diff --git a/court/scotus_zivotofsky_v_kerry_2014_13_628.json b/court/scotus_zivotofsky_v_kerry_2014_13_628.json
new file mode 100644
index 0000000000000000000000000000000000000000..cfbd6daf3898b50314878261a7b1ffd81b502eb2
--- /dev/null
+++ b/court/scotus_zivotofsky_v_kerry_2014_13_628.json
@@ -0,0 +1,1413 @@
+{
+ "case_id": "scotus_zivotofsky_v_kerry_2014_13_628",
+ "case_name": "Zivotofsky v. Kerry",
+ "docket": "13-628",
+ "term": "2014",
+ "oyez_url": "https://www.oyez.org/cases/2014/13-628",
+ "question_presented": "Does a federal statute that directs the Secretary of State to record the birthplace of an American citizen born in Jerusalem as \"Israel,\" if requested to do so, impermissibly infringe on the President's power to recognize foreign states?",
+ "case_summary": "In 2002, Manachem Zivotofsky was born in Jerusalem to parents who are United States citizens. Manachem's parents requested that the U.S. State Department record his place of birth on his passport as \"Israel,\" in accordance with Section 214(d) of the Foreign Relations Authorization Act of 2003 (Act). The State Department refused and instead issued Manachem a passport that listed \"Jerusalem\" as his place of birth. His parents sued the Secretary of State on his behalf and sought the enforcement of Section 214(d). The district court dismissed the case on the grounds that it presented a non-justiciable political question. The U.S. Supreme Court, in Zivotofsky v. Clinton, reversed that holding and remanded the case. On remand, the district court held that Section 214(d) \"impermissibly intereferes\" with the President's exclusive power to recognize foreign states. The U.S. Court of Appeals for the District of Columbia Circuit affirmed and held that the section goes beyond the scope of Congress's passport power to affect United States foreign policy, which is a realm the Constitution reserves for the executive branch.",
+ "applicable_law": "Does a federal statute that directs the Secretary of State to record the birthplace of an American citizen born in Jerusalem as \"Israel,\" if requested to do so, impermissibly infringe on the President's power to recognize foreign states?",
+ "full_conclusion": "The federal statute unconstitutionally usurps the President’s power to recognize foreign nations as it relates to passports.",
+ "evidence_pro": [
+ "Well, they may well, Your Honor. But I do -- but I do think the essential problem here with -- with what 214 does is that it tells the Executive to communicate a message that the Executive believes contradicts our position and undermines the President's credibility as our sole spokesman in matters of diplomacy. And there is not an issue on which the President's credibility could be more important than the question of the status of Jerusalem. The question of the status of Jerusalem is the most vexing and volatile and difficult diplomatic issue that this nation has faced for decades. It goes all the way back to President Truman. And the fact of the matter is that the parties in the region, the nations in the region, and frankly people around the world and governments around the world scrutinize every word that comes out of the United States Government and every action that the United States Government takes in order to see whether we can continue to be trusted as an honest broker who could stand apart from this conflict and help bring it to resolution. And there is no doubt that Section 214(d), when it was enacted, had a serious adverse effect calling our credibility into question. You can just look at the statements from foreign parties that are in the Joint Appendix and the State Department communique at pages 231 to 233. You can look at contemporaneous press accounts from that time, and it seems to me without -- of course, if we were required to implement this, we would do everything we could to try to mitigate the problem. But it seems to me that the right -- it is quite important for this Court to understand that there is a very serious risk that that harm to our credibility as an honest broker on this very serious vexing issue could be called into serious question--",
+ "--I think that's, with all due respect, too easy an assumption, Your Honor. The difference between when this statute was enacted and it did give rise to very serious problems that we had to work very hard to try to get under control. The difference between then and now, there's two very important differences, and they lead to a very important conclusion. The first important difference is it won't be one branch of the United States Government saying that this should happen. It will be two branches of the United States Government saying it should happen. It won't be that we will -- that this statute will have been enacted, but it won't be enforced. It will be enforced. And the consequence of those two things together is that the credibility of the executive the credibility of the President on this fundamental question of where the United States stands on the status of Jerusalem until the parties work it out will inevitably and seriously be called into question and into doubt. Foreign governments, foreign peoples will not be able to have complete confidence that the position that the President announces on behalf of the United States is, in fact, the position of the United States. That is exactly why Section 214 violates the separation of powers, even if you conclude that Congress might have some residual power, which we obviously strongly disagree with. The official position of the United States is that Jerusalem, we don't recognize any nation's sovereignty over Jerusalem until the parties have worked that issue out on their own. And what this -- what this statute does if it was enforced will undermine the credibility of our -- of the President's ability to maintain that critically important diplomatic position as we move forward. Thank you.",
+ "Well, let me I'm delighted to talk about it, but before I do, let me actually address that. I don't think you necessarily have to address the question of exclusive power to rule for us, and here's why: I think that, given the petitioner's position that 214(d) does not change recognition, the official recognition position of the United States, and the Senate amicus brief saying it doesn't change official recognition position of the United States, then that's a given, that the official recognition position of the United States is that we are not recognizing any nation's sovereignty over Jerusalem at this point until the parties work it out. With that as a given, the separation of powers problem with Section 214(d) is that it forces the Executive Branch to engage in diplomatic communications that contradict our official recognition position and undermine the President's credibility, and that--",
+ "--That's true, Justice Sotomayor, but, you know -- and this question about whether place of birth designations are necessary on passports is actually one that Congress asked the Comptroller General to study back several decades ago and there were a series of studies made, and the conclusion of those studies, which you can find in the current version of the Foreign Affairs Manual, not the one in the joint appendix, but the one on the State Department's web site, is that you really have to have them for two reasons. And the first is that very often foreign nations require place of birth information to let you travel to that nation, so it's going to be highly inconvenient if it's not in the passport. And second, law enforcement and counterterrorism officials were quite concerned that passports were going to become less effective in their efforts if you removed the place of birth designation.",
+ "--You're requiring the President to make statements thousands of times that contradict the official recognition position of the United States. Now, it is true that -- that a border guard in a -- in a country where a person is traveling won't know whether this particular passport is one of them, I suppose, unless they ask for place of birth information -- city of birth information. But unless they ask that, they won't know with the particular passport. But what everyone will know, what foreign sovereigns will know, what the parties in this region will know is that thousands of times the Executive Branch is issuing passports that contradict our official recognition position with respect to persons born in Jerusalem.",
+ "I don't think that I think the credibility of the assertion is proven by history. With all due respect, Mr. Chief Justice, even though President Bush issued that statement which said this didn't change the policy of the United States and that we weren't going to enforce it because he was treating it as advisory, the consequences that ensued in the Middle East in October of 2002 were that there were mass demonstrations in Jerusalem, thousands of people in the streets, some turning violent. The Palestinian parliament met and voted for the first time to declare Jerusalem the capital of the Palestinian state, No longer forbearing on that issue. And if you look at pages--"
+ ],
+ "evidence_def": [
+ "We are providing two alternative arguments, Justice Kagan: One saying that this is does not amount to recognition; or if the Court decides to reach the separation of powers question and views this as somehow implicating the recognition clause, that at this point the law passed by Congress would trump the President. Allowing the State Department's say-so to control because it's an expert in foreign relations would be abdicating an independent function and would turn the President into an autocrat whose word controls. We suggest that this is analogous, the recognition power, is analogous to the President's authority to enter into executive agreements to resolve foreign claims, and that just as though that is not an explicit authorization provided to the President, it's also not exclusive, and the agreements entered into by the President cannot contradict or run counter to the express will of Congress. With regard to the international response to this, the consequences, first of all, described by the Solicitor General are grossly exaggerated. And what the world knows could be the -- first of all, the United States State Department could make clear in their statements, as they did with Taiwan, that this does not change the United States' policy with regard to the sovereignty over Jerusalem. And because the passports would be indistinguishable from those who are born elsewhere, there's no continuing statement. While this may initially have some impact, over time, and I propose a short time, particularly if the United States makes that statement, this will become a nonissue because there's no continuing--",
+ "We've provided to the Court alternative options for resolving this issue. Our primary position, as I said at the outset, is that what is written in this statute does not amount to a formal recognition of sovereignty because the language of the statute itself is very narrow. It begins by saying that, for the purposes of, for the narrow purposes of recording a place of birth on a passport or a Consular Report of Birth Abroad, that is where -- what this statute provides for. It also does not state that in all circumstances you have to list Israel as the place of birth. It is merely giving the individual choice.",
+ "But recognizing an individual as an American citizen facilitates the transfer and the movement of American citizens across borders. This -- this passport, if it were to list Israel pursuant to this law, would be indistinguishable from all the other passports of individuals born in Tel Aviv or Haifa or anywhere else in Israel. That passport would not, when shown, be making any kind of political statement. It would merely be identifying the individual by their name, date of birth, place of birth, as all American passports of individuals identify them.",
+ "--There -- well, there is review, and even -- both to respond to Justice Sotomayor and Justice Breyer, Justice Story and William Rawle both recognize that authority of Congress to review. Justice Story also said that, \"If such recognition is made, it's conclusive upon the nation unless, indeed, it can be reversed by an act of Congress repudiating it. \" And then he went further to say that, \"If the President refuses to recognize, then he said Congress may, notwithstanding, solemnly acknowledge the sovereignty of the nation or party. \"",
+ "Mr. Chief Justice, and may it please the Court: How an American is identified in his or her passport or U.S. Consular Report of Birth Abroad, including the place of birth designation, does not amount to formal recognition by the United States of that designated location's sovereign status. This is the principal reason why Congress's law authorizing Jerusalem-born citizens to carry passports that say they were born in Israel is a legitimate congressional exercise of Congress's power to regulate foreign commerce, naturaliza--",
+ "This statute was rectifying a misguided policy of the State Department which enabled individuals born in Israel proper, whether in Tel Aviv or in Haifa, who were opposed politically to the State of Israel to remove that sovereign, to remove reference to Israel from their passport, but it did not allow the flip. It did not allow those who are born in Jerusalem and who live under the sovereign government of Israel, who wish to put Israel on their passport, to put Israel on their passport."
+ ],
+ "disposition": "respondent",
+ "ground_truth_verdict": "respondent",
+ "ground_truth_rationale": "SCOTUS decision: majority opinion. Winning party (Oyez): Kerry. Vote: 6-3.",
+ "vote_breakdown": "6-3",
+ "majority_vote": 6,
+ "minority_vote": 3,
+ "decision_type": "majority opinion",
+ "has_dissent": true,
+ "vote_lineup": {
+ "Kennedy": "majority",
+ "Ginsburg": "majority",
+ "Breyer": "majority",
+ "Sotomayor": "majority",
+ "Kagan": "majority",
+ "Thomas": "majority",
+ "Roberts": "minority",
+ "Alito": "minority",
+ "Scalia": "minority"
+ },
+ "majority_author": "Kennedy",
+ "dissent_authors": [
+ "Scalia"
+ ],
+ "majority_opinion_excerpt": "",
+ "dissent_opinion_excerpt": "",
+ "petitioner_arg_summary": [],
+ "respondent_arg_summary": [],
+ "oral_argument_transcript": [
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "We'll hear argument first in Case 13628, Zivotofsky versus Kerry-- Ms. Lewin."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Mr. Chief Justice, and may it please the Court: How an American is identified in his or her passport or U.S. Consular Report of Birth Abroad, including the place of birth designation, does not amount to formal recognition by the United States of that designated location's sovereign status. This is the principal reason why Congress's law authorizing Jerusalem-born citizens to carry passports that say they were born in Israel is a legitimate congressional exercise of Congress's power to regulate foreign commerce, naturaliza--"
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "Suppose that -- suppose that the President and the Secretary of State put on the passport the place of birth -- I've written it out -- the place of birth on this Jerusalem-born citizen's passport has been listed as Israel at the holder's request. This designation is neither an acknowledgment nor a declaration by the Department of State or the President of the United States that Jerusalem is within the borders of the State of Israel. Could the President, under existing statute, and the Secretary of State, under existing statute, put that statement on the passport?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes, Your Honor, they could put that statement on the passport. But we--"
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "But if -- if -- if -- Congress then passed a law saying that that statement had to come off the passport, could Congress do that?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes, Justice Kagan. The -- the -- we -- there's no restriction on the initial granting of recognition by the President. But by the same token, the Congress has the ability afterwards, upon deliberation, to decide if they disagree with that recognition. But in the case that Justice Kennedy suggested--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "Has that ever happened?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes."
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "In the history of the United States where Congress asked the President to declare that it was not recognizing someone, has Congress ever recognized it?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes, Justice Sotomayor. In -- in 1898, Congress passed a joint resolution for the recognition of the independence of the people of Cuba over the initial opposition of President McKinley, and that ended up recognizing the independence of Cuba."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "If you were careful to say at the outset that this is not recognition, the court of appeals decision, I think it was in the Judge Tabor concurrence, said that both parties urge upon us that they -- that the power of recognition is involved here and Congress has done it. And then, of course, the Attorney General takes takes -- the opposite position that the that -- this, A, this is recognition and, B, that's why it's void. Did you change your position here, or am I just misinterpreting the way this -- the court of appeals discussed it?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "We've provided to the Court alternative options for resolving this issue. Our primary position, as I said at the outset, is that what is written in this statute does not amount to a formal recognition of sovereignty because the language of the statute itself is very narrow. It begins by saying that, for the purposes of, for the narrow purposes of recording a place of birth on a passport or a Consular Report of Birth Abroad, that is where -- what this statute provides for. It also does not state that in all circumstances you have to list Israel as the place of birth. It is merely giving the individual choice."
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "The the -- does -- the provision is part of a section, Section 214. And I think you're trying to read G, and so it is disassociated from the purpose that's expressed throughout 214, that is, that Jerusalem is the capital of Israel. Congress said that, and you -- you are trying to deal with a piece of one section without regard to the -- to the thrust of the whole provision, that Congress has said we think Jerusalem is the capital of Israel."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Justice Ginsburg, the -- that is correct. This section of the statute should be reviewed and the constitutionality of it be determined on its own. But the Court should look not at what Congress may have intended by the entire section but, rather, what this section actually did. And this section, as I said, gives the individuals a choice and does not confer formal recognition. There are benefits that come with formal recognition."
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "You say that. But the -- you say -- I've heard exactly what you said. And I think that's certainly a reasonable position. You could read this and say it doesn't really say anything about recognizing anything. But the Solicitor General of the United States, after conferring with the State Department, says, \"Since Israel's founding, every President has adhered to the position that the status of Jerusalem should not be unilaterally determined by a party. \" and he adds, \"by requiring the President to contradict his recognition position regarding Jerusalem in official communications with foreign sovereigns, the section unconstitutionally encroaches on the President's core recognition authority. \" So he has a different view. He thinks it is our policy not to recognize Jerusalem as the capital, which you apparently agree with, and he thinks that this does have some tendency at least to suggest the contrary. Now, I'm a judge. I'm not a foreign affairs expert. And when he tells me that, and they are foreign affairs experts in the State Department, how can I say that I'm right even if I agree with you, and they, who are in charge of foreign affairs, are wrong when they make those two statements, which certainly sound plausible."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Two points, Justice Breyer. The first is that what goes on a -- on passport as a place of birth is not tantamount to recognizing foreign sovereignty. Taiwan is a perfect example. The State Department puts--"
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "I want -- and I must interject at this point because you emphasize the Taiwan example and it seems to me it's most distinguishable. Taiwan and China maintained from the beginning there is only one China, and so Taiwan is a place name. It's a region. It's in no way recognizing, no -- there's no question of recognition in the Taiwan event."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--That's correct, Justice Ginsburg. So what you put on the passport does not automatically confer recognition--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "No, no, to go back to my question--"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--But the question--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "--which I'd like an answer to. I don't think that Taiwan is a counterexample since the policy of the State Department in that thing that's FAM, which is the Foreign Affairs Manual, says pretty clearly that if there's a dispute about the larger power, i.e., China, you always can put in your passport the smaller place of birth, like a city or I would think your Taiwan. So I don't hear the Department or I guess I'm saying the experts saying that the Taiwan example conflicted with their policy."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "China objected to that. Did China not object to it?"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "China may have done -- I want an answer to this question--"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes, that is correct, Justice Scalia."
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "--not whether China objected or didn't object or so forth. I'm not interested in that. I'm interested in what we, as judges, do when the State Department and those charged say those other things were not contrary to our recognition policy. That's what they think, and this is."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "So one last point on Taiwan--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "I'd like the first point. What am I supposed to do in respect to that?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Well, the first -- the first point is that this -- what goes on the passport does not confer the benefits of formal recognition of sovereignty. This does not entitle the government, the foreign government to bring cases in -- in our courts, to the protection of sovereign immunity or to the act of -- act of state doctrine. What goes on a passport, therefore, does not amount to sovereign recognition."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "Ms. Lewin, I -- I thought your position was you couldn't care less if the State Department thinks that this is going to interfere with our relations with the Palestinians, that Congress is entitled to do what it is authorized to do under the Constitution, even when that contradicts -- let's assume they can't recognize a country, but they can declare war on a country, can't they--"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "--that the State Department has decided to recognize and -- and to be friendly with?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes, Justice Scalia."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "Congress can do that."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "That is correct. Congress can do that. And the test, if there is a conflict 20--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "And you say can do the same here. And -- and the fact that the State Department doesn't like the fact that it makes the Palestinians angry is irrelevant."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Absolutely, Justice Scalia. That is correct and--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "If you take that position, which explains it, then what do you think of Justice Story who writes in 1833 that, \"The exercise of the prerogative of acknowledging new nations and ministers. \" --and he makes clear that involves whether a city or a region is part of a country, et cetera, he says, it's an executive function. Some argue, as we -- I think we've just heard, that Congress could make that decision, too, but that hasn't been decided. And he concludes that, \"A power so extensive in its reach over our foreign relations could not properly be conferred on any other than the Executive Department will admit of little doubt. \""
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Justice--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "So he is saying, of course, you have to have one person deciding such a thing, and that has to be the Executive. That's 1833, pretty knowledgeable about the founders' intent."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--But that is a rather extreme position, number one, to suggest that the Executive Branch would have not only the authority to recognize a foreign government, but also at the State Department's say-so, that automatically would end the question or any review by any other branch. The -- the State Department merely says that the power's influence upon--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "But what -- there is always review with the power of the purse, and there's always review with not appointing an ambassador. There -- there is review in a variety of alternative ways by Congress. It just may not be the way you prefer, that they could pass a resolution contradicting that that would have any legal course."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--There -- well, there is review, and even -- both to respond to Justice Sotomayor and Justice Breyer, Justice Story and William Rawle both recognize that authority of Congress to review. Justice Story also said that, \"If such recognition is made, it's conclusive upon the nation unless, indeed, it can be reversed by an act of Congress repudiating it. \" And then he went further to say that, \"If the President refuses to recognize, then he said Congress may, notwithstanding, solemnly acknowledge the sovereignty of the nation or party. \""
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "I suppose -- I suppose you could also say Hamilton in 1787 or whatever it was trumped Storey in 1830, right? I mean, he said pretty much the exact opposite, that the recognition provision was really just a trivial formality."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Hamilton also switched his position before he was in the administration and after he was in the administration. What that would seem to show, Mr. Chief Justice, is that it's not clear the history--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "Ms. Lewin--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "In any case, this is not your main point, is it? You're -- you're being either forced into or willingly yield yourself to arguing that -- against the proposition that if this is recognition, it is invalid. But your main position is this is not recognition; it just has an effect on on the State Department's desire to -- to make nice with the Palestinians, and your position is Congress has no -- no compulsion to -- to follow that, assuming it can't recognize."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--That is correct."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "You don't claim that this is recognition."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "We do not claim that this is recognition. In fact, if there was a conflict 20--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "--Ms. Lewin, one factual matter I'd like. I see in the record that your application for the passport asked for “ Jerusalem, Israel ”, but that was changed. Was it changed in litigation? Was there an actual official request to change it in your application?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--The initial request was made purely because of a misunderstanding of what the law initially required. And it was a common--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "Answer my question. Did you apply formally to have it changed or did you just take this -- that position in litigation?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--The position was then subsequently taken in litigation. But in subsequent renewals of the passport, too, it has been just the request that “ Israel ” be put on the passport, and it has come back with “ Jerusalem ”."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "May I ask you another -- another factual question? When Menachem was born, was he issued a birth certificate by the Israeli authorities?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "And the United States recognizes that as -- as a lawful exercise of Israeli authority, to issue a birth certificate for a child born in Jerusalem?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "I believe they do, Your Honor."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "So what -- this is a question I would ask the Solicitor General, but I don't completely understand what the position of the United States is regarding Israeli sovereignty over Jerusalem. I understand it is the position of the United States that Israel does not exercise full sovereignty over Jerusalem, but in that -- in this instance, the issuance of a birth certificate, and others I can think of, I suspect the United States recognizes that Israel is lawfully exercising attributes of sovereignty over the territory of Jerusalem. Is that correct? So if someone -- let's say an American citizen committed a crime in Jerusalem, would the United States take the position that the Israeli government has no lawful authority to prosecute that person for the crime?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "I do not believe so, Your Honor. I believe that they would feel that the Israeli government has the authority to prosecute that crime."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Ms. Lewin, if I can ask you, if your primary position is that this is not a recognition statute, can we talk a little bit about what it is? I mean, why -- what -- what is the design, what is the effect of this statute other than as something that goes to recognition?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "This statute is a statute that was created to give individuals the right to self-identify as they choose that they were born in Israel."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "But the United States Government does not usually give people that right to self-identify in this way. In other words, I think this was the Chief Justice's question in the first argument, if you're an American citizen born in Northern Ireland, you can't get the right to say Ireland. For that matter, if you are an American citizen born in Jerusalem today, you can't get the rights to say Palestine. This is a very selective vanity plate law, if we might call it that. And -- and it's selective because Congress had, it appears to me, and it's consistent with the rest of the statute, as Justice Ginsburg said, a real view that this was the self-identification it wanted. In other words, the ability of American citizens to say yes, I was born in Jerusalem, and that means I was born in Israel. That and only that self-identification is allowed."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "This statute was rectifying a misguided policy of the State Department which enabled individuals born in Israel proper, whether in Tel Aviv or in Haifa, who were opposed politically to the State of Israel to remove that sovereign, to remove reference to Israel from their passport, but it did not allow the flip. It did not allow those who are born in Jerusalem and who live under the sovereign government of Israel, who wish to put Israel on their passport, to put Israel on their passport."
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "What about Palestinians who were born in Jerusalem and want to have Palestine as their place of birth? That -- that existed until 1948, that option."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Correct, Justice Ginsburg, because at that point there was, before 1948, a Palestine. So the -- the law was not going so far--"
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Now, people can -- Palestinians cannot -- American-born Palestinians cannot do that. And that suggests that Congress had a view, and the view was that Jerusalem was properly part of Israel."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--And that is because this statute was dealing with an existing sovereign that you either remove from the passport or put on the passport. They weren't complicating the situation by putting in nonrecognized sovereigns or other entities. They said you either put it on or you take it off. We'll give you the choice--"
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "If an American citizen is born in Barcelona, Spain, is that citizen allowed, by the State Department, to put Barcelona as place of birth?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--If they wish to remove the country of birth and list the smaller entity? Yes."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "And is that a -- is that a vanity plate for people who believe in Catalan independence?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "It is enabling an individual to exercise their choice to self-identify as they choose, yes."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "But, again, your argument -- and you're consistent on this, your first argument is that this is not recognition. Now, suppose the State Department, and I think this is its position, says this is recognition. If we defer to the State Department's judgment, to the government's executive judgment on that point, and the government said this is recognition, and you say it isn't recognition, why doesn't the government trump? If the government -- if the Congress really wants to test its power, it can pass a law saying you must recognize Israel as being the legitimate government of Palestine, but it has not done that. And since it has not done that, it seems to me the government's argument trumps."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Justice Kennedy, you are correct. The way the balance of powers works is that the Executive Branch has the right to recognize a sovereign. However, if Congress deliberates, passes legislation, and that legislation is signed into law, then Congress's position trumps."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "But you -- but you say that this isn't recognition. So the ultimate conflict is not before us and -- and, therefore, the government's policy, which says that this is recognition, should be given deference and it trumps."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Well, Your Honor, if it does not amount to recognition, then Congress had the authority to pass this legislation pursuant to its passport authority."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "I -- I guess there are competing canons here. I mean, one is, I suppose, that we listen to the State Department on matters of foreign affairs, but I suppose another one is that we do not hold a -- an act of Congress to be unconstitutional and thereby ineffective. So that seems to me a draw, doesn't it?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes, Justice Scalia."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "So the State Department says this amounts to recognition, and Congress says whether it does or not, we want -- we want this person to be able to list Israel."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "That is correct. And since this was signed into law by the President, the law right now trumps whatever the Executive Branch may say."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Can I -- can I give you a hypothetical, Ms. Lewin? Suppose that Congress passed a law and this law said that the Secretary of State had to send an official letter to all foreign ministers whenever a U.S. citizen was born in Jerusalem, and that official letter from the Secretary of State said says just -- it announces that a new American has been born in Israel. Would that be constitutional?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Excuse me, this would be a law passed?"
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "This is a law passed by Congress and it says every time a U.S. citizen is born in Jerusalem, the Secretary of State has to send an official letter to every other foreign minister saying that a new American has been born in Israel."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Yes, that would be constitutional."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "That would be constitutional, even though the -- the Congress is basically telling the Secretary of State to engage in a certain kind of diplomatic communication with other foreign countries."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "The description of the law that you provide seems to be very similar to what a passport does. A passport recognizes an individual as an American citizen for purposes of communicating that information to the foreign government."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Yes, exactly right. That was going to be my point, that it was-- [Laughter] --that it was extremely similar to what a passport does, that both are forms of diplomatic communication, and that what we usually say about diplomatic communication is that whatever Congress's other foreign affairs powers are, the power of diplomatic communication belongs to the President and the President alone; that in that realm we only speak with one voice. And so I guess I have to sort of say that that answer that you gave me, that this could -- that Congress could say to the Secretary of State, here's the diplomatic communication that you have to send to other foreign ministers, seems, well, a little bit shocking."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "But recognizing an individual as an American citizen facilitates the transfer and the movement of American citizens across borders. This -- this passport, if it were to list Israel pursuant to this law, would be indistinguishable from all the other passports of individuals born in Tel Aviv or Haifa or anywhere else in Israel. That passport would not, when shown, be making any kind of political statement. It would merely be identifying the individual by their name, date of birth, place of birth, as all American passports of individuals identify them."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "So you would say in Justice Kagan's hypothetical, maybe the letter that's required to be sent to every foreign head of state would be unconstitutional, but that doesn't mean that the passport is, because the passport is used primarily for purposes of identification, and it's only the letter that makes it something else."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Correct, Justice Roberts."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, if you say that--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Justice Kennedy."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "Do you want us to say in our opinion that this is not a political declaration?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "This is not a political declaration, that's correct, Justice Kennedy."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, then, I'm not sure why that Congress passed it, then."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Congress passed it to give these individuals the right to self-identify as they choose, because individuals in general have that ability on their passport to choose and designate--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "I thought it was a Federal crime to say that you were born in the United States when you weren't on an official document. So why -- why is it that it's okay for Congress to say something that hasn't happened, meaning to say that someone born in Jerusalem is actually born in Israel? It's different than somebody who's born in -- in Taiwan saying I was born in America."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Since 19--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "I mean, they can self-identify all they want, but can they do that?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes. Since 1948, Israel has acted as the sovereign over western Jerusalem where our client was born, and since 1967 over the entire area of Jerusalem. So -- so--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "I know what it's done, but has the U.S. recognized -- has any President since 1948 recognized Israel's sovereignty over that area?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--In a formal sense, no. But allowing individuals to recognize that, that would not be a false statement."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "--Ms. Lewin, may I just I know your time is -- but if I might just go back to the thought that the Chief Justice gave you that you agreed with. Here's the way a passport begins. It begins, \"The Secretary of State of the United States of America hereby requests all who it may concern to permit the citizen. \" blah, blah, blah. That's what that's the -- you know, the Secretary of State requests all of these who are going to be looking at this passport. And then in Haig v. Agee, we described a passport as a letter of introduction in which the issuing sovereign vouches for the bearer and requests other sovereigns to aid the bearer. So this is, this passport, it seems, both on what it says itself and on what we've said about it, it's like a letter from the Secretary of State. It's a communication."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "It is a communication merely to facilitate this transfer of individuals as American citizens, not to make public statements about where they were born or where they're from or what countries the United States recognizes. If I may reserve the rest of my time."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Thank you, counsel. General Verrilli."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Mr. Chief Justice, and may it please the Court: Let me get to the heart of the problem with Section 214(d). Even if Section 214(d) does not officially change or formally change the recognition position of the United States, it tries to deny the President the power to give effect to our official recognition position by forcing Executive Branch officials to issue official diplomatic communications that contradict that position."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "What -- what if there were a law that said precisely pretty much what you just said? The law says, okay, Mr. President, you can recognize whoever you want, but if you recognize this -- this country, this government, we're going to treat it as if you hadn't recognized this government. For all purposes of domestic law, we're going to pretend -- we're going to operate on the assumption that you have recognized this country."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I think there would be limits to Congress's ability to do that. We think that the recognition power that the President possesses necessarily includes the power to give effect to recognition decisions."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "So -- so that law would be unconstitutional?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "To the extent it said for all purposes, yes, because--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, isn't that exactly what the Taiwan Relations Act says? What it says is, \"The absence of diplomatic recognition shall not affect the application of the laws of the United States with respect to Taiwan. \""
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--No, Mr. Chief Justice, that's quite different. The Taiwan Relations Act was an act that was an exercise of the necessary and proper power to implement the President's foreign relations judgment about how Taiwan should be treated."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, let's say the President -- let's say the President did not want to recognize Taiwan and Congress passes a law that says for every purpose under American law, we will treat Taiwan as if it had been recognized?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "That might raise a serious Constitution question, but that isn't the situation that was -- it wasn't the case when it was enacted, it's not the case now, and it's -- and it's different from the current situation. The fundamental problem with Section 214(d) is that it purports to try to force the Executive Branch to issue official diplomatic communications that contradict the position of the United States."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "But is that really true? Suppose -- could Congress pass a law saying that every passport -- every passport issued to an American citizen must list the place of birth, including country, and that for this purpose, the country is the nation that issued the birth certificate to that individual? Could -- could Congress do that?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I -- I think that that -- that in a situation like that, the Court ought to defer to the Executive Branch's judgment that the place of birth listing can have significant diplomatic consequences. We have had policies in place for decades in this country that align place of birth designations with our official recognition policy. The reason we do that is because foreign sovereigns look to these communications as indicative of where we stand on what--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "If it -- if it is within Congress's -- if it is within Congress's power, what difference does it make whether it antagonizes foreign countries?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Well, there are certain things that are within Congress's power that would antagonize foreign countries that wouldn't raise a separation of powers problem, of course, like a trade embargo or a travel ban. But--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "And this may be one of them. So--"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--This is not one of them."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "--the mere fact that it upsets foreign relations doesn't prove a thing."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "No. The critical point, Your Honor, is that what this statute does that those other statutes don't do is it requires the Executive Branch, the President himself and the Executive Branch itself, to communicate a message that contradicts the official recognition position of the United States, undermining the President's credibility and preventing the President from being able to speak with one voice credibly."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "But why couldn't you have a disclaimer of the kind that I've explained to the Petitioners' counsel. She said that would be perfectly lawful, for you to say it's not the position of the State Department, this is not an indication that Israel is -- has jurisdiction over Jerusalem."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Your Honor--"
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "Why wouldn't that solve the problem?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--It doesn't solve the problem because the issuance of the disclaimer is a credibility hit. It undermines the credibility of the President because what is -- think about what it's actually saying. What it's actually saying in this context is yes, we're issuing thousands of passports that identify persons born in Jerusalem as being born in Israel; yes, the Congress of the United States required that; but pay no attention to it really; it doesn't have any bearing on recognition."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "If it had -- if it were such a big deal, why did the Chief Executive at the time sign it?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Well, the Chief Executive issued a signing statement which really was, in effect, a disclaimer, in 2002. President Bush's statement said in 2002, this does not change our official recognition policy and we're going to treat it as advisory, and that did not have the effect of--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "So we should give no weight to the fact that the Chief Executive signed the law that he is now saying has such a dramatic that his successor, but I gather the position is the same -- is now saying has such deleterious effects on American foreign policy? Well, as a general matter, does that have any consequence at all?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--No. I mean, I think this Court -- held think this Court held in Myers that the fact that one President signed a law into -- signed a law that violated separation of powers doesn't have any effect."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Oh, no. I know, I'm not suggesting it does, although that's a separate question. But it does go to the credibility of the assertion that this is going to have such dramatic effects on American foreign policy."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I don't think that I think the credibility of the assertion is proven by history. With all due respect, Mr. Chief Justice, even though President Bush issued that statement which said this didn't change the policy of the United States and that we weren't going to enforce it because he was treating it as advisory, the consequences that ensued in the Middle East in October of 2002 were that there were mass demonstrations in Jerusalem, thousands of people in the streets, some turning violent. The Palestinian parliament met and voted for the first time to declare Jerusalem the capital of the Palestinian state, No longer forbearing on that issue. And if you look at pages--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "But that's partly because the Executive Branch made such a big deal out of it. I mean, they issue a statement saying, this is unconstitutional and all that. They could easily have said, this is no big deal, they're just letting whoever is born there pick the name they want to put on--"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--With all due respect, Your Honor--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "--nothing to see here, move on, and we're proving that by going ahead and signing it. And over the -- over the intervening course, the executive has litigated this. It's a self-fulfilling prophecy that it's going to be such a huge deal."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--No, Mr. Chief Justice, with all due respect, I think on this question that you're asking me, this is a place where the Court should accord deference to the judgments of the Executive Branch and the State Department, in particular. If the State Department had thought, if the executive had thought that it could solve the diplomatic problem by minimizing the effect of this provision, pretending as though it wasn't going to have this effect, certainly they would have followed that course."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "Not necessarily."
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "What they're asking you to do is to look -- they're asking the government to lie."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I think that--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "I'm not that's exactly what you're saying the government should the executive department should not do."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--I do think the problem here is that the executive made a considered judgment in 2002 that this couldn't sensibly be handled that way. That's--"
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "So how are we--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "What if it just says “ Disputed ”, parentheses after it, “ Disputed ”? Then I gather they wouldn't be lying. They would be telling the truth."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Well, I don't know. I mean, a couple things about that. First, Your Honor, that would have the effect of identifying the passports that were issued to people born in Jerusalem on the -- because that would be the reason to put it on. But beyond that, it isn't disputed as a matter of the official position of the United States. The position of the United States 24--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, it's disputed as a matter of the government of the United States. Part of the government says this -- well, actually, no, I mean, Congress is not saying under my hypothetical, this is Israel. It's saying there's a dispute about it, which I would think is about as true a statement as you can make."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Well, there's a dispute certainly among the parties of the region, but I think the whole premise of Petitioner's argument here is that within the government of the United States there isn't a dispute over the recognition issue."
+ },
+ {
+ "speaker": "Breyer",
+ "role": "justice",
+ "side": "court",
+ "text": "--Can you help me with this same question? How should we approach it generally? That is to say, I can think of instances where a similar statute is serving nothing other than administrative matters -- the passport should be red or something -- and I can think of instances where it causes a lot of trouble. But I can think of instances like this one, and I could and you could easily replicate this controversy with Israel in our imaginations, similar controversy with Donetsk and the Ukraine, where we make some agreement with Russia and something similar comes up, or with Iran, and pretend that -- remember that Russia once invaded the northern part of Iran. And all over the world there can be similar kinds of problems where it's debatable what the words of the passport actually mean or how they will be taken by others and what others will think they mean. Now, how do we, who know little about it, determine, when it gets into the realm, that we should stay out of it and let the President and the Constitution gives him that power or should some think we should always intervene, perhaps some never. What in your mind is the right standard? How do we decide?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I do think this Court, the last time the case was here, said that ultimately it was up to the Court to judge the constitutionality of the statute. Of course, we accept that. But in doing so, we believe it is quite important that the Executive Branch get deference on judgments of precisely the kind that Your Honor has identified. This statute is a very rare passport statute. There really isn't any other passport statute like this one that purports to interject an issue of recognition policy into the content of passports."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "General Verrilli, if we agree with the Petitioner, we do not have to confront the constitutional question whether the President has exclusive power over recognition. If we agree with you, we are going to have to grapple with that constitutional question, right? So maybe you want to talk about it."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Well, let me I'm delighted to talk about it, but before I do, let me actually address that. I don't think you necessarily have to address the question of exclusive power to rule for us, and here's why: I think that, given the petitioner's position that 214(d) does not change recognition, the official recognition position of the United States, and the Senate amicus brief saying it doesn't change official recognition position of the United States, then that's a given, that the official recognition position of the United States is that we are not recognizing any nation's sovereignty over Jerusalem at this point until the parties work it out. With that as a given, the separation of powers problem with Section 214(d) is that it forces the Executive Branch to engage in diplomatic communications that contradict our official recognition position and undermine the President's credibility, and that--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "But if it does, then their argument is going to be it does amount to a -- if it does contradict it, then Congress is making its own judgment about recognition. You have to confront that. Are they entitled to do that? I don't see how you can avoid that question."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Well, I'm happy to address it. I will address it now, but I do think that you can decide the question on the ground I just decided without ultimately resolving that question."
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "Couldn't you say that, at a minimum, the Petitioner has conceded that it is not clear that this is recognition?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Yes, that's certainly the case and, therefore, we take as a given that the President's position on recognition, which is the same as the position every President going back to Truman, is the official position of the United States and the executive is being forced to issue diplomatic communications that contradict it."
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "General Verrilli, it is -- the requirement of place of birth on the passport, that doesn't come from the Congress. That comes from the executive, right?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "That's correct. There's a longstanding policy there."
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "And I thought that the purpose of birthplace identified by the government, by the executive, is to identify the person and not it's not something that the President or the executive required out of a foreign policy concern. The purpose of it was to identify the individual; isn't that right?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Yes, that is its primary purpose. But even though that's its primary function within the passport, it has the effect of raising diplomatic foreign policy issues about our recognition position, and that is why we have had in place official policies in the Foreign Affairs Manual going back to the early 1960s that align decisions of place of birth with our recognition policy. And in fact, before they were formalized in the manual, they stretch all the way back to World War II. It's just inevitable that foreign sovereigns are going to react to that, that the way in which we -- the information that we put in that--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "This is a pretty rough way to identify someone. I mean, there are hundreds of John Smith's in the United States."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--That's true, Justice Sotomayor, but, you know -- and this question about whether place of birth designations are necessary on passports is actually one that Congress asked the Comptroller General to study back several decades ago and there were a series of studies made, and the conclusion of those studies, which you can find in the current version of the Foreign Affairs Manual, not the one in the joint appendix, but the one on the State Department's web site, is that you really have to have them for two reasons. And the first is that very often foreign nations require place of birth information to let you travel to that nation, so it's going to be highly inconvenient if it's not in the passport. And second, law enforcement and counterterrorism officials were quite concerned that passports were going to become less effective in their efforts if you removed the place of birth designation."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "Can I ask you the question I asked Ms. Lewin. What exactly is the position of the executive regarding Israel's exercise of sovereign powers in Jerusalem? Is it the case that it is the position of the executive that Israel cannot lawfully exercise any sovereign powers within Jerusalem?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "The position of the executive is that we recognize, as a practical matter, the authority of Israel over West Jerusalem. With respect to the rest of Jerusalem, the issue is far more complicated. It might well be, as a practical matter, although I confess I don't specifically know the answer to the question you asked Ms. Lewin about the status of the birth certificate issued there, it might well be that, as a practical matter, we would accept it as evidence of birth. Of course we would also issue--"
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, it must have been accepted as evidence of birth or the passport would never have been issued."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Well, we do have the consular notification of birth."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "I thought you had to provide a birth certificate--"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Right."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "--in order to get that."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Well, that's right. But as a practical matter, I don't think one can infer anything about our recognition policy from that. We're recognizing practical reality. I do think, for example, Your Honor, if we were to start issuing passports to people born in the Crimea tomorrow that identified Russia as the country of birth, that would carry obvious implications for our foreign policy position, and it would contradict the foreign policy position in a way that could be quite deleterious."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Let's say there's a -- that passports are printed in Country A, not the United States, and there's a printing plant there, and Congress passes a law saying, no, you must have the passports printed in Country B because we don't think you should recognize Country A. Does that interfere with the President's recognition power?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Well, I'm trying try to give you a precise answer to that. If the statute said they may not -- passports may not be printed in Country A because the United States does not recognize Country A, that would be--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Because Congress wished the President would not recognize Country A. So in response to that, we're directing that passports that are now printed in Country A be printed in Country B."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--That would be a harder case than this one, I think, because it doesn't as clearly implicate the President's ability to give effect to recognition power. And one reason it doesn't is because that doesn't affect the content of the diplomatic communication in the way that Section 214(d) does."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "I thought your position was that the President has the exclusive right to decide what interferes with his recognition power."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "No, I think that the President has the right to give effect to his recognition power, and Congress cannot try to command the Executive Branch to act in a manner itself that contradicts the President's recognition decision because that prevents the President from giving effect to that decision. And we do think, to go back to Your Honor's question, that it is an exclusive power with the President. It is -- after all, recognition is not lawmaking. It is an executive function. And one would, therefore, expect that it'd be assigned to the Executive by the Constitution and not to the Congress. And when--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "War making is an executive function, too."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--But with respect to -- with respect to the executive functions around recognition, when Congress wanted the -- excuse me, when the framers wanted the Congress to play a role and the Constitution envisions a role for the framers in those executive functions, it's prescribed. Article II gives the Senate a role in confirming ambassadors, it gives the Senate a role in advice and consent for treaties. And there isn't anything in Article II as a structural matter that gives the Congress -- the Senate or the Congress a comparable role with respect to recognition decisions."
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "If I think that that Congress generally -- that Congress has the authority under the Constitution to require identification information in passports and to specify the identification information that's included, if I -- if I believe that, then the effect of your argument, I guess, is that something that Congress can do is unconstitutional if it affects the recognition power -- the President's recognition authority in -- in some way. Is that the -- is that--"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "No, our position is narrower. I think all you need to decide to decide this case in the government's favor here is that what Congress can't do is use the authority it has to regulate passports, and we acknowledge, as we did in our brief, that Congress has authority to regulate passports. It can't use that authority to command the Executive Branch to issue diplomatic communication that contradicts the government's official position on recognition. And that we would say--"
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "I don't -- I don't like to, you know, just keep going back to the same thing. It seems to me that you could draft a statement that actually furthers your position. This passport does not indicate that the government of the United States and the Secretary of State recognize that Israel has sovereign jurisdiction over Israel, and you'd actually be making your case."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--I appreciate the appeal of that idea, Justice Kennedy, but the problem with it is that the need to make that statement doesn't further the diplomatic interest of the United States--"
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "Ms. Lewin answered, I think quite candidly--"
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "But it doesn't further -- why doesn't it further it?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Because the very need to make the statement calls the credibility of the President's representation of our recognition position into question. And the reason--"
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "But just like the signing statement."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--Excuse me, Mr. Chief Justice."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Just like the signing statement, which said precisely what Justice Kennedy suggested, that the Executive could do at this point."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Right. And it did not have and I -- but I think that's the point. The assigning statement was in the nature of a disclaimer and it did not prevent the damage to the credibility of the United States."
+ },
+ {
+ "speaker": "Ginsburg",
+ "role": "justice",
+ "side": "court",
+ "text": "--General Verrilli, I think the answer to the question that Ms. Lewin gave was that she said yes, the Executive could put that on the passport. But she also said Congress could then pass a law saying, this is antithetical to our view, and that doesn't have to be put on the passport. On the passport is just birthplace, Israel, period. Congress could pass that into law and counter whatever the President does."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "And I do think that's the necessary implication of the Petitioner's argument here, not only that Congress could forbid a disclaimer, but Congress could require that the--"
+ },
+ {
+ "speaker": "Kennedy",
+ "role": "justice",
+ "side": "court",
+ "text": "But that law isn't in front of us."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--But -- but were the -- were the Court to uphold the constitutionality of the law that is in front of you, it seems to me the necessary implication of that would be that Congress could prevent a disclaimer, it could require not just that Israel be listed but Jerusalem, Israel be listed on -- on a country of birth, and it seems to me that those are very serious interferences with the President's--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "General, if I'm understanding your narrow holding, just so that we can underscore it, what you're saying is that Congress can't compel speech by the President with respect to foreign relations."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--I would put it a little more narrowly, Your Honor, that Congress cannot compel the Executive to issue diplomatic communications that contradict the official position of the United States on a matter of recognition. I think that's all that's the question before the Court in this case."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "Well, you see, I -- I pick up this passport, and it says place of birth, Israel. Do I know whether this person was born in Jerusalem or in -- in Haifa?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "No, you don't. But the--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "So how does it -- how does it advertise to the world that -- that the President is contradicting himself? All you know is that the person was born in Israel. It could have been anywhere in Israel."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--The world knows that we will issue thousands of passports to people born in Jerusalem identifying them as born in Israel, and the world knows that we will be doing that because the Congress of the United States required it. And those actions under--"
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "But it is not a communication contained in the passport itself, is it? You're just saying that -- that this -- this piece of legislation advertises to the world what the situation will be, but -- but you're not compelling the President to -- to say that this individual was born in Jerusalem and we're going to say he was born in Israel, because you can't tell that from the passport."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--You're requiring the President to make statements thousands of times that contradict the official recognition position of the United States. Now, it is true that -- that a border guard in a -- in a country where a person is traveling won't know whether this particular passport is one of them, I suppose, unless they ask for place of birth information -- city of birth information. But unless they ask that, they won't know with the particular passport. But what everyone will know, what foreign sovereigns will know, what the parties in this region will know is that thousands of times the Executive Branch is issuing passports that contradict our official recognition position with respect to persons born in Jerusalem."
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "General, in general, when I travel abroad and come back to the United States or when I go to a foreign country and they're stamping my passport, do they have forms that require you to identify the city?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "I'm not aware that they do, Your Honor. I don't know the answer to that. I'm not aware that they do."
+ },
+ {
+ "speaker": "Scalia",
+ "role": "justice",
+ "side": "court",
+ "text": "I know that some of them do."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "Well, they may well, Your Honor. But I do -- but I do think the essential problem here with -- with what 214 does is that it tells the Executive to communicate a message that the Executive believes contradicts our position and undermines the President's credibility as our sole spokesman in matters of diplomacy. And there is not an issue on which the President's credibility could be more important than the question of the status of Jerusalem. The question of the status of Jerusalem is the most vexing and volatile and difficult diplomatic issue that this nation has faced for decades. It goes all the way back to President Truman. And the fact of the matter is that the parties in the region, the nations in the region, and frankly people around the world and governments around the world scrutinize every word that comes out of the United States Government and every action that the United States Government takes in order to see whether we can continue to be trusted as an honest broker who could stand apart from this conflict and help bring it to resolution. And there is no doubt that Section 214(d), when it was enacted, had a serious adverse effect calling our credibility into question. You can just look at the statements from foreign parties that are in the Joint Appendix and the State Department communique at pages 231 to 233. You can look at contemporaneous press accounts from that time, and it seems to me without -- of course, if we were required to implement this, we would do everything we could to try to mitigate the problem. But it seems to me that the right -- it is quite important for this Court to understand that there is a very serious risk that that harm to our credibility as an honest broker on this very serious vexing issue could be called into serious question--"
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "--Why would that be so? No matter how this Court decides, everyone will know what the position of the President is. Everyone will know what Congress thought when they passed this legislation. Whatever we do, that's not going to be changed, and our decision isn't going to be based on any view that we may have about whether Jerusalem should be regarded as part of Israel or the capital of Israel. So why will there be any effect on foreign policy except by people who will misunderstand the situation, either -- either because they really don't understand it or they will exploit it in some way?"
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--I've got -- I've got at least two points to make about that if I could. First, it's not a misperception. It's an accurate perception. One looks at 214 as a whole, not just 214(d). What 214(d) -- what 214 does is try to force the Executive Branch to take a series of steps that no nation would take if it did not recognize the sovereignty of Israel over Jerusalem, and that nations would only take if they did recognize the sovereignty--"
+ },
+ {
+ "speaker": "Alito",
+ "role": "justice",
+ "side": "court",
+ "text": "But Congress did that, so nothing that we do is going to change that or change what Congress thought."
+ },
+ {
+ "speaker": "Donald B. Verrilli, Jr.",
+ "role": "respondent_counsel",
+ "side": "respondent",
+ "text": "--I think that's, with all due respect, too easy an assumption, Your Honor. The difference between when this statute was enacted and it did give rise to very serious problems that we had to work very hard to try to get under control. The difference between then and now, there's two very important differences, and they lead to a very important conclusion. The first important difference is it won't be one branch of the United States Government saying that this should happen. It will be two branches of the United States Government saying it should happen. It won't be that we will -- that this statute will have been enacted, but it won't be enforced. It will be enforced. And the consequence of those two things together is that the credibility of the executive the credibility of the President on this fundamental question of where the United States stands on the status of Jerusalem until the parties work it out will inevitably and seriously be called into question and into doubt. Foreign governments, foreign peoples will not be able to have complete confidence that the position that the President announces on behalf of the United States is, in fact, the position of the United States. That is exactly why Section 214 violates the separation of powers, even if you conclude that Congress might have some residual power, which we obviously strongly disagree with. The official position of the United States is that Jerusalem, we don't recognize any nation's sovereignty over Jerusalem until the parties have worked that issue out on their own. And what this -- what this statute does if it was enforced will undermine the credibility of our -- of the President's ability to maintain that critically important diplomatic position as we move forward. Thank you."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Thank you, General. Ms. Lewin, you have four minutes remaining."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Thank you, Your Honor. Just a couple of points. Justice Sotomayor, this is not requesting that the government lie on a passport. As the Solicitor General said, this is just recognizing a practical reality that Israel is--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "No, it's not. It's the place of birth. If you say Israel, you believe that -- you're saying that you believe that person was born in Israel."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Yes. Well, seven years prior to the passage of this legislation, Congress passed the Jerusalem Embassy Act, and in the Senate brief it's actually referred -- amicus brief, it's referred to in Footnote 10, which had required that the embassy be moved to Jerusalem and provided the President with a waiver--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "And there was a waiver -- and there was a waiver provided and every President has exercised the waiver."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--So this would be, though, recognizing, as was said before, that there is a disagreement, but not--"
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "How could you tell me it's not a lie? You, the United States, are being asked to put on the passport that you believe the place of birth of this individual is Israel, and the government -- and the executive has said, no, we don't think it was Israel, we think it was Jerusalem."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--But the speech is the speech of the individual who has self-identified."
+ },
+ {
+ "speaker": "Sotomayor",
+ "role": "justice",
+ "side": "court",
+ "text": "But the individual is not the one issuing the passport. It's the government. The document says. This is a diplomatic exchange between sovereigns."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "But we are permitting that speech when it comes to West Bank, Gaza Strip, a host of others. We're recognizing and allowing that speech."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "I take it, Ms. Lewin, when you say the West Bank, I take it you think that Congress could pass the identical statute with respect to a child born in Hebron, say."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "Saying that--"
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "That that, too, is Israel?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Correct."
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Yes. Okay."
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "We are providing two alternative arguments, Justice Kagan: One saying that this is does not amount to recognition; or if the Court decides to reach the separation of powers question and views this as somehow implicating the recognition clause, that at this point the law passed by Congress would trump the President. Allowing the State Department's say-so to control because it's an expert in foreign relations would be abdicating an independent function and would turn the President into an autocrat whose word controls. We suggest that this is analogous, the recognition power, is analogous to the President's authority to enter into executive agreements to resolve foreign claims, and that just as though that is not an explicit authorization provided to the President, it's also not exclusive, and the agreements entered into by the President cannot contradict or run counter to the express will of Congress. With regard to the international response to this, the consequences, first of all, described by the Solicitor General are grossly exaggerated. And what the world knows could be the -- first of all, the United States State Department could make clear in their statements, as they did with Taiwan, that this does not change the United States' policy with regard to the sovereignty over Jerusalem. And because the passports would be indistinguishable from those who are born elsewhere, there's no continuing statement. While this may initially have some impact, over time, and I propose a short time, particularly if the United States makes that statement, this will become a nonissue because there's no continuing--"
+ },
+ {
+ "speaker": "Kagan",
+ "role": "justice",
+ "side": "court",
+ "text": "Can I say that this seems a particularly unfortunate week to be making this kind of, \"oh, it's no big deal. \" argument. I mean, history suggests that everything is a big deal with respect to the status of Jerusalem. And right now Jerusalem is a tinderbox because of issues about the status of and access to a particularly holy site there. And so sort of everything matters, doesn't it?"
+ },
+ {
+ "speaker": "Alyza D. Lewin",
+ "role": "petitioner_counsel",
+ "side": "petitioner",
+ "text": "--Well, the -- it is a sensitive issue, but to suggest that what will go on a passport as a place of birth is going to implicate or make it worse, there's no evidence of that. Thank you."
+ },
+ {
+ "speaker": "Roberts",
+ "role": "justice",
+ "side": "court",
+ "text": "Thank you, counsel. The case is submitted."
+ }
+ ],
+ "source": "oyez_scotus",
+ "intervention_triggers": [
+ "An advocate mischaracterizes the factual record or overstates what the lower court held.",
+ "An advocate attempts to reframe the question presented beyond the scope of certiorari.",
+ "An advocate evades a Justice's direct question by pivoting to a different issue."
+ ],
+ "difficulty": "hard"
+}
\ No newline at end of file
diff --git a/croissant.json b/croissant.json
new file mode 100644
index 0000000000000000000000000000000000000000..0ebf8784761822c5ee2d5525b7af850e5f03b395
--- /dev/null
+++ b/croissant.json
@@ -0,0 +1,312 @@
+{
+ "@context": {
+ "@language": "en",
+ "@vocab": "https://schema.org/",
+ "citeAs": "cr:citeAs",
+ "column": "cr:column",
+ "conformsTo": "dct:conformsTo",
+ "cr": "http://mlcommons.org/croissant/",
+ "rai": "http://mlcommons.org/croissant/RAI/",
+ "data": {
+ "@id": "cr:data",
+ "@type": "@json"
+ },
+ "dataType": {
+ "@id": "cr:dataType",
+ "@type": "@vocab"
+ },
+ "dct": "http://purl.org/dc/terms/",
+ "examples": {
+ "@id": "cr:examples",
+ "@type": "@json"
+ },
+ "extract": "cr:extract",
+ "field": "cr:field",
+ "fileProperty": "cr:fileProperty",
+ "fileObject": "cr:fileObject",
+ "fileSet": "cr:fileSet",
+ "format": "cr:format",
+ "includes": "cr:includes",
+ "isLiveDataset": "cr:isLiveDataset",
+ "jsonPath": "cr:jsonPath",
+ "key": "cr:key",
+ "md5": "cr:md5",
+ "parentField": "cr:parentField",
+ "path": "cr:path",
+ "recordSet": "cr:recordSet",
+ "references": "cr:references",
+ "regex": "cr:regex",
+ "repeated": "cr:repeated",
+ "replace": "cr:replace",
+ "sc": "https://schema.org/",
+ "separator": "cr:separator",
+ "source": "cr:source",
+ "subField": "cr:subField",
+ "transform": "cr:transform",
+ "equivalentProperty": "cr:equivalentProperty",
+ "samplingRate": "cr:samplingRate"
+ },
+ "@type": "sc:Dataset",
+ "name": "RI_Bench",
+ "description": "RI-Bench measures whether an LLM acting as the senior role in a real institutional hierarchy discharges the obligations of that role toward material supplied by subordinates. Three public institutional records: ICLR 2024-2026 OpenReview submissions (817 cases), UK Parliament Select Committee inquiries (570 cases), and US Supreme Court cases with oral arguments via Oyez (249 cases). Total: 1,636 cases, each paired with the institution's published outcome.",
+ "conformsTo": "http://mlcommons.org/croissant/1.1",
+ "license": "https://creativecommons.org/licenses/by-nc/4.0/",
+ "url": "https://huggingface.co/datasets/jxtse/RI-Bench",
+ "version": "1.0.0",
+ "datePublished": "2026-11-19",
+ "creator": [
+ {
+ "@type": "Person",
+ "name": "Jinxiang Xie"
+ },
+ {
+ "@type": "Person",
+ "name": "Xinyi Zhang"
+ },
+ {
+ "@type": "Person",
+ "name": "Changjiang Jiang"
+ },
+ {
+ "@type": "Person",
+ "name": "Kexu Liu"
+ },
+ {
+ "@type": "Person",
+ "name": "Qi Yang"
+ },
+ {
+ "@type": "Person",
+ "name": "Yuxin Su"
+ }
+ ],
+ "keywords": [
+ "multi-agent LLM",
+ "role integrity",
+ "deliberation",
+ "hierarchical synthesis",
+ "obligation prompting",
+ "benchmark"
+ ],
+ "citeAs": "@misc{ribench2026, title={{RI-Bench}: Measuring Role Integrity in Hierarchical Multi-Agent {LLM} Deliberation}, author={Xie, Jinxiang and Zhang, Xinyi and Jiang, Changjiang and Liu, Kexu and Yang, Qi and Su, Yuxin}, year={2026}, howpublished={\\url{https://huggingface.co/datasets/jxtse/RI-Bench}}}",
+ "isLiveDataset": false,
+ "distribution": [
+ {
+ "@type": "cr:FileSet",
+ "@id": "open_review-files",
+ "name": "open_review-files",
+ "description": "ICLR 2024-2026 paper full text in Markdown, converted from OpenReview PDFs and de-identified.",
+ "encodingFormat": "text/markdown",
+ "includes": "open_review/iclr*.md"
+ },
+ {
+ "@type": "cr:FileSet",
+ "@id": "open_review-json-files",
+ "name": "open_review-json-files",
+ "description": "Per-case JSON oracle (reviewer scores, rebuttal, meta-review, ground-truth PC decision) paired with each .md.",
+ "encodingFormat": "application/json",
+ "includes": "open_review/iclr*.json"
+ },
+ {
+ "@type": "cr:FileSet",
+ "@id": "parliament-files",
+ "name": "parliament-files",
+ "description": "UK Parliament Select Committee inquiry packets.",
+ "encodingFormat": "application/json",
+ "includes": "parliament/parl_*.json"
+ },
+ {
+ "@type": "cr:FileSet",
+ "@id": "court-files",
+ "name": "court-files",
+ "description": "SCOTUS oral-argument case packets via Oyez.",
+ "encodingFormat": "application/json",
+ "includes": "court/scotus_*.json"
+ }
+ ],
+ "recordSet": [
+ {
+ "@type": "cr:RecordSet",
+ "@id": "open_review",
+ "name": "open_review",
+ "description": "Open Peer Review cases (one per ICLR submission).",
+ "field": [
+ {
+ "@type": "cr:Field",
+ "@id": "open_review/case_id",
+ "name": "case_id",
+ "description": "Case identifier (filename without extension).",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "open_review-files"
+ },
+ "extract": {
+ "fileProperty": "filename"
+ },
+ "transform": {
+ "regex": "^(iclr\\d+_\\d+)\\.md$"
+ }
+ }
+ },
+ {
+ "@type": "cr:Field",
+ "@id": "open_review/paper_text",
+ "name": "paper_text",
+ "description": "Full text of the ICLR submission in Markdown.",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "open_review-files"
+ },
+ "extract": {
+ "fileProperty": "content"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "@type": "cr:RecordSet",
+ "@id": "open_review_oracle",
+ "name": "open_review_oracle",
+ "description": "Per-case oracle: reviewer scores, rebuttal, meta-review, ground-truth PC decision, rebuttal validity. Joinable with `open_review` by `case_id`.",
+ "field": [
+ {
+ "@type": "cr:Field",
+ "@id": "open_review_oracle/case_id",
+ "name": "case_id",
+ "description": "Case identifier (matches open_review/case_id).",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "open_review-json-files"
+ },
+ "extract": {
+ "fileProperty": "filename"
+ },
+ "transform": {
+ "regex": "^(iclr\\d+_\\d+)\\.json$"
+ }
+ }
+ },
+ {
+ "@type": "cr:Field",
+ "@id": "open_review_oracle/oracle_json",
+ "name": "oracle_json",
+ "description": "Full oracle JSON for the case.",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "open_review-json-files"
+ },
+ "extract": {
+ "fileProperty": "content"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "@type": "cr:RecordSet",
+ "@id": "parliament",
+ "name": "parliament",
+ "description": "UK Parliament Select Committee inquiries (one record per inquiry).",
+ "field": [
+ {
+ "@type": "cr:Field",
+ "@id": "parliament/case_id",
+ "name": "case_id",
+ "description": "Inquiry identifier.",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "parliament-files"
+ },
+ "extract": {
+ "fileProperty": "filename"
+ },
+ "transform": {
+ "regex": "^(parl_\\d+_\\d+)\\.json$"
+ }
+ }
+ },
+ {
+ "@type": "cr:Field",
+ "@id": "parliament/inquiry_data",
+ "name": "inquiry_data",
+ "description": "Full inquiry packet (JSON object: committee, title, background, submissions, ground-truth Conclusions).",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "parliament-files"
+ },
+ "extract": {
+ "fileProperty": "content"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "@type": "cr:RecordSet",
+ "@id": "court",
+ "name": "court",
+ "description": "US Supreme Court oral-argument cases via Oyez.",
+ "field": [
+ {
+ "@type": "cr:Field",
+ "@id": "court/case_id",
+ "name": "case_id",
+ "description": "Case identifier.",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "court-files"
+ },
+ "extract": {
+ "fileProperty": "filename"
+ },
+ "transform": {
+ "regex": "^(scotus_.+)\\.json$"
+ }
+ }
+ },
+ {
+ "@type": "cr:Field",
+ "@id": "court/case_data",
+ "name": "case_data",
+ "description": "Full case packet (JSON: question presented, briefs, oral-argument segments, ground-truth disposition).",
+ "dataType": "sc:Text",
+ "source": {
+ "fileSet": {
+ "@id": "court-files"
+ },
+ "extract": {
+ "fileProperty": "content"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "rai:dataCollection": "ICLR Open Peer Review: scraped from openreview.net public API for ICLR 2024-2026 submissions; only papers, reviews, rebuttals, AC meta-reviews, and PC decisions that are public on the OpenReview platform are included. UK Parliament: scraped from the UK Parliament publication API for Select Committee inquiries; only inquiries that have a published Committee Report (the institutional ground truth) are kept. Court: scraped from oyez.org for US Supreme Court cases with full oral argument transcripts, party briefs, and final disposition; cases without a complete oral argument record are filtered out.",
+ "rai:dataCollectionType": [
+ "Web Scraping"
+ ],
+ "rai:dataCollectionRawData": "All three subsets retain the upstream textual content essentially verbatim. OR: one Markdown rendering per submission. Parl: one structured JSON per inquiry, fields named to match the upstream API. Court: one structured JSON per case with Oyez-side keys preserved.",
+ "rai:dataCollectionTimeframe": "ICLR 2024 through ICLR 2026; UK Parliament inquiries published by April 2026; SCOTUS terms 2005-2024.",
+ "rai:dataImputationProtocol": "No imputation. Cases missing any required field (e.g. Parliament inquiries with no published Conclusions, SCOTUS cases without an oral argument record) are filtered out at scrape time.",
+ "rai:dataPreprocessingProtocol": [
+ "OR: paper PDFs converted to Markdown with pymupdf4llm, then de-identified with the same deterministic rules for every paper (venue running headers, author/affiliation/email block, author footnotes, acknowledgement/funding/author-contribution sections, submission line numbers, URLs removed). Figures are not rendered.",
+ "Parl: API JSON normalised to a fixed schema with consistent committee-id and inquiry-id keys.",
+ "Court: Oyez transcripts segmented per speaker and labelled with role (justice, attorney for petitioner / respondent)."
+ ],
+ "rai:dataAnnotationProtocol": "No human re-annotation. The ground truth used for evaluation (ICLR PC decision, Parliament Committee Report, SCOTUS disposition) is the upstream institutional outcome, not a re-annotated label.",
+ "rai:dataReleaseMaintenancePlan": "Snapshot of upstream sources as of 2026. Issues and corrections via the Hugging Face discussion tab. Material will be removed if an upstream source withdraws it from public availability.",
+ "rai:personalSensitiveInformation": "Reviewer identities in OR are redacted by OpenReview by default and are not present in this bundle. UK Parliament and SCOTUS records include named MPs, named witnesses, named justices, named attorneys, and named litigants by virtue of being public proceedings; this is the same level of identifiability as the upstream public records and reflects the inherent identifiability of the source institution.",
+ "rai:dataBiases": "OR is biased toward ICLR 2024-2026 submissions (machine learning, English-language, sampled with a fixed seed from public submissions). Parl is biased toward UK English-language committee work, predominantly the Justice and Treasury committees. Court is biased toward US Supreme Court cases that received full oral argument (i.e. merits cases, not summary dispositions), in English.",
+ "rai:dataLimitations": "All three sources are textual records of deliberation, not the full epistemic context (private discussions, off-the-record evidence, judicial deliberations) available to the original participants. Models evaluated against this benchmark should not be deployed in real institutional decision-making without human oversight.",
+ "rai:dataSocialImpact": "Intended to advance research on role integrity in multi-agent LLM systems used in institutional contexts. Risk of misuse: a model that scores well on these benchmarks could be incorrectly assumed to be ready for production institutional deployment. We explicitly mark this out of scope and recommend human-in-the-loop deployment for any downstream production use.",
+ "rai:dataUseCases": "Multi-agent LLM evaluation; role-conditioned obligation prompting; hierarchical synthesis under disagreement; pressure-stance consistency under partially valid rebuttal events; ablations over prompting conditions; cross-model and cross-judge robustness studies."
+}
\ No newline at end of file
diff --git a/data/court.parquet b/data/court.parquet
new file mode 100644
index 0000000000000000000000000000000000000000..4e6881e8cab575078f3e56cad9ed4d482d4c3451
--- /dev/null
+++ b/data/court.parquet
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f1a8a47dc25c36f55b6f22174aca5a0fcb49b45bec6b2387cb4520c0c9278f84
+size 7104319
diff --git a/data/open_review.parquet b/data/open_review.parquet
new file mode 100644
index 0000000000000000000000000000000000000000..e6ee08c88ce6a59339062ebed03e9393f9a3a4a1
--- /dev/null
+++ b/data/open_review.parquet
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4cd8df9788e1b42facac55723ad4f53ad60b8f1f00ce5b2f0be899be0e12679f
+size 26153575
diff --git a/data/parliament.parquet b/data/parliament.parquet
new file mode 100644
index 0000000000000000000000000000000000000000..2028a26ce96dac448c85d780aabaad7a49e4738e
--- /dev/null
+++ b/data/parliament.parquet
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7a0fdabac9e6eaf280cab649963b9736812bd31c2ee74549b67c7a90325214e4
+size 26276552
diff --git a/open_review/iclr2024_8529.json b/open_review/iclr2024_8529.json
new file mode 100644
index 0000000000000000000000000000000000000000..cabd33402d30f06c95c28628b0282477062ee2f4
--- /dev/null
+++ b/open_review/iclr2024_8529.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8529",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Understanding Your Agent: Leveraging Large Language Models for Behavior Explanation",
+ "abstract": "Intelligent agents such as robots are increasingly deployed in real-world, safety-critical settings. It is vital that these agents are able to explain the reasoning behind their decisions to human counterparts; however, their behavior is often produced by uninterpretable models such as deep neural networks. We propose an approach to generate natural language explanations for an agent’s behavior based only on observations of states and actions, thus making our method independent from the underlying model’s representation. For such models, we first learn a behavior representation and subsequently use it to produce plausible explanations with minimal hallucination while affording user interaction with a pre-trained large language model. We evaluate our method in a multi-agent search-and-rescue environment and demonstrate the effectiveness of our explanations for agents executing various behaviors. Through user studies and empirical experiments, we show that our approach generates explanations as helpful as those produced by a human domain expert while enabling beneficial interactions such as clarification and counterfactual queries.",
+ "rebuttal": "### Response to Reviewer 5qZT (Part 1)\nWe would like to thank Reviewer 5qZT for their time and insightful comments. We are glad that you appreciate the model-agnostic nature of our approach, the interactivity it enables, and our qualitative/quantitative evaluation. Below is our response to your raised concerns and questions.\n\n**1) Few details are given of the agent, the decision tree, environment, and the language model**\n\nWe have provided details regarding our experiments in Appendix A, but we restate them here with some additional detail for clarity:\n\n**Environment**: The environment is a partially observable multi-agent urban search and rescue task, consisting of a grid of inter-connected rooms that may contain rubble and/or victims. There are two agents with heterogeneous skills: a medic which can save victims and an engineer which can remove rubble. The goal of the task is to save the victims, however, they may be trapped by rubble if both a victim and rubble are present in the same room. In this case, the agents must work together: the engineer must remove the rubble so the medic can save the victim.\n\n**Agent**: We leverage two types of agent behaviors, an exploration type and an exploitation type. The exploration type will first explore all rooms to identify exposed victims and rubble (which may possibly hide trapped victims). The exploitation type acts as a greedy agent, which begins by exploring but acts to either save victims or remove rubble (depending on the agent type) as soon as one is found. All of our results produce explanations for both the medic and engineer agents.\n\n**Language model**: We use GPT4 via OpenAI’s developer API. We include a concise description of the environment (similar to above), a description of the behavior representation (if there is one), and three in-context learning examples.\n\n**Decision tree**: We use dataset aggregation (DAGGER)[1] to sample state-action pairs and train the decision tree (using CART). DAGGER proceeds by collecting a set of visited states at each iteration under the current distilled policy and the corresponding actions from the agent’s original policy, which is aggregated to the set of all previous state-action pairs and used to train the decision tree.\n\n[1] Ross, Stéphane, Geoffrey Gordon, and Drew Bagnell. \"A reduction of imitation learning and structured prediction to no-regret online learning.\" AISTATS 2011.\n\n### Response to Reviewer 5qZT (Part 2)\n**2) Concerns about generalization to other environments, language models, and continuous action spaces**\n\nOur method was evaluated on a single environment due to the time-consuming nature of hand-annotating responses for quantitative evaluation and running user studies. However, we argue that the depth of our analysis on this environment offers intriguing insights, and this doesn’t limit the generalization of our approach to other environments.\n\n**Environment and policy-agnostic metrics**: We designed *policy-agnostic quantitative metrics* to make sure o [...]\n\n### Response to Reviewer 5qZT (Part 3)\n**3) Preference is heavily involved in the user study regarding the evaluation of behavior explanations**\n\nThe quality of the generated explanations are evaluated from a holistic perspective, with the quantitative metrics evaluating faithfulness and the human study evaluating preference. We believe that a good explanation needs to be both faithful and comprehensible from a human's perspective. It is true that users didn't prefer the non-hallucinated explanations over hallucinated ones (Sec. 5.1), but whether this is because they considered the hallucinati [...]\n\n### Response to Reviewer NiyW (Part 1)\nWe would like to thank Reviewer NiyW for their time and helpful feedback. We appreciate that you consider the model-agnostic nature of our method a strength. Below is our response to your raised concerns and questions.\n\n**1) Additional information on metrics**\n\nWe designed *policy-agnostic quantitative metrics* to make sure our evaluation approach can be applied to other tasks and domains. These are Strategy, Category, Goal, Action, and Intent accuracy. These metrics are intended to work with any environment and agent that exhibits high-level strategies a [...]\n\n### Response to Reviewer NiyW (Part 2)\n**3) How the performance of the tree compares with the surrogate policy, and how the performance gap influence the generated explanations**\n\nWe quantified the distilled policy accuracy by rolling out 5000 episodes with random initializations, and computing the action accuracy using the original policy’s action as the target. The accuracy values are given below where we can observe a range from ~83% to 100%.\n\n| | explore | exploit | fixed |\n|-------------|---------|---------|---------|\n| medic | 87.72% | 87.05% | 100.00% |\n| engineer [...]\n\n### Response to Reviewer Pb35 (Part 1)\nWe would like to thank Reviewer Pb35 for their thorough and thoughtful review. We appreciate the positive comments about our method and that you think our idea is interesting. We respond to your questions and concerns below.\n\n**1) How model-agnostic is this approach given that it seems to rely on interpretable state representations?**\n\nYou are correct that the distillation process used here requires inputs which can be directly consumed by a decision tree (and also interpreted by an LLM, but the DT is the bigger constraint in our experience). However, we [...]\n\n### Response to Reviewer Pb35 (Part 2)\n**3) How were the examples hand-annotated and how did we avoid over-fitting to to our choice of policies?**\n\nWe first note that the agent policies themselves were exhibiting goal-directed behavior in our experiments by design (we explicitly crafted policies to exhibit exploitation and exploration type behaviors). Any reasonably accurate distilled policy will then mimic such goal-directed behavior as well. This actually ties into our broader point: we don’t necessarily agree that goal-directed metrics\n[rebuttal truncated]",
+ "initial_scores": [
+ 3,
+ 5,
+ 5,
+ 3
+ ],
+ "score_mean": 4.0,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "Reviewers see potential in this approach but it currently seems too early on and there are a some shared concerns than remain unaddressed.\n\nReviewers all found the domain narrow. While narrow domains are the way to start, the hope is that these allow for clean / convincing results. But reviewers also found the user study not as convincing (high rate of hallucination in model outputs, imperfect user discretion in what a good explanation is). Either expanding the domain or making the evaluation stronger / more convincing on this simpler domain would be great directions to take this.",
+ "forum_id": "PKsTHJXn4d",
+ "primary_area": "visualization or interpretation of learned representations",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_5qZT",
+ "review_id": "ve7c8Bhhmi",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 3288,
+ "edit_detected": true,
+ "edit_delta_seconds": 1849103,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_NiyW",
+ "review_id": "8JFZapXQ0Q",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1787,
+ "edit_detected": true,
+ "edit_delta_seconds": 836354,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Pb35",
+ "review_id": "hCAv18l9Lm",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 8665,
+ "edit_detected": true,
+ "edit_delta_seconds": 848335,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ccmh",
+ "review_id": "CLBeaGJtuI",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 1,
+ "confidence": 4
+ },
+ "review_text_chars": 7996,
+ "edit_detected": true,
+ "edit_delta_seconds": 857418,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8529.md b/open_review/iclr2024_8529.md
new file mode 100644
index 0000000000000000000000000000000000000000..5071b06d8250f1023a20c5234cb5d041beb61888
--- /dev/null
+++ b/open_review/iclr2024_8529.md
@@ -0,0 +1,369 @@
+
+
+## UNDERSTANDING YOUR AGENT: LEVERAGING LARGE LANGUAGE MODELS FOR BEHAVIOR EXPLANATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+Intelligent agents such as robots are increasingly deployed in real-world, safetycritical settings. It is vital that these agents are able to explain the reasoning behind their decisions to human counterparts; however, their behavior is often produced by uninterpretable models such as deep neural networks. We propose an approach to generate natural language explanations for an agent’s behavior based only on observations of states and actions, thus making our method independent from the underlying model’s representation. For such models, we first learn a behavior representation and subsequently use it to produce plausible explanations with minimal hallucination while affording user interaction with a pre-trained large language model. We evaluate our method in a multi-agent search-and-rescue environment and demonstrate the effectiveness of our explanations for agents executing various behaviors. Through user studies and empirical experiments, we show that our approach generates explanations as helpful as those produced by a human domain expert while enabling beneficial interactions such as clarification and counterfactual queries.
+
+## 1 INTRODUCTION
+
+Rapid advances in artificial intelligence and machine learning have led to an increase in the deployment of robots and other embodied agents in real-world, safety-critical settings (Sun et al., 2020; Fatima & Pasha, 2017; Li et al., 2023). As such, it is vital that practitioners – who may be laypeople that lack domain expertise or knowledge of machine learning – are able to query such agents for explanations regarding _why_ a particular prediction has been made – broadly referred to as explainable AI (Amir et al., 2019; Wells & Bednarz; Gunning et al., 2019). While progress has been made in this area, prior works tend to focus on explaining agent behavior in terms of rules (Johnson, 1994), vision-based cues (Cruz & Igarashi, 2021; Mishra et al., 2022), semantic concepts (Zabounidis et al., 2023), or trajectories (Guo et al., 2021). However, it has been shown that laypeople benefit from natural language explanations (Mariotti et al., 2020; Alonso et al., 2017) since they do not require specialized knowledge to understand (Wang et al., 2019), leverage human affinity for verbal communication, and increase trust under uncertainty (Gkatzia et al., 2016).
+
+In this work, **we seek to develop a framework to generate natural language explanations of an agent’s behavior given only observations of states and actions** . By assuming access to only behavioral observations, we are able to explain behavior produced by _any_ agent policy, including deep neural networks (DNNs). Unlike prior methods, which exhibit limited expressivity due to utilizing language templates (Hayes & Shah, 2017; Kasenberg et al., 2019; Wang et al., 2019) or assume access to a large dataset of human-generated explanations (Ehsan et al., 2019; Liu et al., 2023), we propose an approach in which large language models (LLMs) can be used to generate free-form natural language explanations in a few-shot manner. While LLMs have shown considerable zero-shot task performance and are well-suited to generating natural language explanations (Wiegreffe et al., 2021; Marasovi´c et al., 2021; Li et al., 2022), they are typically applied to commonsense reasoning as opposed to explaining model behavior and are prone to hallucination – a well-known phenomenon in which false information is presented as fact (McKenna et al., 2023). It is an open question as to how LLMs can be conditioned on an agent’s behavior in order to generate plausible explanations
+
+1
+
+**==> picture [358 x 86] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Policy Distillation Generate Behavior Representation Interactive Explanations Observation Prompt and Examples Generate Decision Tree Decision Further Decision Path Prompts Path LLM Action: Explanation of Agent Behavior medic rescues the victim **----- End of picture text -----**
+
+Figure 1: Overview of our three-step pipeline to explain policy actions: left: A black-box policy is distilled into a decision tree; middle: a decision path is extracted from the tree for a given state which contains a set of decision rules used to derive the associated action; right: we utilize an LLM to generate an easily understandable natural language explanation given the decision path. Lastly, a user can ask further clarification questions in an interactive manner.
+
+while avoiding such hallucinations. We find this is a particularly important aspect as laypeople tend to struggle to identify hallucinated facts, as we observe in our participant studies in Sec. 4.3.
+
+Our solution, and core algorithmic contribution, is the introduction of a _behavior representation_ (BR), in which we distill an agent’s policy into a locally interpretable model that can be directly injected into a text prompt and reasoned with, without requiring fine-tuning. A behavior representation acts as a compact representation of an agent’s behavior around a specific state and indicates what features the agent considers important when making a decision. We show that by constraining an LLM to reason about agent behavior in terms of a behavior representation, we are able to greatly reduce hallucination compared to alternative approaches while generating informative and plausible explanations. An additional benefit of our approach is that it enables _interactive_ explanations; that is, the user can issue follow-up queries such as clarification or counterfactual questions. This is particularly valuable, as explanations are social interactions conditioned on a person’s own beliefs and knowledge (Miller, 2019) and thus, are highly individual and may require additional clarification to be comprehensible and convincing (Kass et al., 1988).
+
+Our approach is a three-stage process (see Figure 1) in which we, 1) distill an agent policy into a decision tree, 2) extract a decision path from the tree for a given state which serves as our local _behavior representation_ , and 3) transform the decision path into a textual representation and inject it into pre-trained LLM via in-context learning (Brown et al., 2020) to produce a natural language explanation. In this work we show how our framework can be applied to multi-agent reinforcement learning (MARL) policies – a particularly relevant setting given the complex dynamics and decisionmaking resulting from agent-agent interactions. Through a series of participant studies, we show that a) our approach generates model-agnostic explanations that laypeople significantly prefer over baseline methods and are preferred at least as much as those generated by a human domain expert; b) when an agent policy does not align with participant assumptions, participants find the ability to interact with our explanations helpful and beneficial; and c) our approach yields explanations with significantly fewer hallucinations than alternative methods of encoding agent behavior.
+
+## 2 RELATED WORK
+
+**Explainable Agent Policies** : Many works attempt to explain agent behavior through the use of a simplified but interpretable model that closely mimics the original policy (Puiutta & Veith, 2020; Verma et al., 2018; Liu et al., 2019; Shu et al., 2017), a technique which has long been studied in the field of supervised learning (Ribeiro et al., 2016). Although approaches that directly utilize inherently interpretable models with limited complexity during the training phase (Du et al., 2019) exist, many researchers avoid sacrificing model accuracy for interpretability. In this work, we follow an approach similar to (Guo et al., 2023), in which we leverage a distilled interpretable model to gain insight into how the agent’s policy reasons.
+
+**Natural Language Explanations** : Outside of explaining agent behavior, natural language explanations have received considerable attention in natural language processing areas such as commonsense reasoning (Marasovi´c et al., 2020; Rajani et al., 2019) and natural language inference (Prasad et al., 2021). Unlike our setting in which we desire to explain a given _model’s be-_
+
+2
+
+_havior_ , these methods attempt to produce an explanation purely with respect to the given input and domain knowledge, e.g., whether a given premise supports a hypothesis in the case of natural language inference (Camburu et al., 2018). Although self-explaining models (Marasovi´c et al., 2021; maj, 2022; Hu & Clune, 2023) are conceptually similar to our goal, we desire a model-agnostic approach with respect to the agent’s policy and thus seek to explain the agent’s behavior with a separate model. While recent works have investigated the usage of LLMs in explaining another model’s behavior by reasoning directly over the latent representation (Bills et al., 2023), this approach has yielded limited success thus far and motivates our usage of an intermediate behavior representation.
+
+## 3 LANGUAGE EXPLANATIONS FOR AGENT BEHAVIOR
+
+We introduce a framework for generating natural language explanations for an agent from _only_ observations of states and actions. Our approach consists of three steps: 1) we distill the agent’s policy into a decision tree, 2) we generate a behavior representation from the decision tree, and 3) we query an LLM for an explanation given the behavior representation. We note that step 1 only needs to be performed once for a particular agent, while steps 2 and 3 are performed each time an explanation is requested. We make no assumptions about the agent’s underlying policy such that our method is model agnostic; explanations can be generated for any model for which we can sample trajectories.
+
+**Notation** : We consider an infinite-horizon discounted Markov Decision Process (MDP) in which an agent observes environment state _st_ at discrete timestep _t_ , performs action _at_ , and receives the next state _st_ +1 and reward _rt_ +1 from the environment. The MDP consists of a tuple ( _S, A, R, T, γ_ ) where _S_ is the set of states, _A_ is the set of agent actions, _R_ : _S × S →_ R is the reward function, _T_ : _S × A × S →_ [0 _,_ 1] is the state transition probability, and _γ ∈_ [0 _,_ 1) is the discount factor. As in standard imitation learning settings, we assume the reward function _R_ is unknown and that we only have access to states and actions sampled from a stochastic agent policy _π[∗]_ ( _a|s_ ) : _A × S →_ [0 _,_ 1].
+
+## 3.1 DISTILLING A DECISION TREE
+
+Our first step is to distill the agent’s underlying policy into a decision tree, which acts as an interpretable _surrogate_ . The decision tree is intended to faithfully replicate the agent’s policy while being interpretable, such that we can extract a behavior representation from it. Given an agent policy _π[∗]_ , we distill a decision tree policy _π_ ˆ using the DAgger (Ross et al., 2011) imitation learning algorithm which minimizes the expected loss to the agent’s policy under an induced distribution of states,
+
+**==> picture [274 x 15] intentionally omitted <==**
+
+for a restricted policy class Π and loss function _L_ . This method performs iterative data aggregation consisting of states sampled from the agent’s policy and the distilled decision tree, in order to overcome error accumulation caused by the violation of the i.i.d. assumption. While decision trees are simpler than other methods such as DNNs, it has been shown that they are still capable of learning reasonably complex policies (Bastani et al., 2018). Intuitively, DNNs often achieve state-of-the-art performance not because their representational capacity is larger than other models, but because they are easier to regularize and thus train (Ba & Caruana, 2014). However, distillation is a technique that can be leveraged to distill the knowledge contained within a DNN into a more interpretable decision tree (Hinton et al., 2015; Frosst & Hinton, 2017; Bastani et al., 2017).
+
+## 3.2 BEHAVIOR REPRESENTATION GENERATION
+
+The distilled policy _π_ ˆ consists of a set of decision rules which approximate the decision-making process of the agent’s policy _π[∗]_ . Given a state _st_ and action _at_ taken by the agent, we extract a decision path _dp_ = _Path_ (ˆ _π, st_ ) which acts as a _locally_ interpretable model of the agent’s behavior. The path _dp_ consists of a subset of the decision rules in _π_ ˆ which produce the action _at_ in state _st_ , and is obtained by simply traversing the tree from root to leaf. These decision rules approximate the agent’s underlying decision-making rationale in state _st_ and can be used to infer intent.
+
+Figure 2 shows example decision paths for agents operating in an Urban Search and Rescue (USAR) environment where heterogeneous agents with different action spaces learn to coordinate to rescue
+
+3
+
+**==> picture [397 x 170] intentionally omitted <==**
+
+**----- Start of picture text -----**
+X - Coordinate Explorative Policy Decision Path Exploitative Decision Path 0 1 2 3 room (0, 0) has been explored room (0, 1) doesn't contain rubble. 0 room (0, 4) has been explored room (3, 2) doesn't contain rubble. room (3, 4) has been explored room (2, 1) contains rubble. room (3, 0) has not been explored room (2, 3) doesn't contain a victim. 1 room (2, 4) has been explored room (1, 0) doesn't contain rubble. engineer is not in room (0, 0) engineer is in room (1, 0). 2 engineer is in room (1, 0) room (0, 0) doesn't contain rubble. room (1, 3) has been explored room (1, 2) doesn't contain rubble. Explorative Explanations through LLM Exploitative Explanations through LLM 3 The engineer moves east to room (2, 0) because this action The engineer moves east to room (2, 0) because room (2, 1) aligns with an exploration goal. The current room (1, 0) has contains rubble. There is no direct path to room (2, 1) from already been explored, and room (3, 0) to the right has not the engineer's current location, as no adjacent room been explored. Therefore, the engineer seems to move contains rubble. The engineer is likely planning to move to 4 east to reach the unexplored room (3, 0) . room (2, 0) in order to then move south to room (2, 1), where it can begin to remove the rubble. This is suggestible as the Explorative Next-Action Prediction by LLM features show that the engineer seems to prioritize moving toward areas containing rubble . Engineer Medic Based on the new features, the engineer will likely move Explorative Path Victim east to room (3, 0). This is because room (3, 0) has not been explored yet, and the engineer seems to be following a Exploitative Next-Action Prediction by LLM strategy of exploring unexplored rooms . Moving east to Based on the new features, the engineer will likely move Exploitative Path Rubble room (3, 0) aligns with this strategy. north to room (2, 1) because this room contains rubble, and the engineer's goal is to remove rubble . Y - Coordinate **----- End of picture text -----**
+
+Figure 2: An example of am ambiguous state, in which the engineer’s current state can be induced by following two distinct behaviors: _Exploit_ , which prioritizes removing rubble as soon as possible, and _Explore_ , which prioritizes visiting unexplored rooms. Given the current state (engineer at (1, 0)) and intended action (going east), their follow-up action is ambiguous depending on which behavior is utilized by the engineer ( _Explore_ : Purple; _Exploit_ : Pink). The corresponding decision paths are shown for each possible behavior and the resulting natural language explanations after transforming into a behavior representation.
+
+victims Lewis et al. (2019); Freeman et al. (2021). We adopt the environment of Guo et al. (2023) in which there are two agents: a _Medic_ , responsible for healing victims, and an _Engineer_ responsible for clearing rubble. The left decision path, denoted as _Explore_ Decision Path, corresponds to an agent exhibiting exploration behavior, i.e. it fully explores the environment before removing any pieces of rubble. The right decision path, _Exploit_ Decision Path, corresponds to an exploitative agent which greedily removes rubble as it is discovered. We can observe how these different behaviors are reflected in their respective decision paths – the _Explore_ path largely consists of decision rules examining whether rooms have been explored, while the _Exploit_ path consists of rules checking for the existence of rubble. This enables effective reasoning, e.g. because the _Explore_ agent _only_ checks for explored rooms before taking its action, we can infer that the agent is currently only interested in exploration and is choosing to ignore any visible rubble.
+
+We refer to such a decision path as a behavior representation, and it serves as a compact encoding of the agent’s behavior. This representation is effective for three reasons: a) decision tree depth is usually constrained in order to prevent overfitting, which means even complex policies can yield decision paths that fit into relatively small LLM context windows; b) decision paths can be readily translated into natural language via algorithmic templates and injected into an LLM prompt – meaning no fine-tuning is required (Brown et al., 2020), which is an important factor given the lack of human-annotated explanations for agent behavior; and c) they provide an intuitive and explicit ordered set of rules with which an LLM can reason, resulting in more effective explanations and reduced hallucination compared to alternative behavior encodings. We show in Sec. 4 that our proposed behavior representation strongly outperforms alternative encodings.
+
+## 3.3 IN-CONTEXT LEARNING WITH BEHAVIOR REPRESENTATIONS
+
+The last step in our approach is to define a prompt that constrains the LLM to reason about agent behavior with respect to a given behavior representation. Our prompt consists of four parts: a) a concise description of the environment the agent is operating in, e.g., state and action descriptions, b) a description of what information the behavior representation conveys, c) in-context learning examples, and d) the behavior representation and action that we wish to explain. An example of this prompt is shown in our appendix (See. A). All parts except for (d) are pre-defined ahead of time and remain constant for all queries, while our framework provides a mechanism for automatically constructing (d). Thus, our system can be queried for explanations with no input required by the user unless they wish to interact and submit follow-up queries.
+
+4
+
+**==> picture [379 x 225] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Explanation: The medic moves east to room (3, 3) because room (3, 4) The engineer decides to move south to has not been explored , and most of the surrounding rooms have been room (2, 1) because the engineer is explored. Moving to (3, 3) positions the medic closer to the unexplored currently in room (2, 0). Given the limited room (3, 4). This action suggests that the medic is prioritizing features available and the action taken, the exploration of unknown areas. engineer may be trying to search southward since it's already navigated the Why did the medic not consider the victim in room (2, 2) ? northenmost rolls, but the exact reasoning is unclear. The agent may also be acting non-optimally or according to some If room (2, 2) contains a victim but that information is not in the unknown criteria, since such a move does Behavior Representation, it suggests the following: not seem to directly take into account the The observation did not capture this vital information for some location of rubble or unexplored rooms. reason. The medic did not consider this information when making its Given the features, it seems that the agent decision, which would imply a non-optimal decision-making is checking whether it is already on the top process on the part of the medic. In either case, the absence of this information in the Behavior row (y=0). As the agent is not currently in the top row, it is opting to move north to Representation and the subsequent decision to move elsewhere would get closer. The particular end goal is not indicate that saving the victim in room (2, 2) was not part of the medic's decision criteria at that time. This could be a flaw or limitation apparent from the listed features, and it may be the case that the agent is not quite in the decision-making algorithm of the medic. acting optimally but is adhering to a heuristic rule or strategy of 'move north as This is too verbose! long as it's not on the northmost row'. On the other hand, it could also be the case where the game's next goals or best actions The medic did not consider the victim in room (2, 2) because the to perform strictly depend on the layout of information about the victim's presence was not included in the the top row, which we don't have provided Features . information about. **----- End of picture text -----**
+
+Figure 3: Left: Interactive Conversation: The user is asking more clarification questions about the initial explanation generated by our method. Right: Explanation of a _Fixed_ Agent: the LLM is able to detect and rationale about suboptimality.
+
+The ability to ask such follow-up questions plays a crucial role when interacting with laypeople, who may prefer additional explanations of an agent’s behavior. Utilizing an LLM to generate our explanations allows a user to ask such questions to, for example, request further clarification, “whatif” scenarios (counterfactual), further summaries, likely next actions, or other requests. As we show in Sec. 5.2, this is particularly valuable when the agent’s actions are not aligned with the user’s expectations. In our experiments, we have observed two main types of questions: a) requests for further clarification, e.g. _“Why did the agent not consider feature X when making its decision?”_ , and 2) counterfactual questions, e.g., “What if feature Y were present instead of feature X?” See section 5.2 for further details.
+
+## 4 QUANTITATIVE RESULTS AND ANALYSIS
+
+We quantitatively evaluate the performance of our proposed approach in a simulated multi-agent Urban Search and Rescue task with the goal of answering the following questions: **1)** Does our behavior representation enable the LLM to reason about varying behaviors and identify the underlying decision-making rationale? **2)** Does our behavior representation enable the LLM to infer _future_ behavior? **3)** How is hallucination affected by our choice of behavior representation?
+
+**Experimental Setup** Our experimental setting is a partially observable Urban Search and Rescue task in which two agents work cooperatively in order to rescue victims and remove rubble. We model this task as a 2D Gridworld consisting of 20 rooms arranged in a 5 _×_ 4 grid. Both agents can navigate to adjacent rooms in the environment and each have role-specific actions – the engineer can remove rubble which may be hiding victims, and the medic can rescue victims after rubble has been removed. This environment is partially observable and the agents must first traverse the environment in order to locate both rubble and victims. The agents can exhibit one of three possible behaviors:
+
+- **Explore** : Rubble and victims are immediately removed or rescued upon discovery.
+
+- **Exploit** : Agents explore all rooms before backtracking to remove rubble/rescue victims.
+
+- **Fixed** : Agents ignore rubble and victims and simply move in a pre-determined pattern.
+
+We generate natural language explanations for each agent’s behavior using one of three methods:
+
+- **BR (Path)** : Our proposed method which uses a decision path as a behavior representation.
+
+5
+
+|||Long-term|Short-term|Ambiguous|
+|---|---|---|---|---|
+||Method|Strategy Category Goal|Strategy Category Goal|Strategy Category Goal|
+|Exploit|**BR (Path)** BR (States) No BR|0.70 0.75 **0.75** **0.75** **0.80** **0.75** 0.25 0.25 0.25|**1.00** **1.00** **1.00** 0.75 0.75 0.75 0.90 0.95 0.95|**0.90** **0.85** **0.85** 0.60 0.75 0.75 0.70 0.75 0.75|
+|Explore|**BR (Path)** BR (States) No BR|**0.90** **0.75** **0.25** 0.40 0.05 0.05 0.20 0.30 0.15|**1.00** **1.00** 0.70 0.70 0.95 **0.95** 0.40 0.90 0.90|**0.90** **0.80** **0.35** 0.00 0.00 0.00 0.00 0.05 0.00|
+
+Table 1: Explanation accuracy for randomly sampled states in which the agent is pursuing a longterm goal, short-term goal, or ambiguous goal while operating under two different behavior strategies: _Explore_ and _Exploit_ . All metrics represent accuracy (higher is better). Each value is computed over 20 samples: 10 each from medic and engineer. The best method in each column is bolded.
+
+ - **BR (States)** : An alternative behavior representation that uses a set of state-action pairs sampled from the agent’s policy rather than a decision path.
+
+ - **No BR** : No behavior representation is given. This serves as a baseline to evaluate how well the LLM can reason about an agent given only an observation and no prior knowledge.
+
+- The generated behavior explanations are hand-annotated with regards to the following metrics:
+
+ - **Strategy** : Whether the agent’s behavior (defined above) was identified in the explanation.
+
+ - **Category** : Whether the agent’s goal category was identified in the explanation, e.g., the agent is moving towards a rubble/victim/unexplored room.
+
+ - **Goal** : Whether the agent’s specific goal was identified in the explanation, e.g., the agent is moving to rubble in room (1, 2).
+
+ - **Action** : Whether the agent’s next action was successfully predicted.
+
+ - **Intent** : Whether the agent’s intent for taking the next action was successfully identified, e.g., the agent moved to room (1, 1) because it will be closer to rubble in room (1, 2).
+
+Unlike works which evaluate natural language explanations in domains such as natural language inference, to the best of our knowledge there are no datasets consisting of high-quality explanations generated over agent behavior. Due to the time and effort required to construct such datasets, ours is relatively small in comparison and precludes the usage of automatic metrics such as BLEU, which work well only over large corpuses.
+
+## 4.1 EVALUATING EXPLANATION QUALITY
+
+We evaluate explanation quality by generating explanations for state-action pairs randomly sampled from agent trajectories produced by each behavior type. States are grouped into three categories: **Long-term** — The agent is moving to a room/rubble/victim but won’t get there in the next time step; **Short-term** — in which agent is pursuing a short-term goal, meaning it will reach the desired room/remove rubble/rescue victim in the next time step; and **Ambiguous** — where the _current_ stateaction can be induced by either exploration or exploitation behaviors, but the _next_ state will yield different actions from each behavior. The results for each behavior are shown in Table 1 and _Fixed_ in Table 3. We make the following observations.
+
+**Explanations produced with BR (Path) are more accurate** . Explanations generated using a decision path behavior representation more accurately identify the agent’s Strategy, Category, and Goal in every category except for Long-term _Exploit_ when compared to other methods. We conjecture that the slightly reduced accuracy for long-term goals under exploitative behavior is due to the additional complexity associated with _Exploit_ decision paths; they must simultaneously check for the presence of unexplored rooms and rubble, while the _Explore_ decision paths do this sequentially, i.e., they first check all rooms’ exploration status and _then_ check for the presence of rubble.
+
+**The LLM makes assumptions over expected behaviors** . The ambiguous states reveal an important insight: the LLM tends to assume an agent will act _exploitatively_ when presented with an observation and a task description. We can see that all methods, including BR (States) and No BR, yield
+
+6
+
+|||Long-term|Short-term|Ambiguous|
+|---|---|---|---|---|
+||Method|Action Intent|Action Intent|Action Intent|
+|Exploit|**BR (Path)** BR (States) No BR|**0.80** **0.75** 0.65 0.55 0.55 0.50|0.40 **0.75** **0.75** **0.75** 0.65 0.65|**0.85** **0.85** 0.80 0.70 0.80 0.75|
+|Explore|**BR (Path)** BR (States) No BR|**0.95** **1.00** 0.60 0.40 0.65 0.25|**0.80** **0.95** 0.45 0.45 0.50 0.35|**0.90** **0.95** 0.05 0.05 0.30 0.10|
+
+Table 2: Action prediction accuracy for randomly sampled states in which the agent is pursuing a long-term goal, short-term goal, or ambiguous goal. Action indicates whether the next action was correctly identified, while intent indicates whether the reason _why_ the action was taken was identified. Each value is computed over 20 samples (10 for engineer and medic each)
+
+relatively high accuracy when generating explanations for ambiguous state-actions under exploitative behavior. However, when the agent acts exploratory, BR (Path) continues to perform well (90% accuracy) while the other methods fail to get _any_ explanations correct (0% accuracy). We find that this is because when presented with am ambiguous state that could be caused by multiple behaviors, the LLM assumes the agent acts exploitatively and only the decision path behavior representation is able to enforce a strong enough prior over agent behavior for correct reasoning. A similar trend can be observed with states sampled from the _Fixed_ behavior in Table 3. BR (Path) yields an impressive 80% accuracy in detecting the fact that the agent is ignoring victims and rubble and pursuing a predetermined path, yet again the LLM assumes exploitative behavior for BR (States) and No BR and yields nearly no correct explanations.
+
+## 4.2 EVALUATING FUTURE ACTION PREDICTION
+
+We further evaluate how well the LLM is actually able to reason over and explain current agent behavior by analyzing how well it can predict _future_ agent behavior. Intuitively, if the LLM can accurately produce an explanation which identifies an agent’s intent, then it should be able to use this intent to infer future actions. We evaluate this by issuing a follow-up prompt to the LLM for each explanation produced in the previous analysis to predict the agent’s next action while reasoning with the explanation it produced.
+
+**Explanations produced with BR (Path) enable accurate action prediction.** Tables 2 and 3 show that the LLM is able to effectively predict the agent’s next actions when reasoning with explanations produced by BR (Path), consistently yielding 80-90% accuracy across all behavior types. There is one exception to this: short-term goal action prediction which yields 40% accuracy. This is due to the _locality_ of the decision path – the path only encodes decision rules relevant to the agent’s current action, which is highly correlated with the agent’s current goal. If that goal happens to be short-term, meaning it will be achieved with the agent’s _current_ action, then the decision path rarely encodes enough information to reason about the _next_ action. We conjecture that providing additional information, such as the current observation, in addition to the decision path behavior representation, can alleviate this issue. This is also the cause for the low action prediction accuracy over _Fixed_ states in Table 3; the agent’s strategy is often successfully identified, but the LLM exhibits uncertainty due to the lack of information contained within the decision path.
+
+**Predictions can be right for the wrong reasons.** The BR (States) and No BR methods perform worse in action prediction accuracy and approximately align with explanation accuracy, indicating that in most cases, it is difficult to predict future behavior if the agent’s decision-making rationale cannot be identified. However, there is an exception to this which is the relatively high accuracy of 60% for BR (States) when predicting over _Fixed_ policy states (Table 3). On analysis, we found that the LLM can identify the simple action distribution produced by the pre-determined path (the agent moves in a north-south pattern) from the set of provided state-action samples, which is further narrowed down by spatial reasoning constraints, e.g., the agent can’t move further north if it is already in the northern-most row. However, the LLM is unable to reason about _why_ the agent
+
+7
+
+**==> picture [398 x 101] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Exploit Explore Method Strategy Action Intent BR (States)BR (Path) 0.5 0.4 BR (Path) 0.80 0.40 0.25 No BR 0.3 BR (States) 0.05 0.65 0.00 BR (States)BR (Path) 0.2 No BR 0.00 0.35 0.00 No BR 0.1 Long-termShort-termAmbiguousLong-termShort-termAmbiguousFixed Fixed **----- End of picture text -----**
+
+Table 3 & Figure 4: Left: Explanation and action prediction metrics for the _Fixed_ policy. Right: hallucination rates for each method in generated explanations (top) and action predictions (bottom).
+
+follows such an action distribution, leading to a case where actions are predicted correctly but the agent’s rationale is not.
+
+## 4.3 EVALUATING HALLUCINATION
+
+The frequency of hallucination in the explanations and action predictions is shown in Fig. 4.
+
+**Hallucination is significantly reduced with BR (Path)** . There are two interesting insights from the hallucination evaluation: a) explanations produced with the decision path representation yield far lower hallucination rates across all categories than the other methods, and b) BR (States) sometimes yields _more_ hallucinations than No BR. This is a counterintuitive result, but we find that when no behavior representation is provided to the LLM, it tends to make conservative predictions resulting in fewer hallucinations at the cost of lower explanation and accuracy prediction accuracy.
+
+**Hallucination is not correlated with action prediction accuracy** . Intuitively, we might think that the hallucination rate of the generated explanations is inversely correlated with the action prediction accuracy. That is, hallucinations are symptomatic of LLM uncertainty regarding agent intent and inject additional errors into the downstream reasoning process. However, we find this not to be the case and find no significant correlations between hallucination and action prediction metrics according to the Pearson correlation coefficient with _p <_ 0 _._ 05.
+
+## 5 PARTICIPANT STUDY AND ANALYSIS
+
+While the quantitative analysis indicates that the explanations produced with our proposed behavior representation are accurate, we seek to answer whether the explanations are useful to humans. To answer this question we conduct two IRB-approved user studies with the following hypotheses:
+
+**H1** : _Participants prefer the explanations produced by our method – BR (Path) – over the explanations produced by both BR (States) and a textual representation of the decision path (Template)._
+
+**H2** : _Participants will not prefer the explanations produced by a human domain expert over ours._ **H3** : _Participants will find follow-up interaction helpful for understanding the agent’s behavior._
+
+## 5.1 EVALUATING EXPLANATION HELPFULNESS
+
+The first study is designed to determine whether human participants find our explanations helpful in understanding an agent’s behavior. We followed a within-subjects design where we presented each participant with a state-action pair, a visualization of the world state, and a pair of explanations. Each participant is asked to choose whether they find the first or second explanation more helpful in understanding the agent’s behavior or whether they are equally helpful. This study considers two additional baselines in addition to BR (Path) and BR (States): **Human)** Natural language explanations produced by a domain expert with full knowledge of the agent’s behavior; and **Template)** An algorithmic translation of the decision path to a textual representation. The Human explanations are intended to serve as an upper-bound on explanation quality, and the Template explanations a lower-bound. We recruited 40 participants who collectively answered 1106 questions, with the results shown in Fig. 5 (left). From these results, we find that hypothesis **H1 is fully supported** ,
+
+8
+
+**==> picture [396 x 82] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Ours Preferred Tied Ours Not Preferred Interaction Helpful Interaction Not Helpful 202 59 106 6 14 318 22 25 15 5 127 91 156 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Percentage of Explanation Chosen Percentage of Chosen Interactions BR (States) Optimal Template Human Sub-Optimal **----- End of picture text -----**
+
+Figure 5: Left: Participant preference when presented with two explanations and asked to choose which is most helpful to understand agent behavior: Ours vs. BR (States) (top), Ours vs. Template (middle), and Ours vs. Human (bottom) over 1106 responses from 40 participants. Right: Helpfulness of interaction after being presented with an explanation with respect to _Explore_ and _Exploit_ policies across 40 responses from 10 participants. In both cases, Ours refers to BR (Path).
+
+as computed with a one-tailed binomial test with _p <_ 0 _._ 05. Participants significantly prefer the explanations produced by BR (Path) over both those produced by BR (States) as well as Template. We find that hypothesis **H2 is supported** as well, and participants did _not_ prefer the explanations produced by human domain experts over those generated by our proposed method.
+
+**Participants’ preference is not influenced by hallucination.** Furthermore, we note that participant choice was not influenced by hallucinations present within explanations. Half of the explanations produced by BR (States) had some form of hallucinated fact or reasoning. However, we find no significant difference in participant preference when comparing the subset of explanations with hallucination against the subset of explanations without hallucination. This indicates that either a) hallucinated facts do not diminish explanation helpfulness in the eyes of participants, or b) participants fail to identify hallucinated information. As a result of our study, we observe a similar preference between BR(Path) vs. BR(States, No-Hallucination) and BR(Path) vs. BR(States, Hallucination).
+
+## 5.2 EVALUATING EXPLANATION INTERACTIONS
+
+We next evaluated whether participants found the ability to interact with the LLM and the generated explanations helpful. We performed a within-subjects study where 10 participants were recruited and presented with a series of state-action pairs, natural language explanations, and an interactive chat window to an LLM. Participants were given a period of 5 minutes to interact with the system and then they were asked to indicate whether they found the ability to interact with the LLM helpful for understanding the agent’s behavior, or whether the initial explanation was sufficient. The results over 40 total responses are shown in Fig. 5 (right). The results **partially support hypothesis H3** and led to an interesting observation: human participants often assumed the agent would act exploitatively, much like the LLM. When the agent acted according to an exploitative strategy its actions aligned with the participants’ expectations, and interaction was _not_ found helpful. However, when the agent acted according to an exploration strategy the action was unexpected, and participants found the ability to issue follow-up queries to the LLM helpful for understanding agent behavior. We found participant interactions largely fell into three categories: clarification questions, counterfactual questions, and requests for concision. An example of such an interaction is shown in Fig. 3.
+
+## 6 CONCLUSION AND FUTURE WORK
+
+In this work, we propose a model-agnostic framework for producing natural language explanations for an agent’s behavior. Through construction of a _behavior representation_ , we are able to prompt an LLM to reason about agent behavior in a way that produces plausible and useful explanations, enables a user to interact and issue follow-up queries, and results in a minimal number of hallucinations, as measured through two participant studies and empirical experiments. While we recognize that our proposed method has limitations, namely that it requires distillation of an agent’s policy into a decision tree which only works with non-dense inputs, we feel this is a promising direction for explainable policies. Such limitations can be overcome with more complex behavior representations, e.g., differentiable decision trees or concept feature extractors, and we expect the quality of explanations to improve as LLMs grow more capable.
+
+9
+
+## REFERENCES
+
+Knowledge-grounded self-rationalization via extractive and natural language explanations. 2022.
+
+- Jose M Alonso, Alejandro Ramos-Soto, Ehud Reiter, and Kees van Deemter. An exploratory study on the benefits of using natural language for explaining fuzzy rule-based systems. In _2017 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE)_ , pp. 1–6. IEEE, 2017.
+
+- Ofra Amir, Finale Doshi-Velez, and David Sarne. Summarizing agent strategies. _Autonomous Agents and Multi-Agent Systems_ , 33:628–644, 2019.
+
+- Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? _Advances in neural information processing systems_ , 27, 2014.
+
+- Osbert Bastani, Carolyn Kim, and Hamsa Bastani. Interpretability via model extraction. _arXiv preprint arXiv:1706.09773_ , 2017.
+
+- Osbert Bastani, Yewen Pu, and Armando Solar-Lezama. Verifiable reinforcement learning via policy extraction. _Advances in neural information processing systems_ , 31, 2018.
+
+- Steven Bills, Nick Cammarata, Dan Mossing, Henk Tillman, Leo Gao, Gabriel Goh, Ilya Sutskever, Jan Leike, Jeff Wu, and William Saunders. Language models can explain neurons in language models. _URL [URL removed] blob. core. windows. net/neuron-explainer/paper/index. html.(Date accessed: 14.05. 2023)_ , 2023.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020.
+
+- Oana-Maria Camburu, Tim Rocktäschel, Thomas Lukasiewicz, and Phil Blunsom. e-snli: Natural language inference with natural language explanations. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Christian Arzate Cruz and Takeo Igarashi. Interactive explanations: Diagnosis and repair of reinforcement learning based agent behaviors. In _2021 IEEE Conference on Games (CoG)_ , pp. 01–08. IEEE, 2021.
+
+Mengnan Du, Ninghao Liu, and Xia Hu. Techniques for interpretable machine learning. _Communications of the ACM_ , 63(1):68–77, 2019.
+
+- Upol Ehsan, Pradyumna Tambwekar, Larry Chan, Brent Harrison, and Mark O Riedl. Automated rationale generation: a technique for explainable ai and its effects on human perceptions. In _Proceedings of the 24th International Conference on Intelligent User Interfaces_ , pp. 263–274, 2019.
+
+- Meherwar Fatima and Maruf Pasha. Survey of machine learning algorithms for disease diagnostic. _Journal of Intelligent Learning Systems and Applications_ , 9(01):1–16, 2017.
+
+- Jared T Freeman, Lixiao Huang, Matt Woods, and Stephen J Cauffman. Evaluating artificial social intelligence in an urban search and rescue task environment. In _AAAI 2021 Fall Symposium, 4-6 Nov 2021_ . AAAI, 2021.
+
+- Nicholas Frosst and Geoffrey Hinton. Distilling a neural network into a soft decision tree. _arXiv preprint arXiv:1711.09784_ , 2017.
+
+- Dimitra Gkatzia, Oliver Lemon, and Verena Rieser. Natural language generation enhances human decision-making with uncertain information. _arXiv preprint arXiv:1606.03254_ , 2016.
+
+- David Gunning, Mark Stefik, Jaesik Choi, Timothy Miller, Simone Stumpf, and Guang-Zhong Yang. Xai—explainable artificial intelligence. _Science robotics_ , 4(37):eaay7120, 2019.
+
+- Wenbo Guo, Xian Wu, Usmann Khan, and Xinyu Xing. Edge: Explaining deep reinforcement learning policies. _Advances in Neural Information Processing Systems_ , 34:12222–12236, 2021.
+
+10
+
+Yue Guo, Joseph Campbell, Simon Stepputtis, Ruiyu Li, Dana Hughes, Fei Fang, and Katia Sycara. Explainable action advising for multi-agent reinforcement learning. In _2023 IEEE International Conference on Robotics and Automation (ICRA)_ , pp. 5515–5521. IEEE, 2023.
+
+- Bradley Hayes and Julie A Shah. Improving robot controller transparency through autonomous policy explanation. In _Proceedings of the 2017 ACM/IEEE international conference on humanrobot interaction_ , pp. 303–312, 2017.
+
+- Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. _arXiv preprint arXiv:1503.02531_ , 2015.
+
+- Shengran Hu and Jeff Clune. Thought cloning: Learning to think while acting by imitating human thinking. _arXiv preprint arXiv:2306.00323_ , 2023.
+
+- W Lewis Johnson. Agents that learn to explain themselves. In _AAAI_ , pp. 1257–1263. Palo Alto, CA, 1994.
+
+- Daniel Kasenberg, Antonio Roque, Ravenna Thielstrom, Meia Chita-Tegmark, and Matthias Scheutz. Generating justifications for norm-related agent decisions. _arXiv preprint arXiv:1911.00226_ , 2019.
+
+- Robert Kass, Tim Finin, et al. The need for user models in generating expert system explanations. _International Journal of Expert Systems_ , 1(4), 1988.
+
+- Michael Lewis, Katia Sycara, and Illah Nourbakhsh. Developing a testbed for studying human-robot interaction in urban search and rescue. In _Human-Centered Computing_ , pp. 270–274. CRC Press, 2019.
+
+- Shiyang Li, Jianshu Chen, Yelong Shen, Zhiyu Chen, Xinlu Zhang, Zekun Li, Hong Wang, Jing Qian, Baolin Peng, Yi Mao, et al. Explanations from large language models make small reasoners better. _arXiv preprint arXiv:2210.06726_ , 2022.
+
+- Shuai Li, Azarakhsh Keipour, Kevin Jamieson, Nicolas Hudson, Charles Swan, and Kostas Bekris. Large-scale package manipulation via learned metrics of pick success. _arXiv preprint arXiv:2305.10272_ , 2023.
+
+- Guiliang Liu, Oliver Schulte, Wang Zhu, and Qingcan Li. Toward interpretable deep reinforcement learning with linear model u-trees. In _Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2018, Dublin, Ireland, September 10–14, 2018, Proceedings, Part II 18_ , pp. 414–429. Springer, 2019.
+
+- Tongtong Liu, Joe McCalmon, Thai Le, Md Asifur Rahman, Dongwon Lee, and Sarra Alqahtani. A novel policy-graph approach with natural language and counterfactual abstractions for explaining reinforcement learning agents. _Autonomous Agents and Multi-Agent Systems_ , 37(2):34, 2023.
+
+- Ana Marasovi´c, Chandra Bhagavatula, Jae sung Park, Ronan Le Bras, Noah A. Smith, and Yejin Choi. Natural language rationales with full-stack visual reasoning: From pixels to semantic frames to commonsense graphs. In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pp. 2810–2829. Association for Computational Linguistics, November 2020.
+
+- Ana Marasovi´c, Iz Beltagy, Doug Downey, and Matthew E Peters. Few-shot self-rationalization with natural language prompts. _arXiv preprint arXiv:2111.08284_ , 2021.
+
+- Ettore Mariotti, Jose M Alonso, and Albert Gatt. Towards harnessing natural language generation to explain black-box models. In _2nd Workshop on Interactive Natural Language Technology for Explainable Artificial Intelligence_ , pp. 22–27, 2020.
+
+- Nick McKenna, Tianyi Li, Liang Cheng, Mohammad Javad Hosseini, Mark Johnson, and Mark Steedman. Sources of hallucination by large language models on inference tasks. _arXiv preprint arXiv:2305.14552_ , 2023.
+
+- Tim Miller. Explanation in artificial intelligence: Insights from the social sciences. _Artificial intelligence_ , 267:1–38, 2019.
+
+11
+
+- Aditi Mishra, Utkarsh Soni, Jinbin Huang, and Chris Bryan. Why? why not? when? visual explanations of agent behaviour in reinforcement learning. In _2022 IEEE 15th Pacific Visualization Symposium (PacificVis)_ , pp. 111–120. IEEE, 2022.
+
+- Grusha Prasad, Yixin Nie, Mohit Bansal, Robin Jia, Douwe Kiela, and Adina Williams. To what extent do human explanations of model behavior align with actual model behavior? In _Proceedings of the Fourth BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP_ , pp. 1–14, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.blackboxnlp-1.1.
+
+- Erika Puiutta and Eric MSP Veith. Explainable reinforcement learning: A survey. In _International cross-domain conference for machine learning and knowledge extraction_ , pp. 77–95. Springer, 2020.
+
+- Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. Explain yourself! leveraging language models for commonsense reasoning. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 4932–4942, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1487.
+
+- Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. " why should i trust you?" explaining the predictions of any classifier. In _Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining_ , pp. 1135–1144, 2016.
+
+- Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In _Proceedings of the fourteenth international conference on artificial intelligence and statistics_ , pp. 627–635. JMLR Workshop and Conference Proceedings, 2011.
+
+- Tianmin Shu, Caiming Xiong, and Richard Socher. Hierarchical and interpretable skill acquisition in multi-task reinforcement learning. _arXiv preprint arXiv:1712.07294_ , 2017.
+
+- Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, Aurelien Chouard, Vijaysai Patnaik, Paul Tsui, James Guo, Yin Zhou, Yuning Chai, Benjamin Caine, et al. Scalability in perception for autonomous driving: Waymo open dataset. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 2446–2454, 2020.
+
+- Abhinav Verma, Vijayaraghavan Murali, Rishabh Singh, Pushmeet Kohli, and Swarat Chaudhuri. Programmatically interpretable reinforcement learning. In _International Conference on Machine Learning_ , pp. 5045–5054. PMLR, 2018.
+
+- Xinzhi Wang, Shengcheng Yuan, Hui Zhang, Michael Lewis, and Katia Sycara. Verbal explanations for deep reinforcement learning neural networks with attention on extracted features. In _2019 28th IEEE International Conference on Robot and Human Interactive Communication (RO-MAN)_ , pp. 1–7. IEEE, 2019.
+
+- Lindsay Wells and Tomasz Bednarz. Explainable AI and reinforcement learning—a systematic review of current approaches and trends. 4. ISSN 2624-8212.
+
+- Sarah Wiegreffe, Jack Hessel, Swabha Swayamdipta, Mark Riedl, and Yejin Choi. Reframing human-ai collaboration for generating free-text explanations. _arXiv preprint arXiv:2112.08674_ , 2021.
+
+- Renos Zabounidis, Joseph Campbell, Simon Stepputtis, Dana Hughes, and Katia P Sycara. Concept learning for interpretable multi-agent reinforcement learning. In _Conference on Robot Learning_ , pp. 1828–1837. PMLR, 2023.
+
+12
+
+## A APPENDIX
+
+To ensure the reproducibility of this study, the prompts used for querying the large language model are provided. These prompts contain four segments: a) a concise description of the environment the agent is operating in, e.g., state and action descriptions, b) a description of what information the behavior representation conveys, c) in-context learning examples, and d) the behavior representation and action that we wish to explain. While the final part is produced by the surrogate model on a caseby-case basis, the first three parts are supplied for reference.
+
+## **Environment Description**
+
+Within the environment description segment, the Large Language Model (LLM) is acquainted with the game rules to orient it within the USAR settings, aiming to counter any misconceptions spurred by the LLM’s general knowledge. Through testing, it is determined that GPT-4 displays considerable spatial reasoning skills. However, its north/south direction is opposite to our configurations, requiring explicit clarification. Additionally, we also address the contradiction between LLM knowledge and domain knowledge in this section. For instance, while the LLM assumes that rubble block the movement of agents, it does not in our context. The domain knowledge prompt is shared below:
+
+The game is a search and rescue game set in a grid world. There are two agents: a medic and an engineer. The grid is made up of rooms, each represented by coordinates (x,y), where x represents the east-west direction, and y represents the north-south direction. Specifically, a larger x value corresponds to a location further east, and a larger y value corresponds to a location further south, with y=0 being the northernmost row and increasing y values moving southward.
+
+- Both the engineer and the medic can move to an adjacent room in any of the four cardinal directions (north, south, east, west) during a single move.
+
+- The medic has the ability to rescue a victim during a single move; however, this action cannot be performed concurrently with movement to an adjacent room.
+
+- The engineer has the ability to remove rubble during a single move; this action also cannot be performed concurrently with movement to an adjacent room.
+
+- Both agents can only perceive what’s inside their current grid but have memory and can communicate instantly. Every grid visited by either of the agents is visible to both.
+
+- Rooms may initially be unexplored, in which case victims or rubble are assumed to be non-existent. Once explored, details about victims and rubble will be updated.
+
+- Rubble may or may not hide a victim. If a room contains rubble, victim is assumed to be non-existent. Removing the rubble may expose a hidden victim.
+
+- Rubble in the room won’t affect the movement of the agents.
+
+## **Behavior Representation Description**
+
+A description of the behavior representation is provided to the LLM such that it knows how to reason with the information we provide. We emphasize that the LLM should **interpret the policy of a neural network rather than formulating its own rationale** . It should adhere to the behavior representation provided to accurately elucidate the neural network’s policy. The respective task description prompt reads as follows:
+
+Given an observation of the environment, the agent chooses to look at a subset of features in order to choose its action, which we denote as "Features". These features represent parts of the observation that are directly related to why the agent chose its action. Given this subset of features that the agent looks at, provide a concise explanation for why the agent chose the action that it did. Keep in mind that the agent may not always be making optimal
+
+13
+
+decisions, so consider that possibility if there seems like no reasonable goal the agent could be trying to accomplish from the set of features.
+
+## **In-Context Learning (ICL) examples**
+
+The In-Context Learning (ICL) examples supply the LLM with instances of the expected outputs when an observation & action pair is presented. In this segment, we provide examples written by human domain experts. Without prior knowledge of the policy’s type, human is given the same description as above and try to formulate based on the provided feature & action pair. We incorporated three samples, one each from the three possible behaviors _Explore_ , _Exploit_ , _Fixed_ . Below is the human-written example for the _Explore_ policy.
+
+Features: room (0, 1) doesn’t contain rubble. engineer is not in room (0, 1). room (3, 2) doesn’t contain rubble. engineer is not in room (3, 2). room (3, 3) doesn’t contain rubble. engineer is not in room (3, 3). room (3, 4) contains rubble. engineer is not in room (3, 4). engineer is not in room (1, 1). engineer is not in room (3, 0). room (1, 3) doesn’t contain rubble. engineer is not in room (1, 3). engineer is not in room (0, 4). room (0, 4) doesn’t contain rubble. room (3, 1) doesn’t contain rubble. engineer is not in room (3, 1). room (2, 4) doesn’t contain rubble. engineer is not in room (2, 4). medic is not in room (2, 4). medic is not in room (2, 1). engineer is not in room (1, 2). room (2, 3) doesn’t contain a victim. medic is not in room (3, 2). medic is not in room (3, 1). room (2, 3) doesn’t contain rubble. engineer is not in room (2, 3). room (1, 4) doesn’t contain rubble. engineer is not in room (1, 4). room (0, 3) has been explored. room (0, 3) doesn’t contain a victim. medic is not in room (1, 4). room (2, 2) contains rubble.
+
+Action taken by the engineer:
+
+engineer moves east to room (1, 2).
+
+Explanation:
+
+The engineer moves east to room (1, 2) because the engineer is currently in room (0, 2) and room (2, 2) contains rubble. From the set of features it appears the engineer is primarily looking for rooms containing rubble so that it can remove them, and since room (2, 2) contains rubble the engineer may be moving east to reach room (2, 2) and remove the rubble.
+
+14
+
diff --git a/open_review/iclr2024_8530.json b/open_review/iclr2024_8530.json
new file mode 100644
index 0000000000000000000000000000000000000000..422f0d1e93a740377e7a83e5f115723b6b184674
--- /dev/null
+++ b/open_review/iclr2024_8530.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8530",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Decompose Time and Frequency Dependencies: Multivariate Time Series Physiological Signal Emotion Recognition",
+ "abstract": "In this study, we proposed a transformer based end-to-end solution to capture the relationship between the physiological signals and affective changes. We first convert the physiological signal emotion recognition prediction task to a sequence-to-sequence multivariate time series prediction task. We utilize the state-of-the-art (SOTA) self-attention mechanism to decompose the physiological signals into separate frequency domain and time domain representations, and capture the channel dependencies via Two-Stage Attention (TSA). Meanwhile, we implement the multitask learning framework to better predict the valence and arousal affective states individually. We evaluate our system on the Continuously Annotated Signals of Emotion (CASE) dataset used in the Emotion Physiology and Experience Collaboration (EPiC) challenge, and our proposed system outperform all the challenge participants in all four test scenarios.",
+ "rebuttal": "### General Response\nWe thank all the reviewers for their elaborate and constructive feedback. The following are our response to common concerns of all the reviwers:\n\n**Ablation Study**\n\n| Module | RMSE | CCC |\n| :------: | ---- | --- |\n| Time Decoder + Frequency Decoder | 0.9370 | **0.0352** | \n| TSA + Time Decoder | 0.8576 | 0.0290 |\n| TSA + Frequency Decoder | **0.7582** | 0.0198 |\n| TSA + Time Decoder + Frequency Decoder* | 0.7650 | 0.0288 |\n\nTable 1 presents the result of ablation study on Scenario 1. The evaluation metrics are root mean square error (RMSE) and concordance correlation coefficient (CCC), which is range from -1 to 1 indicating negative correlation and postive correlation respectively. The evaluation metrics in the table take average results of valence and arousal. **Bold** presents the best results of relative metrics.\n\n1* The result of Scenario 1 has been updated. The previous result was 0.8288 (average RMSE of valence and arousal). We revise the formula of the final output. \n\n**Analysis of the Ablation study**\nWe use RMSE and CCC as the metrics to reflect the model's ability on predicting seasonal and trend. Without two stage attention(TSA), the model with Time Decoder and Frequency Decoder has advantage on prediction trend and disadvantage on predicting seasonal. While the model with TSA, has advantage on predicting seasonal and disadvantage on trend. Our proposed method has the best tradeoff between the RMSE and CCC. We add predicition visualization in the appendix A.6 to better demostrate this. More explainations of the rationale and effectiveness of each component are in the following secton. \n\n\n**Rationale of Frequency Domain Attention**\n\nWavelet Transform and Fourier Transform has been widely applied in the physiological signal emotion recognition task as preprocessing method. As Frequency attention utilizes Wavelet and Fourier Transform technique and self-attention mechanism, we believe it has advantages on encoding the input physiological signal, decoding the frequency domain information of the target affective signal and capture the frequency domain relationship between the physilogical signal and affective signal. \n\n**Rationale of Time Domain Attention**\n\nWhile Frequency attention works fine on mitigate the seasonal difference between the prediction and target. It is not good at capturing the trend difference between the predicion and target on time domain. From Table 1, model with TSA and Frequency decoder has the best performance according to the MSE. However, model with TSA and Time decoder has best performance according to CCC among the models add TSA. To combine the advantage of both type decoder, we add them together. The model with TSA and both decoders achieves comparable performance to the models with individual decoder.\n\n**Rationale of Two Stage Attention**\n\nThe tranditional transformer based solution for time series task applied attention only on time step wise for each channel, where the channel wise dependencies are neglected. In our task specifically, TSA can provide the dependencies among each physiological signal and each affective signal addition to the vanilla Frequency and Time domain attention. From Table 1, adding TSA improve the model performance by 24.85% according to RMSE. \n\n**Revision**\nThe following are the revsion we made in the currenly uploaded version:\n1. We add prediction visualization in the appendix to better demostrate our rationale for each component.\n2. We add one more transformer based solution in the result section for more comprehensive comparison\n3. The final output formula in section 3.2.3 has been revised.\n\n### Looking forward to your feedback\nDear reviewer zx9B,\n\nThanks again for your valuable time and insightful comments. We are wondering if our response and revision have resolved your concerns. If our response has addressed your concerns, we would highly appreciate it if you could re-evaluate our work and consider raising the score.\n\nIf you have any additional questions or suggestions, we would be happy to have further discussions.\n\nBest regards,\n\nauthors\n\n### Looking forward to your feedback\nDear reviewer 8PZe,\n\nThanks again for your valuable time and insightful comments. We are wondering if our response and revision have resolved your concerns. If our response has addressed your concerns, we would highly appreciate it if you could re-evaluate our work and consider raising the score.\n\nIf you have any additional questions or suggestions, we would be happy to have further discussions.\n\nBest regards,\n\nauthors\n\n### Looking forward to your feedback\nDear reviewer s9qV,\n\nThanks again for your valuable time and insightful comments. We are wondering if our response and revision have resolved your concerns. If our response has addressed your concerns, we would highly appreciate it if you could re-evaluate our work and consider raising the score.\n\nIf you have any additional questions or suggestions, we would be happy to have further discussions.\n\nBest regards,\n\nauthors\n\n### Response to Reviewer 8PZe\nThank you for your time and effort in reviewing our paper. The following are our responses to your specific question and Concern:\n\n> **W1: Contributions of this paper**\n\n1. As Wavelet and Fourier transform are widely applied on physiological signal emotion recognition task for preprocessing. We want to investigate whether Wavelet and Fourier attentions have adavantages on physiological signal emotion recognition task. Our experiment resulst proves the Wavelet and Fourier attentions do have adavantages on predicting seasonal of target signal but has some limitation [...]\n\n### Response to Reviewer s9qV\nThank you for your time and effort in reviewing our paper and insightful suggestion. The following are our response to your concerns:\n>**W1: There should be more ablation studies to prove each component in the proposed method works.**\n\nThank you for point this out. We add the result of ablation study in the general response. We wi\n[rebuttal truncated]",
+ "initial_scores": [
+ 3,
+ 3,
+ 5
+ ],
+ "score_mean": 3.67,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "In this paper, the authors propose a transformer-based solution for physiological signal emotion recognition, by converting the recognition task to a multivariate time prediction task. The authors decompose the signals into separate time and frequency domain representations using self-attention mechanisms and capture channel dependencies. The proposed system outperforms other participants in the Emotion Physiology and Experience Collaboration challenge.\n\nStrengths:\n\n-The authors utilizes some state-of-the-art mechanisms, such as wavelet and Fourier attention, to decompose the physiological signals into separate frequency domain and time domain representations.\n-The authors introduce a two-stage attention mechanism to capture the dependencies between signals. This addresses the challenge of having both cross-time and cross-dimension dependencies and improves the model's ability.\n\nWeaknesses:\n- Contributions and results seem lacking\n- It is not clear that the model is generalizable as it is only evaluated on one dataset.\n-There should be more ablation studies to prove each component in the proposed method works.\n-The related work section introduces some references and attention mechanisms that the authors used, without the information about the following compared works.\n-The replace of the MSAs in the encoder should have evidence to prove its rationality and efficiency, so as the frequency and time domain TSA in the decoders.\n-Many simple formula notations are cumbersome, for e",
+ "forum_id": "edETIhDTwL",
+ "primary_area": "applications to neuroscience & cognitive science",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_s9qV",
+ "review_id": "90QQAEBaFm",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 1,
+ "contribution": 1,
+ "confidence": 5
+ },
+ "review_text_chars": 1512,
+ "edit_detected": true,
+ "edit_delta_seconds": 914522,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_8PZe",
+ "review_id": "0QAf89WzPd",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 5
+ },
+ "review_text_chars": 1814,
+ "edit_detected": true,
+ "edit_delta_seconds": 919991,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_zx9B",
+ "review_id": "y0at0BwtbA",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4816,
+ "edit_detected": true,
+ "edit_delta_seconds": 2164975,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8530.md b/open_review/iclr2024_8530.md
new file mode 100644
index 0000000000000000000000000000000000000000..0ef95e7145d01ff6fae6ed52789b302db3921dcb
--- /dev/null
+++ b/open_review/iclr2024_8530.md
@@ -0,0 +1,388 @@
+
+
+DECOMPOSE TIME AND FREQUENCY DEPENDENCIES: - MULTIVARIATE TIME SERIES PHYSIOLOGICAL SIG NAL EMOTION RECOGNITION
+
+##
+
+Authors withheld for review
+
+## ABSTRACT
+
+In this study, we proposed a transformer based end-to-end solution to capture the relationship between the physiological signals and affective changes. We first convert the physiological signal emotion recognition prediction task to a sequenceto-sequence multivariate time series prediction task. We utilize the state-of-theart (SOTA) self-attention mechanism to decompose the physiological signals into separate frequency domain and time domain representations and capture the channel dependencies via Two-Stage Attention (TSA). Meanwhile, we implement the multitask learning framework to better predict the valence and arousal affective states individually. We evaluate our system on the Continuously Annotated Signals of Emotion (CASE) dataset used in the Emotion Physiology and Experience Collaboration (EPiC) challenge, and our proposed system outperform all the challenge participants in all four test scenarios.
+
+## 1 INTRODUCTION
+
+Affective Computing is defined by Rosalind Picard as computation that relates to, arises from, or deliberately influences emotions. Picard (1997) The computation can be driven by audio, visual, textual, physiological, and multimodal inputs and the annotation of the task can be categorical (e.g., 7-8 basic emotion), discrete (e.g., discrete Valence/Arousal(VA) space), and continuous (e.g., continuous VA space). While emotion recognition with audio, visual and textual inputs has been benefited from the development of auto-speech recognition(ASR), Computer Vision(CV) and Natural Language Processing(NLP),Chen et al. (2023)Ma et al. (2021)Acheampong et al. (2021), state-ofthe-art(SOTA) results of emotion recognition with physiological signal is still dominated by feature engineering and machine learning model.Bota et al. (2019) Until recently, several studies have investigated transformer based solution of physiological emotion recognition. Vu et al. (2023); Vazquez-Rodriguez et al. (2022b;a); Yang et al. (2022) Inspired from the success of theses studies we proposed a transformer based multivariate time-series model to solve the physiological emotion recognition problem with continuous valence and arousal emotion states annotation. We apply the recent SOTA model in time series prediction task to physiological emotion recognition.
+
+Information in both the time domain and the frequency domain is significant for physilogical emotion recognition. Therefore, we choose to use wavelet and Fourier attention proposed by FEDformerZhou et al. (2022) to capture frequency domain dependencies as Fourier transform and Wavelet transform has been widely applied in this task. Meanwhile, we utilize auto-correlation attention Wu et al. (2021) to capture time domain dependencies. Meanwhile, unlike the common multivariate time series prediction, in this task, the input signal and target signal are in different domains. Therefore, we need to capture the inner channel dependencies between the input and the target. We utilize the Two-Stage attention Zhang & Yan (2022) and replace the vanilla multihead self-attention (MSA) Vaswani et al. (2017) with wavelet attention to explore the channel-wise time-frequency dependencies. To further improve model efficiencies and robustness, we applied the multitask learning framework to separate model predictions of valence and arousal with a shared backbone.
+
+The major contribution of this paper are :
+
+1
+
+1. We propose a new State-of-the-art (SOTA) transformer-based solution for physiological signal emotion recognition.
+
+2. We propose a new model architecture and framework for domain-inconsistent multivariate time series prediction.
+
+3. Our proposed method achieved SOTA results on the Continuously Annotated Signals of Emotion (CASE) dataset. Sharma et al. (2019)
+
+## 2 RELATED WORK
+
+## 2.1 AUTOFORMER
+
+Autoformer utilizing the Auto-correlation mechanism to generate long-term time series prediction.Wu et al. (2021) It introduces an Auto-correlation Attention to replaces the Multihead SelfAttention(MSA) in the vanilla transformer. It also proposed deep decomposition architecture to replace the vanilla transformer Encoder-Decoder architecture and series decomposition block to decompose the time series sequence into trend-cyclical and seasonal components.
+
+## 2.1.1 AUTO-CORRELATION ATTENTION
+
+Auto-correlation Attention is a time domain attention based on auto-correlation mechanism. Let _**Q** ,_ _**K** ,_ _**V**_ denote the query, key, and value inputs of the attention. It first capture time delay similarity via auto-correlation calculation based a fix _τ_ length time delay window between _**Q**_ and _**K**_ . It then choose most possible _k_ window periods and normalize them with Softmax. The final output will aggregate the product of rolling _**V**_ based on the same _τ_ length window and the normalized _k_ autocorrelation result of _**Q**_ and _**K**_ . The process can be formulized as:
+
+**==> picture [341 x 105] intentionally omitted <==**
+
+where _**Q** ,_ _**K** ,_ _**V**_ are the attention input, _τ_ is the time delay window length, Roll(X _, τ_ ) is the operation shift the element in _**X**_ by _τ_ length window and the element shift beyond the first position will re-introduced at the last position. In this study, we utilize the Auto-correlation Attention to decompose the pure time domain representation from the time-frequency representation from the encoder.
+
+## 2.1.2 SERIES DECOMPOSITION
+
+The series decomposition block decomposes the series sequence into trend-cyclical and seasonal components. The decompose process can be presented as:
+
+**==> picture [260 x 24] intentionally omitted <==**
+
+where _**X** ∈_ R _[L][×][d]_ is raw time series, _**T** ,_ _**S** ∈_ R _[L][×][d]_ and are the decomposed trend and seasonal components. The following of the paper will denote this block as _**T** ,_ _**S**_ = SeriesDecomp( _**X**_ ).
+
+## 2.2 FEDFORMER
+
+In Zhou et al. (2022), the authors proposed a new transformer based for long-term time series prediction that utilize the frequency domain representation. It inherit the same model architecture from Autoformer and but replace the auto-correlation attention in time domain with Fourier and Wavelet
+
+2
+
+attention in frequency domain. It also further improve series decomposition block with multiple window length instead of fix window length.
+
+## 2.2.1 FOURIER ATTENTION
+
+FEDformer model propose a pure frequency domain attention based on Fourier transform with global property. Let _F_ and _F[−]_[1] denote Fourier transform and inverse Fourier transform. The Fourier attention will first transform the attention input _**Q** ,_ _**K** ,_ _**V**_ into frequency domain and perform attention mechanism via Fourier transform and transform the attention representation back to time domain via inverse Fourier transform. The process of the Fourier attention could be shown as:
+
+Fourier-Attention( _**Q** ,_ _**K** ,_ _**V**_ ) = _F[−]_[1] (Padding( _σ_ ( _F_ ( _**Q**_ ) _· F_ ( _**K**_ ) _[T]_ ) _· F_ ( _**V**_ ))) (3) where _F_ denotes random selecting modes Fourier transform, and _σ_ denotes the activation function. Details of selecting method could be found in Zhou et al. (2022).
+
+In this study, the Fourier Attention is implemented for decompose the pure frequency domain representation from time-frequency domain representation from the encoder.
+
+## 2.2.2 WAVELET ATTENTION
+
+Wavelet attention is another version of frequency enhanced attention proposed by FEDformer. It is a time and frequency attention with local property. The wavelet attention will first decompose the attention input _**Q** ,_ _**K** ,_ _**V**_ in multiscale and perform attention mechanism on each scale and then reconstruct the attention representation. Let _F_ and _F[−]_[1] denote Wavelet decomposition and Wavelet reconstruction process. The Wavelet attention can be formulized as:
+
+Wavelet-Attention( _**Q** ,_ _**K** ,_ _**V**_ ) = _W[−]_[1] ( _σ_ ( _W_ ( _**Q**_ ) _· W_ ( _**K**[T]_ )) _· W_ ( _**V**_ )) (4) where _σ_ denotes the activation function. Details of the multiwavelet implementation could be found in Zhou et al. (2022).
+
+In this study, we utilize the wavelet attention to extract time-frequency representation from the encoder input and then decomposed by the time and frequency decoder into pure time domain and frequency domain representation.
+
+## 2.3 MIXTURE OF EXPERTS SERIES DECOMPOSITION(MOE-DECOMPOSE)
+
+FEDformer proposed a multi-kernel version of series decomposition block. The trend component _**T**_ will be extracted from a set of AvgPool layers and sum the result with weight. The redesigned trend can be presented as:
+
+_**T**_ = SoftMax(L( _**X**_ )) _×_ P( _**X**_ ) (5)
+
+where SoftMax(L( _**X**_ )) denote the weights, and P( _·_ ) denote the set of AvgPool layers. This block will be denoted as _**T** ,_ _**S**_ = MOEDecomp(( _**X**_ )) in rest of the paper.
+
+## 2.4 CROSSFORMER
+
+While most time series prediction model focuses on cross-time dependencies, recently,Zhang & Yan (2022) proposed a new embedding layer and attention framework which can capture both cross-time dependencies and cross-dimensional dependencies with patch segmentation.
+
+## 2.4.1 DIMENSION WISE SEGMENT (DSW) EMBEDDING
+
+The dimension wise segment (DSW) embedding will first segment the model input into fix length patches. To make embedding contains cross-dimension dependencies, DSW embedding embeds the input over patches axis, instead of feature(or channel) axis of the inputs. Let Lseg denote the patch size (or segment length). The embedding could be shown as:
+
+_**X** embed_ = E _segment_ ( _**X** inp_ ) + E _pos_ (6)
+
+where _**X** inp ∈_ R _[T][ ×][C]_ denote the model input, and _T_ is sequence length and _C_ is the number of channels (or features). _**X** embed ∈_ R _[C][×] LsegT[×][D][model]_ denote embedded input and E are the learnable representations, where _Dmodel_ is the number of hidden units of the E. In this study, we customized DSW embedding and details about our implementation will be discussed in section 3.1.3
+
+3
+
+## 2.4.2 TWO-STAGE ATTENTION (TSA)
+
+To capture the both cross-time and cross-dimension dependencies from DSW embedded input, Crossformer proposed a new attention layer called Two-Stage Attention (TSA), which process the 2D embedded input through two different stages, cross-time stage and cross-dimension. In the crosstime stage, the attention is calculated along the time segment axis and in the cross-dimension stage the attention is calculated over the channel axis. Two-Stage Attention can be formulized as:
+
+**==> picture [248 x 28] intentionally omitted <==**
+
+where _**X**[dim]_ denotes the output the TSA block.
+
+Details about the vanilla implementation of TSA are described in Appendix A.2. Our customized TSA implementation of Frequency enhanced TSA, Frequency Domain TSA and Time Domain TSA are described in Appendix A.3,A.4, and A.5 repectively.
+
+## 3 METHODOLOGY
+
+We first convert the physiological signal emotion recognition task to a multivariate time series sequence-to-sequence prediction task. Denote the input physiological signal as _**I**_ , the target valence and arousal signal as _**V** ,_ _**A**_ , and the sample rate difference between them as ∆= (Input sample rate) _/_ (Output sample rate). The common long term time series prediction task will have encoder input with _i_ time step and decoder input with _i/_ 2 + _o_ time step, where _i_ is defined as the sequence length, _i/_ 2 is defined as the label length, and _o_ is defined as the prediction length. Due to the inconsistency between the input and target domains in this task, we change the label length to _o/_ 2 instead. With the sample rate difference ∆, the sequence length _i_ will be ∆ _×_ ( _o/_ 2 + _o_ ).
+
+## 3.1 DATA PREPROCESSING
+
+The data prepossessing of this model includes 3 parts: signal preprocessing, patch segmentation, and sequence embedding.
+
+## 3.1.1 SIGNAL PREPROCESSING
+
+We utilize the same preprocessing implementation of D’Amelio et al. (2023). Including 6 filtered physiological signals (3 ECG signals, EMG , GSR), 2 raw signals (BVP, SKT) and 5 additional continuous signals extracted from physiological signals: 3 from EDA (phasic component, sparse SMNA driver of the phasic component, and tonic component), 1 from ECG (NN intervals) and 1 from respiration (instantaneous respiratory rate). All the filtered signals are processed following the recommendation from Makowski et al. (2021). The details of the 5 additional continuous signals can be found in D’Amelio et al. (2023).
+
+## 3.1.2 PATCH SEGMENTATION AND INPUT PROJECTION
+
+In this study, the sample rate difference between the input (1kHz) and the target (20Hz) signals is 50. As a result, we used a fixed length 50 to segment the input signal to match the target signal dimension. Meanwhile the moving average kernel of Series Decomposition Block for the input signal is also fixed as 50.
+
+Due to the input signal and the target signal having different channels, we use two linear blocks to project the decomposed input signals seasonal and trend to the same channel dimension with the target. The seasonal will be first project to target channel dimension then segment to patches with size as 50 to keep most original channel-wise distribution. The trend will first segment to patches with size as 50 and then project to the target channel dimension to keep most original timestep-wise
+
+4
+
+distribution. The process can be formulized as follows:
+
+**==> picture [272 x 78] intentionally omitted <==**
+
+where _**S** inp,_ _**T** inp ∈_ R _[i][×][C][inp]_ are the seasonal and trend decompose from the input signals _Xinp_ (the preprocessed physiological signals), _i_ is the input (sequence) length and _Cenc_ denote the channel dimension of the encoder input. _**T** seg ∈_ R _[o][×][C][enc]_ , is the segmented trend and _o_ is the output(prediction) length _**S** proj,_ _**T** proj ∈_ R _[o][×][C][dec]_ are the projected seasonal and trend and _Cenc_ denote the channel dimension of the decoder input.
+
+## 3.1.3 SEQUENCE EMBEDDING
+
+We combine DSW embedding with the time feature embedding generated from the timestamp of the signals. We drop the positional embedding including in the Crossformer implementation. The reasons are: 1) The sequential information is inherited in the time feature embedding; 2) From the FEDformer implementation and our own practical and empirical results, adding positional embedding with time feature embedding will cause unnecessary overfitting which eventually decreased the model performance.
+
+For the patch size (or segment length) of DSW embedding, we use 1,2,5,25,50 for encoder input and 1,3,5,15 for decoder input as different initial time domain resolution. Then all different patch size embedding are sum together to generate a dynamic resolution DSW embedding. The embedding process is shown as following:
+
+**==> picture [298 x 64] intentionally omitted <==**
+
+where E denotes the learnable embedding layer, _**X** enc ∈_ R _[i][×][D][model]_ denotes the encoder input, and _**S** proj ∈_ R _[i][×][C][dec]_ and _**S** dec ∈_ R _[o][×][C][dec]_ denote projected seasonal part and segmented seasonal. _**X** dec ∈_ R _[o][×][D][model]_ denotes the input of the decoder.
+
+## 3.2 MODEL ARCHITECTURE
+
+**==> picture [374 x 141] intentionally omitted <==**
+
+Figure 1: Overall Model Architecture
+
+5
+
+**==> picture [302 x 97] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Encoder TSA (b) Frequency Decoder TSA (c) Time Decoder TSA **----- End of picture text -----**
+
+Figure 2: TSA architecture for encoder and decoder
+
+The proposed model architecture is shown in Figure1. It includes one encoder block and two decoder blocks. The general architecture is similar with FEDformer. However, instead of plain frequency domain (Fourier and Wavelet) and time domain(Auto-correlation) attention, we reconstructed the self-attention block with TSA framework. The structures of the reconstructed self-attention block of the encoder and the decoders are shown in Figure2. Details of the encoder block and decoder blocks will be introduced in Section 3.2.1 and Section 3.2.2. In section 3.2.3, we introduce the technique to handle the domain inconsistency in this task. The loss function and the multitask framework will be introduced in Sections 3.3 and 3.4.
+
+## 3.2.1 ENCODER
+
+The encoder contains 3 major parts, Frequency Enhanced TSA, MOE-Decompose, and FeedForward layer, which can be formulized as:
+
+**==> picture [336 x 45] intentionally omitted <==**
+
+where _**S** enc[l,k][k][∈]_[1] _[,]_[ 2][ denote the seasonal part from the k-th decomposition block, and] _[ l]_[ denotes the l-] th encoder layer of the multi-layer structure. denotes the dropped trend component. The frequency enhanced TSA has the similar structure with the vanilla TSA(detail structure in section 2.4.2) but replacing the MSA in Cross-time stage with Wavelet Self-Attention and the MSAs in the CrossDimension stage with Wavelet Cross-Attention as shown in Figure 2a and details implementation are described in Appendix A.3. The output of the encoder will be the seasonal component of the second decomposition block. By replacing the MSA with wavelet attention, the encoder will generate local time-frequency domain representation from both timestep-wise and channel-wise.
+
+## 3.2.2 DECODER
+
+There are two decoders in the structure to decomposed the time-frequency domain representation from encoder into pure frequency domain and time domain representations. The decoding process can be formulized as:
+
+**==> picture [297 x 32] intentionally omitted <==**
+
+6
+
+where Frequency Decoder can be presented as:
+
+_**S** dec[l,]_[1(] _[freq]_[)] _,_ _**T** dec[l,]_[1(] _[freq]_[)] = MOEDecomp(FrequencyDomainTSA( _**X** dec[l][−]_[1][) +] _**[ X]** dec[l][−]_[1][)] _**S** dec[l,]_[2(] _[freq]_[)] _,_ _**T** dec[l,]_[2(] _[freq]_[)] = MOEDecomp(FourierCrossAttention( _**S** dec[l,]_[1(] _[freq]_[)] _,_ _**X** enc[N]_[) +] _**[ S]** dec[l,]_[1(] _[freq]_[)] ) _**S** dec[l,]_[3(] _[freq]_[)] _,_ _**T** dec[l,]_[3(] _[freq]_[)] = MOEDecomp(FeedForward( _**S** dec[l,]_[2(] _[freq]_[)] ) + _**S** dec[l,]_[2(] _[freq]_[)] ) (12) _**X** dec[l]_[(] _[freq]_[)] = _**S** dec[l,]_[3(] _[freq]_[)] _**T** dec[l]_[(] _[freq]_[)] = _**T** dec[l][−]_[1(] _[freq]_[)] + _**W** l,_ 1 _×_ _**T** dec[l,]_[1(] _[freq]_[)] + _**W** l,_ 2 _×_ _**T** dec[l,]_[2(] _[freq]_[)] + _**W** l,_ 3 _×_ _**T** dec[l,]_[3(] _[freq]_[)]
+
+The Time Decoder will be similar with Frequency Decoder but replacing the Frequency Domain Decoder to Time Domain Decoder, and Fourier Cross Attention to Auto-correlation attention.
+
+The structures of Frequency and Time domain TSA are shown in Figure 2b and 2c respectively and details implementation are described in Appendix A.4 and A.5 repectively. Frequency domain TSA replaces the Cross-Time Attention with Fourier Attention, and time domain TSA replaces it with Auto-correlation attention. Both frequency and time domain TSA replace MSAs in the CrossDimension attention with wavelet cross-attention.
+
+The decoders will generate pure frequency and time domain representations along each timestep and time-frequency domain representations over each channel. Then, generate pure frequency and time domain representation with encoder output through the Fourier Cross Attention and Auto-correlation attention, respectively. The final decoder output will be sum of both frequency decoder and time decoder after multiplied the domain adaptive ratio, which will be introduced in the following section.
+
+## 3.2.3 DOMAIN ADAPTATION RATIO
+
+Unlike common multivariate time series prediction, in this task, the feature signal and the target signal have different domains. To address this, we implemented a learnable adaptive ratio. We first project the seasonality and trend extracted from the input physiological signals to the same channel dimension with the target signal via 2 linear blocks(each for valence and arousal respectively). Then, we calculate the difference ratio between the feature and target signal over the label length and the difference ratio between the feature signal over the label length and the prediction length. The final domain adaptation ratio will be the product of these two ratios. The formula of the domain adaptive ratio is presented in Appendix A.1 and the final model outputs will be:
+
+**==> picture [303 x 57] intentionally omitted <==**
+
+where ratio _**S** ,_ ratio _**T**_ denote the seasonal and the trend adaptive ratio respectively, and _**X** dec_ denote the model output.
+
+## 3.3 LOSS FUNCTION
+
+Dilate loss is selected as loss function for this study.Le Guen & Thome (2019) It can address the shape and temporal distortion of time series prediction. It contains two parts _Lossshape_ and _Losstemproal_ , which can be formulized as:
+
+**==> picture [279 x 11] intentionally omitted <==**
+
+The shape loss _Lshape_ is based on the Dynamic Time Warping (DTW), and the temproal loss is calualting Time Distortion Index (TDI) for temporal misalignment estimation. Details of the formulas can be found in Le Guen & Thome (2019).
+
+## 3.4 MULTI-TASK LEARNING
+
+> We implement the multitask framework to separately predict valence and arousal. The top layer of the decoders will generate separate _**X** dec[l]_[(] _[valence]_[)] , _**T** dec[l]_[(] _[valence]_[)] for valence and _**X** dec[l]_[(] _[arousal]_[)] , _**T** dec[l]_[(] _[arousal]_[)]
+
+7
+
+for arousal. The final model output _**X** dec_ will be:
+
+**==> picture [284 x 48] intentionally omitted <==**
+
+The loss function of valence and arousal predictions will be calculated separately. To combine the loss of valence _Lvalence_ and the loss of arousal _Larousal_ , we implement the joint loss _Ljoint_ proposed in Kendall et al. (2018). The formula is:
+
+**==> picture [355 x 25] intentionally omitted <==**
+
+where _σ_ is noise parameter.
+
+## 4 EXPERIMENTS & RESULTS
+
+## 4.1 DATASET
+
+The evaluation dataset used in this study is the Continuously Annotated Signals of Emotion (CASE) dataset.Sharma et al. (2019) It contains the physiological and annotation data from 30 participants, including 15 male and 15 female. The continuous valence and arousal annotations are reported by the participant via a joystick simultaneously while watching various videos. The physiological data is also collected while the participants are watching videos from electrocardiograph (ECG), blood volume pulse(BVP), electromyography(EMG) (3 channels), Galvanic Skin Response(GSR) (or Electrodermal(EDA)), respiration(RSP) and skin temperature(SKT) sensors, in total 8 raw physiological measurements. The sample rate of the physiological signals is 1000Hz and sample rate of the annotation is 20Hz.
+
+## 4.2 EXPERIMENT SETTINGS
+
+We follows the experiment settings of the Emotion Physiology and Experience Collaboration (EPiC) challenge. The CASE dataset will be split into four different test scenarios. In total, there are 240 files which are generated from 30 participants watch eight videos, categorized in four emotion, ”scary”, ”relaxing”, ”boring”, and ”amusing”. Annotation data is range from 0.5-9.5. Details of each scenario setting will be introduced in the following section.
+
+- **Across-time scenario:** In this scenario, the 240 data files are divided into training data and testing data based on the timestamp. The former part of the data files are selected as the training data and the latter part of the data file become the testing data. This scenario is aiming to examine the model’s ability of capturing the time dependencies between the samples.
+
+- **Across-subject scenario:** In across-subject scenario, 30 participants are divided into 5 folds, where each folds contains 24 participants as the training data (192 files in total) and 6 participants as the testing data (48 files). This scenario aims to evaluate the model’s subject independence performance.
+
+- **Across-elicitor scenario:** In this scenario, the eight videos which are labeled in four different emotions will be divided into four folds. Each fold contains six videos categorized in three emotions (180 files) as training data and two videos categorized in the left emotion (60 files) as testing data. This scenario aims to test the model’s generalization ability towards unseen emotion.
+
+- **Across-version scenario:** In across-version scenario, eight videos categorized in four emotions are separated into 2 folds. Each fold contain four videos that categorized in all four emotions (120 files) as training data and the other four videos categorized in all four emotions (120 files) are treated as different version to be testing data. This scenario aims to verify if the model can generalize the emotional state learned from one source to another source elicits the same emotional state.
+
+8
+
+Table 1: RMSE of All scenarios. Comparing with results from AutoGluon(Dollack et al., 2023) and RF or XGBoost (D’Amelio et al., 2023), Multi-scale Transformer(Vu et al., 2023)
+
+|**Ours** **AutoGluon** **RF or** **XGBoost** **Multi-scale** **Transformer**|**Ours** **AutoGluon** **RF or** **XGBoost** **Multi-scale** **Transformer**|**Ours** **AutoGluon** **RF or** **XGBoost** **Multi-scale** **Transformer**|**Ours** **AutoGluon** **RF or** **XGBoost** **Multi-scale** **Transformer**|**Ours** **AutoGluon** **RF or** **XGBoost** **Multi-scale** **Transformer**|
+|---|---|---|---|---|
+|**Scenarios** **Fold** **Valence** **Arousal** **Valence** **Arousal** **Valence** **Arousal** **Valence** **Arousal**|||||
+|Across-time scenario|**0.84** **0.69**|0.95 0.91|0.87 0.85|1.50 1.64|
+|Across- subject scenario 0 1 2 3 4 Scenario level|0.62 0.59 0.49 0.53 0.53 0.64 0.48 0.48 0.45 0.50 **0.51** **0.55**|1.14 1.14 1.17 1.03 1.21 1.18 1.26 0.92 1.13 0.74 1.18 1.00|- - - - - - - - - - 1.36 1.17|- - - - - - - - 1.34 1.35|
+|Across- elicitor scenario 0 1 2 3 Scenario level|1.93 2.40 0.94 0.65 0.73 0.86 0.89 0.62 **1.12** **1.13**|2.36 2.29 1.27 0.92 0.92 1.35 1.15 1.20 1.42 1.44|- - - - - - - - 1.49 1.63|- - - - - - 1.51 1.51|
+|Across- version 0 1|0.84 0.81 0.96 1.04|1.06 1.00 1.54 1.60|- - - -|- - - -|
+|scenario|||||
+|Scenario level|**0.90** **0.93**|1.30 1.30|1.36 1.52|1.37 1.35|
+
+## 4.3 MODEL SETTINGS
+
+The sequence length for all scenarios is 2250, the label length is 15 and the prediction length is 30. The batch size for all scenarios set as 16. We use the AdamW optimizer with 1 _e[−]_[5] weight decay. Models for each scenario are trained 15 epochs.
+
+## 4.4 RESULTS
+
+The inference process of our model require pseudo label. In Across-time scenario, the pseudo label will generated from the label length segment of the end of the training data with same subject id an video id. In Across-subject scenario, we first explore the training data has the same video ID as the testing data, and then the gender of training subject and with the testing subject. In Across-elicitor scenario, our optimal result achieved from utilizing the training data not containing ’scary’ elicitor. The poor performance of fold 0 RMSE in Across-elicitor scenario due to the testing data are the videos labeled as ’scary’. In Across-version scenario, our optimal result doesn’t achieve from using the pseudo label from exact matched version. In some cases, the pseudo label from other elicitor yield better results.
+
+Table1 presents the results of four scenarios. AutoGluon solution proposed by Dollack et al. (2023) achieves the first place in EPiC challenge, RF/XGBoost solution proposed by D’Amelio et al. (2023) achieves third place in the challenge , and the multi-scale Transformer-based solution proposed by Vu et al. (2023). Our results outperforms the other three solutions in all four scenarios, which proves our solution is very promising and can achieve SOTA result in all the test scenarios.
+
+## 5 CONCLUSION
+
+In this study we proposed a SOTA transformer based solution for EPiC challenge. Our proposed model achieve SOTA result in all four scenarios. It proves our proposed method is very promising. For future work, we will improve the model architecture to make it more adaptive to the domain inconsistent situation.
+
+## REFERENCES
+
+- Francisca Adoma Acheampong, Henry Nunoo-Mensah, and Wenyu Chen. Transformer models for text-based emotion detection: a review of bert-based approaches. _Artificial Intelligence Review_ , pp. 1–41, 2021.
+
+9
+
+- Patricia J Bota, Chen Wang, Ana LN Fred, and Hugo Pl´acido Da Silva. A review, current challenges, and future possibilities on emotion recognition using machine learning and physiological signals. _IEEE Access_ , 7:140990–141020, 2019.
+
+- Weidong Chen, Xiaofen Xing, Xiangmin Xu, Jianxin Pang, and Lan Du. Dst: Deformable speech transformer for emotion recognition. In _ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 1–5. IEEE, 2023.
+
+- Felix Dollack, Kiyoshi Kiyokawa, Huakun Liu, Monica Perusquia-Hernandez, Chirag Raman, Hideaki Uchiyama, and Xin Wei. Ensemble learning to assess dynamics of affective experience ratings and physiological change. _2023 11th International Conference on Affective Computing and Intelligent Interaction Workshops and Demos (ACIIW)_ , 2023.
+
+- Tom´as A. D’Amelio, Nicol´as M. Bruno, Leandro A. Bugnon, Federico Zamberlan, and Enzo Tagliazucchi. Affective computing as a tool for understanding emotion dynamics from physiology: A predictive modeling study of arousal and valence. _2023 11th International Conference on Affective Computing and Intelligent Interaction Workshops and Demos (ACIIW)_ , 2023.
+
+- Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 7482–7491, 2018.
+
+- Vincent Le Guen and Nicolas Thome. Shape and time distortion loss for training deep time series forecasting models. _Advances in neural information processing systems_ , 32, 2019.
+
+- Fuyan Ma, Bin Sun, and Shutao Li. Facial expression recognition with visual transformers and attentional selective fusion. _IEEE Transactions on Affective Computing_ , 2021.
+
+- Dominique Makowski, Tam Pham, Zen J Lau, Jan C Brammer, Franc¸ois Lespinasse, Hung Pham, Christopher Sch¨olzel, and SH Annabel Chen. Neurokit2: A python toolbox for neurophysiological signal processing. _Behavior research methods_ , pp. 1–8, 2021.
+
+- Rosling Picard. Affective computing. cambridge, massachustes institure of technology, 1997.
+
+- Karan Sharma, Claudio Castellini, Egon L van den Broek, Alin Albu-Schaeffer, and Friedhelm Schwenker. A dataset of continuous affect annotations and physiological signals for emotion analysis. _Scientific data_ , 6(1):196, 2019.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Juan Vazquez-Rodriguez, Gr´egoire Lefebvre, Julien Cumin, and James L Crowley. Emotion recognition with pre-trained transformers using multimodal signals. In _2022 10th International Conference on Affective Computing and Intelligent Interaction (ACII)_ , pp. 1–8. IEEE, 2022a.
+
+- Juan Vazquez-Rodriguez, Gr´egoire Lefebvre, Julien Cumin, and James L Crowley. Transformerbased self-supervised learning for emotion recognition. In _2022 26th International Conference on Pattern Recognition (ICPR)_ , pp. 2605–2612. IEEE, 2022b.
+
+- Tu Vu, Van Thong Huynh, and Soo-Hyung Kim. Multi-scale transformer-based network for emotion recognition from multi physiological signals. _arXiv preprint arXiv:2305.00769_ , 2023.
+
+- Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. _Advances in Neural Information Processing Systems_ , 34:22419–22430, 2021.
+
+- Kangning Yang, Benjamin Tag, Yue Gu, Chaofan Wang, Tilman Dingler, Greg Wadley, and Jorge Goncalves. Mobile emotion recognition via multiple physiological signals using convolutionaugmented transformer. In _Proceedings of the 2022 International Conference on Multimedia Retrieval_ , pp. 562–570, 2022.
+
+10
+
+- Yunhao Zhang and Junchi Yan. Crossformer: Transformer utilizing cross-dimension dependency for multivariate time series forecasting. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Tian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang, Liang Sun, and Rong Jin. Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting. In _International Conference on Machine Learning_ , pp. 27268–27286. PMLR, 2022.
+
+## A APPENDIX
+
+## A.1 FORMULA OF DOMAIN ADAPTIVE RATIO
+
+The domain adaptive ratio can be formulized as :
+
+**==> picture [289 x 152] intentionally omitted <==**
+
+where the _ratioS ratioT_ denote the adaptive ratio for seasonal and trend respectively. (0 _,...,[o]_ 2[)(] _[target]_[)] _Xraw_ denote the target signal with the label length.
+
+## A.2 VANILLA TSA IMPLEMENTATION
+
+The Cross Time stage Attention(CTA) is structured as:
+
+**==> picture [299 x 30] intentionally omitted <==**
+
+where _**X** t,_ _**X** t[time] ∈_ R _LsegT[×][D][model]_ denote for the input and output of the cross-time stage attention, LayerNorm and MSA denote the layer normalization layer and vanilla multi-head self attention. and Cross Dimension stage Attention(CDA) is presented as:
+
+**==> picture [307 x 63] intentionally omitted <==**
+
+where _**R** ∈_ R _[f][×][D][model]_ is learnable vector which server as router to reduce the computation complexity and _f_ is a constant number denote the number of the routers. _**X** d[time] ∈_ R _[C][×][D][model]_ denotes the reshaped cross-time stage attention output as the cross-dimension stage attention input, and _**X**[dim] ∈_ R _[C][×] LsegT[×][D][model]_ denotes the cross dimension stage output. The _**X**[dim]_ will also be the final output of the complete TSA block.
+
+11
+
+A.3 FREQUENCY ENHANCED TSA IMPLEMENTATION
+
+The Cross Time stage Attention(CTA) is structured as:
+
+**==> picture [334 x 29] intentionally omitted <==**
+
+where _**X** t,_ _**X** t[time] ∈_ R _LsegT[×][D][model]_ denote for the input and output of the cross-time stage attention, LayerNorm and MSA denote the layer normalization layer and vanilla multi-head self attention. and Cross Dimension stage Attention(CDA) is presented as:
+
+**==> picture [315 x 63] intentionally omitted <==**
+
+where _**R** ∈_ R _[f][×][D][model]_ is learnable vector which server as router to reduce the computation complexity and _f_ is a constant number denote the number of the routers. _**X** d[time] ∈_ R _[C][×][D][model]_ denotes the reshaped cross-time stage attention output as the cross-dimension stage attention input, and _**X**[dim] ∈_ R _[C][×] LsegT[×][D][model]_ denotes the cross dimension stage output. The _**X**[dim]_ will also be the final output of the complete TSA block.
+
+## A.4 FREQUENCY DOMAIN TSA IMPLEMENTATION
+
+The Cross Time stage Attention(CTA) is structured as:
+
+**==> picture [332 x 29] intentionally omitted <==**
+
+where _**X** t,_ _**X** t[time] ∈_ R _LsegT[×][D][model]_ denote for the input and output of the cross-time stage attention, LayerNorm and MSA denote the layer normalization layer and vanilla multi-head self attention. and Cross Dimension stage Attention(CDA) is presented as:
+
+**==> picture [315 x 63] intentionally omitted <==**
+
+where _**R** ∈_ R _[f][×][D][model]_ is learnable vector which server as router to reduce the computation complexity and _f_ is a constant number denote the number of the routers. _**X** d[time] ∈_ R _[C][×][D][model]_ denotes the reshaped cross-time stage attention output as the cross-dimension stage attention input, and _**X**[dim] ∈_ R _[C][×] LsegT[×][D][model]_ denotes the cross dimension stage output. The _**X**[dim]_ will also be the final output of the complete TSA block.
+
+A.5 TIME DOMAIN TSA IMPLEMENTATION
+
+The Cross Time stage Attention(CTA) is structured as:
+
+**==> picture [275 x 13] intentionally omitted <==**
+
+**==> picture [343 x 13] intentionally omitted <==**
+
+where _**X** t,_ _**X** t[time] ∈_ R _LsegT[×][D][model]_ denote for the input and output of the cross-time stage attention, LayerNorm and MSA denote the layer normalization layer and vanilla multi-head self attention.
+
+12
+
+and Cross Dimension stage Attention(CDA) is presented as:
+
+**==> picture [315 x 63] intentionally omitted <==**
+
+where _**R** ∈_ R _[f][×][D][model]_ is learnable vector which server as router to reduce the computation complexity and _f_ is a constant number denote the number of the routers. _**X** d[time] ∈_ R _[C][×][D][model]_ denotes the reshaped cross-time stage attention output as the cross-dimension stage attention input, and _**X**[dim] ∈_ R _[C][×] LsegT[×][D][model]_ denotes the cross dimension stage output. The _**X**[dim]_ will also be the final output of the complete TSA block.
+
+A.6 PREDICTION VISUALIZATION
+
+13
+
+**==> picture [355 x 90] intentionally omitted <==**
+
+**==> picture [355 x 432] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) AutoGluon (Dollack et al., 2023) (b) RF or XGBoost (D’Amelio et al., 2023) (c) TSA + Frequency Decoder (d) TSA + Time Decoder (e) TSA + Time Decoder + Frequency Decoder **----- End of picture text -----**
+
+Figure 3: Prediction visualization of different model. Two evaluation metrics of the prediction shows in the caption below the graph, root mean square error (RMSE) and concordance correlation coefficient (CCC)
+
+14
+
diff --git a/open_review/iclr2024_8531.json b/open_review/iclr2024_8531.json
new file mode 100644
index 0000000000000000000000000000000000000000..aa238b2937bcb3d212882aeb158ea79de083ab3b
--- /dev/null
+++ b/open_review/iclr2024_8531.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8531",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Cross-modality debiasing: using language to mitigate sub-population shifts in imaging",
+ "abstract": "Sub-population shift is a specific type of domain shift that highlights changes in data distribution within specific sub-groups or populations between training and testing. Sub-population shift accounts for a significant source of algorithmic bias and calls for distributional robustness. Recent studies found inherent distributional robustness in multi-modality foundation models, such as the vision-language model CLIP, yet this robustness is vulnerable through parameter fine-tuning. In this paper, we propose leveraging the connection of robustness among different modalities and reshaping the distributional robustness of one modality with another. Specifically, in the context of the distributional robustness of CLIP, we propose to leverage natural language inputs to debias the image feature representations, to improve worst-case performance on sub-populations. Our extensive empirical studies show that image representations debiased by natural language can achieve significant performance improvement and reduction of performance instability under sub-population shifts.",
+ "rebuttal": "Dear Reviewer KXPh,\n\nWe hope our response has answered your questions and clarified the concerns. If there are any further questions, please feel free to inform us before the closure of the interactive rebuttal system.\n\nAppreciate your time and happy Thanksgiving.\n\nDear Reviewer FPNj,\n\nWe hope our response has answered your questions and clarified the concerns. If there are any further questions that require our attention, please feel free to inform us before the closure of the interactive rebuttal system.\n\nAppreciate your time and happy Thanksgiving.\n\nWeakness and Question 3\n\nWe agree with the reviewer that there are challenges in selecting appropriate text prompts when dealing with language (text) related deep models, and varying text prompts have a significant influence on the final performance, and this work does need a domain explicit validation dataset to guarantee reasonable worst-case performance, as mentioned in Section 3.2 and Section 5 (Experiment) and employed by related work in this line of research. (JTT and $\\chi^{2}$-DRO generally use this validation dataset for another purpose, detailed in ‘stable worst-case accuracy acros [...]\n\nWe greatly appreciate your constructive comments. Please see our responses below;\n\nWeakness 1\n\nIn our loss design, $\\eta$ is expected to balance the two items, consistency loss and similarity loss. And we reported the performance under CelebA dataset and network structure CLIP (ViT-B/32) with varying $\\eta$ here to show that the proposed method is not sensitive to the hyper-parameter.\n\nη = 0.1, Avg. Acc. = 0.845±0.006, W.C. Acc. = 0.782±0.016.\n\nη = 0.2 (default), Avg. Acc. = 0.836±0.003, W.C. Acc. = 0.792±0.013.\n\nη = 0.3, Avg. Acc. = 0.845±0.003, W.C. Acc. = 0.771±0.028.\n\nη = 0.4, Avg. Acc. = [...]\n\nThank you for taking the time to read and review our paper. We sincerely appreciate your keen interest in the technical aspects of our work and positive feedback. Please see our responses below;\n\nWeakness\n\nWe admit the challenges in designing debiasing guidance from other modalities instead of language modality. And, our solution enables fine-tuning an extra adapter in the last layers with language guidance to mitigate subpopulations in the label space, it follows the trend of the broader and broader application scenarios of the (large) multi-modal models, relying on the guidance from natural [...]\n\nWe greatly appreciate your constructive comments. Please see our responses below;\n\nWeakness 1\n\nWe appreciate the insights regarding our method. Projecting all the debiased feature representation onto the null-space of $[T(\\hat{t_{1}}), T(\\hat{t_{2}})]^{T}$ is not the only goal since our solution also encourages the similarity of feature representations before and after the adapter with a consistency loss.\nWithout the consistency loss, we believe all the feature representations may collapse to, e.g., one fixed direction that is perpendicular with $T(\\hat{t_{1}})$ and $T(\\hat{t_{2}})$.\nHowever, [...]",
+ "initial_scores": [
+ 3,
+ 6,
+ 5,
+ 5
+ ],
+ "score_mean": 4.75,
+ "score_variance": 1.58,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The authors propose a debiasing method for CLIP using language modality, but most of the reviewers agree that the work is not sufficient for a publication yet. Particularly, justification of the entropy maximization and some experimental settings should be more addressed to get the work published.",
+ "forum_id": "o1TKGCrSL7",
+ "primary_area": "societal considerations including fairness, safety, privacy",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_FPNj",
+ "review_id": "OXyHxLJw1D",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2852,
+ "edit_detected": true,
+ "edit_delta_seconds": 17227,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_cXZe",
+ "review_id": "nLslb1LTLi",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2772,
+ "edit_detected": true,
+ "edit_delta_seconds": 137171,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_BEYs",
+ "review_id": "9Fzv1TiRTE",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1759,
+ "edit_detected": true,
+ "edit_delta_seconds": 1602846,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_KXPh",
+ "review_id": "A8oWmEq18l",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 5956,
+ "edit_detected": true,
+ "edit_delta_seconds": 817318,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8531.md b/open_review/iclr2024_8531.md
new file mode 100644
index 0000000000000000000000000000000000000000..4de9a32e72385e5c7b1dd770751831f6ffc14b0f
--- /dev/null
+++ b/open_review/iclr2024_8531.md
@@ -0,0 +1,404 @@
+
+
+## - CROSS MODALITY DEBIASING: USING LANGUAGE TO - MITIGATE SUB POPULATION SHIFTS IN IMAGING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Sub-population shift is a specific type of domain shift that highlights changes in data distribution within specific sub-groups or populations between training and testing. Sub-population shift accounts for a significant source of algorithmic bias and calls for distributional robustness. Recent studies found inherent distributional robustness in multi-modality foundation models, such as the vision-language model CLIP, yet this robustness is vulnerable through parameter fine-tuning. In this paper, we propose leveraging the connection of robustness among different modalities and reshaping the distributional robustness of one modality with another. Specifically, in the context of the distributional robustness of CLIP, we propose to leverage natural language inputs to debias the image feature representations, to improve worst-case performance on sub-populations. Our extensive empirical studies show that image representations debiased by natural language can achieve significant performance improvement and reduction of performance instability under sub-population shifts.
+
+## 1 INTRODUCTION
+
+The domain shift between the training data and data at the inference stage is commonly found in machine learning systems. For instance, in applications such as robotics James et al. (2019); Wulfmeier et al. (2017), navigation Lütjens et al. (2019); Bharadhwaj et al. (2019), and auto collecting MorenoTorres et al. (2012), training data may be collected from simulated or misaligned environments to reduce cost. The collected data will likely encounter _domain shift_ during deployment, where the model robustness towards those shifts is a crucial requisite for safety deployment. _Sub-population shift_ is a specific type of domain shift where there are changes in the distribution of data within specific sub-populations or groups Koh et al. (2021); Santurkar et al. (2020). Sub-population shift leads to generalization issues of groups and constitutes a significant source of algorithmic bias. A robust model against sub-population shift shall perform well on various demographic groups, such as groups identified by gender, race, or age, no matter the group population. However, classical methods such as empirical risk minimization are known to be fragile under such sub-population shifts or domain shifts Duchi & Namkoong (2018); Rockafellar et al. (2000).
+
+More recently, the sub-population shift has also been identified as a critical issue in large foundation models Henderson et al. (2023); Gan et al. (2022). One notable example of cross-modality foundation models is Contrastive Language-Image Pre-training (CLIP) Radford et al. (2021). CLIP is a neural network trained on pairs of images and natural language supervision. It enables learning rich feature representations for images and leverages natural language cues during training and inference. Consequently, methods built upon CLIP have gained considerable attention due to their ability to align diverse modalities and address various tasks. However, recent studies found that fine-tuning CLIP improved task performance but often compromised its original robustness to domain shifts Wortsman et al. (2022); Kumar et al. (2022); Zhang et al. (2021). Similarly, the same phenomenon regarding robustness to sub-population shifts was observed Li et al. (2021); Zhang & Ré (2022); Lee et al. (2022). These findings collectively indicate that the careful construction of feature embeddings can be easily compromised by the negligent utilization of label information during training and emphasize the importance of investigating suitable methods for handling distributional shifts in conjunction with multimodal models like CLIP.
+
+Distributionally Robust Optimization (DRO) provides a paradigm to tackle the naturally distributional shifts Namkoong & Duchi (2016); Rockafellar et al. (2000). DRO typically involves optimizing
+
+1
+
+the model performance by considering the _uncertainty_ of data, which approximates the worst-case shift in domain features or sub-populations from the training distribution. The shift is usually bounded within a distributional divergence distance, such as _f_ -divergences Ben-Tal et al. (2013); Namkoong & Duchi (2016); Hashimoto et al. (2018); Duchi & Namkoong (2018); Shapiro (2021) and Wasserstein distances Gao et al. (2017); Blanchet et al. (2019); Kuhn et al. (2019); Sinha et al. (2017). However, a straightforward combination of CLIP with universal DRO approaches, such as _χ_[2] -DRO Hashimoto et al. (2018) and its variants, may introduce inherent risks like unstable performance and the requirement for a domain-aware validation dataset. Therefore, it is essential to explore alternative strategies to mitigate distributional shifts while preserving the effectiveness and robustness of CLIP.
+
+A recent study by Dunlap et al. (2022) introduced an approach that modifies the feature embedding of classifiers utilizing CLIP as a backbone. This modification enables the extension of classifier capabilities to previously unseen domains by leveraging natural language descriptions associated with these unseen domains. The example demonstrated the potential of adjusting distributional robustness using interconnected modalities. In this paper, we study strategies for mitigating sub-population shifts by leveraging natural language supervision in the context of the language-image foundation model CLIP. Notably, our investigation is conducted under the assumption of a domain-oblivious setting, wherein the sub-population membership of individual instances remains unknown during the training phase.
+
+Our contributions are summarized as follows:
+
+- We build a principled connection between natural language supervision and robustness to sub-population shift (also known as subgroup robustness) and provide extensive experimental analysis, which shows the capability of mitigating robustness issues in one modality by identifying and analyzing it in another modality.
+
+- We show that without instance-wise label information, the proposed method consistently improves worst-case performance under sub-population shifts over original zero-shot learning of CLIP under divergent settings.
+
+## 2 RELATED WORK
+
+Recent years witnessed a growing interest in studying the distributional robustness of vision-language foundation models Fang et al. (2022); Nguyen et al. (2022); Gan et al. (2022). There is extensive evidence of robustness deterioration when applying classical fine-tuning methods, such as linearprobe, to pre-trained models, and there are great efforts to alleviate these robustness issues Wortsman et al. (2022); Gao et al. (2021); Kumar et al. (2022). To enhance performance in the presence of subpopulation shifts, broadly used strategies that are based on loss values have been adapted to foundation models fine-tuning Zhang & Ré (2022). Moreover, there is a growing trend that natural language supervision is adapted in the training phase to debias learned feature representations Ranasinghe et al. (2022); Petryk et al. (2022); Wang et al. (2022). A recent work that aligns with our approach is presented in Zhang et al. (2023), which utilizes language to control model behaviors by identifying misclassified instances and influential attributes in the form of language descriptions and then continuing fine-tuning the vision classifier upon that information.
+
+Distributionally robust optimization has been widely studied to handle the situation where the test distribution is undetermined Shapiro (2021); Namkoong & Duchi (2016); Quiñonero-Candela et al. (2008). Common approaches involve constructing an uncertainty set around the training distribution with some divergence to approximate the unknown distribution. Certain real-world scenarios, such as sub-population shift Koh et al. (2021); Santurkar et al. (2020); Jeong & Namkoong (2020), can be modeled as minimizing the supremum of the loss within the uncertainty set. Some convenient dual reformulations of the optimization problem in terms of some specific divergence are introduced such as _χ_[2] -DRO Hashimoto et al. (2018). In the context of addressing sub-population shifts, exploring statistical features to identify minority groups during training, through the analysis of gradients, losses, and feature spaces, has also gained popularity Liu et al. (2021); Nam et al. (2020); Sagawa et al. (2019); Sohoni et al. (2020).
+
+2
+
+## 3 BACKGROUND
+
+Considering a machine learning task with given training distribution _P_ over input space _X ∈_ R _[d]_ and vectorized label space _Y ∈_ R _[c]_ , empirical risk minimization aims to optimize the average performance of a model _fθ_ : _X →Y_ parameterized with _θ_ over observed i.i.d. samples **z** _k_ = ( **x** _k,_ **y** _k_ ) _∼ P_ for _k_ = _{_ 1 _, ..., m}_ , which is formulated as min _θ_ E _Z∼P_ [ _ℓ_ ( _θ, Z_ )]. The problem of **sub-population shift** concerns the worst-case performance over some pre-defined sub-populations or domains _{Q_ 1 _, ..., Qn}_ from an uncertainty set of distributions _Q ∈X × Y_ where _P_ and _Q_ have the same support, and the objective is formulated as min _θ_ sup _Q∈Q_ E _Z∼Q_ [ _ℓ_ ( _θ, Z_ )]. In this paper, we use the vision-language foundation model CLIP Radford et al. (2021) in our evaluations and the proposed strategy and principle can be easily extended to other multimodal foundation models. We analyze the challenges associated with mitigating sub-population shift using _χ_[2] -DRO Hashimoto et al. (2018).
+
+## 3.1 CLIP
+
+Because of the rich image feature representations and its ability to incorporate natural language supervision during training and inference, CLIP has been widely studied and applied in various domains. In particular, the general zero-shot performance of CLIP serves as an essential baseline for algorithm development nowadays. The zero-shot classifier, which relies on CLIP as its backbone, utilizes the image encoder of CLIP and a linear classifier constructed using domain-specific descriptions for a given task. We formally define this zero-shot classifier as follows.
+
+We denote _Iθi_ : _X →I_ as the image encoder of CLIP that maps input space _X_ to image embedding space _I_ , and _Tθt_ ( _t_ ) _∈T_ as the text encoder of CLIP that maps some text _t_ to text embedding space _T_ , where _I ∈_ R _[e]_ and _T ∈_ R _[e]_ . We abbreviate _Iθi_ ( _·_ ) and _Tθt_ ( _·_ ) as _I_ ( _·_ ) and _T_ ( _·_ ) respectively. A set of classification text prompts, _{t_ 1 _, ..., tc}_ , that is empirically derived from class labels and class-domain " description is necessary to construct a zero-shot classifier, e.g., _{t_ 1 _, t_ 2 _}_ = _{ a photo of a blond hair people_ ", " _a photo of a not blond hair people_ " _}_ for the common dataset CelebA Liu et al. (2015), we abbreviate _{t_ 1 _, t_ 2 _}_ as " _a photo of a {_ not blond, blond _} hair people_ ". The zero-shot classifier built upon CLIP classifies an input **x** through: arg max _i∈_ [ _c_ ] _I_ ( **x** ) _[T] T_ ( _ti_ ) _,_ where [ _c_ ] refers to the set of classes _{_ 1 _,_ 2 _, ..., c}_ . Various fine-tuning methods have been proposed to better adapt CLIP to downstream tasks, we select architecture design by Gao et al. (2021) for general training purposes. It added an extra feature adapter, _Aθa_ : _I →I_ , between _I_ ( _·_ ) and _T_ ( _·_ ), and we abbreviate _Aθa_ as _A_ ( _·_ ). The corresponding training and inference are formulated as:
+
+**==> picture [321 x 35] intentionally omitted <==**
+
+where [( _Aθa ◦ I_ ( **x** )) _[T] T_ ( _ti_ )] _i∈_ [ _c_ ] denotes a vector with _i_ -th value as ( _Aθa ◦ I_ ( **x** )) _[T] T_ ( _ti_ ), and _ℓ_ ce( _·_ ) denotes the cross-entropy loss. We abbreviate the network architecture as _I ▷A ▷T_ following the input stream from the image encoder of CLIP to the feature adapter and then to the text embedding.
+
+## 3.2 DRO
+
+Given a training distribution _P_ and a predefined divergence _D_ , DRO aims to minimize the expected risk over the distribution _Q_ that is in a ball around the training distribution _P_ w.r.t. divergence _D_ . The expected DRO risk is defined as _RD_ ; _ρ_ ( _θ_ ; _P_ ) = sup _Q≪P {_ E _Z∼Q_ [ _ℓ_ ( _θ, Z_ )] : _D_ ( _Q||P_ ) _≤ ρ}_ for some _ρ >_ 0 where _Q ≪P_ denotes _Q_ is absolutely continuous with respect to _P_ . Supported by the convenient dual characterization of Cressie-Read family of R´enyi divergence Shapiro (2017); Cressie & Read (1984), pioneering work eliminates the untouchable distribution _Q_ in _RD_ ; _ρ_ ( _θ_ ; _P_ ) and only exploits training distribution _P_ to solve the problem Duchi & Namkoong (2018); Zhai et al. (2021). Referring Zhai et al. (2021), we can show that, minimizing the loss values that are larger than a specific threshold, results in minimizing the DRO risk where _P_ and _Q_ have the same support, i.e., sub-population shift. This reinforces that the loss values (wrongly classified instances), based on over-sampling or re-weighting methods, are being used for mitigating the sub-population shift.
+
+However, it is hard to directly apply DRO risk in the general training pipeline of deep models. Firstly, (Mini-batch) SGD is a biased estimation of DRO risk Ghosh et al. (2018), which suggests a two-phase training pipeline. Secondly, directly minimizing DRO risk is equal to minimizing the loss over a small
+
+3
+
+**==> picture [318 x 122] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Language-Image model Dataset(X, ) 𝐼!! 𝐼(x#) 𝐴!# 𝐴∘𝐼(x#) ℓsim x# Consistency loss Pre-defined sub-populations {F, M}:={female, male} 𝑇(𝑡!), 𝑇(𝑡") Descriptions 𝑇!" ℓent {𝑡!, 𝑡"} ≔ “a photo a {female, male} people” Debiasing loss MaxEnt(𝒫(F|x#), 𝒫(M|x#)) **----- End of picture text -----**
+
+Figure 1: Training phase of L-DRO on CelebA Liu et al. (2015). Given the training dataset (without instance-wise label information) and concerned sup-populations, L-LDR aims to learn a feature adapter _Aθa_ to transform image representation from original embedding to a debiased embedding. The goal is to ensure that the debiased embedding does not reveal any information about sub-population membership while minimizing significant changes from the original embedding.
+
+portion of whole data points, which likely deteriorates the average performance and even worst-case performance in deep learning regimes. This suggests an augmentation over the small portion of data points identified by DRO, instead of counting on learning over the small portion of data points only, and leads to a similar design of JTT Liu et al. (2021). However, with the theoretical understanding and method developments, existing approaches dealing with sub-population shifts still suffer risks such as unstable performance across training epochs Zhai et al. (2021). A popular and compromised solution is a domain explicit validation dataset along with an early stopping strategy to guarantee reasonable worst-case performance Zhai et al. (2022), which is also employed in this work.
+
+## 4 L-DRO: DISTRIBUTIONAL ROBUSTNESS VIA LANGUAGE
+
+The ability of the CLIP model that fuses natural language supervision into the training phase for various purposes leaves great untouched potential. A set of text prompts with carefully designed class-domain descriptions can construct a zero-shot classifier that works reasonably well for specific tasks. Inspired by the construction, this work proposes to use natural language information to mitigate sub-population shifts.
+
+_Using language to mitigate sub-population shift_ Note that the sub-populations _{Q_ 1 _, ..., Qn}_ is defined over space _X × Y_ , i.e., for a specific sub-population, e.g., _Qk_ , the sub-population is decided by the combination of attributes from input space and label space together. Take a typical setting on CelebA as an example, attributes from label space _{_ **y** _b,_ **y** _n}_ := _{_ blond, not blond _}_ and attributes from input space _{F, M }_ := _{_ female, male _}_ consist of four sub-populations _{_ blond male, not blond male, blond female, not blond female _}_ for worst-case performance estimation.
+
+Since label space information is explicit, the performance over label space can be perfectly balanced. Intuitively, if the performance of sub-populations within the same class can be balanced as well, the sub-population shifts can be mitigated. Using the principle of applying ERM for deep model training with the balanced dataset for label space _P_ ( **y** _b|_ **x** ) _≈P_ ( **y** _n|_ **x** ), the performance of sub-populations is given by _P_ ( **y** _b, F |_ **x** ) : _P_ ( **y** _n, F |_ **x** ) : _P_ ( **y** _b, M |_ **x** ) : _P_ ( **y** _n, M |_ **x** ) _≈P_ ( _F |_ **x** ) : _P_ ( _F |_ **x** ) : _P_ ( _M |_ **x** ) : _P_ ( _M |_ **x** ). This means the performance of a specific sub-population is decided by the proportion of the sub-population over the dataset. Further, _ℓ_ ent( _P_ ( _F |_ **x** ) _, P_ ( _M |_ **x** )) can serve as a measure to sub-population shifts, formulated as:
+
+**==> picture [298 x 19] intentionally omitted <==**
+
+It suggests that sub-population shift can be naturally mitigated through max _ℓ_ ent( _P_ ( _F |_ **x** ) _, P_ ( _M |_ **x** )), and achieving the goal does not rely on instance-wise label information.
+
+Based on intuition, we proposed Language-based Distributional Robust Optimization, abbreviated as L-DRO. L-DRO is built upon equation 3 and aims at improving the worst-case performance of CLIP without instance-wise label information.
+
+4
+
+- Following architecture design in equation 1, we propose using the sup-population descriptions to debias the original feature representations.
+
+- In order to retain general performance, another objective is designed to maintain consistency between the original feature representations and the debiased ones.
+
+Given image encoder of CLIP _I_ ( _·_ ), text encoder _T_ ( _·_ ), adapter _A_ ( _·_ ), _classification text prompt_ (target domain descriptions ) _{t_ 1 _, · · · , tc}_ , and _debiasing text prompt_ (a set of semantically opposite sub-population descriptions) _{t_[ˆ] 1 _, · · · , t_[ˆ] _s}_ , the objective of L-DRO is formulated as:
+
+**==> picture [399 x 32] intentionally omitted <==**
+
+where _ℓ_ ent( **a** ) := _−_ softmax( **a** ) _[T]_ log(softmax( **a** )) is the entropy loss that encourages the inability to distinguish across sub-populations using the learned feature representation, i.e., debiasing the **a** _[T]_ **b** feature representations. And _ℓ_ sim( **a** _,_ **b** ) := _||_ **a** _||||_ **b** _||_[is the consistency loss (cosine similarity) that] encourages the similarity of feature representation before and after the adapter. _η_ is a scalar to balance the above two terms. The corresponding training and inference of L-DRO follow the procedures of Eqs. equation 1 and equation 2. An outline of the training phase of our method is shown in Figure 1.
+
+## 5 EXPERIMENTS
+
+In this section, we begin by showcasing the consistent improvement of L-DRO over zero-shot learning in terms of worst-case performance. Specifically, we investigate this improvement and highlight the stability of L-DRO across different training epochs (see Section 5.1). Subsequently, we examine the impact of debiasing on various sub-populations, including both independent and correlated subpopulations (see Section 5.2). Further, we explore the potential of the debiased feature representations to stabilize the existing methods that deal with sub-population shifts. The performance metrics include average accuracy and worst-case accuracy, and the worst-case accuracy represents the lowest accuracy observed among the different subpopulations. To ensure the robustness and reliability of the results, each experiment is repeated 10 times using different random seeds to get the mean and standard deviation of accuracy.
+
+**Model architecture** CLIP Radford et al. (2021) is selected as the vision-language foundation model in the experiment, and the training and inference follow equation 1 and equation 2. The subspace mapping _AθA_ ( _·_ ) is a two-layer MLP with the same input and output dimensions.
+
+**Dataset and pre-defined sub-populations** Most of our experiments were evaluated on CelebA Liu et al. (2015), which is a large-scale face attributes dataset with 40 attribute annotations for each image. The target task of CelebA is to differentiate if a given human face image is blond hair or not blond hair. The attributes from input space for constituting sub-population shifts are selected as _{_ male, female _}_ , then we have four sub-populations _{_ blond male, not blond male, blond female, not blond female _}_ on CelebA dataset for worst-case performance estimation. Another selected and commonly used dataset is Waterbirds (95%) Sagawa et al. (2019), which asks classifiers to differentiate if a given image is waterbirds or landbirds. The training set of Waterbirds places 95% of all waterbirds against a water background with the remaining 5% against a land background. And the similar unbalanced setting also applied to the other class landbirds. Then we have four sub-populations _{_ waterbird in water, waterbird in land, landbird in water, landbird in land _}_ on Waterbirds dataset for worst-case performance estimation.
+
+We note that the best model is selected based on a domain-aware validation dataset across varying hyper-parameters and training epochs (early stopping strategy), please refer to Appendix B.2 of Zhai et al. (2021) and Zhai et al. (2022) for a comprehensive discussion about the necessity of domain-aware validation dataset for model selection in methods dealing with sub-population shifts.
+
+## 5.1 WORST-CASE PERFORMANCE AND BEYOND
+
+**The selection of text prompt** The selection of appropriate text prompts, including classification and debiasing prompts, significantly impacts the performance of CLIP. Thus, our initial investigation focuses on examining the impact of different text prompts on both average accuracy and worst-case
+
+5
+
+Table 1: Under CelebA and CLIP (ViT-B/32 and RN50), the Average Accuracy (Avg.Acc.) and Worst-Case Accuracy (W.C.Acc.) over sub-populations with varying classification text prompt and debiasing text prompt.(%)
+
+|ebiasingtextprompt.(%)||||
+|---|---|---|---|
+|Classifcation text prompt And Debiasing text prompt|Method|RN50 (Avg.Acc & W.C.Acc.)|ViT-B/32 (Avg.Acc & W.C.Acc.)|
+|"a photo of []"|Zero-shot|64.9 & 49.2|49.6 & 35.6|
+|And "a photo of []"|L-DRO|66.3±0.8 &**55.4±1.0**|51.6_±_1.2 &**38.3**_±_**1.5**|
+|"photo of a [] people"|Zero-shot|70.1 & 52.9|58.8 & 49.2|
+|And "photo of a [] people"|L-DRO|70.9±0.8 &**53.3±1.4**|60.4_±_0.7 &**53.3**_±_**0.9**|
+|"photo of a [] hair people"|Zero-shot|77.4 & 65.2|86.4 & 61.1|
+|And "photo of a [] people"|L-DRO|78.3±0.8 &**66.5±1.5**|86.1_±_0.3 &**69.7**_±_**2.1**|
+|"a photo of a [] hair people|Zero-shot|77.4 & 62.6|85.2 & 70.6|
+|And "a photo of a [] people"|L-DRO|78.0±0.7 &**63.5±1.4**|83.6_±_0.3 &**79.2**_±_**1.3**|
+|"picture of [] hair people"|Zero-shot|87.6 & 67.1|86.1 & 65.0|
+|And "picture of [] people"|L-DRO|88.8±0.3 &**74.7±1.1**|85.0±0.5 &**65.4±1.3**|
+|"a picture of [] hair people"|Zero-shot|88.8 & 75.6|87.3 & 75.0|
+|And "a picture of [] people"|L-DRO|89.0±0.3 &**75.8±1.1**|85.2±0.7 &**75.9±0.8**|
+|"a picture of [] people"|Zero-shot|83.6 & 75.3|71.6 &**66.3**|
+|And "a picture of [] people"|L-DRO|85.7±0.4 &**78.9±1.7**|71.2±0.4 & 58.8±0.8|
+
+in the classification text prompt is male or female and [] in the classification text prompt is not blond or blond.
+
+accuracy. Table 1 shows that L-DRO consistently outperforms zero-shot learning across most of popular text prompt selections for both network architectures RN50 and ViT-B/32. Meanwhile, the average accuracy increases most time surprisingly since the objective of L-DRO, equation 4, does not involve any label information about the target task. More investigations in text prompts for Waterbirds dataset and other settings are detailed in Appendix A.
+
+**Performance cross datasets and network architectures** Table 2 shows the performance of L-DRO with different network architectures on CelebA and Waterbirds. Compared with other baselines, under both network architectures RN50 and ViT-B/32 with both CelebA dataset and Waterbirds dataset, L- DRO outperforms all of the baselines with great improvement. However, with network architectures ViT-L/14, the L-DRO fails to debias the feature representations and improve the performance compared with zero-shot learning, we investigate the phenomenon in Appendix C, which shows that text prompts on CLIP (ViT-B/32) does not consistently translate to high performance on CLIP (ViT-L/14). Unless otherwise specified, we use ViT-B/32 for the following experiments.
+
+**Stable worst-case accuracy across training epochs** We highlight the performance stability of L-DRO across training epochs since most methods dealing with sub-population shifts suffer the instability of performance along with training epochs. A domain-aware validation dataset is usually necessary to obtain reasonable worst-case performance. As we can see from Figure 2, baseline DRO methods, _χ_[2] -DRO Hashimoto et al. (2018), JTT Liu et al. (2021), and CVaR DRO Namkoong & Duchi (2016), show large fluctuations in both average accuracy and worst-case accuracy throughout the training epochs. On the other hand, Figure 2 shows that the average accuracy and worst-case accuracy of L-DRO under the default setting where _η_ = 0 _._ 2 are significantly stable along with training epochs, which underscore the advancement of methods based on re-weighting or augmentation over dataset that bring instability during training referring Figure 2 in Zhai et al. (2021).
+
+**Data efficiency** Benefiting from the parameter-efficient training procedure, L-DRO demonstrates data efficiency. Table 3 summarizes the average accuracy and worst-case accuracy with varying sizes of training data. The performance gain compared with zero-shot learning starts from 2048 training examples under the CelebA dataset, and the gain for Waterbirds starts from 512 training examples.
+
+## 5.2 MUTUAL EFFECTS OF DEBIASING VARIOUS SUB-POPULATIONS AND BEYOND
+
+We investigate the effect of unaligned debiasing and the combination of multiple debiasing sources at Table 4. The first eight rows in Table 4 show that unaligned debiasing generally has similar
+
+6
+
+Table 2: The average accuracy and worst-case accuracy of OrthCali Chuang et al. (2023), ERM, CVaR DRO Namkoong & Duchi (2016), _χ_[2] -DRO Hashimoto et al. (2018), JTT Liu et al. (2021), and L-DRO (our proposed method) over different datasets and network architectures.[1] (%)
+
+|||Architecture Method2|Architecture Method2|Architecture Method2|Architecture Method2|Architecture Method2|Architecture Method2|Architecture Method2|
+|---|---|---|---|---|---|---|---|---|
+|||RN50|||||||
+|||_I ▷T_ OrthCali _I ▷A ▷T_ ERM _I ▷A ▷T_ CVaR DRO _I ▷A ▷T_ _χ_2-DRO _I ▷A ▷T_ JTT _I ▷A ▷T_ L-DRO|||||||
+|||ViT-B/32|||||||
+|||_I ▷T_ OrthCali _I ▷A ▷T_ ERM _I ▷A ▷T_ CVaR DRO _I ▷A ▷T_ _χ_2-DRO _I ▷A ▷T_ JTT _I ▷A ▷T_ L-DRO|||||||
+|0.0 0.2 0.4 0.6 0.8 1.0 Accuracy||1 3 5 7 9 Epochs Avg. Acc. in test - 2-DRO W.C. Acc. in test - 2-DRO Avg. Acc. in test - CVaR DRO W.C. Acc. in test - CVaR DRO Avg. Acc. in test - JTT W.C. Acc. in test - JTT Avg. Acc. in test - L-DRO W.C. Acc. in test - L-DRO 0.0 0.2 0.4 0.6 0.8 1.0 Accuracy||||||1 3 5 7 9 Epochs Avg. Acc. in test - 2-DRO W.C. Acc. in test - 2-DRO Avg. Acc. in test - CVaR DRO W.C. Acc. in test - CVaR DRO Avg. Acc. in test - JTT W.C. Acc. in test - JTT Avg. Acc. in test - L-DRO W.C. Acc. in test - L-DRO|
+||||||||||
+||||||||||
+||||||||||
+||||||||||
+|||Avg. Acc. in te W.C. Acc. in te Avg. Acc. in te W.C. Acc. in te|st - 2-DRO st - 2-DRO st - CVaR DRO st - CVaR DRO|Avg. Acc. in W.C. Acc. in Avg. Acc. in W.C. Acc. in|test - JTT test - JTT test - L-DRO test - L-DRO||||
+||||||||||
+|||(a) Performance on CelebA dataset.||||||(b) Performance on Waterbirds dataset.|
+
+Figure 2: Under CLIP (ViT-B/32), the average and worst-case accuracy of validation dataset and test dataset over epochs using L-DRO and baseline methods. The left figure shows the performance of CelebA dataset, and the right figure shows the performance of Waterbirds dataset.
+
+performance with zero-shot learning, i.e., basically, the L-DRO works on influential attributes only and will not hurt the embedding of uncorrelated attributes. The last two rows demonstrate the performance of combining multiple debiasing sources, it shows that L-DRO can debias multiply influential attributes at the same time and the performance is slightly degraded compared with independent debiasing. In Table 5, we further investigate using L-DRO to debias semantically correlated source sub-populations and target sub-populations, and it shows that a degressive correlation between source
+
+7
+
+Table 3: Under CLIP (ViT-B/32), the average accuracy and worst-case accuracy with varying sizes of training data. The accuracy with _[⋆]_ reaches the performance of zero-shot learning, and the accuracy with _[⋄]_ reaches or is close to the performance of training with full data.(%)
+
+|Dataset Acc.|Performance over varying size of training data 512 1024 2048 4096 8192 16384|
+|---|---|
+|CelebA Avg. W.C.|77.1_±_8.5 84.6_±_1.1 84.7_±_0.8 84.5_±_0.8 83.9_±_0.6 83.7_±_0.9 57.2_±_6.4 69.4_±_6.2 71.4_±_4.6_⋆_ 74.1_±_2.8 76.3_±_3.3 77.4_±_2.8_⋄_ 74.4_±_1.8 76.0_±_0.7 77.8_±_0.7 78.4_±_0.8 / / 57.9_±_3.1_⋆_ 63.2_±_1.9 65.1_±_1.1_⋄_ 66.5_±_1.4 / /|
+|Waterbirds Avg. W.C.||
+
+Table 4: Under CelebA and CLIP (ViT-B/32), the average accuracy and worst-case accuracy over unaligned source sub-populations and target sub-populations. (%)
+
+|Method Zero-shot L-DRO L-DRO L-DRO L-DRO Zero-shot L-DRO L-DRO L-DRO L-DRO L-DRO|Unaligned debiasing Avg. Acc. W.C. Acc. Source Target|
+|---|---|
+||- _{_male, female_}_ 85.2 70.6 _{_male, female_}_ _{_male, female_}_ 83.6_±_0.3 79.2_±_1.3 _{_old, young_}_ _{_male, female_}_ 84.5_±_0.3 69.5_±_1.3 _{_attractive, not attractive_}_ _{_male, female_}_ 84.3_±_0.2 73.9_±_1.7 _{_straight hair, wavy hair_}_ _{_male, female_}_ 85.8_±_0.4 67.7_±_2.2 - _{_old, young_}_ 85.1 73.5 _{_old, young_}_1 _{_old, young_}_ 88.0_±_0.7 84.3_±_1.6 _{_male, female_}_ _{_old, young_}_ 84.3_±_0.8 69.4_±_1.7 _{_attractive, not attractive_}_ _{_old, young_}_ 84.0_±_0.7 79.6_±_1.7 _{_straight hair, wavy hair_}_ _{_old, young_}_ 85.9_±_0.5 72.1_±_1.8 [_{_old, young_}_,_{_male, female_}_] _{_male, female_}_ 86.7_±_0.8 78.9_±_1.6 _{_old, young_}_ 86.9_±_1.1 81.2_±_1.8|
+
+> 1 Debiasing test prompt for input space attributes _{_ old, young _}_ is "a photo of a [ _{_ old, not old _}_ , _{_ young, not young _}_ ] people".
+
+Table 5: Under CelebA and CLIP (ViT-B/32), the average accuracy and worst-case accuracy over semantically correlated source sub-populations and target sub-populations. The semantic relations refer University (2010). (%)
+
+|Method|Semantically correlated debiasing Avg. Acc. W.C. Acc. Source Target|
+|---|---|
+|Zero-shot L-DRO L-DRO L-DRO|- _{_male, female_}_ 85.2 70.6 _{_male, female_}_ _{_male, female_}_ 83.6_±_0.3 79.2_±_1.3 _{_man, woman_}_1 _{_male, female_}_ 84.9_±_0.3 75.8_±_2.3 _{_boy, girl_}_2 _{_male, female_}_ 85.1_±_0.4 74.4_±_2.5 - _{_old, young_}_ 85.1 73.5 _{_old, young_}_ _{_old, young_}_ 88.0_±_0.7 84.3_±_1.6 _{_adult, juvenile_}_ _{_old, young_}_ 81.8_±_0.5 79.1_±_0.6 _{_mature, immature_}_ _{_old, young_}_ 85.6_±_0.3 71.2_±_1.4|
+|Zero-shot L-DRO L-DRO L-DRO||
+
+> 1 Debiasing test prompt is "a photo of a _{_ man, woman _}_ ".
+
+> 2 Debiasing test prompt is "a photo of a _{_ boy, girl _}_ ".
+
+and target sub-populations generally gets decreasing performance on the worst-case accuracy as expected.
+
+8
+
+Table 6: Under CLIP (ViT-B/32), the average accuracy and worst-case accuracy of ERM, L- DRO+ERM, CVaR DRO Namkoong & Duchi (2016), L-DRO+CVaR-DRO, _χ_[2] -DRO Hashimoto et al. (2018), L-DRO+ _χ_[2] -DRO, JTT Liu et al. (2021), and L-DRO + JTT over different datasets. (%)
+
+|Architecture_a_ Method|CelebA Waterbirds Avg. Acc. W.C. Acc. Avg. Acc. W.C. Acc.|
+|---|---|
+|_I ▷A_2 _▷T_ ERM _I ▷A_1 _▷A_2 _▷T_ L-DRO + ERM|95.3_±_0.1 44.2_±_2.5 83.3_±_1.0 59.7_±_2.4 95.1_±_0.1 45.3_±_4.6 79.9_±_2.0 55.6_±_3.3 84.8_±_4.9 67.1_±_10.4 78.3_±_3.2 60.5_±_4.2 85.9_±_3.2 71.0_±_8.1 78.1_±_3.0 56.7_±_4.5 87.4_±_4.5 72.0_±_9.6 79.3_±_2.9 59.3_±_5.7 84.7_±_2.8 73.8_±_6.8 77.5_±_4.4 57.1_±_5.2 90.3_±_2.1 53.4_±_2.6 80.3_±_1.9 60.5_±_3.0 91.2_±_2.2 48.4_±_2.8 78.2_±_2.0 56.7_±_2.3|
+|_I ▷A_2 _▷T_ CVaR DRO _I ▷A_1 _▷A_2 _▷T_ L-DRO + CVaR-DRO||
+|_I ▷A_2 _▷T_ _χ_2-DRO _I ▷A_1 _▷A_2 _▷T_ L-DRO +_χ_2-DRO||
+|_I ▷A_2 _▷T_ JTT _I ▷A_1 _▷A_2 _▷T_ L-DRO + JTT||
+
+_a I ▷A_ 1 _▷A_ 2 _▷T_ denotes that L-DRO tunes the first adapter _A_ 1 which is the same adapter as _AθA_ ( _·_ ), and the second embedded method tunes the second adapter _A_[2] which is a three-layer MLP with the same input and output dimensions.
+
+## 5.3 DEBIASED FEATURES IMPROVING THE STABILITY OF METHODS DEALING WITH SUB-POPULATION SHIFTS
+
+In this section, we empirically verify that L-DRO has the potential to help stabilize the existing methods including CVaR-DRO Namkoong & Duchi (2016), _χ_[2] -DRO Hashimoto et al. (2018), and JTT Liu et al. (2021) that deal with sub-population shifts based on loss values or wrongly classified instances. In Table 6, we compare the performance of some commonly used DRO methods before and after using the adapter to debias feature on CelebA dataset and Waterbirds dataset. Under CelebA dataset, results show that L-DRO+CVaR-DRO and L-DRO+ _χ_[2] -DRO improves the mean and standard deviation of worst-case accuracy over the original CVaR-DRO and _χ_[2] -DRO. But, there is no improvement when using JTT. Under Waterbirds dataset, the combination does not show any advantages. However, it seems that if the base performance has reasonable results, then L-DRO can further improve its performance upon it. If not, such as the first four rows of performance on Waterbirds, the DRO methods cannot achieve better performance than ERM, then the combination fails either.
+
+## 6 CONCLUSION
+
+In this work, we studied the sub-population shift in the multimodality model CLIP, where subpopulation shifts in one modality can be described and defined in another modality. Specifically, one can use natural language to describe the influential attributes that cause the shifts, then those descriptions can be mapped into the space same as image embedding. To this end, we proposed L-DRO to debias the image representations according to the vectorized influential attributes descriptions and exploit the debiased representations to achieve better performance while sub-population shifts exist during testing. Compared with zero-shot learning, L-DRO shows improved worst-case performance under domain oblivious settings and occasionally even enhances average performance without instance-wise label information. In L-DRO, we introduced the use of entropy and consistency terms to facilitate the cooperation between the two modalities, focusing specifically on the concerned attributes while minimizing their impact on other factors.
+
+**Limitations.** Our work has several limitations that should be acknowledged. Firstly, as is the case with other studies utilizing vision-language models as the foundation, the selection of text prompts, including classification and debiasing prompts in this work, plays a crucial role in achieving reasonable average accuracy and worst-case accuracy. Therefore, even though we can eliminate the need for a domain-oblivious validation dataset during training, careful consideration and appropriate selection of prompts are necessary and deserve a comprehensive study in our future work. Additionally, we anticipate that there may be certain sub-populations that prove challenging to describe accurately, which could hinder the application of our proposed method.
+
+9
+
+## REFERENCES
+
+- Aharon Ben-Tal, Dick Den Hertog, Anja De Waegenaere, Bertrand Melenberg, and Gijs Rennen. Robust solutions of optimization problems affected by uncertain probabilities. _Management Science_ , 59(2):341–357, 2013.
+
+- Homanga Bharadhwaj, Zihan Wang, Yoshua Bengio, and Liam Paull. A data-efficient framework for training and sim-to-real transfer of navigation policies. In _2019 International Conference on Robotics and Automation (ICRA)_ , pp. 782–788. IEEE, 2019.
+
+- Jose Blanchet, Yang Kang, and Karthyek Murthy. Robust wasserstein profile inference and applications to machine learning. _Journal of Applied Probability_ , 56(3):830–857, 2019.
+
+- Ching-Yao Chuang, Varun Jampani, Yuanzhen Li, Antonio Torralba, and Stefanie Jegelka. Debiasing vision-language models via biased prompts. _arXiv preprint arXiv:2302.00070_ , 2023.
+
+- Noel Cressie and Timothy RC Read. Multinomial goodness-of-fit tests. _Journal of the Royal Statistical Society: Series B (Methodological)_ , 46(3):440–464, 1984.
+
+- John Duchi and Hongseok Namkoong. Learning models with uniform performance via distributionally robust optimization. _arXiv preprint arXiv:1810.08750_ , 2018.
+
+- Lisa Dunlap, Clara Mohri, Devin Guillory, Han Zhang, Trevor Darrell, Joseph E Gonzalez, Aditi Raghunanthan, and Anja Rohrbach. Using language to extend to unseen domains. _arXiv preprint arXiv:2210.09520_ , 2022.
+
+- Alex Fang, Gabriel Ilharco, Mitchell Wortsman, Yuhao Wan, Vaishaal Shankar, Achal Dave, and Ludwig Schmidt. Data determines distributional robustness in contrastive language image pretraining (clip). In _International Conference on Machine Learning_ , pp. 6216–6234. PMLR, 2022.
+
+- Zhe Gan, Linjie Li, Chunyuan Li, Lijuan Wang, Zicheng Liu, Jianfeng Gao, et al. Vision-language pre-training: Basics, recent advances, and future trends. _Foundations and Trends® in Computer Graphics and Vision_ , 14(3–4):163–352, 2022.
+
+- Peng Gao, Shijie Geng, Renrui Zhang, Teli Ma, Rongyao Fang, Yongfeng Zhang, Hongsheng Li, and Yu Qiao. Clip-adapter: Better vision-language models with feature adapters. _arXiv preprint arXiv:2110.04544_ , 2021.
+
+- Rui Gao, Xi Chen, and Anton J Kleywegt. Distributional robustness and regularization in statistical learning. _arXiv preprint arXiv:1712.06050_ , 2017.
+
+- Soumyadip Ghosh, Mark Squillante, and Ebisa Wollega. Efficient stochastic gradient descent for learning with distributionally robust optimization. _arXiv preprint arXiv:1805.08728_ , 2018.
+
+- Tatsunori Hashimoto, Megha Srivastava, Hongseok Namkoong, and Percy Liang. Fairness without demographics in repeated loss minimization. In _International Conference on Machine Learning_ , pp. 1929–1938. PMLR, 2018.
+
+- Peter Henderson, Xuechen Li, Dan Jurafsky, Tatsunori Hashimoto, Mark A Lemley, and Percy Liang. Foundation models and fair use. _arXiv preprint arXiv:2303.15715_ , 2023.
+
+- Stephen James, Paul Wohlhart, Mrinal Kalakrishnan, Dmitry Kalashnikov, Alex Irpan, Julian Ibarz, Sergey Levine, Raia Hadsell, and Konstantinos Bousmalis. Sim-to-real via sim-to-sim: Dataefficient robotic grasping via randomized-to-canonical adaptation networks. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 12627–12637, 2019.
+
+Sookyo Jeong and Hongseok Namkoong. Robust causal inference under covariate shift via worst-case subpopulation treatment effects. In _Conference on Learning Theory_ , pp. 2079–2084. PMLR, 2020.
+
+- Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In _International Conference on Machine Learning_ , pp. 5637–5664. PMLR, 2021.
+
+10
+
+- Daniel Kuhn, Peyman Mohajerin Esfahani, Viet Anh Nguyen, and Soroosh Shafieezadeh-Abadeh. Wasserstein distributionally robust optimization: Theory and applications in machine learning. In _Operations research & management science in the age of analytics_ , pp. 130–166. Informs, 2019.
+
+- Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang. Fine-tuning can distort pretrained features and underperform out-of-distribution. _arXiv preprint arXiv:2202.10054_ , 2022.
+
+- Yoonho Lee, Annie S Chen, Fahim Tajwar, Ananya Kumar, Huaxiu Yao, Percy Liang, and Chelsea Finn. Surgical fine-tuning improves adaptation to distribution shifts. _arXiv preprint arXiv:2210.11466_ , 2022.
+
+- Mike Li, Hongseok Namkoong, and Shangzhou Xia. Evaluating model performance under worst-case subpopulations. _Advances in Neural Information Processing Systems_ , 34:17325–17334, 2021.
+
+- Evan Z Liu, Behzad Haghgoo, Annie S Chen, Aditi Raghunathan, Pang Wei Koh, Shiori Sagawa, Percy Liang, and Chelsea Finn. Just train twice: Improving group robustness without training group information. In _International Conference on Machine Learning_ , pp. 6781–6792. PMLR, 2021.
+
+- Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In _Proceedings of International Conference on Computer Vision (ICCV)_ , 12 2015.
+
+- Björn Lütjens, Michael Everett, and Jonathan P How. Safe reinforcement learning with model uncertainty estimates. In _2019 International Conference on Robotics and Automation (ICRA)_ , pp. 8662–8668. IEEE, 2019.
+
+- Jose G Moreno-Torres, Troy Raeder, Rocío Alaiz-Rodríguez, Nitesh V Chawla, and Francisco Herrera. A unifying view on dataset shift in classification. _Pattern recognition_ , 45(1):521–530, 2012.
+
+- Junhyun Nam, Hyuntak Cha, Sungsoo Ahn, Jaeho Lee, and Jinwoo Shin. Learning from failure: De-biasing classifier from biased classifier. _Advances in Neural Information Processing Systems_ , 33:20673–20684, 2020.
+
+- Hongseok Namkoong and John C Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. _Advances in neural information processing systems_ , 29, 2016.
+
+- Thao Nguyen, Gabriel Ilharco, Mitchell Wortsman, Sewoong Oh, and Ludwig Schmidt. Quality not quantity: On the interaction between dataset design and robustness of clip. _arXiv preprint arXiv:2208.05516_ , 2022.
+
+- Suzanne Petryk, Lisa Dunlap, Keyan Nasseri, Joseph Gonzalez, Trevor Darrell, and Anna Rohrbach. On guiding visual attention with language specification. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 18092–18102, 2022.
+
+- Joaquin Quiñonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. _Dataset shift in machine learning_ . Mit Press, 2008.
+
+- Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In _International conference on machine learning_ , pp. 8748–8763. PMLR, 2021.
+
+- Kanchana Ranasinghe, Brandon McKinzie, Sachin Ravi, Yinfei Yang, Alexander Toshev, and Jonathon Shlens. Perceptual grouping in vision-language models. _arXiv preprint arXiv:2210.09996_ , 2022.
+
+- R Tyrrell Rockafellar, Stanislav Uryasev, et al. Optimization of conditional value-at-risk. _Journal of risk_ , 2:21–42, 2000.
+
+- Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. _arXiv preprint arXiv:1911.08731_ , 2019.
+
+11
+
+- Shibani Santurkar, Dimitris Tsipras, and Aleksander Madry. Breeds: Benchmarks for subpopulation shift. _arXiv preprint arXiv:2008.04859_ , 2020.
+
+- Alexander Shapiro. Distributionally robust stochastic programming. _SIAM Journal on Optimization_ , 27(4):2258–2275, 2017.
+
+- Alexander Shapiro. Chapter 7: Distributionally robust stochastic programming. In _Lectures on Stochastic Programming: Modeling and Theory, Third Edition_ , pp. 307–359. SIAM, 2021.
+
+- Aman Sinha, Hongseok Namkoong, Riccardo Volpi, and John Duchi. Certifying some distributional robustness with principled adversarial training. _arXiv preprint arXiv:1710.10571_ , 2017.
+
+- Nimit Sohoni, Jared Dunnmon, Geoffrey Angus, Albert Gu, and Christopher Ré. No subclass left behind: Fine-grained robustness in coarse-grained classification problems. _Advances in Neural Information Processing Systems_ , 33:19339–19352, 2020.
+
+Princeton University. About wordnet. _Princeton University_ , 2010.
+
+Junyang Wang, Yi Zhang, and Jitao Sang. Fairclip: Social bias elimination based on attribute prototype learning and representation neutralization. _arXiv preprint arXiv:2210.14562_ , 2022.
+
+- Mitchell Wortsman, Gabriel Ilharco, Jong Wook Kim, Mike Li, Simon Kornblith, Rebecca Roelofs, Raphael Gontijo Lopes, Hannaneh Hajishirzi, Ali Farhadi, Hongseok Namkoong, et al. Robust fine-tuning of zero-shot models. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 7959–7971, 2022.
+
+- Markus Wulfmeier, Alex Bewley, and Ingmar Posner. Addressing appearance change in outdoor robotics with adversarial domain adaptation. In _2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)_ , pp. 1551–1558. IEEE, 2017.
+
+- Runtian Zhai, Chen Dan, Zico Kolter, and Pradeep Ravikumar. Doro: Distributional and outlier robust optimization. In _International Conference on Machine Learning_ , pp. 12345–12355. PMLR, 2021.
+
+Runtian Zhai, Chen Dan, Zico Kolter, and Pradeep Ravikumar. Understanding why generalized reweighting does not improve over erm. _arXiv preprint arXiv:2201.12293_ , 2022.
+
+Michael Zhang and Christopher Ré. Contrastive adapters for foundation model group robustness. _arXiv preprint arXiv:2207.07180_ , 2022.
+
+- Xin Zhang, Yusuke Iwasawa, Yutaka Matsuo, and Shixiang Shane Gu. Amortized prompt: Lightweight fine-tuning for clip in domain generalization. _arXiv preprint arXiv:2111.12853_ , 2021.
+
+- Yuhui Zhang, Jeff Z HaoChen, Shih-Cheng Huang, Kuan-Chieh Wang, James Zou, and Serena Yeung. Diagnosing and rectifying vision models using language. _arXiv preprint arXiv:2302.04269_ , 2023.
+
+12
+
+## A THE EFFECT OF TEXT PROMPT
+
+Table 7: Under CelebA and CLIP (ViT-B/32), the average accuracy and worst-case accuracy over sub-populations with varying classification text prompt and debiasing text prompt. (%)
+
+|Classifcation text prompt And Debiasing text prompt|Method|Avg. Acc.|Worst-case Acc.|
+|---|---|---|---|
+|Input space sub-group: _{_female, male_}_||||
+|"a photo of a_{_not blond, blond_}_hair people"|Zero-shot|85.2|70.6|
+|And "aphoto of a _{_female,male_}_ people" 1|L-DRO|83.6_±_0.3|**79.2**_±_**1.3**|
+|Or "a photo of a_{_female, not female_}_people"|L-DRO|88.8_±_0.3|65.0_±_0.9|
+|Or "a photo of a_{_male, not male_}_people"|L-DRO|89.4_±_0.3|37.8_±_2.2|
+|Or "a photo of a_{_[female, not female], [male, not male]_}_people"|L-DRO|89.9_±_0.3|60.7_±_2.4|
+|Input space sub-group: _{_old, young_}_||||
+|"a photo of a_{_not blond, blond_}_hair people"|Zero-shot|85.1|73.5|
+|And "a photo of a_{_old, young_}_people"|L-DRO|84.4_±_0.3|74.5_±_1.5|
+|Or "a photo of a_{_old, not old_}_people"|L-DRO|82.2_±_0.05|78.2_±_0.6|
+|Or "a photo of a_{_young, not young_}_people"|L-DRO|91.3_±_0.1|51.6_±_1.9|
+|Or "aphoto of a _{_[old,not old], [young,notyoung]_}_ people"|L-DRO|88.0_±_0.7|**84.3**_±_**1.6**|
+
+> 1 " " denotes default choice.
+
+Table 8: Under Waterbirds and CLIP (ViT-B/32 and RN50), the Average Accuracy (Avg.Acc.) and Worst-Case Accuracy (W.C.Acc.) over sub-populations with varying classification text prompt and debiasing text prompt.(%)
+
+|debiasingtextprompt.(%)||||
+|---|---|---|---|
+|Classifcation text prompt And Debiasing text prompt|Method|RN50 (Avg.Acc & W.C.Acc.)|ViT-B/32 (Avg.Acc & W.C.Acc.)|
+|"a {landbird, waterbird}"|Zero-shot|68.1 & 43.4|74.8 & 56.8|
+|And "{water, land}"|L-DRO|72.6±1.2 & 49.5±2.7|75.1±1.6 & 56.6±2.6|
+|Or "{water, forest}"|L-DRO|74.9±1.2 &**57.6±2.6**|77.6±0.5 &**64.8±0.8**|
+|"photo of {landbird, waterbird}"|Zero-shot|66.3 &**43.2**|66.1 & 39.6|
+|And "photo of {water, land}"|L-DRO|63.3±1.4 & 41.0±3.3|76.0±0.7 &**61.9±1.4**|
+|"photo of a {landbird, waterbird}"|Zero-shot|78.1 & 34.0|68.7 & 43.6|
+|And "photo of a bird on|L-DRO|74.3±0.9 &**57.9±1.8**|71.8±2.5 &**49.7±4.7**|
+|{water, land}"||||
+|"photo of a {landbird, waterbird}"|Zero-shot|78.1& 34.0|68.7 & 43.6|
+|And "photo of a bird on|L-DRO|77.4±1.3 &**62.7±2.8**|70.0±3.2 &**46.9±4.8**|
+|{water, land} background"||||
+|"a photo of a {landbird, waterbird}"|Zero-shot|76.8 & 40.8|69.7 & 45.5|
+|And "a photo of a bird on|L-DRO|73.9±3.0 &**54.4±4.6**|71.4±3.4 &**50.2±5.2**|
+|{water, land}"||||
+|"a photo of a {landbird, waterbird}"|Zero-shot|76.8 & 40.8|69.7&**45.5**|
+|And "a photo of a bird on|L-DRO|75.3±0.8&**58.1±1.7**|67.5±2.9 & 43.9±4.2|
+|{water, land} background"||||
+
+13
+
+## B EFFECTS OF TWO-PHASE TRAINING ON DRO METHODS
+
+Table 9: The average accuracy and worst-case accuracy over different datasets and methods.[[1]] (%)
+
+|Dataset|Architecture|Method|Average Acc.|Worst-case Acc.|
+|---|---|---|---|---|
+||_I ▷A_2 _▷T_|ERM|95.3_±_0.1|44.2_±_2.5|
+||_I ▷A_2 _▷T_|CVaR DRO|86.6_±_1.0|11.7_±_9.7|
+|CelebA|_I ▷A_2 _▷T_|_χ_2-DRO|84.2_±_8.3|61.3_±_8.5|
+||_I ▷A_2 _▷T_|CVaR DRO_⋆_|84.8_±_4.9|67.1_±_10.4|
+||_I ▷A_2 _▷T_|_χ_2-DRO_⋆_|87.4_±_4.5|72.0_±_9.6|
+
+> 1 Keeping the same settings with Table 6. And _⋆_ denotes using the same twophase training strategy with JTT, and the method without _[⋆]_ denotes the original version (mini-batch) of CVaR DRO and _χ_[2] -DRO.
+
+## C TEXT PROMPT FOR CLIP (VIT-L/14)
+
+Table 10 reveals that the effectiveness of text prompts on CLIP (ViT-B/32) does not consistently translate to high performance on CLIP (ViT-L/14). Employing "a photo of a _{ }_ people" as the prompt for CLIP (ViT-L/14) achieves a more reasonable performance, and the introduction of L-DRO further enhances the overall performance in this context.
+
+Table 10: Under CelebA and CLIP (ViT-L/14), the average accuracy and worst-case accuracy over sub-populations with varying classification text prompt and debiasing text prompt[1] .(%)
+
+||Classifcation text prompt And Debiasing text prompt Method Average Acc. Worst-case Acc.|
+|---|---|
+||"a photo of_{_not blond, blond_}_" Zero-shot 39.1 28.8 "photo of a_{_not blond, blond_}_" Zero-shot 75.9 65.2 "a photo of a_{_not blond, blond_}_" Zero-shot 64.0 39.7 "photo of a_{_not blond, blond_}_people" Zero-shot 80.7 77.9 "aphoto of a _{_not blond,blond_}_ people" Zero-shot 85.4 76.1 "photo of a_{_not blond, blond_}_hair people" Zero-shot 78.5 70.7 "a photo of a_{_not blond, blond_}_hair people" Zero-shot 75.6 64.5 And "aphoto of a _{_male,female_}_ people" 2 L-DRO 85_._9_±_0.9 **79.7**_±_**1.9**|
+|||
+
+> 1 classification and debiasing text prompts use the same structure, e.g., "a photo of a _{ }_ people" will be used for both classification and debiasing text prompts.
+
+> 2 " " denotes default choice.
+
+14
+
diff --git a/open_review/iclr2024_8533.json b/open_review/iclr2024_8533.json
new file mode 100644
index 0000000000000000000000000000000000000000..65a0465daaefedb2f1497857fb68d222349d8619
--- /dev/null
+++ b/open_review/iclr2024_8533.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8533",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Unsupervised Sign Language Translation and Generation",
+ "abstract": "Sign language translation and generation are crucial in facilitating communication between the deaf and hearing communities.However, the scarcity of parallel sign language video-to-text data poses a considerable challenge to developing effective sign language translation and generation systems.Motivated by the success of unsupervised neural machine translation (UNMT), this paper introduces an unsupervised sign language translation and generation network (USLNet), which learns from abundant single-modality (text and video) data without parallel sign language data. Inspired by UNMT, USLNet comprises two main components: single-modality reconstructing modules (text and video) that rebuild the input from its noisy version in the same modality and cross-modality back-translation modules (text-video-text and video-text-video) that reconstruct the input from its noisy version in the different modality using back-translation procedure.Unlike the single-modality back-translation procedure in text-based UNMT, USLNet faces the cross-modality discrepancy in feature representation, in which the length and the feature dimension mismatch between text and video sequences.To address the issues, we propose a sliding window method to align variable-length text with video sequences.To our knowledge, USLNet is the first unsupervised sign language translation and generation model capable of generating both text and sign language video in a unified manner.Experimental results on the BBC-Oxford Sign Language datasets (BOBSL) reveal that USLNet achieves competitive results compared to supervised baseline models, indicating its effectiveness in sign language translation and generation.",
+ "rebuttal": "We thank the reviewer for the review. We have provided clarification in the author's response and also update our paper. Should the reviewer have any further suggestions, we would be happy to provide further clarification and revise our manuscript.\n\nWe thank the reviewer for the review. We have provided clarification in the author's response and also update our paper. Should the reviewer have any further suggestions, we would be happy to provide further clarification and revise our manuscript.\n\nWe thank the reviewer for the review. We have provided clarification in the author's response and also update our paper. Should the reviewer have any further suggestions, we would be happy to provide further clarification and revise our manuscript.\n\nWe thank the reviewer for the review. We have provided clarification in the author's response and also update our paper. Should the reviewer have any further suggestions, we would be happy to provide further clarification and revise our manuscript.\n\nQ3: Descriptions problem for the process of the aligner. \nThank you for your advice. We will simplify our illustration of the slide window aligner in the revised version. We will add a discussion of dual learning in the related works.\n\nQ4: Dual Learning introduction. \nWe appreciate your suggestions regarding dual learning algorithms in our work. Following your recommendation, we will include a subsection discussing dual learning in the revised version.\nHere, we provide a brief outline of the proposed subsection, which will cover the following points: \nDual Learning. [3] propose dual learni [...]\n\nQ1:Experimental settings: supervised finetune results and other dataset results.\n\n1.1 Fine-tuning USLNet on parallel corpus \nThanks for your suggestion. We conduct experiments and report the experimental results: \n| **Models** | B@1 | B@4 |\n|------------------------------------------------|-------|----------|\n| **Albanie** | 12.78 | 1.00 |\n| **USLNet(unsupervised )** | 21.10 | 0.10 |\n| **USLNet(supervised )** | 15.50 | 1.00 |\n| **USLNet(unsupervised + supervis [...]\n\nQ4: Qualitative results and failure analysis. \nThanks for your suggestions. We completely agree with your opinion that we should dig deep into “why” and “how”. Moreover, it is especially significant for this topic. In the next paragraph, we will give our analysis and possible paths to success. \n1 **For the reason (“why”) part**, we will divide it into results analysis and dataset analysis. first give the analysis about results to tell which we can do relatively better and show comparison between our output and supervised output.\n1.1 Case study which can be research on good case, bad case and [...]\n\nQ1:Other results on BOBSL and acknowledge that the challenging of BOBSL. \nWe greatly appreciate your contribution of state-of-the-art (SOTA) results and insights emphasizing the challenges associated with BOBSL. For the work[1], the best model using the context and spotting information achieves 2.88 B@4 points. However, the model can not obtain context and spotting information in our setting. To make a fair comparison, the appropriate baseline for comparison should be B @ 4=1.27 for video-to-text, as depicted in Table 4 in [1], given the fact that USLNet also do not have extra knowledge. \n[1 [...]\n\nQ2: Different resolution: \n\nWe have conducted experiments using higher resolution; however, the results do not indicate any performance improvement. A possible explanation for this outcome could be that the BOBSL dataset is inherently challenging[1], and increasing the video resolution may further complicate the task. We will add the discussion in the revised version. \n\n[1]Sincan O M, Camgoz N C, Bowden R. Is context all you need? Scaling Neural Sign Language Translation to Large Domains of Discourse[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023: 1955-1965 [...]\n\nQ1: Analysis of the results and possible path to success. \n\nWe appreciate your suggestions and agree with your perspective on delving deeper into the \"why\" and \"how\" aspects, particularly for this topic. In the following paragraph, we will provide our analysis and potential paths to success. \n\n1 **Regarding the \"why\" aspect**, we will conduct a thorough analysis of the results, identifying the areas in which our approach performs well and those that require further improvement. \n \n1.1 Case study which can be research on good case, bad case and case for comparison: \nGood cases: \n\n| **Good [...]\n\nQ3: Evaluation for the fidelity of the generated videos and visual results is limited. \n\nWe appreciate your suggestions regarding the evaluation of video generation. In our study, we have adopted the Frechet Video Distance (FVD) metric [11] to assess generated video quality.\n\nThe FVD evaluation is conceptually analogous to the Frechet Inception Distance (FID) metric; however, it replaces the feature extraction network for images with a video extraction network, such as the Inflated 3D ConvNet (I3D). The evaluation results are presented below, demonstrating that joint training with USLNet sign [...]\n\nQ1:Discussion text-to-video aligner algorithms. \nWe appreciate your suggestions regarding the text-to-video aligner algorithms in our work. Following your recommendation, we will include a subsection discussing text-to-video aligners in the revised version.\n\nHere, we provide a brief outline of the proposed subsection, which will cover the following points: \na) Text-to-video aligners in sign language domain can be broadly classified into two main categories. The first category involves the use of animated avatars to generate sign language, relying on a predefined text-sign dictionary that con [...]",
+ "initial_scores": [
+ 5,
+ 5,
+ 5,
+ 5
+ ],
+ "score_mean": 5.0,
+ "score_variance": 0,
+ "score_spread": 0,
+ "score_min": 5,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The paper introduces a model for unsupervised sign language translation and generation, which does not rely on parallel sign language data. The approach includes four modules: text reconstruction, video reconstruction, text-to-video-to-text translation, and video-to-text-to-video reconstruction. USLNet can learn to translate and generate sign language in an unsupervised manner.\n\nThe primary concern from the reviewers is that some results reported in the paper are notably poor, raising questions about the model's effectiveness. A deeper analysis of why the results are suboptimal and potential improvements is needed. \n\nThe reviewers suggest the paper could explore using the approach as a pretraining method followed by supervised fine-tuning, potentially enhancing the model's performance. The authors tried this approach, and the results show that pretraining is helpful. \n\nThe paper primarily focuses on the BOBSL dataset. The reviewers suggest experimenting with other datasets like OpenASL could provide a broader perspective on the model's performance and applicability.",
+ "forum_id": "eeaKRQIaYd",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_PET1",
+ "review_id": "XmltZGTiqf",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2337,
+ "edit_detected": true,
+ "edit_delta_seconds": 905803,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_WPdm",
+ "review_id": "jqhaqfYlFp",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3417,
+ "edit_detected": true,
+ "edit_delta_seconds": 938028,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_zNBk",
+ "review_id": "U71cNImRBQ",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 5
+ },
+ "review_text_chars": 3302,
+ "edit_detected": true,
+ "edit_delta_seconds": 3144832,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_gT8h",
+ "review_id": "fqsEblAkZy",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2432,
+ "edit_detected": true,
+ "edit_delta_seconds": 1131834,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8533.md b/open_review/iclr2024_8533.md
new file mode 100644
index 0000000000000000000000000000000000000000..e486a770b379db7af7add8f1aa8730eefcfd6392
--- /dev/null
+++ b/open_review/iclr2024_8533.md
@@ -0,0 +1,361 @@
+
+
+## UNSUPERVISED SIGN LANGUAGE TRANSLATION AND GENERATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+Sign language translation and generation are crucial in facilitating communication between the deaf and hearing communities. However, the scarcity of parallel sign language video-to-text data poses a considerable challenge to developing effective sign language translation and generation systems. Motivated by the success of unsupervised neural machine translation (UNMT), this paper introduces an unsupervised sign language translation and generation network (USLNet), which learns from abundant single-modality (text and video) data without parallel sign language data. Inspired by UNMT, USLNet comprises two main components: single-modality reconstructing modules (text and video) that rebuild the input from its noisy version in the same modality and cross-modality back-translation modules (text-video-text and video-text-video) that reconstruct the input from its noisy version in the different modality using back-translation procedure. Unlike the single-modality back-translation procedure in text-based UNMT, USLNet faces the cross-modality discrepancy in feature representation, in which the length and the feature dimension mismatch between text and video sequences. To address the issues, we propose a sliding window method to align variable-length text with video sequences. To our knowledge, USLNet is the first unsupervised sign language translation and generation model capable of generating both natural language text and sign language video in a unified manner. Experimental results on the BBCOxford Sign Language datasets (BOBSL) reveal that USLNet achieves competitive results compared to supervised baseline models, indicating its effectiveness in sign language translation and generation.
+
+## 1 INTRODUCTION
+
+Sign language translation and generation (SLTG) have emerged as essential tasks in facilitating communication between the deaf and hearing communities (Angelova et al., 2022b). Sign language translation involves the conversion of sign language videos into natural language, while sign language generation involves the generation of sign language videos from natural language.
+
+Sign language translation and generation (SLTG) have achieved great progress in recent years. However, training an SLTG model requires a large parallel video-text corpus, which is known to be ineffective when the training data is insufficient (Müller et al., 2022b). Furthermore, manual and professional sign language annotations are expensive and time-consuming. Inspired by the successes of unsupervised machine translation (UNMT) (Artetxe et al., 2018; Lample et al.) and unsupervised image-to-image translation (Liu et al., 2017), we propose an unsupervised model for SLTG that does not rely on any parallel video-text corpus.
+
+In this work, we propose an unsupervised SLTG network (USLNet), which learns from abundant single-modal (text and video) data without requiring any parallel sign language data. Similar to UNMT, USLNet consists the following components: the text reconstruction module (Section 2.1) and the sign video reconstruction module (Section 2.2) that rebuild the input from its noisy version in the same modality, and cross-modality back-translation modules (Section 2.3) that reconstruct the input from its noisy version in the different modality using a back-translation procedure.
+
+Unlike the single-modal back-translation in text-based UNMT, USLNet faces the challenge of crossmodal discrepancy. Sign and spoken languages exhibit distinct characteristics in terms of modality, structure, and expression. Sign language relies on visual gestures, facial expressions, and body
+
+1
+
+movements to convey meaning, while spoken language depends on sequences of phonemes, words, and grammar rules Chen et al. (2022). The cross-modal discrepancy in feature representation presents unique challenges for USLNet.
+
+To address the cross-modal discrepancy in feature representation, a common practice is to use a linear projection to map the representations from the single-modal representation to a shared multi-modal embedding space (Radford et al., 2021). This approach effectively bridges the gap between different feature representations, facilitating seamless integration of information and enhancing the overall performance of models in handling cross-modal translation tasks. In this work, we propose a sliding window method to address the issues of aligning the text with video sequences.
+
+To the best of our knowledge, USLNet is the first unsupervised SLTG model capable of generating both text and sign language video in a unified manner. Experimental results on the BBC-Oxford Sign Language datasets (BOBSL) reveal that USLNet achieves competitive results compared to the supervised baseline model (Albanie et al., 2021) indicating its effectiveness in sign language translation and generation. (Albanie et al., 2021) is a standard transformer encoder-decoder structure and the encoder and decoder comprise two attention layers, each with two heads.
+
+Our contributions are summarized below:
+
+1. USLNet is the first unsupervised model for sign language translation and generation, addressing the challenges of scarce high-quality parallel sign language resources.
+
+2. USLNet serves as a comprehensive and versatile model capable of performing both sign language translation and generation tasks efficiently in a unified manner.
+
+3. USLNet demonstrates competitive performance compared to the previous supervised method on the BOBSL dataset.
+
+## 2 METHODOLOGY
+
+The proposed framework in this study consists of four primary components: a text encoder, a text decoder, a video encoder, and a video decoder. As illustrated in Figure 1, the USLNet framework encompasses four modules: a text reconstruction module, a sign video reconstruction module, a textvideo-text back-translation (T2V2T-BT) module, and a video-text-video back-translation (V2T2V-BT) module. The latter two modules are considered cross-modality back-translation modules due to their utilization of the back-translation procedure. In this section, we will first describe each module and then introduce the training procedure.
+
+**Task Definition** We formally define the setting of unsupervised sign language translation and generation. Specifically, we aim to develop a USLNet that can effectively perform both sign language translation and generation tasks, utilizing the available text corpus _T_ = _{_ **t** _[i] }[M] i_ =1[, and sign language] video corpus _V_ = _{_ **v** _[j] }[N] j_ =1[, where] _[ M]_[and] _[ N]_[are the sizes of the text and video corpus, respectively.]
+
+## 2.1 TEXT RECONSTRUCTION MODULE
+
+As shown in Figure 1, the text reconstruction module uses text encoder and text decoder to reconstruct the original text from its corrupted version. Following the implementation by (Song et al., 2019), we employ masked sequence-to-sequence learning to implement the text reconstruction. Specifically, given an input text **t** = ( **t1** _, . . . ,_ **tn** ) with _n_ words, we randomly mask out a sentence fragment **t[u]**[:] **[v]** where 0 _< u < v < n_ in the input text to construct the prediction sequence. The text encoder ENC-TEXT is utilized to encode the masked sequence **t** _[\]_ **[u]**[:] **[v]** , and the text decoder DEC-TEXT is employed to predict the missing parts **t[u]**[:] **[v]** . The log-likelihood serves as the optimization objective function:
+
+**==> picture [267 x 27] intentionally omitted <==**
+
+This task facilitates the model’s learning of the underlying text structure and semantics while enhancing its capacity to manage noisy or incomplete inputs.
+
+2
+
+**==> picture [397 x 448] intentionally omitted <==**
+
+**----- Start of picture text -----**
+① Text Reconstruction ② Video Reconstruction Hello World Hello World Video Next Video Enc -zationquanti TokenGener Dec -ation Text Text E EmbdsVideo Video Tokens ❓ G Encoder Decoder Code GPT book ③ Cross-Modality Back-Translation Text-Video-Text Back-Translation (T2V2T-BT) Video-Text-Video Back-Translation(V2T2V-BT) 6 Hello World 10 5 step 1 Text Encoder Text Decoder Hello World Text Encoder Text Decoder Pseudo text begin end 28 Slide Window Aligner 9 3 73 Slide Window Aligner 4 8 9 7 Codebook GPT 4 2 Codebook GPT VideoEnc VideoDec step 1begin VideoEnc VideoDec 10end 6 Pseudo video 5 (a) Tasks Explored text Text Reconstruction Text Reconstruction reconstruction Loss Sign Language GenerationVideo Reconstruction Hello World Hello World Sign Language Translation + T2V2T-BT + V2T2V-BT Text Text Pseudo text Encoder Decoder Cross-Modality Slide Window Aligner T2V2T-BT Loss Back-Translation V2T2V-BT Codebook GPT Decoder Loss 0 1 �(�) = � �(��|�<�) Pseudo video 12 8 49 37 64 26 90 ❓ N-1 �<� �� VideoEncoder quantization 12 8 49 37 Next token Conv3DDecoderVideoDecoder 64 26 90 2 E 55 3 62 86 generation G G 78 98 7 9 Video Reconstruction (b) USLNet Illustration Loss **----- End of picture text -----**
+
+Figure 1: Overview of the proposed USLNet framework and the tasks we explored. USLNet adopts separate encoders to capture modality-specific (visual and textual) characteristics and separate decoders to generate text or video. It employs slide window aligner to archive cross-modality feature transformation. The framework encompasses three modules: a text reconstruction module, a sign video reconstruction module, a text-video-text (T2V2T) module, and a video-text-video (V2T2V) module.
+
+## 2.2 SIGN VIDEO RECONSTRUCTION MODULE
+
+The sign video reconstruction module employs video encoder and video decoder to reconstruct the original video from the downsampled discrete latent representations of raw video data. In this work, we adopt the VideoGPT (Yan et al., 2021) architecture to build the sign video reconstruction module. VideoGPT consists of two sequential stages, i.e., quantization and video sequence generation.
+
+3
+
+**Quantization** VideoGPT employs 3D convolutions and transposed convolutions along with axial attention for the autoencoder in VQ-VAE, learning a downsampled set of discrete latents from raw pixels of the video frames.
+
+Specifically in the quantization stage, given an input video **v** = ( **v1** _, . . . ,_ **vn** ) with _n_ pixels, the video encoder encodes the input **v** into video embeddings **Ev** = ( **Ev1** _, . . . ,_ **Evn** ),then **Ev** are discretized by performing a nearest neighbors lookup in a codebook of embeddings **C** = _{_ **ei** _}_ **[N] i** = **1**[, as shown] in Eq.(2). Next, **Ev** can be representated as discrete encodings **E[q] v**[which consists of the nearest] embedding indexs in codebook, shown in Eq.(3). Finally, video decoder learns to reconstruct the input **v** from the quantized encodings.
+
+**==> picture [299 x 13] intentionally omitted <==**
+
+**==> picture [332 x 12] intentionally omitted <==**
+
+The similarity between **Evi** and **ej** serves as the optimization objective function:
+
+**==> picture [266 x 29] intentionally omitted <==**
+
+**Video Sequence Generation** After quantization stage, the discrete video encodings **E[q] v**[=] ( **k1** _, . . . ,_ **kn** ) are feed into the GPT-style decoder, and generate the next video "word" **kn** + **1** . The similarity between autoregressively generated video **vrecon** and the original input video **v** serves as the optimization object function:
+
+**==> picture [263 x 27] intentionally omitted <==**
+
+## 2.3 CROSS-MODALITY BACK-TRANSLATION MODULE
+
+The cross-modality back-translation module consists of two tasks: text-video-text back-translation (T2V2T-BT) and video-text-video back-translation (V2T2V-BT). In contrast to conventional backtranslation (Sennrich et al., 2016), which utilizes the same modality, cross-modal back-translation encounters the challenge of addressing discrepancies between different modalities (Ye et al., 2023). Inspired by the recent work Visual-Language Mapper (Chen et al., 2022), we propose the implementation of a sliding window aligner to facilitate the mapping of cross-modal representations.
+
+**Sliding Window Aligner.** The sliding window aligner is proposed to address the discrepancies between text and video modal representations. Specifically, two primary distinctions between text and video representation sequences are hidden dimensions and sequence length differences. Considering these differences, the aligner consists of two components: _length mapper_ **M[L]** and _dimension mapper_ **M[D]** . Considering different back-translation directions (V2T2V and T2V2T), dimension mappers include text-to-video mapper **M[D] T** _→_ **V**[and video-to-text mapper] **[ M][D] V** _→_ **T**[.]
+
+Given the text encoder output **Et** , the text decoder input **Dt** , the codebook reconstructed video embedding **Ev** and video GPT input **Dv** , the feature dimension transformation procedure are as follows:
+
+**==> picture [251 x 13] intentionally omitted <==**
+
+**==> picture [251 x 13] intentionally omitted <==**
+
+Sign language constitutes a distinct language system characterized by its unique grammatical principles governing word order. Achieving optimal word order in video-text and text-video tasks poses a significant challenge for Sign Language Translation and Generation (SLTG) models. Furthermore, due to the disparity in decoding termination conditions between video and text modalities, text sequences exhibit variability in length, whereas video sequences maintain a fixed length.
+
+4
+
+**==> picture [396 x 84] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Current window Adjacent window Other words Text 1 2 3 4 5 6 Current window words Adjacent window words Other words Video a b c d **----- End of picture text -----**
+
+Figure 2: Left: A figure describing slide window aligner at step one. Right: Visualization of the probability distribution (Gaussian distribution) that satisfies the weight coefficients of words in different positions. At step one, we compute the first token of pseudo video "sequence" by slide window aligner.
+
+Aiming to solve the above two challenges, we design **length mapper M[L]** method, which uses the sliding window method. According to (Sutton-Spence & Woll, 1999), signing is particularly influenced by English word order when the signers sign while translating from a text. In the context of British Sign Language, presenters may adhere to a more English-like word order and the validation procedure can be seen in Appendix A.1. Drawing upon this linguistic understanding, we propose a method wherein the source sequence is partitioned into distinct windows, allowing each word in the target sequence to align more closely with its corresponding window. Taking text-to-video for example, supposed that input text sequence **t** = ( **t1** _, . . . ,_ **tm** ) with m words, video sequence **v** = ( **v1** _, . . . ,_ **vn** ) with n frames and **m** _>_ **n** , the sliding window method, Length Mapper **M[L]** which can be described as follows:
+
+**==> picture [345 x 81] intentionally omitted <==**
+
+Shown in Eq.(8), every video word accept all text words’ information. However, each word in the target sequence aligns more closely with its corresponding window. For example, the beginning video frames conveys more information about the first some text words. Specifically, weight coefficient [ _α_ **1** _, α_ **2** _, . . . , α_ **n** ] comes from _X_ = [ _β_ **1** _, β_ **2** _, . . . , β_ **n** ]. X follows a Gaussian distribution _N_ ( _µ, σ_[2] ). The value of _β_ **i** depends on where token i is and is divided into three probability intervals ( _p_ ( _·_ ) _, p_ ( _·_ )], shown in Eq.(9). The value of token _β_ **i** increases as its proximity to the current window becomes closer. Additionally, the lengths of the window and the stride can be easily calculated using the following rules. The window length is equal to the ratio of the input sequence length to the output sequence length, while the stride is obtained by subtracting the window length from the input length and dividing the result by the output length.
+
+As figure 2 has shown, supposed text has 6 words **t** = ( **t1** _, . . . ,_ **t6** ) and video has 4 frames **v** = ( **va** _,_ **vb** _,_ **vc** _,_ **vd** ). We can compute window size = 2, stride = 1. It means the first window is **t1** _,_ **t2** , and the corresponding video token is **v1** ; and the second window is **t2** _,_ **t3** and the corresponding video token is **v2** and so on. When it comes to the first window, _α_ **1** _, α_ **2** has high probability of Gaussian distribution, _α_ **3** _, α_ **4** has medium probability of Gaussian distribution, and _α_ **5** _, α_ **6** has a low probability of Gaussian distribution.
+
+We introduce **dimension mapper M[D]** to address the differences in hidden dimensions of different modalities. For example, **M[D] T** _→_ **V**[(] **[E][t]**[)][ transposes text embeddings’ hidden dimensions into video] embeddings’ hidden dimensions, facilitating the integration and alignment of textual and visual information for improved multimodal tasks.
+
+**Cross-Modality Back-Translation.** The T2V2T-BT translates a given text sequence into a sign video, followed by translating the generated sign video back into text, shown in figure 1(a). The objective of T2V2T-BT is to ensure consistency between the generated text and the original text while
+
+5
+
+accurately translating the video back into the original text. This task assists the model in capturing the semantic and visual correspondence between text and video modalities and comprehending the input data’s underlying structure and temporal dynamics.The similarity between back-translated text **tBT** and the original input text **t** serves as the optimization object function:
+
+**==> picture [260 x 27] intentionally omitted <==**
+
+Similarly, the V2T2V-BT task requires the model to translate a given video into its corresponding text description, and then translate the generated text back into a video, using the original video as a reference, shown in figure 1(a). The similarity between back-translated video **vBT** and the original input video **v** serves as the optimization object function:
+
+**==> picture [262 x 26] intentionally omitted <==**
+
+Overall, the cross-modality back-translation module of our proposed USLNet aims to improve the model’s ability to translate between text and video modalities in an unsupervised manner, by learning a consistent and meaningful mapping between the two modalities.
+
+## 2.4 UNSUPERVISED JOINT TRAINING
+
+The training objective of USLNet combines the above four loss items, which jointly optimize the text and video networks. The loss _Ltext_ and _Lvideo_ encourages the generator network to generate realistic and diverse texts and videos. while loss _LT_ 2 _V_ 2 _T_ and _LV_ 2 _T_ 2 _V_ encourage the USLNet to learn a consistent and meaningful mapping between text and video modalities. The objective is to train a model that can generate high-quality sign language videos(texts) from arbitrary text(video) inputs without relying on any labeled data.
+
+**==> picture [351 x 10] intentionally omitted <==**
+
+## 3 EXPERIMENT
+
+**Dataset.** The BBC-Oxford British Sign Language Dataset (BOBSL) (Albanie et al., 2021) is a large-scale video collection of British sign language(BSL). The corpus is collected from BBC TV episodes, covering a wide range of topics. It contains 1,004K, 20K, 168K samples in train, dev and test sets, respectively. The vocabulary size is 78K, and out-of-vocab size of the test set is 4.8k.
+
+**Metric.** We adopt the BLEU(Papineni et al., 2002) as the evaluation metric for the sign language translation. For the sign language generation, we follow UNMT (Lample et al.) to utilize backtranslation BLEU to assess the performance. Specifically, we back-translate the generated sign language video and use the input text as the reference to compute the BLEU score.
+
+**Model.** The USLNet incorporates the MASS (Song et al., 2019) architecture as the text model backbone and VideoGPT (Yan et al., 2021) as the video model backbone. For the text model, we set the encoder and decoder layers to 6, and the hidden dimension to 1024. As for the video model, we build the VideoGPT with 8 layers and 6 heads,with a hidden dimension of 576. For the codebook, we set it with 2048 codes, wherein each code represents a feature tensor with a 256-dimensional. The training process comprises two stages: pre-training and unsupervised training. Firstly, we perform continued pre-training using the pre-trained MASS model (Song et al., 2019) on the text portion of the BOBSL. Then, we train the VideoGPT model (Yan et al., 2021) on the sign language video component of the BOBSL. Finally, we utilize the pre-trained MASS and VideoGPT models to initialize the USLNet and conduct unsupervised joint training, as described in Section 2.4. We train the whole network for 10 epochs with a learning rate of 1e-3. Moreover, we use greedy decoding in evaluation procedure.
+
+6
+
+Table 1: Sign language translation performance in terms of BLEU on BOBSL test set. B@1 and denotes BLEU-1 and BLEU-4, respectively.
+
+|LEU-1 and BLEU-4,respectively.|||
+|---|---|---|
+|**Method**|**Dev** B@1_↑_|**Test** B@1_↑_ B@4_↑_|
+||||
+|(Albanie et al., 2021)(supervised) (Sincan et al.,2023)(supervised)|- 18.80|12.78 1.00 17.71 1.27|
+|USLNet(unsupervised) USLNet(supervised) USLNet(unsupervised + supervised Finetune)|17.30 19.60 24.60|21.30 0.10 15.50 1.00 27.00 1.40|
+
+Table 2: Sign language generation performance in terms of back-translation BLEU and Frechet Video Distance (FVD) on BOBSL dataset. B@1 and denotes BLEU-1 and BLEU-4, respectively.
+
+|**Method**|**Dev** B@1_↑_ FVD _↓_|**Test** B@1_↑_ B@4 _↑_ FVD _↓_|
+|---|---|---|
+|USLNet w/o. joint training USLNet w. joint training|0.50 892.8 20.90 402.8|0.70 0.00 872.7 22.70 0.20 389.2|
+
+## 4 RESULTS AND DISCUSSION
+
+## 4.1 MAIN RESULT
+
+**Sign Language Translation** We compare the results of USLNet with the supervised approach (Albanie et al., 2021) on BOBSL test set. As illustrated in Table 1, our USLNet achieves competitive results compared to the supervised approach and surpasses it by an 8.0+ BLEU-1 metric. Moreover, unsupervised way can obtain more knowledge representation and is significant for improve supervised translation method (B@4 1.0 –> 1.4). The results show that although translation quality is not perfect, more cases, failure analysis and path to success will be illustrated in Appendix A.2.
+
+**Sign Language Generation** Since there are no existing results for sign language generation on the BOBSL dataset, we compare the use of unsupervised joint training in USLNet. As shown in Table 2, the unsupervised joint training in USLNet yields improvements in terms of back-translation BLEU scores, demonstrating the effectiveness of USLNet. What’s more, visual results can be found in Appendix A.6.
+
+## 4.2 ANALYSIS
+
+In this section, to gain a deeper understanding of the improvements achieved by USLNet, we assess the impact of our approach on both the sliding window aligner and our translation outputs.
+
+## 4.2.1 IMPACT ON SLIDING WINDOW ALIGNER
+
+**Different alignment networks** To further explore the advantages of the proposed sliding window aligner (soft connection), we have designed two comparison aligner networks, altering only the length mapper component **M[L]** . The first network is pooling, where the text sequence is padded to a fixed length and a linear network maps it to the video sequence length. The second network is the sliding window aligner with a hard connection, also utilizing a sliding window mechanism. However, _αi_ in Eq(9) is non-zero only if tokens are in the current window, indicating that it conveys information exclusively from tokens in the current window.
+
+As demonstrated in Table 3 and Table 4, our method, the sliding window aligner with soft connection, achieves the best performance, exhibiting significant improvements of 9.00 at BLEU-1 score in sign language translation compared to the pooling method and 18.00 BLEU-1 score in sign language generation tasks compared to the pooling method.
+
+7
+
+Table 3: Sign language translation results of USLNet with different cross-modality mappers on BOBSL. B@1 and denotes BLEU-1 and BLEU-4, respectively.
+
+|**Method**|**Dev** B@1|**Test** B@1 B@4|
+|---|---|---|
+||||
+|Pooling Sliding Window Aligner (hard connection) Sliding Window Aligner (soft connection)|10.70 15.50 17.30|12.00 0.00 17.10 0.00 21.30 0.10|
+
+Table 4: Sign language generation results in terms of back-translation BLEU of USLNet with different cross-modality mappers on BOBSL. B@1 and denotes BLEU-1 and BLEU-4, respectively.
+
+|**Method**|**Dev** B@1|**Test** B@1 B@4|
+|---|---|---|
+||||
+|Pooling Sliding Window Aligner (hard connection) Sliding Window Aligner (soft connection)|7.00 11.70 20.90|6.60 0.00 11.70 0.00 22.70 0.20|
+
+## 4.2.2 IMPACT ON SIGN LANGUAGE TRANSLATION OUTPUTS
+
+The sign language translation performance evaluated by B@4 exhibits considerable room for improvement.To figure out the reasons, we conducted numerous ablation studies and a preliminary analysis utilizing the WMT 2022 sign language translation task, which employed identical challenging data similar to BOBSL.
+
+**Adjusting data distribution benefits SLT.** The transformation of un-parallel video and text data into parallel video and text data, employed in an unsupervised manner, has been demonstrated to significantly improve SLT (+5.60 BLEU-1 socore). This means that we only adjust the training data distribution but do not change how we utilize the data, as we still feed video and text into USLNet in an unsupervised manner. This adjustment, which aligns the video and text modalities, offers notable improvements in the overall performance of unsupervised training. The absence of object offset, which likely contributes to the challenges in utilizing un-parallel data, is a key rationale for this adjustment.
+
+**Freezing Video Encoder has better sign language translation effect** In this research, we compare various freezing strategies by evaluating their impact on the performance of our model, which consists of a text encoder, text decoder, video encoder, and video decoder, inspired by (Zhang et al.). The freezing strategies involve selectively freezing the parameters of different modules during the training process. Specifically, we investigate the effects of freezing the video encoder module while keeping other modules trainable. Our experimental results demonstrate that freezing the video encoder yields superior performance compared to other freezing strategies. This finding suggests that by fixing the video encoder’s parameters, the model can effectively leverage the learned visual representations, leading to enhanced feature extraction and improved overall performance in video-related tasks.
+
+**Comparison to WMT sign language translation system** The submissions for the first sign language translation task of WMT 2022 (Müller et al., 2022a) were found to be subpar. These results were similar to the USLNet SLT results achieved by the best submission system MSMUNICH, which obtained a B@4 score of 0.56 on the WMT-SLT test set (all).Several submission reports have highlighted the difficulty of this task, primarily due to the unprecedented scale of the target-side vocabulary, exceeding 20,000 words (Dey et al., 2022). Interestingly, we encountered a similar situation in the BOBSL dataset. Our investigation reveals that BOBSL possesses an extensive vocabulary of 72,000 words, surpassing the 22,000-word vocabulary of WMT, as well as a notable issue of multiple signer bias with 28 signers compared to the 15 signers present in the WMT ALL dataset. These factors serve to illustrate the challenging nature of the BOBSL task. Consequently, the acceptable and promising sign language translation output and evaluation results can be attributed to these factors.
+
+8
+
+Table 5: Ablation study of USLNet on sign language translation(SLT) on the BOBSL dev set.
+
+|ID|System|SLT B@1↑|
+|---|---|---|
+|1|Baseline|3.20|
+|1.1|1+more text data|9.60|
+||**Explore Multi-task Learning**||
+|2.1|1.1+ remove text reconstruction at training|5.40|
+|2.2|1.1+ remove video reconstruction at training|8.30|
+|2.3|1.1+ remove cross-modality||
+||Back-Translation at training|0.70|
+||**Adjust data distribution**||
+|3|1.1+ 1M parallel video and text||
+||for unsupervised training|15.20|
+||**Explore Different freezing strategy**||
+|4.1|3+ freeze video decoder|10.80|
+|4.2|3+ freeze text encoder|12.20|
+|4.3|3+ freeze text decoder|12.60|
+|4.1|3+ freeze video encoder|17.30|
+
+## 5 RELATED WORK
+
+**Sign Language Translation** Sign language translation (SLT) focuses on translating sign language video into text (Camgoz et al., 2018). As SLT involves cross-modal learning, previous methods can be broadly categorized into two groups. The first group aims to enrich the visual representation, such as 2D/3D convolution or recurrent encoders (Yin et al., 2021), spatial-temporal multi-cue networks (Zhou et al., 2021b; Yin & Read, 2020), and hierarchical spatial-temporal graph neural networks (Kan et al., 2022). The second group aims to improve the quality of translation output, such as sign language transformers (Camgoz et al., 2020), semi-supervised tokenization approaches (Orbay & Akarun, 2020), and neural machine translation for SLT (Angelova et al., 2022a). Recent studies have investigated MT techniques(He et al., 2022a; 2023) to mitigate data scarcity, such as data augmentation (Ye et al., 2022; 2023; Zhou et al., 2021a) and pretrained language models (Chen et al., 2022). To the best of our knowledge, we are the first to use unsupervised methods for unlabeled data in this SLT domain.
+
+**Sign Language Generation** Sign language generation aims to generate high reliability sign language video (Bragg et al., 2019; Cox et al., 2002). Early efforts relied on classical grammar-based approaches to combine signs for isolated words, achieving continuous sign language production (Glauert et al., 2006b; Cox et al., 2002). Recent work adopt advanced deep learning techniques to generate sign pose (Inan et al., 2022; Saunders et al.). Previous research has predominantly relied on high-quality parallel sign language video and text corpora. We aim to employ an unsupervised approach (Lample et al.; Artetxe et al., 2018; He et al., 2022b) to utilize a large amount of unlabeled data for training SLTG models, which has not been investigated before.
+
+**Text-to-video Aligner and Dual Learning** Due to the inclusion of slide window design as a component of cross-modality, and the similarity between T2V2T-BT and V2T2V-BT to dual learning, we will provide a detailed introduction of text-to-video aligner(Glauert et al., 2006a; Karpouzis et al., 2007; McDonald et al., 2016; Saunders et al., 2020a;b) and dual learning(He et al., 2016; Xia et al., 2017b;a; Yi et al., 2017; Luo et al., 2017) in the Appendix A.3.
+
+## 6 CONCLUSION
+
+In this paper, we present an unsupervised sign language translation and generation network, USLNet, which does not depend on any parallel video-text corpus to perform the cross-modal unsupervised learning task. Experimental results on the BOBSL dataset reveal that USLNet achieves competitive performance compared to the supervised approach, demonstrating its potential for practical applications in sign language translation and generation.
+
+9
+
+## REFERENCES
+
+- Samuel Albanie, Gül Varol, Liliane Momeni, Hannah Bull, Triantafyllos Afouras, Himel Chowdhury, Neil Fox, Bencie Woll, Rob Cooper, Andrew McParland, et al. Bbc-oxford british sign language dataset. _arXiv preprint arXiv:2111.03635_ , 2021.
+
+- Galina Angelova, Eleftherios Avramidis, and Sebastian Möller. Using neural machine translation methods for sign language translation. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop_ , pp. 273–284, 2022a.
+
+- Galina Angelova, Eleftherios Avramidis, and Sebastian Möller. Using neural machine translation methods for sign language translation. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop_ , pp. 273–284, 2022b.
+
+- Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. In _6th International Conference on Learning Representations, ICLR 2018_ , 2018.
+
+- Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, Olivier Pietquin, Matt Sharifi, Dominik Roblek, Olivier Teboul, David Grangier, Marco Tagliasacchi, et al. Audiolm: a language modeling approach to audio generation. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 2023.
+
+- Danielle Bragg, Oscar Koller, Mary Bellard, Larwan Berke, Patrick Boudreault, Annelies Braffort, Naomi Caselli, Matt Huenerfauth, Hernisa Kacorri, Tessa Verhoef, et al. Sign language recognition, generation, and translation: An interdisciplinary perspective. In _Proceedings of the 21st International ACM SIGACCESS Conference on Computers and Accessibility_ , pp. 16–31, 2019.
+
+- Necati Cihan Camgoz, Simon Hadfield, Oscar Koller, Hermann Ney, and Richard Bowden. Neural sign language translation. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 7784–7793, 2018.
+
+- Necati Cihan Camgoz, Oscar Koller, Simon Hadfield, and Richard Bowden. Sign language transformers: Joint end-to-end sign language recognition and translation. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 10023–10033, 2020.
+
+- Yutong Chen, Fangyun Wei, Xiao Sun, Zhirong Wu, and Stephen Lin. A simple multi-modality transfer learning baseline for sign language translation. In _CVPR_ , 2022.
+
+- Stephen Cox, Michael Lincoln, Judy Tryggvason, Melanie Nakisa, Mark Wells, Marcus Tutt, and Sanja Abbott. Tessa, a system to aid communication with deaf people. In _Proceedings of the fifth international ACM conference on Assistive technologies_ , pp. 205–212, 2002.
+
+- Subhadeep Dey, Abhilash Pal, Cyrine Chaabani, and Oscar Koller. Clean text and full-body transformer: Microsoft’s submission to the wmt22 shared task on sign language translation. _arXiv preprint arXiv:2210.13326_ , 2022.
+
+- John RW Glauert, Ralph Elliott, Stephen J Cox, Judy Tryggvason, and Mary Sheard. Vanessa–a system for communication between deaf and hearing people. _Technology and disability_ , 18(4): 207–216, 2006a.
+
+- John RW Glauert, Ralph Elliott, Stephen J Cox, Judy Tryggvason, and Mary Sheard. Vanessa–a system for communication between deaf and hearing people. _Technology and disability_ , 18(4): 207–216, 2006b.
+
+- Di He, Yingce Xia, Tao Qin, Liwei Wang, Nenghai Yu, Tie-Yan Liu, and Wei-Ying Ma. Dual learning for machine translation. _Advances in neural information processing systems_ , 29, 2016.
+
+- Zhiwei He, Xing Wang, Zhaopeng Tu, Shuming Shi, and Rui Wang. Tencent AI lab - shanghai jiao tong university low-resource translation system for the WMT22 translation task. In _Proceedings of the Seventh Conference on Machine Translation (WMT)_ , pp. 260–267, Abu Dhabi, United Arab Emirates (Hybrid), December 2022a. Association for Computational Linguistics. URL [URL removed]
+
+10
+
+- Zhiwei He, Xing Wang, Rui Wang, Shuming Shi, and Zhaopeng Tu. Bridging the data gap between training and inference for unsupervised neural machine translation. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 6611–6623, Dublin, Ireland, May 2022b. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.456. URL [URL removed] 456.
+
+- Zhiwei He, Tian Liang, Wenxiang Jiao, Zhuosheng Zhang, Yujiu Yang, Rui Wang, Zhaopeng Tu, Shuming Shi, and Xing Wang. Exploring human-like translation strategy with large language models, 2023.
+
+- Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 29:3451–3460, 2021.
+
+- Mert Inan, Yang Zhong, Sabit Hassan, Lorna Quandt, and Malihe Alikhani. Modeling intensification for sign language generation: A computational approach. In _Findings of the Association for Computational Linguistics: ACL 2022_ , pp. 2897–2911, 2022.
+
+- Jichao Kan, Kun Hu, Markus Hagenbuchner, Ah Chung Tsoi, Mohammed Bennamoun, and Zhiyong Wang. Sign language translation with hierarchical spatio-temporal graph neural network. In _Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision_ , pp. 3367– 3376, 2022.
+
+- Kostas Karpouzis, George Caridakis, S-E Fotinea, and Eleni Efthimiou. Educational resources and implementation of a greek sign language synthesis architecture. _Computers & Education_ , 49(1): 54–74, 2007.
+
+- Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In _Proceedings of NAACL-HLT_ , pp. 4171– 4186, 2019.
+
+- Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. Unsupervised machine translation using monolingual corpora only. In _International Conference on Learning Representations_ .
+
+- Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. _Advances in neural information processing systems_ , 30, 2017.
+
+- Ping Luo, Guangrun Wang, Liang Lin, and Xiaogang Wang. Deep dual learning for semantic image segmentation. In _Proceedings of the IEEE international conference on computer vision_ , pp. 2718–2726, 2017.
+
+- John McDonald, Rosalee Wolfe, Jerry Schnepp, Julie Hochgesang, Diana Gorman Jamrozik, Marie Stumbo, Larwan Berke, Melissa Bialek, and Farah Thomas. An automated technique for real-time production of lifelike animations of american sign language. _Universal Access in the Information Society_ , 15:551–566, 2016.
+
+- Liliane Momeni, Hannah Bull, KR Prajwal, Samuel Albanie, Gül Varol, and Andrew Zisserman. Automatic dense annotation of large-vocabulary sign language videos. In _European Conference on Computer Vision_ , pp. 671–690. Springer, 2022.
+
+- Mathias Müller, Sarah Ebling, Eleftherios Avramidis, Alessia Battisti, Michèle Berger, Richard Bowden, Annelies Braffort, Necati Cihan Camgöz, Cristina España-Bonet, Roman Grundkiewicz, et al. Findings of the first wmt shared task on sign language translation (wmt-slt22). In _Proceedings of the Seventh Conference on Machine Translation (WMT)_ , pp. 744–772, 2022a.
+
+- Mathias Müller, Sarah Ebling, Eleftherios Avramidis, Alessia Battisti, Michèle Berger, Richard Bowden, Annelies Braffort, Necati Cihan Camgöz, Cristina España-Bonet, Roman Grundkiewicz, et al. Findings of the first wmt shared task on sign language translation (wmt-slt22). In _Proceedings of the Seventh Conference on Machine Translation (WMT)_ , pp. 744–772, 2022b.
+
+11
+
+- Adrián Núñez-Marcos, Olatz Perez-de Viñaspre, and Gorka Labaka. A survey on sign language machine translation. _Expert Systems with Applications_ , 213:118993, 2023.
+
+- Alptekin Orbay and Lale Akarun. Neural sign language translation by learning tokenization. In _2020 15th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2020)_ , pp. 222–228. IEEE, 2020.
+
+- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In _Proceedings of the 40th annual meeting of the Association for Computational Linguistics_ , pp. 311–318, 2002.
+
+- Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In _International conference on machine learning_ , pp. 8748–8763. PMLR, 2021.
+
+- Ben Saunders, Necati Cihan Camgöz, and Richard Bowden. Adversarial training for multi-channel sign language production. In _The 31st British Machine Vision Virtual Conference_ . British Machine Vision Association.
+
+- Ben Saunders, Necati Cihan Camgoz, and Richard Bowden. Progressive transformers for end-to-end sign language production. In _Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XI 16_ , pp. 687–705. Springer, 2020a.
+
+- Ben Saunders, Necati Cihan Camgoz, and Richard Bowden. Adversarial training for multi-channel sign language production. _arXiv preprint arXiv:2008.12405_ , 2020b.
+
+- Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In _ACL_ , 2016.
+
+- Ozge Mercanoglu Sincan, Necati Cihan Camgoz, and Richard Bowden. Is context all you need? scaling neural sign language translation to large domains of discourse. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 1955–1965, 2023.
+
+- Kaitao Song, Xu Tan, Tao Qin, Jianfeng Lu, and Tie-Yan Liu. Mass: Masked sequence to sequence pre-training for language generation. In _International Conference on Machine Learning_ , pp. 5926–5936. PMLR, 2019.
+
+- Rachel Sutton-Spence and Bencie Woll. _The linguistics of British Sign Language: an introduction_ . Cambridge University Press, 1999.
+
+- Sarah L Taylor, Moshe Mahler, Barry-John Theobald, and Iain Matthews. Dynamic units of visual speech. In _Proceedings of the 11th ACM SIGGRAPH/Eurographics conference on Computer Animation_ , pp. 275–284, 2012.
+
+- Chengyi Wang, Sanyuan Chen, Yu Wu, Ziqiang Zhang, Long Zhou, Shujie Liu, Zhuo Chen, Yanqing Liu, Huaming Wang, Jinyu Li, et al. Neural codec language models are zero-shot text to speech synthesizers. _arXiv preprint arXiv:2301.02111_ , 2023.
+
+- Yingce Xia, Jiang Bian, Tao Qin, Nenghai Yu, and Tie-Yan Liu. Dual inference for machine learning. In _IJCAI_ , pp. 3112–3118, 2017a.
+
+- Yingce Xia, Tao Qin, Wei Chen, Jiang Bian, Nenghai Yu, and Tie-Yan Liu. Dual supervised learning. In _International conference on machine learning_ , pp. 3789–3798. PMLR, 2017b.
+
+- Yingce Xia, Xu Tan, Fei Tian, Tao Qin, Nenghai Yu, and Tie-Yan Liu. Model-level dual learning. In _International Conference on Machine Learning_ , pp. 5383–5392. PMLR, 2018.
+
+- Wilson Yan, Yunzhi Zhang, Pieter Abbeel, and Aravind Srinivas. Videogpt: Video generation using vq-vae and transformers. _arXiv preprint arXiv:2104.10157_ , 2021.
+
+- Jinhui Ye, Wenxiang Jiao, Xing Wang, and Zhaopeng Tu. Scaling back-translation with domain text generation for sign language gloss translation. _arXiv preprint arXiv:2210.07054_ , 2022.
+
+12
+
+Jinhui Ye, Wenxiang Jiao, Xing Wang, Zhaopeng Tu, and Hui Xiong. Cross-modality data augmentation for end-to-end sign language translation. _arXiv_ , 2023.
+
+- Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for imageto-image translation. In _Proceedings of the IEEE international conference on computer vision_ , pp. 2849–2857, 2017.
+
+- Kayo Yin and Jesse Read. Better sign language translation with stmc-transformer. In _Proceedings of the 28th International Conference on Computational Linguistics_ , pp. 5975–5989, 2020.
+
+- Kayo Yin, Amit Moryossef, Julie Hochgesang, Yoav Goldberg, and Malihe Alikhani. Including signed languages in natural language processing. _arXiv preprint arXiv:2105.05222_ , 2021.
+
+- Biao Zhang, Mathias Müller, and Rico Sennrich. Sltunet: A simple unified model for sign language translation. In _International Conference on Learning Representations_ .
+
+- Hang Zhang, Xin Li, and Lidong Bing. Video-llama: An instruction-tuned audio-visual language model for video understanding. _arXiv preprint arXiv:2306.02858_ , 2023.
+
+- Sibo Zhang, Jiahong Yuan, Miao Liao, and Liangjun Zhang. Text2video: Text-driven talkinghead video synthesis with personalized phoneme-pose dictionary. In _ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 2659–2663. IEEE, 2022.
+
+- Hao Zhou, Wengang Zhou, Weizhen Qi, Junfu Pu, and Houqiang Li. Improving sign language translation with monolingual data by sign back-translation. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 1316–1325, 2021a.
+
+- Hao Zhou, Wengang Zhou, Yun Zhou, and Houqiang Li. Spatial-temporal multi-cue network for sign language recognition and translation. _IEEE Transactions on Multimedia_ , 24:768–779, 2021b.
+
+13
+
diff --git a/open_review/iclr2024_8534.json b/open_review/iclr2024_8534.json
new file mode 100644
index 0000000000000000000000000000000000000000..c280cdb1df1d2e0ee38b507c4f21e533cf296a77
--- /dev/null
+++ b/open_review/iclr2024_8534.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8534",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Deep probabilistic 3D angular regression for directional dark matter detectors",
+ "abstract": "Modern detectors of elementary particles are approaching a fundamental sensitivity limit where individual quanta of charge can be localized and counted in 3D. This enables novel detectors capable of unambiguously demonstrating the particle nature of dark matter by inferring the 3D directions of elementary particles from complex point cloud data. The most complex scenario involves inferring the initial directions of low-energy electrons from their tortuous trajectories. To address this problem we develop and demonstrate the first probabilistic deep learning model that predicts 3D directions using a heteroscedastic von Mises-Fisher distribution that allows us to model data uncertainty. Our approach generalizes the cosine distance loss which is a special case of our loss function in which the uncertainty is assumed to be uniform across samples. We utilize a sparse 3D convolutional neural network architecture and develop approximations to the negative log-likelihood loss which stabilize training. On a simulated Monte Carlo test set, our end-to-end deep learning approach achieves a mean cosine distance of $0.104$ $(26^\\circ)$ compared to $0.556$ $(64^\\circ) $ achieved by a non-machine learning algorithm. We demonstrate that the model is well-calibrated and allows selecting low-uncertainty samples to improve accuracy. This advancement in probabilistic 3D directional learning could significantly contribute to directional dark matter detection.",
+ "rebuttal": "We appreciate the helpful feedback enhancing our paper. We've discussed relevant work, including Gilitschenski, Igor, et al., clarifying the rationale for comparing our model to our own baselines. We’ve clarified why real-world evaluation isn't our primary focus at this stage, we've demonstrated our model's robustness to simulation parameter variations. Our contribution, the first deep probabilistic direction prediction model, is relevant to the ICLR community because it addresses a general problem. With the discussion period extended until Dec. 1, we welcome additional feedback to address any remaining concerns. If you feel that your concerns have been addressed, then we encourage you to reassess your rating.\n\nThank you for your initial feedback and response to our comment. To recap our response to your concerns:\n\n1. We've shown that our conservative simulations yield a robust model against modest variations in simulation parameters.\n2. We’ve clarified that our framework is the first for the task of probabilistically predicting 3D direction\n3. We've included a comprehensive discussion positioning our work with respect to the extensively studied problem of predicting orientation.\n\nShould you have any lingering concerns or additional insights, we welcome your valuable feedback as our discussion period [...]\n\nWe've clarified our rationale for prioritizing simulation over real-world evaluation, explained our conservative parameter choices, and demonstrated the model's robustness. Furthermore, we’ve clarified that our contribution is the first probabilistic deep learning framework for predicting 3D directions, along with the necessary approximations for stable training, and tests that empirically demonstrate calibration.\n\nGiven the extended discussion period until Dec. 1 and the lower confidence score, we welcome further dialogue. Your feedback is invaluable, and we're eager to address any lingering [...]\n\nThank you for you valuable time and feedback. We address the weaknesses and questions below.\n\n# Re: Lack of real-world experiments.\n\nUnder “Real-World Evaluation and the sim-to-real gap” in our general response, we discuss the scope of our paper.\n\nPlease also see “General comments about sim-to-real gap and systematic errors” where we elaborate on the sim-to-real gap.\n\nThe specific choice of our simulation parameters is based on Jaegle et al. (2019). We have slightly modified the text on Section 4.1 to emphasize this further. The choice of binning segmentation was deliberately conservative with [...]\n\nThank you very much for the insightful feedback. Below, we address the stated weaknesses and recommendations.\n\n# In response to W1 and recommendation 2\n\nWe have clarified the relationship to prior work. Please see “Comparison to related work” in our general response.\n\n# In response to W2\n\nPlease see the “Real-World Evaluation and the sim-to-real gap” discussion in our general comment.\n\n# In response to W4 and recommendation 1\n\nPlease see the “Interest to the community / key Novelties” discussion in our general comment.\n\n# In response to recommendation 3\n\nThis is a very general approach. In app [...]\n\nWe sincerely appreciate this constructive feedback and address your concerns below:\n\n# In response to weakness 1\n\nPlease see “Real-World Evaluation and the sim-to-real gap” in our general response.\n\n# In response to weakness 2\n\n Please see “Interest to the community / key Novelties” and “Comparison to related work” in our general response for a discussion of our key novelties and how our work relates to similar tasks. \n\n# In response to the minor comments\n\n1. We have moved Section 5 into the appendix.\n\n2. Yes, the color scale represents ionization. A colorbar has been added and mentioned in th [...]\n\n### General Response\nWe thank the reviewers for their time and valuable feedback. We will address common issues below, and specific questions in the response to each review.\n\n# Comparison to related work\n\nWe present a probabilistic DL approach for the task of predicting 3D directions. There is related work from the machine vision community on estimating orientation, which is slightly different. We’ve added the following subsection to better explain the relationship to this work.\n\n“In computer vision, several approaches have applied deep networks to predicting 3D orientation from 2D images (Lia [...]\n\n### General Response Continued\n# Interest to the community / key Novelties\n \nWe have added the following text to the introduction to provide a better overview of why this contribution is relevant to the ICLR community.\n\n“We develop a deep learning approach to analyze 3D events and probabilistically predict their initial direction. To our knowledge, this is the first deep probabilistic approach for predicting 3D directions with the Von Mises-Fisher distribution on S2. Our framework significantly outperforms traditional algorithms when applied to a simulated electron recoil data set. Leveraging [...]\n\n### General comments about sim-to-real gap and systematic errors\nWe emphasize that our contribution to the ICLR community is primarily the method for addressing the general problem of probabilistic direction prediction — a contribution whose novelty the reviewers have not disputed. However, the reviewers have asked whether the results can be expected to generalize beyond these simulations to the analysis of experimental data. \n\nIn short, the simulated setup was already performance-degraded conservatively, and the model generalizes for different electron and simulation input parameters. The cur [...]\n\n### Re: systematic errors\nThank you for clarifying.\n\nThis is a list of the parameters that we identify as possible sources of systematic errors.\n\n1. ESTART - the starting energy of the electron\n2. FRAC1, FRAC2 - the fraction of the gasses in our gas mixture \n3. T - the temperature\n4. P - the pressure\n\nThe starting energy of the electron strongly impacts the track's directionality. When applying this framework, \n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 8,
+ 3
+ ],
+ "score_mean": 5.33,
+ "score_variance": 6.33,
+ "score_spread": 5,
+ "score_min": 3,
+ "score_max": 8,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The paper introduces a method for predicting the SO(3) angles of particles from their recoil trajectories within the context of a physics problem. The reviewers are divided in their opinions, expressing doubts about the novelty of the problem and the contribution this research makes to the field of machine learning. A notable point of comparison for this work is Liu et al.'s study, \"Delving into Discrete Normalizing Flows on SO(3) Manifold for Probabilistic Rotation Modeling,\" presented at CVPR 2023. This reference is particularly relevant for the task of SO(3) prediction with uncertainty. Given the concerns raised by the reviewers, particularly regarding the need for a more thorough exploration of the novelty and contribution of the research, the area chair is currently leaning towards rejecting the submission. It is suggested that the authors comprehensively address these main concerns before resubmitting to another major machine learning conference/journal.",
+ "forum_id": "Kwm1OyINXt",
+ "primary_area": "applications to physical sciences (physics, chemistry, biology, etc.)",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_c5Tr",
+ "review_id": "1MYEiHVM65",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 2212,
+ "edit_detected": false,
+ "edit_delta_seconds": 0,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_7Dku",
+ "review_id": "w2FPWVXqi7",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 3723,
+ "edit_detected": true,
+ "edit_delta_seconds": 3035304,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_qwYh",
+ "review_id": "kRV1AJqzoR",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3532,
+ "edit_detected": true,
+ "edit_delta_seconds": 1663271,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8534.md b/open_review/iclr2024_8534.md
new file mode 100644
index 0000000000000000000000000000000000000000..486457a074ad81acc640694a6d78ff0ae81ce94e
--- /dev/null
+++ b/open_review/iclr2024_8534.md
@@ -0,0 +1,325 @@
+
+
+## DEEP PROBABILISTIC 3D ANGULAR REGRESSION FOR DIRECTIONAL DARK MATTER DETECTORS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Modern detectors of elementary particles are approaching a fundamental sensitivity limit where individual quanta of charge can be localized and counted in 3D. This enables novel detectors capable of unambiguously demonstrating the particle nature of dark matter by inferring the 3D directions of elementary particles from complex point cloud data. The most complex scenario involves inferring the initial directions of low-energy electrons from their tortuous trajectories. To address this problem we develop and demonstrate the first probabilistic deep learning model that predicts 3D directions using a heteroscedastic von Mises-Fisher distribution that allows us to model data uncertainty. Our approach generalizes the cosine distance loss which is a special case of our loss function in which the uncertainty is assumed to be uniform across samples. We utilize a sparse 3D convolutional neural network architecture and develop approximations to the negative log-likelihood loss which stabilize training. On a simulated Monte Carlo test set, our end-to-end deep learning approach achieves a mean cosine distance of 0 _._ 104 (26 _[◦]_ ) compared to 0 _._ 556 (64 _[◦]_ ) achieved by a non-machine learning algorithm. We demonstrate that the model is well-calibrated and allows selecting low-uncertainty samples to improve accuracy. This advancement in probabilistic 3D directional learning could significantly contribute to directional dark matter detection.
+
+## 1 INTRODUCTION
+
+Elusive, electrically neutral elementary particles can be detected by measuring the recoil trajectories of atomic nuclei or electrons produced when the neutral particles scatter in a detector. Modern gaseous detectors are uniquely capable of reconstructing the directions of such recoils. This enables a highly desirable capability: directional detection of dark matter, neutrinos, and neutrons.
+
+The benefits of obtaining directional information are profound and could prove game-changing in several areas of fundamental physics. Most importantly, dark matter detection experiments could reject solar neutrino backgrounds based on recoils pointing back towards the sun, and positively identify dark matter from the observed angular distribution of recoils (Billard et al., 2014; O’Hare, 2021). This would overcome two major limitations in current experiments seeking to identify the particle nature of dark matter, which is arguably the most urgent and exciting problem in contemporary physics. Directional measurements of electron recoils induced by solar neutrinos would enable improved measurements of neutrinos from the Sun’s “CNO cycle” which could settle a longstanding puzzle known as the solar abundance problem (Villante & Serenelli, 2019; O’Hare et al., 2022). Directional measurements of photoelectrons produced by X-rays enable us to map the X- ray polarization of extended astrophysical sources, as in the Imaging X-ray Polarimetry Explorer (Weisskopf et al., 2016). A comprehensive review of directional recoil detection and its benefits can be found in Vahsen et al. (2021).
+
+The gas time projection chamber (TPC) is the most mature directional recoil detection technology. Gas TPCs reconstruct the ionization track of the recoiling nucleus or electron. An example of an electron recoil detected in 3D using a gas TPC developed by Jaegle et al. (2019) is shown in Figure 1. The detector provides a voxel grid where each voxel is given a value corresponding to the amount of ionization detected at its position. Inferring the initial direction of the recoiling particle from this data is a difficult challenge. There are three main obstacles: First, the electron track is not straight, as the electron scatters in the gas. Second, the recoil starts and ends inside the detector, and it is
+
+1
+
+not clear which side is the beginning, and which side is the end. Third, the non-straight trajectory and the start-versus-end ambiguity both make it difficult to estimate the uncertainty of any estimated direction. Unlike many common computer vision problems, even a trained human expert, such as a graduate student, would have difficulties correctly interpreting this data.
+
+**==> picture [258 x 182] intentionally omitted <==**
+
+Figure 1: A 40 keV electron recoil reconstructed in 3D using the gas TPC in Jaegle et al. (2019). Electron recoils can have complex shapes and ambiguous starting points. An agent must identify the start of the recoil and determine how much of it to fit to determine the initial direction accurately. The color scale depicts a measure of ionization referred to as the time over threshold (TOT).
+
+We develop a deep learning approach to analyze 3D events and probabilistically predict their initial direction. To our knowledge, this is the first deep probabilistic approach for predicting 3D directions with the Von Mises-Fisher distribution on _S_[2] . Our framework significantly outperforms traditional algorithms when applied to a simulated electron recoil data set. Leveraging our framework’s uncertainty predictions, performance can be enhanced by discarding high-uncertainty samples. By discarding only the top percentile, our framework achieves the best expected directional performance (as defined in Appendix A). This development is far-reaching as it enhances the sensitivity of all directional recoil detection experiments. Exciting possibilities include aiding in the discovery of dark matter (Billard et al., 2014; O’Hare, 2021) or resolving the solar abundance problem (Villante & Serenelli, 2019; O’Hare et al., 2022). The framework can also be applied to general problems where direction needs to be predicted, we demonstrate this by applying it to the task of detecting 3D arrows directions in Appendix B.
+
+Our contributions include: 1) The first deep learning framework that predicts direction probabilistically with the von Mises-Fisher distribution on _S_[2] , 2) the associated loss function along with approximations that stabilize training, 3) two tests that empirically demonstrate calibration, something which is lacking in related work on predicting orientation, 4) a model capable of analyzing highly-segmented 3D data using state-of-the-art sparse convolution techniques.
+
+## 2 RELATED WORK
+
+## 2.1 RELATED WORK FROM THE PHYSICS COMMUNITY
+
+Others have been interested in applying deep learning to directional detectors (Schueler et al., 2022; Glaser et al., 2023). The most related application is X-ray polarimetry Weisskopf et al. (2016) where it is necessary to determine the initial direction of an electron track. A key difference is that they reconstruct tracks in 2D and hence only need to predict directions on _S_[1] . In the work of Kitaguchi et al. (2019), the task is framed as a classification problem. The unit circle is split into 36 segments and a convolutional neural network is trained to classify tracks into a segment via the cross entropy loss. Event selection is performed based on the predicted probabilities. Our approach is capable of predicting directions continuously and is also able to do event selection, using the predicted
+
+2
+
+uncertainties. The work of Peirson et al. (2021) uses a deep ensemble to determine 2D directions with estimates for both data and model uncertainty. The model uncertainty is estimated by using an ensemble of models. The data uncertainty is modeled by minimizing the negative log-likelihood (NLL) of a probabilistic prediction. However, they use a Gaussian NLL instead of a von Mises NLL which is more suitable for 2D directions. Our NLL is derived from the von Mises-Fisher distribution on _S_[2] , the appropriate probabilistic model for learning 3D directions.
+
+## 2.2 RELATED WORK FROM THE MACHINE LEARNING COMMUNITY
+
+In computer vision, several approaches have applied deep networks to estimating 3D orientation from 2D images (Liao et al., 2019; Huang et al., 2018; Xiang et al., 2018; Mahendran et al., 2017; 2018). Only a handful consider modeling orientation uncertainty (Prokudin et al., 2018; Gilitschenski et al., 2020; Mohlin et al., 2020). All of these approaches are concentrated on predicting orientation. This is similar to predicting direction but different. Orientation includes an additional dimension, which would introduce a spurious degree of freedom for our task. For example, an airplane’s direction is naturally represented by a point on _S_[2] , while the airplane’s orientation requires an additional parameter specifying a rotation about the plane’s main axis. Representing probability distributions over orientations in 3D is non-trivial, and the approaches of Prokudin et al. (2018); Gilitschenski et al. (2020); Mohlin et al. (2020) are all different.
+
+Prokudin et al. (2018) uses Euler angles (pan, tilt, roll) to represent orientation. A unidimensional von Mises distribution over each angle captures orientation uncertainty. However, jointly predicting Euler angles has problems due to degeneracies known as gimbal lock. In Mohlin et al. (2020) orientation is represented by 3D rotation matrices. The orientation uncertainty is estimated by outputting a distribution over _SO_ (3), parameterized by the matrix Fisher distribution. However, this method poorly models classes with rotational symmetries, such as the test case in Appendix B. Gilitschenski et al. (2020) uses unit quaternions as a representation for object orientation. The uncertainty is modeled using the Bingham distribution, an antipodally symmetric distribution over _S_[3] . Unit quaternions do not suffer from gimbal lock and are more compact than rotation matrices. However, the computationally expensive Bingham normalization constant necessitates backpropagation through an interpolator and use of a lookup table.
+
+Our task is not to find the orientation of a rigid body. We want to find the initial direction in the trajectories imaged by our detectors. The direction lives on _S_[2] , so frameworks that output distributions over _SO_ (3) or _S_[3] are inappropriate and fail to leverage a dimension of symmetry. This work proposes an approach focused on predicting directions with distributions on _S_[2] . Predicting direction is a general task with many use cases beyond directional recoil detection, including predicting where something is pointing, predicting where someone is looking, determining the source direction of a signal, and predicting wind directions from video images.
+
+## 3 THE MODEL
+
+We develop two deep learning models. The first is the heteroscedastic convolutional neural network (HCN), a probabilistic model that predicts directional distributions on _S_[2] . The second is the regular convolutional neural network (RCN), a deterministic model that only estimates direction. The RCN model serves as deep learning baseline which the HCN model can be compared to.
+
+## 3.1 ARCHITECTURE
+
+The input is a (120,120,120,1) voxel grid, which means every event has 1,728,000 features. For a typical electron recoil simulation (discussed in section 4) the fraction of non-zero features is on the order of 10 _[−]_[4] . Sparsity is a common feature in highly-segmented 3D data and it is essential to take advantage of it to keep computational requirements feasible. All data is stored as PyTorch Sparse Tensors in the COO(rdinate) format, where only the non-zero entries and their indices are stored. A DataLoader is used to load batches of sparse tensors on the fly. The coordinates and values of the non-zero features are passed into our models, where they are immediately converted into a spconv.SparseConvTensor (Spconv Contributors, 2022).
+
+3
+
+Both models begin with a feature extraction portion, a series of submanifold sparse convolution, sparse convolution, and sparse max pooling layers. The details of the layers and the order in which they are applied is outlined in Figure 2. These sparse operations allow us to convolve and downsample our input data without expressing them as dense tensors, significantly increasing speed and reducing memory usage. Sparse convolution and max pooling are equivalent to their dense counterparts, except they operate on sparse tensors. In submanifold sparse convolution (Graham & van der Maaten, 2017; Graham et al., 2018), padding is applied so that the input and output have the same shape. An output site is active if and only if the corresponding input site is active, in which case the output feature vector is computed in the same manner as for regular convolution. Since the number of active sites is unchanged, submanifold sparse convolution allows us to process our input through several layers while maintaining its sparseness. The implementation of the layers specified in Figure 2 is through SpConv (Spconv Contributors, 2022) which is based on Yan et al. (2018).
+
+**==> picture [338 x 98] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Inputs Feature maps Feature maps 120x120x120 32@120x120x120 40@120x120x120 Feature maps Feature maps Feature maps 50@58x58x58 50@29x29x29 Feature maps 30@14x14x14 10@12x12x12 Feature maps 10@6x6x6 SubMConv3d Flatten Kernel 7x7x7 Stride 1x1x1 SubMConv3d Kernel 5x5x5Stride 1x1x1 SparseConv3d Kernel 6x6x6Stride 2x2x2 SparseMaxPool3d Kernel 2x2x2Stride 2x2x2 SparseConv3d Kernel 3x3x3Stride 2x2x2 SparseConv3d Kernel 3x3x3Stride 1x1x1 SparseMaxPool3d Kernel 2x2x2Stride 2x2x2 **----- End of picture text -----**
+
+Figure 2: The feature extraction portion of our models. Each convolutional layer includes a learnable bias and is followed by a RelU activation. Padding is only applied in the SubMConv3d layers, where it is set such that the input and output have the same shape. The implementation is via SpConv (Spconv Contributors, 2022).
+
+After applying the layers in Figure 2, the data is converted into a dense tensor and flattened. The flattened tensor is then passed on to the dense portion of the neural network. The HCN and RCN models have the same feature extraction portion but differing dense portions. For the RCN model, the dense portion is illustrated on the left of Figure 3. Here, the dense portion is fully connected and the output is 3 normalized neurons, to be interpreted as the predicted direction on _S_[2] . The dense portion of the HCN model is illustrated on the right of Figure 3. The HCN model is a copy of the RCN model with an additional head. The additional head leads to a single output neuron to be interpreted as the predicted uncertainty. The details of the dense portions of our models are in Figure 3.
+
+**==> picture [198 x 150] intentionally omitted <==**
+
+**----- Start of picture text -----**
+2160 neurons, flattened input 500 neurons, relU activation 200 neurons, relU activation 50 neurons, tanh activation 3 neurons, L2 norm activation 1 neuron, softplus activation **----- End of picture text -----**
+
+**==> picture [198 x 150] intentionally omitted <==**
+
+Figure 3: The dense portion of our models. The feature extraction described in Figure 2 is followed by either the left or the right neural network to make the RCN or HCN model, respectively. The illustrations do not display the actual number of neurons per layer. The number of neurons and the activation functions are specified in the legend. A learnable bias is added to every layer.
+
+4
+
+## 3.2 LOSS FUNCTIONS
+
+The RCN model is trained using the cosine distance loss function
+
+**==> picture [287 x 30] intentionally omitted <==**
+
+where _**y** predi_ is the predicted direction, _**y** i_ is the true direction, _ϵ_ is a small positive value to avoid division by 0, and _N_ is the number of examples in a batch.
+
+The HCN model is trained via heteroscedastic regression to predict a distribution of directions by specifying a mean direction and spread (uncertainty). To do this we need a probabilistic distribution of directions on _S_[2] . The 5-parameter Fisher–Bingham distribution (Kent, 1982) is the analogue of the bivariate normal distribution on _S_[2]
+
+**==> picture [322 x 23] intentionally omitted <==**
+
+Above, _c_ ( _κ, β_ ) is a normalization constant, _κ ∈_ R+ determines the spread, _β ∈_ [0 _, κ/_ 2) determines the ellipticity, and _**v**_ 1 _,_ _**v**_ 2 _,_ _**v**_ 3 determine the mean direction, major axis, and minor axis, respectively. We simplify Equation 2 to only model uncertainty isotropically about the mean direction by setting _β_ = 0. By doing so, we obtain
+
+**==> picture [268 x 19] intentionally omitted <==**
+
+This special case of the 5-parameter Fisher–Bingham distribution is also known as the von Mises–Fisher distribution on _S_[2] (Mardia et al., 2000).
+
+Given the predicted directions ( _**y** predi_ ) and predicted uncertainties ( _κi_ ) of the HCN model, as well as the true directions ( _**y** i_ ), we use Equation 3 to calculate the likelihood as
+
+**==> picture [306 x 79] intentionally omitted <==**
+
+and the NLL, scaled by batch size, is
+
+The HCN model is trained to predict directional distributions as in Equation 3 that minimize the NLL.
+
+We note that Equation 4 generalizes Equation 1. If we assume _κi_ is constant (the uncertainty is uniform), the first term in Equation 4 becomes a constant. Furthermore, Since _**y** predi_ and _**y** i_ are unit vectors, the denominator in Equation 1 is 1. Now, it is easy to see that under the uniform uncertainty assumption, Equations 1 and 4 are equivalent up to a constant offset and scale factor. Therefore, the HCN and RCN models are heteroscedastic/homoscedastic counterparts.
+
+## 3.3 PRACTICAL CONSIDERATIONS
+
+Now that we’ve outlined the models, we discuss the practical considerations of implementing the HCN model. The first is the ln term on the right-hand side of Equation 4. If _κi ≥_ 87, the argument of the ln term evaluates as zero making the loss infinite. When _κ_ = 0, Equation 3 is isotropic, and as _κ_ increases the distribution becomes more localized (the uncertainty decreases). Hence, as the model learns directions accurately it will encounter _κi ≥_ 87, and all gradients will be nan. To avoid this, we use the limit
+
+**==> picture [162 x 22] intentionally omitted <==**
+
+This limit is a close approximation, even for small values of _κi_ . If _κ_ = 9, the values of _ln_ ( 4 _π_ sinh ( _κi κi_ )[)][ and] _[ ln]_[(] 2 _[κ] π[i]_[)] _[ −][κ][i]_[ are indistinguishable when using the 32-bit floating point data type.] Therefore, instead of using Equation 4, we express our loss function as
+
+**==> picture [367 x 30] intentionally omitted <==**
+
+5
+
+Above, we use the PyTorch operation torch.where which has three arguments. If the condition in the first argument is True then torch.where is evaluated as the second argument; otherwise, torch.where is evaluated as the third argument.
+
+Using torch.where introduces another consideration. If the second or third argument is infinite, then torch.where will produce nan in the backward pass, even if the condition selects the non-infinite term. This is discussed in [URL removed] issues/68425. The PyTorch MaskedTensor is suggested as a solution for this (see [URL removed]); however, this API is still in the prototype stage and is not implemented for all of the functions we use. Therefore, Equation 5 does not solve our issue because we still get nan in the backward pass whenever ln( 4 _π_ sinh ( _κi κi_ )[)][ evaluates as infinity.]
+
+**==> picture [397 x 56] intentionally omitted <==**
+
+We stop at the 15th-order because higher powers of _κ_ make the Taylor series unstable. We now have two approximations for ln 4 _π_ sinh ( _κi κi_ )[,][for][low][and][high] _[κ]_[.][Putting][these][together][we][arrive][at][the] final form of the loss function for the HCN model
+
+**==> picture [387 x 31] intentionally omitted <==**
+
+The condition _κ <_ 2 _._ 65 is chosen so that the maximum percent difference between Equations 4 and 6 is minimized to 0 _._ 14%.
+
+## 4 APPLICATION TO ELECTRON RECOILS
+
+For a demonstration of our models on a simple case see Appendix B. Here, we apply our models to determine the initial direction of electron recoils because that is the most complex scenario in gas TPCs. As an electron recoils through gas it undergoes multiple scattering which alters the trajectory of the recoiling electron and creates a track of secondary, ionized electrons. By reconstructing the positions of the secondary electrons in 3D, directional gas TPCs can infer the initial direction of the recoiling electron. Determining the direction is a complicated task because of the non-trivial track shapes, illustrated in Figure 1. An agent must determine which side of the recoil track is the starting point, and how much of the track beyond the starting point to fit in order to optimize the initial direction prediction. As the electron recoils it loses energy and in the process becomes more highly ionizing. Hence the charge density along the track can be used to determine the starting point. To first order, there are two effects influencing the angular resolution of electron recoils: the multiple scattering of the recoiling electron and the effective point resolution with which the secondary electrons are detected. Multiple scattering makes the electron lose directionality as it travels, suggesting only the very beginning of the track should be used to determine the initial direction. On the other hand, the effective point resolution sets a lower limit on the length scale where meaningful information can be extracted from the track. The models need to learn the best trade-off between these two effects on a tack-by-track basis to provide the most accurate initial direction predictions.
+
+## 4.1 SIMULATION, PREPROCESSING, AND DATA SPLITS
+
+Below we detail the steps taken to create our simulated electron recoil data sets. The specification of the gas mixture, pressure, temperature, and diffusion are inspired by Jaegle et al. (2019).
+
+1. We simulate 10[6] electron recoils at 40, 45, and 50 keV in a 70% He : 30% CO2 gas mixture at 20 _[◦]_ C and 760 Torr using Degrad (Biagi, 2014). All electron recoil simulations begin at the origin with the initial momentum in the positive z-direction. This produces a track of secondary (ionized) electrons for each electron recoil simulation, illustrated in Figure 4a.
+
+6
+
+2. To include the diffusion in the detector, Gaussian smearing is applied to each ionized electron in the track. For each track, the amount of smearing is drawn from a uniform distribution of 160 _−_ 466 _µ_ m, the smallest and largest expected values in Jaegle et al. (2019).
+
+3. To make our simulations isotropic, a random rotation is applied to the track. The true initial direction after rotation is saved.
+
+4. The track is translated so that the origin is the center of charge. An example of a simulation at this stage is shown in Figure 4b
+
+5. The tracks are then binned into a (120 _,_ 120 _,_ 120) voxel grid, each voxel is a (500 _µ_ m)[3] cube. In binning, data is directly transformed into PyTorch Sparse Tensors in the COO format. Tracks that are not fully contained in the voxel grid are discarded. An illustration of a simulation at this stage is shown in Figure 4c.
+
+The final dataset contains 2,766,798 simulations. A random data split is used to create a training set (80%) and a validation set (20%). To create the test data sets we simulate another 2 _×_ 10[4] electron recoils at 40 and 50 keV. We follow the same steps outlined above except for a slight modification. The applied Gaussian smearing is no longer drawn from a uniform distribution. Instead, we probe two specific cases: a high diffusion case where 443 _µ_ m of smearing is applied and a low diffusion case where 200 _µ_ m is applied. The two energies and two diffusion cases give us four test data sets.
+
+The simulation framework, Degrad, is the standard software package used in physics for simulating the interaction of low-energy electrons in gasses Pfeiffer et al. (2019). The focus of this work is to compare the different models, and our simulations provide a typical setup on which to compare performance. The performance in any particular detector is expected to differ slightly due to the sim-to-real gap. In the future we plan to use radioactive source data to train our models, thereby avoiding the sim-to-real gap entirely. Simulation parameters, such as diffusion and binning, were deliberately conservative compared to what is experimentally achievable. We verified that model performance is robust against modest variation of the Degrad input parameters, such as temperature.
+
+**==> picture [159 x 105] intentionally omitted <==**
+
+**==> picture [159 x 105] intentionally omitted <==**
+
+**==> picture [257 x 161] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Raw Degrad simulation (b) Processed simulation (c) Voxilized simulation **----- End of picture text -----**
+
+Figure 4: An electron recoil simulation at various prepossessing stages. The processed simulation is made by randomly rotating, applying Gaussian smearing, and mean-centering the raw simulation. That is then binned into a (120 _,_ 120 _,_ 120) voxel grid with a (500 _µ_ m)[3] resolution. The red arrows indicate the true direction.
+
+7
+
+## 4.2 TRAINING
+
+Both models are trained using the Adam optimizer with lr = 0 _._ 0001, betas = (0 _._ 94 _,_ 0 _._ 999), eps = 10 _[−]_[7] , and the PyTorch default value for all other parameters. The deep learning models are trained with mini-batches of size _N_ = 256. Hyperparameters were optimized by exploring values in the range eps _∈_ [10 _[−]_[8] _,_ 10 _[−]_[6] ], lr _∈_ [10 _[−]_[6] _,_ 10 _[−]_[4] ], and _N ∈_ [64 _,_ 256].
+
+Both the RCN and HCN models are trained on the training set while their loss on the validation set is used for early stopping and hyperparameter selection. If the validation loss has not decreased in the last five epochs, training is stopped. The weights corresponding to the lowest validation loss are saved and used for the final model. The validation cosine distance loss achieved by the final RCN model is 0 _._ 078 and the validation NLL loss achieved by the final HCN model is 0 _._ 179.
+
+## 4.3 PERFORMANCE
+
+We evaluate the trained model on the independent test sets discussed in Section 4.1 by comparing it to a non-machine learning algorithm and to our estimation of the best expected directional performance. The non-machine learning algorithm (Non-ML) is adapted from Marco et al. (2022). We generalize the original algorithm to 3D and explore different variations where we tune its parameters on the test sets and give the algorithm the correct head-tail. The best expected directional performance (Best-Expected) is estimated by utilizing information that is only available in simulation. The purpose of Best-Expected is not to be a viable option for analysis but to provide a benchmark of exceptional performance. Non-ML and Best-Expected are detailed in Appendix A. Furthermore, the RCN model provides a deep learning baseline to compare HCN to.
+
+To compare all of our models, we use the cosine distance loss in Equation 1. In Appendix A we explain that the Non-ML algorithm has a track efficiency based on the parameters used. Hence, when comparing the models we plot the cosine distance loss versus the percentage of omitted tracks, referred to as the efficiency cut. In Figure 5, we display the performance of all models on the 40 keV test data set with 443 _µ_ m Gaussian smearing (left) and the 50 keV test data set with 200 _µ_ m Gaussian smearing (right). In both cases, we find that the deep learning models significantly outperform Non-ML, even under the most optimistic assumptions. On the 40 keV test data set with 443 _µ_ m Gaussian smearing and at a 0% efficiency cut, the RCN, HCN, and Best-Expected models achieve a cosine distance loss of 0 _._ 104, 0 _._ 104, and 0 _._ 098, respectively. On the 50 keV test data set with 200 _µ_ m Gaussian smearing and at a 0% efficiency cut, the models achieve a cosine distance loss of 0 _._ 0624, 0 _._ 0632, and 0 _._ 0569, in the same order. The HCN and RCN models have similar performance. However, the accuracy of the HCN model can be improved by discarding events with low _κi_ (high predicted uncertainty). The HCN model outperforms Best-Expected with just a 1% efficiency cut, in both cases.
+
+To assess the calibration of the HCN model we plot a 2D histogram of the predicted uncertainty ( _κi_ ) and the angle from the true direction to the predicted direction ( _θi_ ) for all test data, displayed in Figure 6a. The spread in _θi_ gets smaller for higher values of _κ_ , indicating that the HCN model is predicting _κi_ appropriately. The solid red curve in Figure 6a shows the mean angle, calculated for each bin in _κ_ . Using Equation 3, we can also calculate the expected mean angle as a function of _κ_
+
+**==> picture [346 x 26] intentionally omitted <==**
+
+where _Io_ is a modified Bessel function of the first kind. The expected mean angle as a function of _κ_ is plotted as the dashed black line in Figure 6a. The agreement of the expected mean angle with the mean angle for each bin in kappa suggests that the HCN model is well-calibrated.
+
+Building onto the 2D histogram in Figure 6a, we check whether the predicted directions in a _κ_ bin behave as if they are drawn from a von Mises-Fisher distribution with that value of _κ_ . For each bin in _κ_ , we compute a distribution of _**y** i ·_ _**y** predi_ values and fit it with Equation 3 to obtain _κ_ fit. In a perfect scenario, we expect _κ_ fit to match the bin center value. The _κ_ fit value for each bin versus the bin center value in plotted in Figure 6b. The diagonal solid line indicates perfect agreement and the dashed lines around it show the width of a bin in _κ_ . Looking at both Figures 6aand 6b, we see good agreement in the predicted and fit _κ_ values in the regions where the majority of our statistics lie.
+
+8
+
+**==> picture [358 x 135] intentionally omitted <==**
+
+**----- Start of picture text -----**
+HCN HCN 0.5 RCNBest-Expected 0.5 RCNBest-Expected 1% efficiency cut 1% efficiency cut Non-ML standard Non-ML standard 0.4 Non-ML tuned 0.4 Non-ML tuned 0.3 0.3 0.2 0.2 0.1 0.1 0 20 40 60 80 0 20 40 60 80 Efficiency Cut [%] Efficiency Cut [%] Cosine Distance Loss Cosine Distance Loss **----- End of picture text -----**
+
+Figure 5: Cosine distance loss versus efficiency cuts for all models on the 40 keV test data set with 443 _µ_ m Gaussian smearing (left) and the 50 keV test data set with 200 _µ_ m Gaussian smearing (right). The RCN (red diamond) and Best-Expected (horizontal line) models have no efficiency cuts. For the HCN model, we improve accuracy by cutting examples with higher predicted uncertainty, results are presented with a blue curve. The dashed vertical line indicates when the HCN model beats BestExpected. The orange point and black star indicate the performance of the Non-ML method with standard parameters and with parameters tuned on the test set, respectively. The downward arrows indicate how much improvement is possible if we cheat and give Non-ML the correct head-tail.
+
+**==> picture [179 x 142] intentionally omitted <==**
+
+**==> picture [179 x 138] intentionally omitted <==**
+
+**==> picture [192 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 6: Left: 2D histogram of predicted uncertainty ( _κ_ ) and the angle from true to predicted direction for all test data. The red curve is the mean angle for each bin in _κ_ . The black dashed curve is the expected mean angle according to Equation 3. Right: The cosine of the angles for each bin in _κ_ is fit to Equation 3 to obtain _κ_ fit, plotted with statistical error bars versus the bin center _κ_ value.
+
+## 5 CONCLUSION
+
+This works integrates all the essential components required for applying deep learning to modern directional recoil detectors. We discuss the challenge of handling sparse 3D data, which is increasingly critical as detectors become more finely segmented. For the first time, we introduce a deep probabilistic approach that utilizes the von Mises-Fisher distribution on _S_[2] to predict 3D directions along with their associated uncertainties. We outline the approximations on the NLL necessary for stable training. Additionally, we propose two tests to assess model calibration and we demonstrate that efficiency cuts on high uncertainty events effectively improve accuracy. The culmination of our work is a general and robust framework that marks a significant advancement over existing nonmachine learning methods. These advancements have the potential to contribute to several realms of fundamental physics. This general approach is applicable to any task requiring 3D direction estimation with uncertainty.
+
+9
+
+## REFERENCES
+
+- S. Biagi. Degrad – transport of electrons in gas mixtures, 2014. URL [URL removed] cern.ch/magboltz.
+
+- J. Billard, L. Strigari, and E. Figueroa-Feliciano. Implication of neutrino backgrounds on the reach of next generation dark matter direct detection experiments. _Phys. Rev. D_ , 89(2):023524, 2014. doi: 10.1103/PhysRevD.89.023524.
+
+- Igor Gilitschenski, Roshni Sahoo, Wilko Schwarting, Alexander Amini, Sertac Karaman, and Daniela Rus. Deep orientation uncertainty learning based on a bingham loss. In _International Conference on Learning Representations_ , 2020. URL [URL removed] id=ryloogSKDS.
+
+- C. Glaser, S. McAleer, S. Stj¨arnholm, P. Baldi, and S.W. Barwick. Deep-learning-based reconstruction of the neutrino direction and energy for in-ice radio detectors. _Astroparticle Physics_ , 145:102781, 2023. ISSN 0927-6505. doi: [URL removed] 2022.102781. URL [URL removed] S0927650522000822.
+
+- Benjamin Graham and Laurens van der Maaten. Submanifold sparse convolutional networks. _arXiv preprint arXiv:1706.01307_ , 2017.
+
+- Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. _CVPR_ , 2018.
+
+- Siyuan Huang, Siyuan Qi, Yinxue Xiao, Yixin Zhu, Ying Nian Wu, and Song-Chun Zhu. Cooperative holistic scene understanding: Unifying 3d object, layout, and camera pose estimation. In _Advances in Neural Information Processing Systems_ , pp. 206–217, 2018.
+
+- I. Jaegle et al. Compact, directional neutron detectors capable of high-resolution nuclear recoil imaging. _Nucl. Instrum. Meth. A_ , 945:162296, 2019. doi: 10.1016/j.nima.2019.06.037.
+
+- John T. Kent. The fisher-bingham distribution on the sphere. _Journal of the Royal Statistical Society. Series B (Methodological)_ , 44(1):71–80, 1982. ISSN 00359246. URL [URL removed] org/stable/2984712.
+
+- Takao Kitaguchi, Kevin Black, Teruaki Enoto, Asami Hayato, Joanne E. Hill, Wataru B. Iwakiri, Philip Kaaret, Tsunefumi Mizuno, and Toru Tamagawa. A convolutional neural network approach for reconstructing polarization information of photoelectric x-ray polarimeters. _Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , 942:162389, 2019. ISSN 0168-9002. doi: [URL removed] j.nima.2019.162389. URL [URL removed] pii/S0168900219309726.
+
+- Shuai Liao, Efstratios Gavves, and Cees G. M. Snoek. Spherical regression: Learning viewpoints, surface normals and 3d rotations on n-spheres. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , Long Beach, USA, June 2019.
+
+- Siddharth Mahendran, Haider Ali, and Ren´e Vidal. 3d pose regression using convolutional neural networks. In _2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW)_ , pp. 494–495, 2017. doi: 10.1109/CVPRW.2017.73.
+
+- Siddharth Mahendran, Haider Ali, and Ren´e Vidal. A mixed classification-regression framework for 3d pose estimation from 2d images. _ArXiv_ , abs/1805.03225, 2018. URL [URL removed] semanticscholar.org/CorpusID:13688430.
+
+- Alessandro Di Marco et al. A weighted analysis to improve the x-ray polarization sensitivity of the imaging x-ray polarimetry explorer. _The Astronomical Journal_ , 163(4):170, mar 2022. doi: 10. 3847/1538-3881/ac51c9. URL [URL removed]
+
+10
+
+Kanti V Mardia, Peter E Jupp, and KV Mardia. _Directional statistics_ , volume 2. Wiley Online Library, 2000.
+
+- David Mohlin, Josephine Sullivan, and G´erald Bianchi. Probabilistic orientation estimation with matrix fisher distributions. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 4884–4893. Curran Associates, Inc., 2020. URL [URL removed] paper/2020/file/33cc2b872dfe481abef0f61af181dfcf-Paper.pdf.
+
+- Ciaran A. J. O’Hare. New Definition of the Neutrino Floor for Direct Dark Matter Searches. _Phys. Rev. Lett._ , 127(25):251802, 2021. doi: 10.1103/PhysRevLett.127.251802.
+
+- Ciaran A. J. O’Hare et al. Recoil imaging for dark matter, neutrinos, and physics beyond the Standard Model. In _Snowmass 2021_ , 3 2022.
+
+- A.L. Peirson, R.W. Romani, H.L. Marshall, J.F. Steiner, and L. Baldini. Deep ensemble analysis for imaging x-ray polarimetry. _Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment_ , 986:164740, 2021. ISSN 0168-9002. doi: [URL removed] URL [URL removed] sciencedirect.com/science/article/pii/S0168900220311372.
+
+- Dorothea Pfeiffer et al. Interfacing Geant4, Garfield++ and Degrad for the Simulation of Gaseous Detectors. _Nucl. Instrum. Meth. A_ , 935:121–134, 2019. doi: 10.1016/j.nima.2019.04.110.
+
+- Sergey Prokudin, Peter Gehler, and Sebastian Nowozin. Deep directional statistics: Pose estimation with uncertainty quantification. In _European Conference on Computer Vision (ECCV)_ , September 2018.
+
+- J. Schueler, M. Ghrear, S. E. Vahsen, P. Sadowski, and C. Deaconu. Deep learning for improved kev-scale recoil identification in high resolution gas time projection chambers, 2022.
+
+Spconv Contributors. Spconv: Spatially Sparse Convolution Library, October 2022. URL https: //[URL removed]
+
+- Sven E. Vahsen, Ciaran A. J. O’Hare, and Dinesh Loomba. Directional Recoil Detection. _Ann. Rev. Nucl. Part. Sci._ , 71:189–224, 2021. doi: 10.1146/annurev-nucl-020821-035016.
+
+- FL Villante and A Serenelli. An updated discussion of the solar abundance problem. In _Solar Neutrinos: Proceedings of the 5th International Solar Neutrino Conference_ , pp. 103–120. World Scientific, 2019.
+
+- Martin C. Weisskopf et al. The imaging x-ray polarimetry explorer (ixpe). _Results in Physics_ , 6:1179–1180, 2016. ISSN 2211-3797. doi: [URL removed] 2016.10.021. URL [URL removed] S221137971630448X.
+
+- Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. Posecnn: A convolutional neural network for 6d object pose estimation in cluttered scenes. 2018.
+
+- Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. _Sensors_ , 18(10), 2018. ISSN 1424-8220. doi: 10.3390/s18103337. URL [URL removed] 1424-8220/18/10/3337.
+
+## A NON-MACHINE LEARNING ALGORITHMS
+
+Here, we detail the non-machine learning algorithms to which we compare our models. The first algorithm, Non-ML, is adapted from Marco et al. (2022) where it is discussed in the context of determining the initial direction of a photoelectron track imaged in 2D by the IXPE. We generalized the algorithm so that it can be applied to our 3D simulations. The Non-ML algorithm is outlined below:
+
+11
+
+1. Find the barycenter ( _**x** b_ ) of the track, defined as _**x** b_ = � _i[q][i]_ _**[x]**[i]_ , where _qi_ is the charge in a � _i[q][i]_
+
+voxel and _**x** i_ is the position of the voxel. Center the track on _**x** b_ .
+
+2. Compute the weighted covariance matrix. Use its singular value decomposition (SVD) to find the principal axis _**v**_ PA (the axis on which the second moment is maximized) and the second moment along _**v**_ PA, denoted as _M_ 2.
+
+3. Compute the third moment ( _M_ 3) about _**v**_ PA. _M_ 3 is also known as the skewness and it is used to keep only the initial part of the recoil track. Keep only the points satisfying _sgn_ (( _**x** i −_ _**x** b_ ) _·_ _**v**_ PA) = _sgn_ ( _M_ 3).
+
+4. _M_ 2 sets the length scale along the principal axis, keep only the points satisfying 1 _._ 5 _M_ 2 _<_ ( _**x** i −_ _**x** b_ ) _·_ _**v**_ PA _<_ 3 _M_ 2
+
+5. The two conditions above are meant to isolate the beginning portion of the track. The interaction point ( _**x**_ IP) is defined as the charge-weighted center of the remaining points. Center the remaining points on _**x**_ IP.
+
+6. The remaining points are re-weighted with _wi_ = exp ( _−dist_ ( _**x**_ IP _,_ _**x** i_ ) _/wo_ ), where _wo_ = 0 _._ 05 as specified in Marco et al. (2022). Compute the weighted covariance matrix and use SVD to find the principal axis, this gives the initial axial direction of the track, denoted as _**v**_ IP.
+
+Above, 1 _._ 5 _M_ 2, 3 _M_ 2, and _wo_ = 0 _._ 05 are all adopted from Marco et al. (2022), it is possible that these values are not optimal for our application. Hence, we also investigate the performance when these parameters are tuned to minimize the cosine distance loss on each test data set. There is no discussion of assigning a head-tail to _**v**_ IP. We employ two approaches: In the first, we assign the head-tail such that _**v**_ IP _·_ _**v**_ PA = _>_ 0. In the Second, we simply assign the correct head-tail, such that _**v**_ IP _·_ _**v**_ True = _>_ 0 where _**v**_ True is the true direction. Finally, the selections applied in steps 3 and 4 may not leave enough points to determine a principal axis for a subset of the tracks. In this case, the track is omitted and the track efficiency is noted. When tuning the parameters, we only consider cases resulting in a track efficiency of greater than 10%.
+
+The second algorithm, Best-Expected, attempts to estimate the best possible directional performance by using information that is only available in simulation. The purpose is not to be a viable option for analysis but to provide a benchmark allowing us to check how close our models are to the best expected performance. The implementation of this method is outlined below:
+
+1. For each simulation, Identify the true starting point. The true starting point is information that is only known in simulation. One of the key challenges faced by our models is identifying the starting point which can be ambiguous.
+
+2. Make a sphere of radius _ε_ centered on the true starting point. The value of _ε_ is specified by tuning it to minimize the cosine distance loss for each test data set.
+
+3. Determine the principal axis of the points contained within the sphere using SVD.
+
+4. Assign a head-tail to the principal axis such that it agrees with the true direction. In this step, the true label is used to assist the algorithm, giving it a significant advantage.
+
+5. The final vector direction obtained is used as the predicted direction of this method.
+
+Since this algorithm is given information about the true starting point, it is tuned on the test data sets, and it uses the truth head-tail information, we reason it is a good approximation of the best expected performance.
+
+## B APPLICATION TO A SIMPLE CASE
+
+To provide an illustrative tutorial of applying our models, we demonstrate their application to determining the direction of 3D arrows. Isotropic arrows with a constant shape and uniform density are generated and binned into a (120 _,_ 120 _,_ 120) voxel grid. An example is displayed in figure 7. We generate 6000 arrows, 4000 are used for the training set and 1000 are used for the validation and test sets. The RCN and HCN models are trained on the training set while their validation loss is used for early stopping. If the validation loss has not decreased in the last 2 epochs, training is stopped. The weights corresponding to the lowest validation loss are saved and used for the final model.
+
+12
+
+In this simple case, both models are fully trained within minutes. The cosine distance loss of the RCN and HCN models on the test data set is 4 _×_ 10 _[−]_[4] and 8 _×_ 10 _[−]_[4] , respectively. As expected, the direction predictions are much more accurate than Section 4. The lowest predicted _κi_ by HCN on the test data set is 443, meaning the model is much more confident in the predicted directions than for the electron recoil case. The code needed to create the arrow data sets, train our models, and test our models is available at [URL removed]
+
+**==> picture [160 x 155] intentionally omitted <==**
+
+Figure 7: An example of a 3D arrow for the application to a simple case.
+
+13
+
diff --git a/open_review/iclr2024_8538.json b/open_review/iclr2024_8538.json
new file mode 100644
index 0000000000000000000000000000000000000000..e7d8a1c6760b7a3dbc4dc2d7d6106636d0ec9017
--- /dev/null
+++ b/open_review/iclr2024_8538.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8538",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Non-stationary Contextual Bandit Learning via Neural Predictive Ensemble Sampling",
+ "abstract": "Real-world applications of contextual bandits often exhibit non-stationarity due to seasonality, serendipity, and evolving social trends. \nWhile a number of non-stationary contextual bandit learning algorithms have been proposed in the literature, they excessively explore due to a lack of prioritization for information of enduring value, or are designed in ways that do not scale in modern applications with high-dimensional user-specific features and large action set, or both. In this paper, we introduce a novel non-stationary contextual bandit algorithm that addresses these concerns. It combines a scalable, deep-neural-network-based architecture with a carefully designed exploration mechanism that strategically prioritizes collecting information with the most lasting value in a non-stationary environment. Through empirical evaluations on two real-world recommendation datasets, which exhibit pronounced non-stationarity, we demonstrate that our approach significantly outperforms the state-of-the-art baselines.",
+ "rebuttal": "### Thank you for your review\n1, 2, 3. In this response, we address the question from the first three questions from the reviewer. The main advantage of NeuralPES is to offer a practical neural network based non-stationary context bandit algorithm that follows the key insight from PS, which is to only explore for enduring information in the environment. The key differences are:\n\n a) NeuralPES only requires one-step rollout into the future instead of PS which requires sampling an infinite sequence of future rewards for all actions.\n b) NeuralPES conditions on the one-step rollout of future world parameter prediction with a sequence model instead of sampled rewards, such that we can scale to a large space of contexts and actions.\n c) PS does not support neural networks and assumes a known world dynamics for nonstationarity, but NeuralPES doesn’t require a known world dynamics and can adapt to any type of nonstationarity.\n\n4. The theoretical analysis differs in that (a) we now consider contextual bandits, and (b) generalizes our analysis to linear bandits. \n\n5. Execution/inference time for NeuralPES is 2x of standard neural networks since it requires a prediction of one-step rollout of world parameters. Training-wise, it is approximately 3x to standard ensemble neural networks that carries out Thompson-sampling-like exploration per batch of data given that the model has three stages. However, in production environments, people usually need to completely retrain models to adapt to nonstationarities and hence if we can incrementally train from the current model using NeuralPES, it would actually save a lot of resources. \n\n6. A100 40GB GPU was the only GPU available to us. From our experiment, any GPU with 2 GB is sufficient for the experiment. \n\n7. We refer to both the cumulative regret and the long-run average regret. We will revise those sentences to make it clear. \n\n8. In this particular scenario, the cumulative regret is zero, so the algorithm is optimal. \n\n9. We select M = 10 according to [1] given that a 10-particle ensemble with prior functions is sufficiently enough to approximate the posterior distribution of the reward. Increasing to 100 or even 1000 particles does not significantly improve the performance. \n\n10. Yes the order of recommendations presented within the 12-hour is ignored but as we do not retrain our model within the 12 hours, it would not introduce any bias since we use the same NeuralPES model to address the whole batch of 12-hour data.\n\n11. We are limited by our organization’s policy to not share code. We are in the process of obtaining permission to share open-source code. However, all hyperparameters and datasets are publicly available as listed in the paper. \n\n[1] Osband, Ian, et al. \"The neural testbed: Evaluating joint predictions.\" Advances in Neural Information Processing Systems 35 (2022): 12554-12565.\n\n### Thank you for your review\nThank you for the detailed feedback! We would like to make the following clarifications. \n\nResponding to Weaknesses:\n\nYou raised the point that our analysis is “restricted to linear contextual bandits,” which is indeed a fairly large class of problems, and can be a good starting point. \n\nOur algorithm does not rely on any assumptions of how the rewards are generated. Our theoretical results are introduced with the purpose to provide more intuition on how our algorithm works. Our result (Corollary 1) is general, and we establish a result in AR(1) bandit (Corollary [...]\n\n### Thank you for your review.\nThank you for acknowledging that this is the first time you see the neural bandit’s work in non-stationary environments. We would like to make the following clarifications. \n\n(1) An Ensemble of neural networks can perform Thompson sampling-like exploration. This is also discussed in literature Lu and Van Roy (2017) [1], Qin et al. (2022) [2] and Osband et al. (2016) [3]. \n\n(2) Neural contextual bandit algorithms are very commonly adopted in research that studies scalability [4, 5] and real-world applications [6], and also shown to be very incremental in terms of [...]",
+ "initial_scores": [
+ 3,
+ 3,
+ 3,
+ 6
+ ],
+ "score_mean": 3.75,
+ "score_variance": 2.25,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The reviewers are overall not positive about the contribution of the work and several weaknesses of the paper has been pointed which weakens the competency of the submission. Some of the reviewers' questions are also not addressed in the rebuttal.\n\nWe urge the authors to address the reviewers' concerns before resubmitting the paper to the next suitable venue.",
+ "forum_id": "qVILwUxjLG",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_EExp",
+ "review_id": "RPadC40cVX",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1819,
+ "edit_detected": true,
+ "edit_delta_seconds": 938888,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Fa2p",
+ "review_id": "YAH9OIAqiJ",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3170,
+ "edit_detected": true,
+ "edit_delta_seconds": 1029399,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Coy3",
+ "review_id": "xtMDTZa7FA",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 4445,
+ "edit_detected": true,
+ "edit_delta_seconds": 1078374,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_jNAd",
+ "review_id": "x5w2aKrXQP",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 1026,
+ "edit_detected": true,
+ "edit_delta_seconds": 2122145,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8538.md b/open_review/iclr2024_8538.md
new file mode 100644
index 0000000000000000000000000000000000000000..fba709a2a836188bd9863d5e2eddbe74fe6bf239
--- /dev/null
+++ b/open_review/iclr2024_8538.md
@@ -0,0 +1,588 @@
+
+
+## NON-STATIONARY CONTEXTUAL BANDIT LEARNING VIA NEURAL PREDICTIVE ENSEMBLE SAMPLING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Real-world applications of contextual bandits often exhibit non-stationarity due to seasonality, serendipity, and evolving social trends. While a number of nonstationary contextual bandit learning algorithms have been proposed in the literature, they excessively explore due to a lack of prioritization for information of enduring value, or are designed in ways that do not scale in modern applications with high-dimensional user-specific features and large action set, or both. In this paper, we introduce a novel non-stationary contextual bandit algorithm that addresses these concerns. It combines a scalable, deep-neural-network-based architecture with a carefully designed exploration mechanism that strategically prioritizes collecting information with the most lasting value in a non-stationary environment. Through empirical evaluations on two real-world recommendation datasets, which exhibit pronounced non-stationarity, we demonstrate that our approach significantly outperforms the state-of-the-art baselines.
+
+## 1 INTRODUCTION
+
+Contextual bandit learning algorithms have seen rapid adoptions in recent years in a numder of domains (Bouneffouf and Rish, 2019), from driving personalized recommendations (Li et al., 2010) to optimizing dyanmic advertising placements (Schwartz et al., 2017). The primary objective of these algorithms is to strategically select actions to acquire information about the environment in the most cost-effective manner, and use that knowledge to guide subsequent decision-making. Thanks in part to the historical development in this field, many of these algorithms are designed for a finite-horizon experiment with the environment remaining relatively stationary throughout.
+
+However, real-world environments are rife with nonstationarity (Ditzler et al., 2015; Elena et al., 2021), as a result of seasonality (Keerthika and Saravanan, 2020; Hwangbo et al., 2018), serendipity (Kotkov et al., 2016; 2018), or evolving social trends (Abdollahpouri et al., 2019; Cañamares and Castells, 2018). To make matters worse, many practical contextual bandit systems, such as these commonly used in a recommendation engine, operate in a continuous manner over a long, or even indefinite time horizon, further exposing the learning algorithm to non-stationarity that is bound to manifest over its lifetime. Indeed, when applied to non-stationary environments, traditional contextual bandit learning algorithms designed with stationarity in mind are known to yield sub-optimal performance (Trovo et al., 2020; Russac et al., 2020).
+
+**==> picture [160 x 120] intentionally omitted <==**
+
+Figure 1: NeuralPES Regret in Nonstationary Contextual Bandits
+
+The goal of this paper is to study the design of contextual bandit algorithms that not only successfully navigate a non-stationary environment, but also scale to real-world production environments. Extending classic bandit algorithms to a non-stationary setting has received sustained attention in recent years (Kocsis and Szepesvári, 2006; Garivier and Moulines, 2008; Raj and Kalyani, 2017; Trovo et al., 2020). A limitation in these existing approaches, however, is that they are designed to explore new information by only decaying past information, which could introduce excessive exploration. As pointed out by Liu et al. (2023), exploration designs intended for stationary environments tend to focus on resolving the uncertainty surrounding an action’s current quality, and as
+
+1
+
+such, suffer sub-optimal performance for failing to prioritize collecting information that would be of more enduring value in a non-stationary environment. In response, Liu et al. (2023) proposed the predictive sampling algorithm that takes information durability into account, and demonstrated an impressive performance improvement over existing solutions. However, the predictive sampling algorithm, among many nonstationary contextual bandit learning algorithm we discuss in the related work section, suffers from their scalability and does not scale with modern deep learning systems.
+
+In this work, we take a step towards solving large-scale nonstationary contextual bandit problems by introducing Neural Predictive Ensemble Sampling (NeuralPES), the first non-stationary contextual bandit learning algorithm that is scalable with modern neural networks and effectively explores in a non-stationary envrionment by seeking lasting information. Theoretically, we establish that NeuralPES emphasizes the acquisition of lasting information, information that remains relevant for a longer period of time. Empirically, we validate the algorithm’s efficacy in two real-world recommendation datasets, spanning across 1 week and 2 months of time, respectively, and exhibiting pronounced non-stationarity. Our findings reveal that our algorithm surpasses other state-of-theart neural contextual bandit learning algorithms, encompassing both stationary and non-stationary variants. As a spoiler for our empirically results, see Figure 1 for the average regret of our agent compared to other baselines on an AR(1) nonstationary contextual bandit environment.
+
+## 2 RELATED WORK
+
+**Non-Stationary Bandit Learning.** A large number of non-stationary bandit learning algorithms rely on heuristic approaches to reduce the effect of past data. These heuristics include maintaining a sliding window Cheung et al. (2019; 2022); Garivier and Moulines (2008); Russac et al. (2020); Srivastava et al. (2014); Trovo et al. (2020), directly discounting the weight of past rewards by recency Bogunovic et al. (2016); Garivier and Moulines (2008); Russac et al. (2020); Kocsis and Szepesvári (2006), restarting the algorithm periodically or with a fixed probability at each time Auer et al. (2019a); Allesiardo et al. (2017); Besbes et al. (2019); Bogunovic et al. (2016); Wei et al. (2016); Zhao et al. (2020), restarting upon detecting a change point Abbasi-Yadkori et al. (2022); Allesiardo and Féraud (2015); Auer et al. (2019b); Allesiardo et al. (2017); Besson and Kaufmann (2019); Cao et al. (2019); Chen et al. (2019); Ghatak (2021); Ghatak et al. (2021); Hartland et al. (2006); Liu et al. (2018); Luo et al. (2018); Mellor and Shapiro (2013), and more complex heuristics (Gupta et al., 2011; Kim and Tewari, 2020; Raj and Kalyani, 2017; Viappiani, 2013). These algorithms adapt stationary bandit learning algorithms like Thompson sampling (TS) (Thompson, 1933), Upper Confidence Bound (UCB) (Lai and Robbins, 1985), and exponential-weight algorithms (Rexp3) (Auer et al., 2002; Freund and Schapire, 1997) using aforementioned heuristics to reduce the impact of past data and encourage continual exploration. However, they often lack intelligent mechanisms for seeking lasting information during exploration. While predictive sampling (Liu et al., 2023) seeks for lasting information, it does not efficiently scale.
+
+**Deep Neural Network-Based Bandit Algorithms.** In practical applications of bandit learning, both the set of contexts and the set of actions can be large. A number of algorithms (Gu et al., 2021; Jia et al., 2022; Kassraie and Krause, 2022; Riquelme et al., 2018; Salgia, 2023; Su et al., 2023; Xu et al., 2022; Zhang et al., 2020; Zhou et al., 2020; Zhu and Van Roy, 2023b) utilize the capacity of deep neural networks to generalize across actions and contexts. These algorithms are designed for stationary environments. While Allesiardo et al. (2014) proposes a deep neural-network based algorithm for non-stationary environments, it does not intelligently seek for lasting information.
+
+## 3 CONTEXTUAL BANDITS
+
+This section formally introduces contextual bandits, and other related concepts and definitions. We first introduce contextual bandits.
+
+**Definition 1** ( **Contextual Bandit).** A contextual bandit _E_ with a finite set of contexts _C_ and a finite set of actions _A_ is characterized by three stochastic processes: the reward process _{Rt}t∈_ N with state space R _[|C|] ×_ R _[|A|]_ , the contexts _{Ct}t∈_ N with state space _C_ , and the sequence of available action sets _{At}t∈_ N with state space 2 _[A]_ . We use _E_ = ( _{Rt}t∈_ N _, {Ct}t∈_ N _, {At}t∈_ N) to denote the bandit.
+
+At each timestep _t ∈_ N, an agent is presented with context _Ct_ and the set of available actions _At_ . Upon selecting action _a ∈At_ , the agent observes a reward of _Rt_ +1 _,Ct,a_ .
+
+## 3.1 LINEAR CONTEXTUAL BANDITS
+
+In many practical applications, both the context set and the action set are large. To enable effective generalization across these sets, certain structural assumptions on how the rewards are generated
+
+2
+
+come into play. In this regard, the reward _Rt,c,a_ can be described as a function of a feature vector _ϕ_ ( _c, a_ ), which captures relevant contextual information in context _c ∈C_ and action information in action _a ∈A_ . To exemplify this structure, let us introduce the linear contextual bandit.
+
+**Example 1** ( **Linear Contextual Bandit).** A linear contextual bandit is a contextual bandit with feature mapping _ϕ_ : _C × A →_ R _[d]_ , a stochastic process _{θt}t∈_ N with state space R _[d]_ . For all _t ∈_ N, _c ∈C_ , and _a ∈At_ , the reward _Rt,c,a_ satisfies that E[ _Rt,c,a|ϕ, θt_ ] = _ϕ_ ( _c, a_ ) _[⊤] θt_ .
+
+3.2 POLICY AND PERFORMANCE Let _H_ denote the set of all sequences of a finite number of action-observation pairs. Specifically, the observation at timestep 0 consists of only the initial context and available action set, and each following observation consists of a reward, a context, and an available action set. We refer to the elements of _H_ as _histories_ . We next introduce a policy.
+
+**Definition 2.** A policy _π_ : _H →P_ ( _A_ ) is a function that maps each history in _H_ to a probability distribution over the action set _A_ .
+
+A policy _π_ assigns, for each realization of history _h ∈H_ , a probability _π_ ( _a|h_ ) of choosing an action _a_ for all _a ∈A_ . We require that _π_ ( _a|h_ ) = 0 for _a ∈A/ t_ , where _At_ is the available action set defined by _h_ . For any policy _π_ , we use _A[π] t_[to denote the action selected at time] _[ t]_[ by an agent that] executes policy _π_ , and _Ht[π]_[to denote the history generated at timestep] _[ t]_[ as an agent executes policy] _π_ . Specifically, we let _H_ 0 _[π]_[be the empty history.][We let] _[ A][π] t_[be such that][ P][(] _[A][π] t[∈·|][H] t[π]_[) =] _[ π]_[(] _[·|][H] t[π]_[)] and that _A[π] t_[is independent of] _[ {][C][t][}][t][∈]_[N][,] _[ {][R][t][}][t][∈]_[N][, and] _[ {A][t][}][t][∈]_[N][conditioned on] _[ H] t[π]_[, and let] _[ H] t[π]_ +1[=] ( _C_ 0 _, A_ 0 _, A[π]_ 0 _[, R]_[1] _[,C]_ 0 _[,A][π]_ 0 _[, . . . , A] t[π][, R][t]_[+1] _[,C] t[,A][π] t[, C][t]_[+1] _[,][ A][t]_[+1][)][.]
+
+For all policies _π_ , all bandits _E_ = ( _{Rt}t∈_ N _, {Ct}t∈_ N _, {At}t∈_ N), and _T ∈_ N, the expected cumulative reward and the long-run average expected reward are
+
+**==> picture [284 x 22] intentionally omitted <==**
+
+The average expected reward is particularly useful in evaluating agent performance when both the reward process _{Rt}t∈_ N and the context process _{Ct}t∈_ N are stationary stochastic processes. In such cases, Return( _E_ ; _π_ ) = E � _Rt_ +1 _,Ct,A[π] t_ � _,_ which is independent of _t_ .
+
+4 NEURAL PREDICTIVE ENSEMBLE SAMPLING In this section, we introduce a novel algorithm for non-stationary contextual bandit learning. The algorithm has several salient features below. See visualization of the architecture in Fig. 2
+
+**Use Deep Neural Network Ensemble as Uncertainty Representation for Exploration.** In contextual bandit learning, an agent should intelligently balance exploration and exploitation. Thompson sampling (TS) (Thompson, 1933) stands as one of the most popular bandit learning algorithms, backed by well-established theoretical guarantees (Agrawal and Goyal, 2012; Russo and Van Roy, 2014) and good empirical performance (Chapelle and Li, 2011; Zhu and Van Roy, 2023b). To adopt TS in complex settings, Ensemble sampling (Lu and Van Roy, 2017) is introduced an efficient approximation and is also compatible with deep neural networks. Importantly, ensemble sampling has shown both theoretical effectiveness and superior empirical performance with neural networks (Lu et al., 2018; Qin et al., 2022; Osband et al., 2016). Therefore, we adopt a deep ensemble architecture.
+
+**Seek Out Lasting Information.** In a non-stationary environment, a continuous stream of new information emerges. As an agent strives to balance between exploration and exploitation, an important consideration involves prioritizing the acquisition of information that remains relevant for a longer period of time (Liu et al., 2023). We introduce an algorithm that effectively prioritizes seeking such lasting information. Notably, our algorithm, NeuralPES, avoids the introduction of assumptions on how the rewards are generated or that of additional tuning parameters to adjust the extent of exploration. Indeed, it determines the exploration extent by training a deep neural network. To our knowledge, NeuralPES is the first algorithm that both suitably prioritizes seeking lasting information and scales to complex environments of practical interest.
+
+4.1 NEURAL ENSEMBLE SAMPLING
+
+Before delving into the specific design of our algorithm, let us introduce a baseline algorithm which can be thought of as a deep neural network-based TS. This algorithm is referred to as the Neural Ensemble Sampling (NeuralEnsembleSampling).
+
+At each timestep _t ∈_ N, a NeuralEnsembleSampling agent (See Algorithm 1):
+
+3
+
+**==> picture [358 x 97] intentionally omitted <==**
+
+Figure 2: Visualization of three components of NeuralPES: reward, sequence, and predictive model.
+
+1. Trains an ensemble of _M_ reward models, updating weights using stochastic gradient descent.
+
+2. Samples _m ∼_ unif( _{_ 1 _, ..., M }_ ), and uses the _m_ -th reward model to predict a reward at the next timestep _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+3. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+## **Algorithm 1:** NeuralEnsembleSampling
+
+**1 Input:** Horizon _T_ , number of particles in each ensemble _M_ , loss function _L_ , replay buffer size _K_ , sequence model input size _L_ , number of gradient steps _τ, τ_ seq, step sizes _α, α_ seq, minibatch sizes _K[′]_ ,
+
+**2 Initialize:** Let replay buffer _B_ = _∅_ , and randomly initialize weights _ψ_ 1: _M_ , _w_ 1: _M,_ 0, and _w_ 1:[seq]
+
+1: _M,_ 0[,]
+
+|**2 **|**I**|**nitialize:** Let replay buffer_B_ = _∅_, and randomly initialize weights_ψ_1:_M_,_w_1:_M,_0, and_w_seq 1:_M,_0,|**nitialize:** Let replay buffer_B_ = _∅_, and randomly initialize weights_ψ_1:_M_,_w_1:_M,_0, and_w_seq 1:_M,_0,|
+|---|---|---|---|
+|**3 ** **4** **5** **6** **7** **8** **9**|**fo**|**r**_t_ = 0_,_1_, . . . , T −_1**do** **for**_m_ = 1_,_2_, . . . , M_ **do** Let(_ψm, wm,t_) _←_TrainRewardNN(_B, L, ψm, wm,t−_1_, τ, α, K′_) **sample**: _m ∼_unif(_{_1_, ..., M}_) **select**: _At ∈_arg max_a∈At f_(_wm,t_;_b_(_ψm_;_Ct, a_)) **observe**: _Rt_+1_,Ct,At_,_Ct_+1,_At_+1 **update**: Update_B_to keep the most recent_K_ tuples of context, action, reward, and timestep data.||
+||**1 ** **2 ** **3** **4** **5 **||**Algorithm 3:**TrainSequenceNN **Input:** Replay buffer_B_, sequence model weights_w_seq, historical last-layer weights_w_1:_t−_1, number of gradient steps_τ_, step size_α_, number of future steps_x_. **for**_i_ = 0_,_1_, . . . , τ −_1**do** **sample**: _j ∼_unif(_{L, ..., t −_1_}_) **update**_w_seq following Equation2 **return:** _w_seq|
+|||**Algorithm 2:**TrainRewardNN||
+|||**Input:** Replay buffer_B_, loss function_L_, base network weights _ψ_, last-layer weights_w_, number of gradient steps_τ_, step size _α_, minibatch size_K′_. **for**_i_ = 0_,_1_, . . . , τ −_1**do** **sample:** a minibatch_B′_ of size_K′_ from replay buffer_B_ **update**(_ψ, w_)following Equation1 **return:** _ψ_**,**_w_ **1 ** **2 ** **3** **4** **5 **||
+
+**The Reward Model** Figure 2 presents a visualization of the ensemble of reward models. The ensemble has _M_ particles, each consists of a base network _b_ defined by weights _ψm_ , and last layer _f_ defined by weights _wm,t_ . Each particle in the ensemble is a reward model that aims to predict the reward _Rt_ +1 _,c,a_ given context and action pair ( _c, a_ ). Specifically, at each timestep _t ∈_ N, the _m_ -th reward model predicts _f_ ( _wm,t_ ; _b_ ( _ψm_ ; _c, a_ )).
+
+We maintain a replay buffer _B_ of the most recent _K_ tuples of context, action, reward, and timestep data. At each timestep, the network weights _w_ 1: _M_ and _ψ_ 1: _M_ are trained via repeatedly sampling a minibatch _B[′]_ of size _K[′]_ , and letting
+
+**==> picture [328 x 19] intentionally omitted <==**
+
+for each _m ∈_ [ _M_ ]. Note that we use _wm,t_ to denote the last-layer weight of the _m_ -th particle at the _t_ -th timestep; when it is clear that we are considering a single timestep, we drop the subscript _t_ .
+
+## 4.2 PREDICTING FUTURE REWARD VIA SEQUENCE MODELING
+
+Given the non-stationarity of the environment, a natural choice to adapt to the changing dynamics is to predict future reward model weights via sequence models, and use the predictive future reward model to select actions. We refer to this agent as the Neural Sequence Ensemble agent
+
+At each timestep _t ∈_ N, a Neural Sequence Ensemble agent proceeds as the following:
+
+1. Trains an ensemble of _M_ reward models and an ensemble of _M_ sequence models through updating their weights using stochastic gradient descent.
+
+4
+
+2. Samples _m ∼_ unif( _{_ 1 _, ..., M }_ ), uses the _m_ -th sequence model to predict a future reward model one step ahead of time based on past reward models, and uses this predicted future model to predict a reward at the next timestep _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+3. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+**The Sequence Model** Figure 2 presents a visualization of the ensemble of the sequence models as well. The ensemble consists of _M_ particles. Each particle is a sequence model implemented as a recurrent neural network that aims to predict future reward model weights _wm,t_ +1 given historical ones _wm,t−L_ +1: _t_ . At each timestep _t ∈_ N, the _m_ -th sequence model predicts _f_[seq] ( _wm,t_[seq][;] _[ w][m,t][−][L]_[+1] _[,t]_[)][.] The network weights _wm_[seq][are trained via repeatedly sampling] _[ j]_[from] _[ {][L, ..., t][ −]_[1] _[}]_[ and letting]
+
+_wm_[seq] _← wm_[seq] _− α∇wm_ seq _[L]_[MSE][(] _[f]_[ seq][(] _[w] m_[seq][;] _[ w][m,j][−][L]_[+1:] _[j]_[)] _[, w][m,j]_[+1][)] _[.]_ (2)
+
+## 4.3 NEURAL PREDICTIVE ENSEMBLE SAMPLING
+
+Let us now present NeuralPES. A key distinction between this algorithm and NeuralEnsemble lies in its ability to prioritize information that maintains relevance over a longer period of time. This is achieved through incorporating a new model which we refer to as the predictive model. Specifically, the predictive model is designed to take a function of a context-action pair ( _c, a_ ) and a future reward model as input. Its purpose is to generate a prediction for the upcoming reward _Rt_ +1 _,c,a_ . When maintaining an ensemble of predictive models for exploration, an agent can suitably prioritize information based on how lasting the information is.
+
+At each timestep _t ∈_ N, a NeuralPES agent (see Algorithm 4):
+
+1. Trains an ensemble of _M_ reward models, an ensemble of _M_ sequence models, and an ensemble of _M_ predictive models
+
+2. Samples _m ∼_ unif( _{_ 1 _, ..., M }_ ), and uses the _m_ -th sequence model to predict a future reward model two steps ahead of time based on past models.
+
+3. Takes this predicted future model as part of input to the _m_ -th predictive model, and predicts a reward at the next timestep _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+4. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
+
+## **Algorithm 4:** NeuralPES
+
+**==> picture [374 x 122] intentionally omitted <==**
+
+**----- Start of picture text -----**
+1 Input: Horizon T , number of particles in each ensemble M , loss function L , replay buffer size K , sequence model input size L , number of gradient steps τ, τ seq , τ pred, step sizes α, α seq , α pred, minibatch sizes K [′] , K [′′] . 2 Initialize: Let replay buffer B = ∅ , and randomly initialize weights ψ 1: M , w 1: M, 0, w 1: [seq] M, 0 [, and] [ w] 1: [pred] M, 0 3 for t = 0 , 1 , . . . , T − 1 do 4 for m = 1 , 2 , . . . , M do 5 Let ( ψm, wm,t ) ← TrainNN( B, L, ψm, wm,t− 1 , τ, α, K [′] ) 6 Let wm,t [seq] [←] [TrainSequenceNN(] [B][, w] m,t [seq] − 1 [, w][m,] [1:] [t][−] [1] [, τ] [seq] [, α] [seq] [,] [ 2)] 7 Let wm,t [pred] [←] [TrainPredictiveNN(] [B][,][ L][, w] m,t [pred] − 1 [, ψ][m][, w][m,] [1:] [t][−] [1] [, τ] [pred] [, α] [pred] [, K][′′] [)] 89 sampleroll out: : mw ˆ m,t∼ unif(+2 = {f 1 [seq] , ..., M ( wm,t [seq] } ) [;] [ w][m,t][−][L] [+1:] [t] [)] 10 select : At ∈ arg max a∈At � Mi =1 [f] [ pred][(] [w] i,t [pred] ; ( ˆ wm,t +2 ⊙ b ( ψm ; Ct, a )) 11 observe : Rt +1 ,Ct,At , Ct +1 , At +1 12 update : Update B to keep the most recent K tuples of context, action, reward, and timestep data. **----- End of picture text -----**
+
+## **Algorithm 5:** TrainPredictiveNN
+
+**1 Input:** Replay buffer _B_ , loss function _L_ , base network weights _ψ_ , historical last-layer weights _w_ 1: _t−_ 1, number of gradient steps _τ_ , step size _α_ , minibatch size _K[′′]_ .
+
+**2 for** _i_ = 0 _,_ 1 _, . . . , τ −_ 1 **do 3 sample:** a minibatch _B[′′]_ of size _K[′′]_ from replay buffer _B_ **4 update** : _w_[pred] _← w_[pred] _− α_[�] ( _c,a,r,j_ ) _∈B[′′][∇] w_[pred] _[L]_[(] _[f]_[ pred][(] _[w]_[pred][;] _[ w][j]_[+2] _[⊙][b]_[(] _[ψ]_[;] _[ c, a]_[))] _[, r]_[)]
+
+- **5 return:** _w_[pred]
+
+**The Predictive Model** Figure 2 also presents a visualization of the ensemble of the predictive models. The ensemble consists of _M_ particles. Each particle in the ensemble is a predictive model that aims to predict the next reward _Rt_ +1 _,c,a_ provided context-action pair ( _c, a_ ) and a future reward model of two timesteps ahead of time. Specifically, at each timestep _t ∈_ N, the _m_ -th predictive model aims to predict _Rt_ +1 _,c,a_ by taking an intermediate representation, i.e., _w_ ˆ _m,t_ +2 _⊙ b_ ( _ψ_ ; _c, a_ ), as input.
+
+5
+
+We maintain a replay buffer _B_ of the most recent _K_ tuples of context, action, reward, and timestep data. The network weights _w_ 1:[pred] _M_[are trained via repeatedly sampling a minibatch] _[ B][′′]_[of size] _[ K][′′]_
+
+**==> picture [337 x 19] intentionally omitted <==**
+
+for each _m ∈_ [ _M_ ]. Note that we use _wm,t_[pred][to denote the last-layer weight of the] _[ m]_[-th particle at the] _t_ -th timestep; when it is clear that we are considering a single timestep, we drop the subscript _t_ .
+
+**Regularization to Address Loss of Plasticity** To address the loss of plasticity, we regularize each particle’s weight towards its initial weight in the last layer of the reward model ensemble and the predictive model ensemble Kumar et al. (2023). (1) and (3) now becomes
+
+**==> picture [387 x 42] intentionally omitted <==**
+
+## 4.4 THEORETICAL INSIGHTS AND ANALYSIS
+
+We provide intuition and evidence that NeuralPES’s prioritizes the acquisition of lasting information.
+
+4.4.1 NEURALPES PRIORITIZES LASTING INFORMATION We focus on comparing NeuralPES and NeuralEnsemble in linear contextual bandits. In such contexts, NeuralPES can be viewed as a neural network-based implementation of an algorithm which we refer to as linear predictive sampling (LinPS); NeuralEnsemble can be viewed as a neural network-based implementation of TS. In a linear contextual bandit, a LinPS agent carries out the following three-step procedure at each timestep, and a TS agent carries out a similar procedure, replacing _θt_ +2 with _θt_ +1:
+
+1. samples _θ_[ˆ] _t_ +2 from the posterior P( _θt_ +2 _∈·|Ht_ ), and _ϕ_[ˆ] _t_ from the posterior P( _ϕ ∈·|Ht_ ).
+
+2. estimates the reward _R_[ˆ] _t_ +1 _,Ct,a_ = E[ _Rt_ +1 _,Ct,a|Ht, ϕ_ = _ϕ_[ˆ] _t, θt_ +2 = _θ_[ˆ] _t_ +2],
+
+3. and selects an action that maximizes the sample _At ∈_ arg max _a∈At R_[ˆ] _t_ +1 _,Ct,a_ .
+
+The procedures are carried out by approximating P( _θt_ +1 _∈·|Ht_ ) using the ensemble of the last layers of the reward models, approximating P( _ϕ ∈·|Ht_ ) using the ensemble of the base models, approximating P( _θt_ +2 _∈·|Ht_ ) utilizing the sequence models; the reward estimation step of LinPS utilizes the predictive models.
+
+To compare the behaviors of NeuralPES and NeuralEnsemble, we can compare LinPS with TS. It is worth noting that both algorithms trade off exploration and exploitation in a similar fashion, yet TS trades off between optimizing the immediate reward and learning about _ϕ_ and _θt_ +1 and LinPS trades off between optimizing the immediate reward and learning about _ϕ_ and _θt_ +2. If _θt_ +1 = _θt_ for all _t ∈_ N, then the environment is stationary and the two algorithms are equivalent. In general, compared with _θt_ +1, _θt_ +2 better represents valuable information that is helpful for making future decisions. Aiming to learn about _θt_ +2, LinPS strategically prioritizes information that is still valuable in the next timestep and does not acquire information for which its value immediately vanishes.
+
+4.4.2 THEORETICAL ANALYSIS Next, we present a regret analysis that offers further evidence of LinPS’s effectiveness in prioritizing lasting information. In particular, we demonstrate that LinPS excels in environments where a substantial amount of information is transient. This success stems from its strategic approach to acquire less of such information. We assume that the action set is known and remains unchanged, _At_ = _A_ for all _t ∈_ N, and that _ϕ_ is known. We first introduce the notion of regret.
+
+**Definition 3** ( **Regret).** For all policies _π_ and _T ∈_ N, the regret and long-run average regret associated with a policy _π_ over _T_ timesteps in a linear contextual bandit is Regret( _T_ ; _π_ ) = � _Tt_ =0 _−_ 1[E] � _Rt_ +1 _,∗ − Rt_ +1 _,Ct,A[π] t_ � _,_ and Regret( _π_ ) = lim sup _T →_ + _∞ T_ 1[Regret(] _[T]_[;] _[ π]_[)][,][respectively,] where _Rt_ +1 _,∗_ = max _a∈A_ E[ _Rt_ +1 _,Ct,a|θt_ ].
+
+We use Regret( _T_ ) and Regret to denote the regret of LinPS and present a regret bound on LinPS. **Theorem 1. (LinPS Regret Bound)** _In a linear contextual bandit, suppose {θt}t∈_ N _is a reversible Markov chain. For all T ∈_ N _, the regret and the long-run average regret of LinPS is upper-bounded by_ Regret( _T_ ) _≤_ � _d_ 2 _[T]_[[][I][(] _[θ]_[2][;] _[ θ]_[1][) + (] _[T][−]_[1)][I][(] _[θ]_[3][;] _[ θ]_[2] _[|][θ]_[1][)]] _[ and]_ Regret _≤_ � _d_ 2[I][(] _[θ]_[3][;] _[ θ]_[2] _[|][θ]_[1][)] _[.]_
+
+6
+
+The key proof idea essentially follows from that of (Liu et al., 2022) and (Russo and Van Roy, 2016). For the sake of completeness, we include the proof in the appendix.
+
+It is worth noting that when _θt_ +1 = _θt_ for all _t ∈_ N0, we have Regret( _T_ ) _≤_ � _d_ 2 _[T]_[H][(] _[θ]_[1][)] _[.]_[We] recover a regret bound for TS in a stationary linear contextual bandit. In the other extreme, if _θt_ changes very frequently, say if _{θt}t∈_ N is an i.i.d. sequence each with non-atomic distribution, then the regret of LinPS is zero that LinPS achieves optimal. This suggests that when information about _θt_ is not lasting, LinPS stops acquiring this information and is optimal.
+
+To specialize the bound to a particular example, we introduce linear contextual bandits with abrupt changes. Similar models were introduced by (Mellor and Shapiro, 2013) and (Liu et al., 2023).
+
+**Example 2** ( **Linear Contextual Bandit with Abrupt Changes).** For all _i ∈_ [ _d_ ], let _qi ∈_ [0 _,_ 1], and _{Bt,i}t∈_ N be an i.i.d. sequence of Bernoulli r.v.’s each with success probability _qi_ . For all _i ∈_ [ _d_ ], let _{βt,i}t∈_ N be an i.i.d. sequence. Consider a linear contextual bandit where for all _i ∈_ [ _d_ ], _θ_ 1 _,i_ = _β_ 1 _,i_ , and _{θt,i}t∈_ N transitions according to _θt_ +1 _,i_ = _Bt,iβt_ +1 _,i_ + (1 _− Bt,i_ ) _θt,i_ .
+
+**Corollary 1. (LinPS Regret Bound in Example 2)** _For all T ∈_ N _, the regret and long-run average regret of LinPS in a linear contextual bandit with abrupt changes is upper-bounded by d d_ Regret( _T_ ) _≤_ 2 _[T] i_ =1[(1] _[ −][q][i]_[)][H][(] _[θ]_[1] _[,i]_[) + (] _[T][−]_[1)][�] _[d] i_ =1[[2][H][(] _[q][i]_[) +] _[ q][i]_[(1] _[ −][q][i]_[)][H][(] _[θ]_[1] _[,i]_[)]] _, and_ � �� � Regret _≤_ � _d_ 2 � _di_ =1[[2][H][(] _[q][i]_[) +] _[ q][i]_[(1] _[ −][q][i]_[)][H][(] _[θ]_[1] _[,i]_[)]] _[,][where]_[H][(] _[q][t,i]_[)] _[denotes][to][the][entropy][of][of][a] Bernoulli random variable with success probability qt,i._
+
+We can use Theorem 1 to investigate how the performance of LinPS depends on various key parameters of the bandit. On one hand, when _qi_ = 0 for all _i ∈_ [ _d_ ], i.e., when the environment is stationary,
+
+the bound becomes _d_[which][recovers][a][sublinear][regret][bound][for][TS][in][a][stationary] � 2 _[T]_[H][(] _[θ]_[1][)][,] environment. On the other hand, as the _qi_ ’s approach 1, the regret bound approaches 0, suggesting that LinPS performs well. Recall that this is a setting where _θt_ are redrawn frequently, and the information associated with _θt_ is not enduring. Our regret bound further confirms that LinPS continues to excel in such environments.
+
+We consider another example, which models bandits with "smooth" changes. Similar bandits have been introduced by (Burtini et al., 2015; Gupta et al., 2011; Kuhn et al., 2015; Kuhn and Nazarathy, 2015; Liu et al., 2023; Slivkins and Upfal, 2008).
+
+**Example 3.** [ **AR(1) Linear Contextual Bandit] Let** _γ ∈_ [0 _,_ 1] _[d]_ **, with its** _i_ **-th coordinate denoted** _γi_ **. Consider a linear contextual bandit where** _{θt,i}t∈_ N **transitions independently according to an AR(1) process with parameter** _γi_ **:** _θt_ +1 _,i_ = _γiθt,i_ + _Wt_ +1 _,i_ **, where** _{Wt,i}t∈_ N **is a sequence of i.i.d.** _N_ (0 _,_ 1 _− γi_[2][)] **[ r.v.’s and]** _[ θ]_[1] _[,i][∼N]_[(0] _[,]_[ 1)] **[.]**
+
+Applying Theorem 1 to an AR(1) linear contextual bandit, we establish the following result.
+
+**Corollary 2. (LinPS Regret Bound in AR(1) Linear Contextual Bandit)** _For all T ∈_ N _, the regret and long-term average regret of LinPS in an AR(1) linear contextual bandit is upper-_
+
+_bounded by_ Regret( _T_ ) _≤_ ~~�~~ _d_ 4 _[T]_ �� _di_ =1[log] � 1 _−_ 1 _γi_[2] � +[�] _t[T]_ =1 _[ −]_[1] � _di_ =1[log (1 +] _[ γ] i_[2][)] � _,_ Regret( _T_ ) _≤ d d_ � 4 � _i_ =1[log (1 +] _[ γ] i_[2][)] _[ if][ γ][i][<]_[ 1] _[ for all][ i][ ∈]_[[] _[d]_[]] _[.]_
+
+The regret bound suggests that LinPS prioritizes the acquisition of lasting information. Specifically, when _γi_ = 0 for all _i ∈_ [ _d_ ], information about all _θt,i_ ’s lose their usefulness immediately. In such contexts, LinPS achieves 0 regret and is such optimal. In addition, the regret of LinPS remains small when _γi_ is small for each _i ∈_ [ _d_ ], suggesting that the algorithms consistently performs well when information about _θt,i_ ’s are not durable.
+
+## 5 EXPERIMENTS
+
+In this section, we introduce AR(1) contextual logistic bandit experiment and two experiments built on real-world data. Among the two real-world dataset experiments, one leverages one-week user interactions on Microsoft News website in time order and the other is built on Kuai’s short-video platform’s two-month user interaction data in time order. We consider Neural Ensemble (Osband
+
+7
+
+|Algorithm|AR(1) Average Reward|MIND 1-week Average CTR|Kuai 2-month Average Rating|
+|---|---|---|---|
+|Neural Ensemble|0_._5683_±_0_._0025|0_._1503_±_0_._0013|1_._2614_±_0_._0017|
+|Window Neural Ensemble|0_._5688_±_0_._0025|0_._1513_±_0_._0012|1_._3187_±_0_._0023|
+|Neural LinUCB|0_._5684_±_0_._0020|0_._1468_±_0_._0015|1_._2798_±_0_._0020|
+|Window Neural LinUCB|0_._5730_±_0_._0031|0_._1482_±_0_._0020|1_._3172_±_0_._0023|
+|Neural Linear|0_._5701_±_0_._0027|0_._1467_±_0_._0016|1_._2690_±_0_._0020|
+|Window Neural Linear|0_._5741_±_0_._0029|0_._1492_±_0_._0015|1_._3171_±_0_._0026|
+|NeuralPES|**0**_._**5850**_±_**0**_._**0023**|**0**_._**1552**_±_**0**_._**0013**|**1**_._**3421**_±_**0**_._**0016**|
+
+Table 1: Empirical Experiment Results
+
+et al., 2016), Neural LinUCB (Xu et al., 2022) and Neural Linear (Riquelme et al., 2018) and their sliding window versions (Cheung et al., 2019; 2022; Garivier and Moulines, 2008; Russac et al., 2020; Srivastava et al., 2014; Trovo et al., 2020) (to address nonstationarity in environments) as our baselines for comparison. All experiments are performed on AWS with 1 A100 40GB GPU per experiment, each with 8 CPUs, and each experiment repeated over 20 distinct seeds. To scale the experiments to the large scale experiments, we learn every batch of interactions instead of per interaction, more details in Appendix B.0.1. Constrained by computation, we do not consider Neural UCB (Zhou et al., 2020) and Neural TS (Zhang et al., 2020), given their computation requirement of inverting square matrices with dimensions equal to neural network parameter count.
+
+## 5.1 AR(1) CONTEXTUAL LOGISTIC BANDIT
+
+Following Example 3, An AR(1) contextual logistic bandit changes its reward function to _Rt,c,a ∼_ Bernoulli � _σ_ � _ϕ_ ( _c, a_ ) _[⊤] θt_ ��, all others the same. We set number of actions to 10, and _d_ = 10, _γi_ = 0 _._ 99 _[i]_ . Each entry in _θ_ is initialized with _N_ (0 _,_ 0 _._ 01). Hyperparameters of the agents are presented in Appendix B.0.2. The average reward is presented in Table 1, and Figure 3a.
+
+**==> picture [115 x 87] intentionally omitted <==**
+
+**==> picture [116 x 87] intentionally omitted <==**
+
+**==> picture [115 x 87] intentionally omitted <==**
+
+**==> picture [398 x 132] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) AR(1) Nonstationary Contextual (b) Microsoft News 1-Week Experi- (c) Microsoft News Day of Week Bandit Average Reward ment Average CTR Nonstationary CTR (d) KuaiRec 2-Month Experiment (e) KuaiRec 2-Month Ablation Ex- Average Rating periment **----- End of picture text -----**
+
+Figure 3: Empirical Results and Ablations
+
+## 5.2 MICROSOFT NEWS DATASET EXPERIMENTS
+
+We leverage the MIND dataset (Wu et al., 2020) to carry out the first real-world dataset experiment. MIND is collected from real user interactions with Microsoft News website and its public training and validation set covers the interactions from November 9 to November 15, 2019. Each row of the MIND dataset is presented as in Table 2. In this dataset, since every recommendation’s groundtruth feedback is provided at a single timestamp, no counterfactual evaluation is needed. In this experiment, we feed the rows in the order of interaction timestamp to the agent for action selection to resemble the real-world nonstationarity in user preferences. The nonstationarity presented in this dataset is commonly observed as day of week patterns in real-world recommender systems. To visualize the nonstationarity in user behavior within a week, see Figure 3c to see daily average click-through rate (CTR) in the dataset to see a week of day pattern in the dataset.
+
+8
+
+|||Table 2: MIND Dataset Illustration|Table 2: MIND Dataset Illustration|Table 2: MIND Dataset Illustration||
+|---|---|---|---|---|---|
+|Impression ID|User ID|Time|User Interest History||News with Labels|
+|91|U397059|11/15/2019 10:22:32 AM|N106403 N71977 N97080|N129416-0|N26703-1 N120089-1 N53018-0|
+
+We sample 10,000 users from the dataset and asks candidate agents to select news recommendations sequentially according to the time order of the interactions that happened in the dataset. Hyperparameters of the agents are presented in Appendix B.0.2. Features for each recommendation is derived by average pooling over the entity embeddings of each news recommendation provided by the dataset and features for each user as average pooling over features of their clicked articles. Both user and recommendation features are of size 100. The average CTR of news recommendations offered by candidate agents over 1 week is presented in Table 1, and Figure 3b, where NeuralPES outperforms all baselines. Note that since we present interactions to users sequentially according to time order, the figure presents natural day of week seasonality from the dataset.
+
+## 5.3 KUAIREC DATASET EXPERIMENT
+
+While the MIND dataset offers a setup to empirically test agents’ performance under day of week nonstationarity, the short duration of the dataset naturally limits the possibility of observing long-term agent behaviors under nonstationarity. In this experiment, we make slight modifications to the KuaiRec dataset Gao et al. (2022) to offer a 2-month-long real-world experiment. Every row of KuaiRec offers a user ID, the timestamp, a video ID of a recommended video, and a rating derived from the user’s watch duration. The dataset also offers daily features of each user and each video candidate, of dimensions 1588 and 283 respectively. In our transformed dataset, we grouped every 12 hours of recommendation to a user into a contextual bandit format where each row contains a user ID, the 12-hour window, set of videos alongside with their corresponding ratings, sorted by the 12-hour window start time. The agent’s goal is to select the best recommendation to each user in each window in the order of occurrence in the real-world. Hyperparameters of the agents are presented in Appendix B.0.2. The average rating of news recommendations offered by candidate agents over 2 months is presented in Table 1 and see Figure 3d and we see NeuralPES outperforms all baselines.
+
+## 5.4 ABLATION STUDIES
+
+## 5.4.1 REGULARIZATION FOR CONTINUAL LEARNING
+
+To facilitate continual learning and avoid loss of plasticity, we leverage regularization trick introduced in Eq.4 to ensure the agent continues to learn while the environment changes. See Figure 3e. The algorithm with regularization consistently outperforms its version without regularization.
+
+## 5.4.2 IMPORTANCE OF PREDICTIVE MODEL
+
+We compare NeuralPES’ performance against its version without the Predictive Model, Neural Sequence Ensenble, introduced in Section 4.2. See Figure 3e. Without the Predictive Model, the agent crashes in its performance because in nonstationary environments, the environment changes are mostly unpredictable and the predictive model is responsible for determining whether a piece of information from the sequence model prediction lasts in the future.
+
+## 6 CONCLUSION AND FUTURE WORK
+
+There are a few lines of future work that can extend on top of this work. First of all, this work does not consider context and state evolution as a result of actions, as mentioned in Zhu and Van Roy (2023a); Xu et al. (2023); Chen et al. (2022). As these state transition kernels can also be nonstationary, it calls for future extension of this work to address nonstationarities in reinforcement learning problems. Furthermore, to enhance the quality of future reward parameter predictions, attention mechanisms (Vaswani et al., 2017) can be potentially leveraged to further improve the performance of the models.
+
+In this paper, we introduced a novel non-stationary contextual bandit learning algorithm, NeuralPES, which is scalable with deep neural networks and is designed to seek enduring information. We theoretically demonstrated that the algorithm effectively prioritizes exploration for enduring information. Additionally, through empirical analysis on two extensive real-world datasets spanning one week and two months respectively, we illustrated that the algorithm adeptly adapts to pronounced non-stationarity and surpasses the performance of leading stationary neural contextual bandit learning algorithms, as well as their non-stationary counterparts. We aspire that the findings and the algorithm delineated in this paper will foster the adoption of NeuralPES in real-world systems.
+
+9
+
+## REFERENCES
+
+- Abbasi-Yadkori, Y., Gyorgy, A., and Lazic, N. (2022). A new look at dynamic regret for non-stationary stochastic bandits. _arXiv preprint arXiv:2201.06532_ .
+
+- Abdollahpouri, H., Burke, R., and Mobasher, B. (2019). Managing popularity bias in recommender systems with personalized re-ranking. _arXiv preprint arXiv:1901.07555_ .
+
+- Agrawal, S. and Goyal, N. (2012). Analysis of thompson sampling for the multi-armed bandit problem. In _Conference on learning theory_ , pages 39–1. JMLR Workshop and Conference Proceedings.
+
+- Allesiardo, R. and Féraud, R. (2015). Exp3 with drift detection for the switching bandit problem. In _2015 IEEE International Conference on Data Science and Advanced Analytics (DSAA)_ , pages 1–7. IEEE.
+
+- Allesiardo, R., Féraud, R., and Bouneffouf, D. (2014). A neural networks committee for the contextual bandit problem. In _Neural Information Processing: 21st International Conference, ICONIP 2014, Kuching, Malaysia, November 3-6, 2014. Proceedings, Part I 21_ , pages 374–381. Springer.
+
+- Allesiardo, R., Féraud, R., and Maillard, O.-A. (2017). The non-stationary stochastic multi-armed bandit problem. _International Journal of Data Science and Analytics_ , 3:267–283.
+
+- Auer, P., Cesa-Bianchi, N., Freund, Y., and Schapire, R. E. (2002). The nonstochastic multiarmed bandit problem. _SIAM journal on computing_ , 32(1):48–77.
+
+- Auer, P., Chen, Y., Gajane, P., Lee, C.-W., Luo, H., Ortner, R., and Wei, C.-Y. (2019a). Achieving optimal dynamic regret for non-stationary bandits without prior information. In _Conference on Learning Theory_ , pages 159–163. PMLR.
+
+- Auer, P., Gajane, P., and Ortner, R. (2019b). Adaptively tracking the best bandit arm with an unknown number of distribution changes. In _Conference on Learning Theory_ , pages 138–158. PMLR.
+
+- Besbes, O., Gur, Y., and Zeevi, A. (2019). Optimal exploration-exploitation in a multi-armed-bandit problem with non-stationary rewards. _Stochastic Systems_ , 9(4):319–337.
+
+- Besson, L. and Kaufmann, E. (2019). The generalized likelihood ratio test meets KLUCB: an improved algorithm for piece-wise non-stationary bandits. _Proceedings of Machine Learning Research vol XX_ , 1:35.
+
+- Bogunovic, I., Scarlett, J., and Cevher, V. (2016). Time-varying gaussian process bandit optimization. In _Artificial Intelligence and Statistics_ , pages 314–323. PMLR.
+
+- Bouneffouf, D. and Rish, I. (2019). A survey on practical applications of multi-armed and contextual bandits. _arXiv preprint arXiv:1904.10040_ .
+
+- Burtini, G., Loeppky, J. L., and Lawrence, R. (2015). Improving online marketing experiments with drifting multi-armed bandits. In _ICEIS (1)_ , pages 630–636.
+
+- Cañamares, R. and Castells, P. (2018). Should i follow the crowd? a probabilistic analysis of the effectiveness of popularity in recommender systems. In _The 41st International ACM SIGIR Conference on Research & Development in Information Retrieval_ , pages 415–424.
+
+- Cao, Y., Wen, Z., Kveton, B., and Xie, Y. (2019). Nearly optimal adaptive procedure with change detection for piecewise-stationary bandit. In _The 22nd International Conference on Artificial Intelligence and Statistics_ , pages 418–427. PMLR.
+
+- Chapelle, O. and Li, L. (2011). An empirical evaluation of thompson sampling. _Advances in neural information processing systems_ , 24.
+
+- Chen, M., Xu, C., Gatto, V., Jain, D., Kumar, A., and Chi, E. (2022). Off-Policy Actor-critic for Recommender Systems. In _Proceedings of the 16th ACM Conference on Recommender Systems_ , pages 338–349.
+
+10
+
+- Chen, Y., Lee, C.-W., Luo, H., and Wei, C.-Y. (2019). A new algorithm for non-stationary contextual bandits: Efficient, optimal and parameter-free. In _Conference on Learning Theory_ , pages 696–726. PMLR.
+
+- Cheung, W. C., Simchi-Levi, D., and Zhu, R. (2019). Learning to optimize under non-stationarity. In _The 22nd International Conference on Artificial Intelligence and Statistics_ , pages 1079–1087. PMLR.
+
+- Cheung, W. C., Simchi-Levi, D., and Zhu, R. (2022). Hedging the drift: Learning to optimize under nonstationarity. _Management Science_ , 68(3):1696–1713.
+
+- Ditzler, G., Roveri, M., Alippi, C., and Polikar, R. (2015). Learning in nonstationary environments: A survey. _IEEE Computational Intelligence Magazine_ , 10(4):12–25.
+
+- Elena, G., Milos, K., and Eugene, I. (2021). Survey of multiarmed bandit algorithms applied to recommendation systems. _International Journal of Open Information Technologies_ , 9(4):12–27.
+
+- Freund, Y. and Schapire, R. E. (1997). A decision-theoretic generalization of on-line learning and an application to boosting. _Journal of computer and system sciences_ , 55(1):119–139.
+
+- Gao, C., Li, S., Lei, W., Chen, J., Li, B., Jiang, P., He, X., Mao, J., and Chua, T.-S. (2022). Kuairec: A fully-observed dataset and insights for evaluating recommender systems. In _Proceedings of the 31st ACM International Conference on Information & Knowledge Management_ , pages 540–550.
+
+- Garivier, A. and Moulines, E. (2008). On upper-confidence bound policies for non-stationary bandit problems. _arXiv preprint arXiv:0805.3415_ .
+
+- Ghatak, G. (2021). A change-detection-based Thompson sampling framework for non-stationary bandits. _IEEE Transactions on Computers_ , 70(10):1670–1676.
+
+- Ghatak, G., Mohanty, H., and Rahman, A. U. (2021). Kolmogorov–smirnov test-based activelyadaptive thompson sampling for non-stationary bandits. _IEEE Transactions on Artificial Intelligence_ , 3(1):11–19.
+
+- Gu, Q., Karbasi, A., Khosravi, K., Mirrokni, V., and Zhou, D. (2021). Batched neural bandits. _arXiv preprint arXiv:2102.13028_ .
+
+- Gupta, N., Granmo, O.-C., and Agrawala, A. (2011). Thompson sampling for dynamic multi-armed bandits. In _2011 10th International Conference on Machine Learning and Applications and Workshops_ , volume 1, pages 484–489. IEEE.
+
+- Hartland, C., Gelly, S., Baskiotis, N., Teytaud, O., and Sebag, M. (2006). Multi-armed bandit, dynamic environments and meta-bandits.
+
+- Hwangbo, H., Kim, Y. S., and Cha, K. J. (2018). Recommendation system development for fashion retail e-commerce. _Electronic Commerce Research and Applications_ , 28:94–101.
+
+- Jia, Y., Zhang, W., Zhou, D., Gu, Q., and Wang, H. (2022). Learning neural contextual bandits through perturbed rewards. _arXiv preprint arXiv:2201.09910_ .
+
+- Kassraie, P. and Krause, A. (2022). Neural contextual bandits without regret. In _International Conference on Artificial Intelligence and Statistics_ , pages 240–278. PMLR.
+
+- Keerthika, K. and Saravanan, T. (2020). Enhanced product recommendations based on seasonality and demography in ecommerce. In _2020 2nd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN)_ , pages 721–723. IEEE.
+
+- Kim, B. and Tewari, A. (2020). Randomized exploration for non-stationary stochastic linear bandits. In _Conference on Uncertainty in Artificial Intelligence_ , pages 71–80. PMLR.
+
+- Kocsis, L. and Szepesvári, C. (2006). Discounted UCB. In _2nd PASCAL Challenges Workshop_ , volume 2, pages 51–134.
+
+11
+
+- Kotkov, D., Konstan, J. A., Zhao, Q., and Veijalainen, J. (2018). Investigating serendipity in recommender systems based on real user feedback. In _Proceedings of the 33rd annual acm symposium on applied computing_ , pages 1341–1350.
+
+- Kotkov, D., Wang, S., and Veijalainen, J. (2016). A survey of serendipity in recommender systems. _Knowledge-Based Systems_ , 111:180–192.
+
+- Kuhn, J., Mandjes, M., and Nazarathy, Y. (2015). Exploration vs exploitation with partially observable gaussian autoregressive arms. _EAI Endorsed Transactions on Self-Adaptive Systems_ , 1(4).
+
+- Kuhn, J. and Nazarathy, Y. (2015). Wireless channel selection with reward-observing restless multiarmed bandits. _Chapter to appear in “Markov Decision Processes in Practice”, Editors: R. Boucherie and N. van Dijk_ .
+
+- Kumar, S., Marklund, H., and Van Roy, B. (2023). Maintaining plasticity via regenerative regularization. _arXiv preprint arXiv:2308.11958_ .
+
+- Lai, T. and Robbins, H. (1985). Asymptotically efficient adaptive allocation rules. _Advances in Applied Mathematics_ , 6(1):4–22.
+
+- Li, L., Chu, W., Langford, J., and Schapire, R. E. (2010). A contextual-bandit approach to personalized news article recommendation. In _Proceedings of the 19th international conference on World wide web_ , pages 661–670.
+
+- Liu, F., Lee, J., and Shroff, N. (2018). A change-detection based framework for piecewise-stationary multi-armed bandit problem. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 32.
+
+- Liu, Y., Kuang, X., and Van Roy, B. (2022). Understanding the concept of nonstationarity.
+
+- Liu, Y., Van Roy, B., and Xu, K. (2023). Nonstationary bandit learning via predictive sampling. In _International Conference on Artificial Intelligence and Statistics_ , pages 6215–6244. PMLR.
+
+- Lu, X. and Van Roy, B. (2017). Ensemble sampling. _Advances in neural information processing systems_ , 30.
+
+- Lu, X., Wen, Z., and Kveton, B. (2018). Efficient online recommendation via low-rank ensemble sampling. In _Proceedings of the 12th ACM Conference on Recommender Systems_ , pages 460–464.
+
+- Luo, H., Wei, C.-Y., Agarwal, A., and Langford, J. (2018). Efficient contextual bandits in nonstationary worlds. In _Conference On Learning Theory_ , pages 1739–1776. PMLR.
+
+- Mellor, J. and Shapiro, J. (2013). Thompson sampling in switching environments with Bayesian online change detection. In Carvalho, C. M. and Ravikumar, P., editors, _Proceedings of the Sixteenth International Conference on Artificial Intelligence and Statistics_ , volume 31 of _Proceedings of Machine Learning Research_ , pages 442–450, Scottsdale, Arizona, USA. PMLR.
+
+- Osband, I., Blundell, C., Pritzel, A., and Van Roy, B. (2016). Deep exploration via bootstrapped dqn. _Advances in neural information processing systems_ , 29.
+
+- Qin, C., Wen, Z., Lu, X., and Van Roy, B. (2022). An analysis of ensemble sampling. _Advances in Neural Information Processing Systems_ , 35:21602–21614.
+
+- Raj, V. and Kalyani, S. (2017). Taming non-stationary bandits: A bayesian approach. _arXiv preprint arXiv:1707.09727_ .
+
+- Riquelme, C., Tucker, G., and Snoek, J. (2018). Deep bayesian bandits showdown: An empirical comparison of bayesian deep networks for thompson sampling. _arXiv preprint arXiv:1802.09127_ .
+
+- Russac, Y., Cappé, O., and Garivier, A. (2020). Algorithms for non-stationary generalized linear bandits. _arXiv preprint arXiv:2003.10113_ .
+
+- Russo, D. and Van Roy, B. (2014). Learning to optimize via posterior sampling. _Mathematics of Operations Research_ , 39(4):1221–1243.
+
+12
+
+- Russo, D. and Van Roy, B. (2016). An information-theoretic analysis of thompson sampling. _The Journal of Machine Learning Research_ , 17(1):2442–2471.
+
+- Salgia, S. (2023). Provably and practically efficient neural contextual bandits. In _International Conference on Machine Learning_ , pages 29800–29844. PMLR.
+
+- Schwartz, E. M., Bradlow, E. T., and Fader, P. S. (2017). Customer acquisition via display advertising using multi-armed bandit experiments. _Marketing Science_ , 36(4):500–522.
+
+- Slivkins, A. and Upfal, E. (2008). Adapting to a changing environment: the Brownian restless bandits. In _COLT_ , pages 343–354.
+
+- Srivastava, V., Reverdy, P., and Leonard, N. E. (2014). Surveillance in an abruptly changing world via multiarmed bandits. In _53rd IEEE Conference on Decision and Control_ , pages 692–697. IEEE.
+
+- Su, Y., Wang, X., Le, E. Y., Liu, L., Li, Y., Lu, H., Lipshitz, B., Badam, S., Heldt, L., Bi, S., et al. (2023). Value of exploration: Measurements, findings and algorithms. _arXiv preprint arXiv:2305.07764_ .
+
+- Thompson, W. R. (1933). On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. _Biometrika_ , 25(3/4):285–294.
+
+- Trovo, F., Paladino, S., Restelli, M., and Gatti, N. (2020). Sliding-window Thompson sampling for non-stationary settings. _Journal of Artificial Intelligence Research_ , 68:311–364.
+
+- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. _Advances in neural information processing systems_ , 30.
+
+- Viappiani, P. (2013). Thompson sampling for Bayesian bandits with resets. In _International Conference on Algorithmic Decision Theory_ , pages 399–410. Springer.
+
+- Wei, C.-Y., Hong, Y.-T., and Lu, C.-J. (2016). Tracking the best expert in non-stationary stochastic environments. _Advances in neural information processing systems_ , 29.
+
+- Wu, F., Qiao, Y., Chen, J.-H., Wu, C., Qi, T., Lian, J., Liu, D., Xie, X., Gao, J., Wu, W., et al. (2020). Mind: A large-scale dataset for news recommendation. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 3597–3606.
+
+- Xu, P., Wen, Z., Zhao, H., and Gu, Q. (2022). Neural contextual bandits with deep representation and shallow exploration. In _International Conference on Learning Representations_ .
+
+- Xu, R., Bhandari, J., Korenkevych, D., Liu, F., He, Y., Nikulkov, A., and Zhu, Z. (2023). Optimizing long-term value for auction-based recommender systems via on-policy reinforcement learning.
+
+- Zhang, W., Zhou, D., Li, L., and Gu, Q. (2020). Neural thompson sampling. _arXiv preprint arXiv:2010.00827_ .
+
+- Zhao, P., Zhang, L., Jiang, Y., and Zhou, Z.-H. (2020). A simple approach for non-stationary linear bandits. In _International Conference on Artificial Intelligence and Statistics_ , pages 746–755. PMLR.
+
+- Zhou, D., Li, L., and Gu, Q. (2020). Neural contextual bandits with ucb-based exploration. In _International Conference on Machine Learning_ , pages 11492–11502. PMLR.
+
+- Zhu, Z. and Van Roy, B. (2023a). Deep exploration for recommendation systems. In _Proceedings of the 17th ACM Conference on Recommender Systems_ , pages 963–970.
+
+- Zhu, Z. and Van Roy, B. (2023b). Scalable neural contextual bandit for recommender systems. _Proceedings of the 32nd ACM International Conference on Information and Knowledge Management (CIKM ’23)_ .
+
+13
+
+## A TECHNICAL PROOFS
+
+## A.1 PROOF OF THEOREM 1
+
+We first present a general regret bound that applies to any agent.
+
+**Theorem 2. (General Regret Bound)** _In a linear contextual bandit, suppose {θt}t∈_ N _is a Markov chain. For all policies π and T ∈_ N _, the regret is upper-bounded by_ Regret( _T_ ; _π_ ) _≤_ �� _Tt_ =0 _−_ 1[Γ] _t[π]_ �I( _θ_ 2; _θ_ 1) +[�] _[T] t_ =1 _[ −]_[1][I][(] _[θ][t]_[+2][;] _[ θ][t]_[+1] _[|][θ][t]_[)] � _, where_ Γ _[π] t_[=] I(E _θt_ [+2 _Rt_ +1; _A[π] t,∗[,R] −R[t]_[+1] _t_ +1 _[,C] ,Ct,Aπt[,Aπ] t[|] t[H]_[]] 2 _t[π]_[)] _[.]_
+
+_Proof._ For all policies _π_ and _T ∈_ N,
+
+**==> picture [322 x 111] intentionally omitted <==**
+
+where the inequality follows from Cauchy-Schwartz. Next, observe that for all _t ∈_ N,
+
+**==> picture [387 x 169] intentionally omitted <==**
+
+where the first equality follows from _θt_ +2 _⊥ Ht[π]_ +1 _[|][θ][t]_[+1][.][By][ (][5][)][ and][ (][6][)][, we complete the proof.]
+
+To apply Theorem 2 and derive a regret bound specifically for LinPS in linear contextual bandits, we establish the subsequent result, bounding Γ _[π] t_[LinPS] , which we will also refer to as Γ _t_ for brevity. **Lemma 1.** _In a linear contextual bandit, suppose {θt}t∈_ N _is a reversible Markov chain. For all t ∈_ N _, the information ratio associated with LinPS satisfies_ Γ _t ≤[d]_ 2 _[,][ where the information ratio for] any policy π is defined as_ Γ _[π] t_[=] I(E _θt_ [+2 _Rt_ +1; _A[π] t,∗[,R] −R[t]_[+1] _t_ +1 _[,C] ,Ct,Aπt[,Aπ] t[|] t[H]_[]] 2 _t[π]_[)] _[.]_
+
+_Proof._ We use _At_ to denote _A[π] t_[LinPS] , _Ht_ to denote _Ht[π]_[LinPS] .
+
+14
+
+For all _t ∈_ N0, and _h_ = ( _c_ 0 _, a_ 0 _, r_ 1 _, ..., rt−_ 1 _, c_ ) _∈Ht_ , we have
+
+**==> picture [366 x 75] intentionally omitted <==**
+
+where the second equality follows from the reversibility of _{θt}t∈_ N, and _A[∗] t,c_[is defined as] _[ A][∗] t,c_[=] arg max _a∈A_ E[ _Rt_ +1 _,c,a|θt_ +2].
+
+In addition, for all _t ∈_ N0, and _h_ = ( _c_ 0 _, a_ 0 _, r_ 1 _, ..., rt−_ 1 _, c_ ) _∈Ht_ , we have
+
+**==> picture [335 x 29] intentionally omitted <==**
+
+where the inequality follows from the data-processing inequality.
+
+Note that E[ _Rt_ +1 _,c,a|Ht_ = _h, θt_ +1] = E[ _Rt_ +1 _,c,a|θt_ +1] = _ϕ_ ( _c, a_ ) _[⊤] θt_ +1. By Proposition 2 of (Russo and Van Roy, 2016), we have
+
+**==> picture [349 x 67] intentionally omitted <==**
+
+This, together with (7) and (8), implies that
+
+Therefore, for all _t ∈_ N,
+
+**==> picture [256 x 61] intentionally omitted <==**
+
+where the inequality follows from Jensen’s inequality, and the last equality follows from (9).
+
+Then Theorem 1 follows directly from Theorem 2 and Lemma 1.
+
+**Theorem 1. (LinPS Regret Bound)** _In a linear contextual bandit, suppose {θt}t∈_ N _is a reversible Markov chain. For all T ∈_ N _, the regret and the long-run average regret of LinPS is upper-bounded by_ Regret( _T_ ) _≤_ � _d_ 2 _[T]_[[][I][(] _[θ]_[2][;] _[ θ]_[1][) + (] _[T][−]_[1)][I][(] _[θ]_[3][;] _[ θ]_[2] _[|][θ]_[1][)]] _[ and]_ Regret _≤_ � _d_ 2[I][(] _[θ]_[3][;] _[ θ]_[2] _[|][θ]_[1][)] _[.]_
+
+_Proof._ For all _T ∈_ N, the regret of LinPS is upper-bounded by
+
+**==> picture [248 x 106] intentionally omitted <==**
+
+where the first inequality follows from Theorem 2, the first equality follows from Lemma 1, and the last equality follows from stationarity.
+
+15
+
+## A.2 PROOF OF COROLLARY 1
+
+Corollary 1 follows directly from Theorem 1 and Lemma 8 of (Liu et al., 2023).
+
+## A.3 PROOF OF COROLLARY 2
+
+**Corollary 2. (LinPS Regret Bound in AR(1) Linear Contextual Bandit)** _For all T ∈_ N _, the regret and long-term average regret of LinPS in an AR(1) linear contextual bandit is upperbounded by_ Regret( _T_ ) _≤_ ~~�~~ _d_ 4 _[T]_ �� _di_ =1[log] � 1 _−_ 1 _γi_[2] � +[�] _t[T]_ =1 _[ −]_[1] � _di_ =1[log (1 +] _[ γ] i_[2][)] � _,_ Regret( _T_ ) _≤ d d_ � 4 � _i_ =1[log (1 +] _[ γ] i_[2][)] _[ if][ γ][i][<]_[ 1] _[ for all][ i][ ∈]_[[] _[d]_[]] _[.]_
+
+_Proof._ We use **h** to denote differential entropy. If _γi <_ 1 for all _i ∈_ [ _d_ ], then
+
+**==> picture [302 x 170] intentionally omitted <==**
+
+In addition, if _γi <_ 1 for all _i ∈_ [ _d_ ], then
+
+**==> picture [324 x 30] intentionally omitted <==**
+
+Applying Theorem 1, we complete the proof.
+
+B IMPLEMENTATION
+
+## B.0.1 EXTENSION TO IMPROVE SCALABILITY
+
+Instead of generating _w_ 1: _M_ ensemble every time step, _w_ 1: _M_ can be generated every _K_ steps to further improve scalability of the method. In this case, the reward model _f_ ( _wm,⌊ Kt[⌋]_[;] _[ b]_[(] _[ψ]_[;] _[ c, a]_[))][ represent a] posterior sample of the average reward of context-action pair _c, a_ in the current _K_ -step window. The sequence model,step rollouts to obtain _f_[seq] ( _ww_ ˆ _m,jm,j_[seq] +1[;] _[ w][m,j]_ and _[−] w[L]_ ˆ[+1:] _m,j[j]_ +2[)][ predicts] , the predictive model then predicts the average reward of _[ w][m,j]_[+1][.][Leveraging the sequence model for two] context-action pair _c, a_ in the current _K_ -step window conditioned on future reward by computing _f_[pred] ( _wm,_[pred] _⌊ K[t][⌋]_[;] _[w]_[ˆ] _[m,][⌊] K[t][⌋]_[+1] _[ ⊙][b]_[(] _[ψ]_[;] _[ c, a]_[))][.][The agent samples] _[ m][ ∼]_[unif][(] _[{]_[1] _[, . . . , M][}]_[)][ and takes action] with _At ∈_ arg max _a∈A f_[pred] ( _wm,_[pred] _⌊ K[t][⌋]_[;] _[w]_[ˆ] _[m,][⌊] K[t][⌋]_[+1] _[ ⊙][b]_[(] _[ψ]_[;] _[ c, a]_[))]
+
+## B.0.2 EXPERIMENT HYPERPARAMETERS
+
+NeuralPES’s training intervals for AR(1), Microsoft News and Kuai are set to 100, 200 and 1200 respectively. All NeuralPES agents use a lookback reward parameter window of 10.
+
+AR(1) Contextual Logistic Bandit Experiment Hyperparameters - Table 3
+
+16
+
+|Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
+|---|---|---|---|---|---|---|
+|Neural Ensemble|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
+|Window Neural Ensemble|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
+|Neural LinUCB|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
+|Window Neural LinUCB|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
+|Neural Linear|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
+|Window Neural Linear|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
+|NeuralPES|-50 - 25-|10,000|0.0001|GRU 1-layer, 25 hidden|0.05|-10-|
+
+Table 3: AR(1) Hyperparameter
+
+|Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
+|---|---|---|---|---|---|---|
+|Neural Ensemble|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
+|Window Neural Ensemble|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|Neural LinUCB|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
+|Window Neural LinUCB|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|Neural Linear|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
+|Window Neural Linear|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|NeuralPES|-256 - 128-|20,000|0.0001|GRU 1-layer, 128 hidden|0.05|-10-|
+
+Table 4: AR(1) Hyperparameter
+
+Microsoft News 1-Week Experiment Hyperparameters - Table 4 KuaiRed 2-Month Experiment Hyperparameters - Table 5
+
+|Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
+|---|---|---|---|---|---|---|
+|Neural Ensemble|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
+|Window Neural Ensemble|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|Neural LinUCB|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
+|Window Neural LinUCB|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|Neural Linear|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
+|Window Neural Linear|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
+|NeuralPES|-512 - 128-|20,000|0.0001|GRU 1-layer, 128 hidden|0.001|-10-|
+
+Table 5: AR(1) Hyperparameter
+
+17
+
diff --git a/open_review/iclr2024_8539.json b/open_review/iclr2024_8539.json
new file mode 100644
index 0000000000000000000000000000000000000000..db536b63883a9ef9981b35aeae25f387d279afaa
--- /dev/null
+++ b/open_review/iclr2024_8539.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8539",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Multi-Resolution Learning with DeepONets and Long Short-Term Memory Neural Networks",
+ "abstract": "Deep operator networks (DeepONets, DONs) offer a distinct advantage over traditional neural networks in their ability to be trained on multi-resolution data. This property becomes especially relevant in real-world scenarios where high-resolution measurements are difficult to obtain, while low-resolution data is more readily available. Nevertheless, DeepONets alone often struggle to capture and maintain dependencies over long sequences compared to other state-of-the-art algorithms.\nWe propose a novel architecture, named DON-LSTM, which extends the DeepONet with a long short-term memory network (LSTM). Combining these two architectures, we equip the network with explicit mechanisms to leverage multi-resolution data, as well as capture temporal dependencies in long sequences. We test our method on long-time-evolution modeling of multiple non-linear systems and show that the proposed multi-resolution DON-LSTM achieves significantly lower generalization error and requires fewer high-resolution samples compared to its vanilla counterparts.",
+ "rebuttal": "### Discussion reminder and summary of manuscript modifications\nWe sincerely thank the reviewers for their invaluable feedback that helped us improve our paper. We have incorporated the suggested improvements and updated our manuscript.\n\nThe most significant modifications: we further clarified our motivation for low-resolution training (Introduction), justified choosing the LSTM architecture (Section 2.2), clarified the reasoning behind the training procedure (Section 2.4), corrected the reported standard deviations of the aggregated results (Table 1), and included comparisons to the state of the art (Section 4.3 and Figure 3). The description of training data was moved to the Appendix due to space considerations.\n\nPlease let us know if there are any remaining questions we can address or if there are any additional clarifications required.\n\n### Response to Reviewer FcVp (1/3)\nWe want to thank the reviewer for the time and effort put into reviewing our paper. The insightful comments provided us with some invaluable suggestions on improving our paper, which we happily incorporated. Moreover, it was brought to our attention that certain aspects of our communication may not have been as clear as intended. We present the results of the suggested tests, as well as we clarify the questions raised. \n\n## Contribution and novelty\n\nWe want to emphasize that the primary contribution of our work lies in developing a robust framework to succes [...]\n\n### Response to Reviewer FcVp (2/3)\n## Other baselines\n\nWe have included the comparison to additional state-of-the-art methods for time series regression: a transformer model and a Fourier neural operator (FNO): https://i.imgur.com/jG6gr9A.png\n\nWe employed the FNO variant that contains four Fourier layers (modes=8, width=64) and employs Fourier convolutions through both space and time. The transformer model was composed of a dimension expansion layer (linear mapping), followed by a multi-head attention layer with positional encoding, a layer normalization, and three fully-connected layers.\n\nTh [...]\n\n### Response to Reviewer FcVp (3/3)\n## Obtaining low-resolution data points\n\nThe low-resolution points were obtained through downsampling of the high-resolution data with $\\Delta t_L = 5\\times \\Delta t_H$, where $t_L$ and $t_H$ were the resolution of the low- and high-resolution data, respectively. \n\nReducing the data resolution simulates many real-world scenarios where high-resolution data is scarce, while low-resolution data is more accessible. For example, high-resolution measurements may be more costly to obtain because they require more sophisticated equipment or increased experimentation [...]\n\n### Response to Reviewer LP9x\nWe wish to express our gratitude to the reviewer for dedicating their time and effort to review our paper. We greatly appreciate the received feedback, and it will certainly help us improve our manuscript. \n\n## Self-adaptive weights, learning rate\n\nFirstly, we want to address the comment about exploring the sensitivity to the learning rate of the self-adaptive weights in the loss function. In all experiments we chose fixed hyperparameter values, which we believe was the fairest way to compare our models. We equipped all the models with equal mechanisms that facili [...]\n\n### Response to Reviewer qWGe (1/2)\nWe extend our gratitude to the reviewer for dedicating their time and effort to the comprehensive review of our paper and the constructive feedback provided. We believe that addressing the reviewer's comments will significantly improve our manuscript. The paper will be revised shortly to align with the suggested improvements and clarify the points that were raised.\n\n## Low-resolution data as additional source of information\n\nRegarding the contribution of low-resolution data to the overall performance of our models: Low-resolution data serves as a useful sour [...]\n\n### Response to Reviewer qWGe (2/2)\n## Training procedure\n\nThe training procedure was defined with the strategy to first incorporate the low-resolution data in pre-training, capturing the general system's dynamics, followed by the use of the (limited) high-resolution data to fine-tune the weights to achieve high-resolution prediction. While we acknowledge the reviewer's suggestion to explore alternative training procedures, we want to highlight that our composed models trained with the current regime consistently outperformed their vanilla baselines. Consequently, we opted to not prioritize op [...]",
+ "initial_scores": [
+ 5,
+ 6,
+ 3
+ ],
+ "score_mean": 4.67,
+ "score_variance": 2.33,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "This paper introduces a new model architecture, DON-LSTM, designed to effectively model multi-resolution data while accounting for temporal dependencies. The proposed architecture harnesses the strengths of both LSTM and DeepONets, resulting in enhanced performance for long-time system evolutions. All reviewers have acknowledged the significance of the problem addressed in this paper. However, there still exist strong concerns about the extent of performance improvement (Reviewer FcVP and qWGe), the absence of theoretical justification (Reviewer FcVP and qWGe), and questions about the contribution’s significance in the fusion of DeepONets and LSTM (Reviewer FcVP). Considering the opinions from the reviewers, this paper still needs further revision and improvement.",
+ "forum_id": "nZ7rpEp6wj",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_LP9x",
+ "review_id": "CAsQlCRq1l",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 1274,
+ "edit_detected": true,
+ "edit_delta_seconds": 577860,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_qWGe",
+ "review_id": "M4aRL74dp9",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3558,
+ "edit_detected": true,
+ "edit_delta_seconds": 835581,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_FcVp",
+ "review_id": "9k9MnzH8gL",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 1,
+ "confidence": 4
+ },
+ "review_text_chars": 2635,
+ "edit_detected": true,
+ "edit_delta_seconds": 948522,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8539.md b/open_review/iclr2024_8539.md
new file mode 100644
index 0000000000000000000000000000000000000000..5fcf45358a6a1d567cece8060af32657096dfd50
--- /dev/null
+++ b/open_review/iclr2024_8539.md
@@ -0,0 +1,713 @@
+
+
+## MULTI-RESOLUTION LEARNING WITH DEEPONETS - AND LONG SHORT-TERM MEMORY NEURAL NET WORKS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Deep operator networks (DeepONets, DONs) offer a distinct advantage over traditional neural networks in their ability to be trained on multi-resolution data. This property becomes especially relevant in real-world scenarios where highresolution measurements are difficult to obtain, while low-resolution data is more readily available. Nevertheless, DeepONets alone often struggle to capture and maintain dependencies over long sequences compared to other state-of-the-art algorithms. We propose a novel framework that leverages multi-resolution data in training and provides precise models when dealing with limited high-resolution data. We achieve this through extending the DeepONet architecture with a long short-term memory network (LSTM), coined DON-LSTM, and training it in a three-step procedure that utilizes data of different levels of granularity. Combining these two architectures, we equip the network with explicit mechanisms to leverage multi-resolution data, as well as capture temporal dependencies in long sequences. We test our method on long-time-evolution modeling of multiple nonlinear systems and show that the proposed multi-resolution DON-LSTM achieves significantly lower generalization error and requires fewer high-resolution samples compared to its vanilla counterparts.
+
+## INTRODUCTION
+
+Modeling the temporal evolution of dynamical systems is of paramount importance across various scientific and engineering domains, including physics, biology, climate science, and industrial predictive maintenance. Creating such models enables future predictions and process optimization, and provides insights into the underlying mechanisms governing these systems.
+
+Nevertheless, obtaining precise and comprehensive data for modeling poses a challenge in practical contexts. Real-world scenarios bring along the issue of data limitations, where the costs associated with obtaining large scale, high-resolution data are often prohibitive, e.g., due to specific equipment or increased time required to obtain high-resolution measurements, significant computational costs to perform high-fidelity simulations, or even limited bandwidth of satellite observations. Moreover, historical data may be maintained with reduced granularity due to storage considerations, while in other scenarios, legacy data may be available after an outdated technology is replaced, e.g., resulting in vast amounts of low-resolution sensor data but only limited amounts of high-resolution data.
+
+In such cases, data originating from various sources with differing levels of granularity presents both a challenge and opportunity. While low-resolution data may lack the precision required to learn high-resolution models, it can be exploited by deep learning models to capture general patterns and dynamics that govern the system at hand, and increase the representativeness of the training sample. Multi-resolution learning algorithms serve as a solution for effectively integrating information from data collected over diverse temporal and spatial scales. Beyond addressing data availability constraints, multi-resolution methods can offer a reduction of computational costs during training, initially leveraging only lower-resolution data to capture general dynamics, and subsequently finetuning the models on high-resolution data.
+
+To this end, several approaches have been proposed to tackle multi-resolution, multi-scale, or discretization-invariant learning. Among these, a natural framework that has gained prominence
+
+1
+
+is neural operators, which are neural networks that learn mappings between function spaces, e.g., DeepONet, Fourier neural operator and others (Lu et al., 2021; Li et al., 2020; Cao et al., 2023; Wang & Golland, 2022; Ronneberger et al., 2015; Seidman et al., 2022). Alternative methods for multi-resolution learning include encoder-decoder-based architectures (Ong et al., 2022; Aboutalebi et al., 2022), graph and message-passing networks (Equer et al., 2023; Liu et al., 2021), and combinations of the above (Yang et al., 2022). In a related vein, another body of research deals with conceptually similar multi-fidelity learning in DeepONets, which tackles the problem of combining data of varying quality, where high-quality samples are sparse (Lu et al., 2022b; Howard et al., 2022; De et al., 2023).
+
+In this work, we approach multi-resolution learning through the innate discretization-invariance property of DeepONets. We further propose a new architecture, DON-LSTM, which extends the architecture of the DeepONet with a long short-term memory network (LSTM), in order to capture temporal patterns in sequential outputs of the DeepONet. The main purpose of combining these two architectures is to leverage data of different resolutions in training, effectively increasing the feasible training set, as well as to assist the modeling of time-dependent evolution through explicit mechanisms of the LSTM.
+
+The remainder of this paper is structured as follows. First, we formulate the learning problem at hand. Next, we describe our proposed architecture and the training procedure. Finally, we present and discuss our experimental results on four non-linear partial differential equations (PDEs) and lowand high-resolution training sets of various sizes. Our main findings show that our proposed multiresolution DON-LSTM achieves lower generalization error than its single-resolution counterparts, which require a much larger high-resolution sample size in order to achieve similar precision.
+
+## 1 PROBLEM STATEMENT
+
+In this study, we learn the operator _N_ that defines the evolution of a system over time starting from any given initial condition, i.e.:
+
+**==> picture [257 x 12] intentionally omitted <==**
+
+where _u_ ( _x, t_ = 0) is the function defining the initial condition and _G_ ( _u_ ( _y_ )) is the operator describing the evolution over time for any _y_ = ( _x, t_ ), where _x_ and _t_ are the spatial and temporal coordinates of the system’s trajectory.
+
+In practice, _G_ ( _u_ ( _y_ )) is observed at discretized fixed locations _{_ ( _x_ 1 _, t_ 1) _, ...,_ ( _xm, tn_ ) _}_ , resulting in a vector [ _u_ ( _x_ 1 _, t_ 1) _, ..., u_ ( _xm, tn_ )] _∈_ R _[m][×][n]_ where _m_ is the total number of spatial discretization points and _n_ is the total number of temporal discretization points that define the full trajectory. For the purpose of this study, we assume that for each system we have two datasets:
+
+- High-resolution set _DH_ with _NH_ samples of time resolution ∆ _tH_ ,
+
+- Low-resolution set _DL_ of size _NL_ samples of time resolution ∆ _tL_ .
+
+For the four considered PDE-based examples in this work, we set _NH_ = 4 _× NL_ and ∆ _tL_ = 5 _×_ ∆ _tH_ , while the spatial discretization is the same in both datasets. The multi-resolution network is trained on both datasets. The sizes of the training data are dependent on the complexity of the problem.
+
+## 2 PROPOSED MULTI-RESOLUTION DON-LSTM (OURS)
+
+The schematic representation of the proposed architecture is shown in Figure 1. The architecture consists of a DeepONet followed by a reshaping layer, an LSTM layer, and a final feed-forward layer which brings the output back to the predefined spatial dimension of the solution. The architecture is set up such that the DeepONet outputs are fed as inputs to the LSTM. The DeepONet approximates the solution at locations that are determined by its inputs, which enables the initial discretizationinvariant training. During the training of the LSTM, we impose the sequential nature of the outputs through these inputs and use the LSTM to process them as temporal sequences.
+
+2
+
+**==> picture [378 x 119] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Concatenated outputs Branch Reshaped outputs Trunk Neural operator (DeepONet) Data post-processing Recurrent neural network **----- End of picture text -----**
+
+Figure 1: The proposed architecture. In the first phase, the DeepONet maps the solution operator from the initial condition _ut_ =0 to solutions at later timesteps. During the DeepONet training, the output _u_ can be defined at arbitrary temporal locations. In the next two training stages, the outputs must have a fixed time interval ∆ _t_ to be compatible with the LSTM. The DeepONet output solutions are reshaped to be represented in a temporally sequential manner and processed by an LSTM. The LSTM lifts the dimension to the specified number of neurons and returns all hidden states. The last layer is a fully-connected dense layer bringing the embedding to the original size of the solution.
+
+## 2.1 DEEP OPERATOR NETWORK (DEEPONET)
+
+The DeepONet is an architecture based on the universal approximation theorem for operators (Chen & Chen, 1995) which combines the outputs of two deep neural networks (the ”branch” and ”trunk” networks). It is formulated as (Lu et al., 2021):
+
+**==> picture [315 x 37] intentionally omitted <==**
+
+where _bk_ and _tk_ denote the output embeddings of the branch and the trunk network, respectively, and _⊙_ denotes the element-wise multiplication of the outputs of the two networks. The inputs to the branch network are the initial conditions, _u_ ( _t_ = 0), discretized at _m_ spatial sensor locations _{x_ 1 _, x_ 2 _, . . . , xm}_ , and for the trunk network they are the locations, _y_ = ( _x, t_ ), at which the operator _G_ ( _u_ ) is evaluated. Additionally, the trunk network can incorporate periodic boundary conditions through simple feature expansion that consists of applying Fourier basis on the provided spatial locations, i.e., _x →_ cos([2] _P[πx]_[)][, and] _[ x][ →]_[sin(][2] _P[πx]_[)][, where] _[ P]_[is the period (Lu et al., 2022a).]
+
+## 2.2 LONG SHORT-TERM MEMORY NETWORK (LSTM)
+
+LSTM is a type of recurrent neural network (RNN) that was designed to maintain short-term dependencies over long sequences. RNNs in general are a class of specialized neural networks for sequence processing. RNNs employ a hidden state, which persists as the network iterates through data sequences and propagates the information from the previous states forward. LSTMs were developed as an extension to RNNs, aimed at mitigating the problem of vanishing gradients encountered in RNNs. Vanishing gradients occur in long sequences, as the hidden state is updated at every timestep, which leads to a large number of multiplications causing the gradients to approach zero. To address this, LSTM is equipped with a set of gates: the _input gate_ regulates the inflow of new information to the maintained hidden state, the _forget gate_ determines what proportion of the information should be discarded, and the _output gate_ controls the amount of information carried forward.
+
+The choice of the LSTM was especially suitable for our study as our training data were numerical PDE solutions integrated over long time, meaning that each consecutive solution was fully determined by its preceding state. Moreover, we opted to use the LSTM to limit susceptibility to error accumulation, since it directly approximates longer sequences, as opposed to one- or few-stepsahead prediction methods (Zeng et al., 2023).
+
+3
+
+## 2.3 SELF-ADAPTIVE LOSS FUNCTION
+
+In solving time-dependent PDEs, the main challenge lies in preserving the precision of the modeled solution over a long-time horizon. Introducing appropriately structured non-uniform penalization parameters can address this aspect. In all the experiments, we equip the networks with self-adaptive weights in the loss function, first introduced by McClenny & Braga-Neto (2020), which adapt during training and force the network to focus on the most challenging regions of the solution. We take the inspiration from Kontolati et al. (2022), where in turn self-adaptive weights considerably improve the accuracy prediction of discontinuities or non-smooth features in the solution. The self-adaptive weights are defined for every spatial and temporal location, and they are updated along with the network parameters during optimization. Specifically, the training loss is defined as:
+
+**==> picture [293 x 30] intentionally omitted <==**
+
+ˆ ˆ where ( _u_ ( _xi, ti_ ) _− u_ ( _xi, ti_ ))[2] is the squared error between the reference _u_ and predicted value _u_ , and _g_ ( _λ_ ) is a non-negative, strictly increasing self-adaptive mask function, and _**λ**_ = _{λ_ 1 _, λ_ 2 _, · · · λj}_ are _j_ self-adaptive parameters, and _j_ is the total number of evaluation points. Typically, in a neural network, we minimize the loss function with respect to the network parameters, _**θ**_ . However, in this approach, we additionally maximize the loss function with respect to the trainable hyper-parameters using a gradient descent/ascent procedure. The modified objective function is defined as:
+
+**==> picture [236 x 15] intentionally omitted <==**
+
+**==> picture [398 x 24] intentionally omitted <==**
+
+where _η_ _**λ**_ is the learning rate of the self-adaptive weights and
+
+**==> picture [283 x 15] intentionally omitted <==**
+
+Therefore, if _g_ ( _λi_ ) _>_ 0, _∇λiL_ would be zero only if the term ( _ui_ ( _ξ_ ) _−Gθ_ ( **v** _i_ )( _ξ_ )) is zero. In this work, the self-adaptive weights are normalized to sum up to one after each epoch. The weights _λ_ are updated alongside the weights of the network during training.
+
+## 2.4 TRAINING PROCEDURE
+
+The training procedure was defined with the strategy to first incorporate the low-resolution data in pre-training, capturing the general system’s dynamics and increasing the representative training sample, followed by the use of the limited high-resolution data to fine-tune the weights to achieve high-resolution prediction.
+
+In our approach, we propose a three-step procedure:
+
+1. First, we exploit the information provided by the low-resolution data with the DeepONet. This step can be seen as pre-training during which the model captures the general patterns governing the modelled system, while providing the model with a more representative sample of the overall data distribution, which may not be available at the target, high resolution.
+
+2. Next, we extend this network with the mechanisms suitable for the underlying data (here, the LSTM mechanisms to capture short-term dependencies in long sequences). During this phase, we tune the weights of the LSTM with the high-resolution data to increase the model’s precision. At the same time, we keep the weights of the DeepONet unchanged, which prevents the LSTM from overfitting to the small high-resolution sample and ensures that the DeepONet preserves the general system’s dynamics.
+
+3. Finally, we gently fine-tune the whole architecture with a small learning rate. This step adjusts the DeepONet weights to potentially also capture some of the finer-grained characteristics of the system.
+
+Training is performed iteratively over a predefined number of epochs and in minibatches, i.e., in each epoch the training data is divided into multiple smaller subsets. After calculating the loss on each batch, the gradients are calculated w.r.t. the loss function and the trainable network parameters (weights) are updated. The optimization is performed using the Adam optimizer and a predefined learning rate. The training procedure is also described in Algorithm 1.
+
+4
+
+## **Algorithm 1** DON-LSTM training procedure.
+
+- 1: **Step 1:** DEEPONET TRAINING( _**θ** DON_ , _DL_ , _lr_ 1, _nfreq_ )
+
+- 2: Initialize _**θ** DON_ .
+
+- 3: Iteratively update _**θ** DON_ on _DL_ with learning rate _lr_ 1, save at every _nfreq_ epochs.
+
+- 4: Compute MSE loss on predictions for validation data.
+
+- 5: Choose _**θ** DONi_ with the lowest loss.
+
+- 6: **Step 2:** LSTM TRAINING( _**θ** LST M_ , _**θ** DON_ , _DH_ , _lr_ 1, _nfreq_ )
+
+- 7: Extend DeepONet with reshaping and LSTM layers.
+
+- 8: Initialize _**θ** LST M_ .
+
+- 9: Freeze _**θ** DON_ as non-trainable.
+
+- 10: Iteratively update _**θ** LST M_ on _DH_ with learning rate _lr_ 1, save at every _nfreq_ epochs.
+
+- 11: Compute MSE loss on predictions for validation data.
+
+- 12: Choose _**θ** LST M_ with the lowest loss.
+
+- 13: **Step 3:** DON-LSTM TRAINING( _**θ** LST M_ , _**θ** DON_ , _DH_ , _lr_ 2, _nfreq_ ) 14: Unfreeze _**θ** DON_ as trainable.
+
+- 15: Iteratively update _**θ** LST M_ on _DH_ with learning rate _lr_ 2 _< lr_ 1, save at every _nfreq_ epochs. 16: Compute MSE loss on predictions for validation data.
+
+- 17: Choose _**θ** LST M_ with the lowest loss.
+
+## 3 PROBLEMS CONSIDERED AND DATA GENERATION
+
+The performance of the proposed multi-resolution models is showcased on four infinite-dimensional non-linear dynamical systems. The numerical solutions to the Korteweg–de Vries, Benjamin–Bona– Mahony and Cahn–Hilliard equations were obtained through schemes that are second order in both space and time; the equations are spatially discretized using central finite differences and integrated in time using the implicit midpoint method. The solutions of the Burgers’ equation were generated using PDEBench (Takamoto et al., 2022). All PDEs are evaluated on the one-dimensional spatial domain Ω= [0 _, P_ ], for different _P_ , with periodic boundary conditions _u_ ( _P, t_ ) = _u_ (0 _, t_ ) for all _t ≥_ 0. The training set for each PDE consists of data obtained from _N_ = _NH_ + _NL_ different initial conditions integrated over time _t_ = _T_ with step size ∆ _t_ . The PDEs are described in Appendix A, where example data are visualized in Figure 4, and details of the time and space domains are given in Table 2.
+
+## 4 EXPERIMENTAL RESULTS
+
+We compare the performance of our multi-resolution DON-LSTM against five benchmark networks discussed in section 3 using the relative squared error (RSE), the mean average error (MAE) and the root mean squared error (RMSE), described in Appendix E. The average values of these error metrics are presented in Table 1, and the log values of RSE against the increasing number of highresolution training samples are shown in Figure 2. Each of the six models is tested on five random weight initializations, four to five different training data sizes, and four problems. Due to space considerations, detailed tables with the evaluation of the models trained on distinct sample sizes are available in Appendix B. All evaluations are performed on high-resolution test samples of size _Ntest_ = 1000.
+
+## 4.1 BENCHMARK MODELS
+
+The benchmark models used to evaluate the performance of the multi-resolution DON-LSTM (DON-LSTM ( _DH_ , _DL_ )) are the following:
+
+- **DON (** _DL_ **)** : The vanilla DeepONet trained on _NL_ low-resolution data,
+
+- **DON (** _DH_ **)** : The vanilla DeepONet trained on _NH_ high-resolution data,
+
+- **DON (** _DH , DL_ **)** : The vanilla DeepONet trained on _NL_ + _NH_ multi-resolution data (both datasets),
+
+5
+
+- **LSTM (** _DH_ **)** : An architecture trained on _NH_ high-resolution data, consisting of one dense layer lifting the input to a dimension [-1, _mn_ ], a reshaping layer (into [-1, _m_ , _n_ ]) followed by an LSTM layer, where _m_ is the spatial and _t_ is the temporal dimension,
+
+- **DON-LSTM (** _DH_ **)** : The proposed architecture trained only on _NH_ high-resolution data.
+
+The models vary by the amount and granularity of the training data. We take advantage of the discretization-invariance of deep neural operators and train the vanilla DeepONet and DON-LSTM on multi-resolution data (in the case of DON-LSTM only the DeepONet layers are trained with multi-resolution). In this problem formulation, the LSTM implicitly learns ∆ _t_ and therefore has to be trained at the resolution used in testing (here, high-resolution). In the following, we refer to specific models by the data resolution used in their training and the models’ name, e.g., _high-resolution DON_ . In all experiments we chose fixed hyperparameter values and equipped all the models with equal mechanisms that facilitate learning (e.g., self-adaptive weights in the loss function). Moreover, we refrained from fine-tuning the hyperparameters of any particular model.
+
+## 4.2 GENERALIZATION PERFORMANCE
+
+We evaluate the performance of our models grouping them by the number of samples used in their training (Figure 2). As expected, increasing the sample size leads to a reduction in the generalization error for all models. In nearly all cases, we also see that the multi-resolution DON-LSTM achieves the lowest error, followed by the multi-resolution DON for the KdV, BBM and Cahn–Hilliard equations, and the high-resolution LSTM for the Burgers’ equation.
+
+Our main findings can be summarized into the following:
+
+1. The multi-resolution DON-LSTM generally achieves the lowest generalization error out of the five benchmarks.
+
+2. In order to achieve similar accuracy with single-resolution methods (such as the vanilla LSTM) we need significantly more high-resolution training samples than for multiresolution DON-LSTM. For example, in case of the KdV equation, _RSE ≈_ 0 _._ 09 is achieved by the multi-resolution DON-LSTM with _NH_ = 250, while the LSTM requires _NH_ = 750 (where _NH_ is the number of high-resolution samples).
+
+3. In multiple cases the DON trained on larger amount of lower-resolution data obtains better results than the DON trained on fewer samples of high-resolution data.
+
+4. While the DeepONet itself achieves reasonable performance, the time-dependent architecture is crucial for capturing long-time dynamics, as is evident by the superior performance of DON-LSTM and the vanilla LSTM.
+
+## 4.3 COMPARISON WITH STATE-OF-THE-ART
+
+To provide a broader understanding of our method’s performance, we included the comparison to additional state-of-the-art methods for long time series prediction: a transformer model and a Fourier neural operator (FNO). We employed the FNO variant that contains four Fourier layers ( _modes_ = 8, _width_ = 64) and employs Fourier convolutions through both space and time. The transformer model was composed of a dimension expansion layer (linear mapping), followed by a multi-head attention layer with positional encoding, a layer normalization, and three fully-connected layers.
+
+The multi-resolution DON-LSTM exhibited superior performance over the transformer model on all testing examples, which we attribute to the limited benefit of long-time dependencies for our data. The multi-resolution DON-LSTM also outperformed the FNO tested on the Burgers’ and Cahn– Hilliard equations, while the FNO was best on Korteweg–de Vries and Benjamin–Bona–Mahony equations.
+
+- 5 DISCUSSION
+
+In all our experiments, the multi-resolution DON-LSTM achieved the lowest generalization error, while requiring fewer high-resolution training samples than its benchmarks. This advantage stems
+
+6
+
+|**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
+|---|---|---|---|---|---|---|
+|||**Korteweg–de Vries equation**|||||
+|**DON**|∆_t_= 0_._025||(high)|0.190_±_0.007|0.321_±_0.005|0.333_±_0.010|
+|**DON**|∆_t_= 0_._125||(low)|0.094_±_0.005|0.189_±_0.006|0.125_±_0.007|
+|**DON**|∆_t_=_{_0_._025_,_0_._125_}_||(multi)|0.083_±_0.005|0.175_±_0.005|0.105_±_0.005|
+|**DON-LSTM**|∆_t_= 0_._025||(high)|0.086_±_0.013|0.168_±_0.024|0.113_±_0.028|
+|**DON-LSTM**|∆_t_=_{_0_._025_,_0_._125_}_||(multi)|**0.042**_±_**0.002**|0.122_±_0.010|0.049_±_0.008|
+|**LSTM**|∆_t_= 0_._025||(high)|0.067_±_0.003|0.200_±_0.003|0.133_±_0.004|
+|**FNO**|∆_t_= 0_._025||(high)|0.049_±_0.002|**0.111**_±_**0.005**|**0.042**_±_**0.004**|
+|**Transformer**|∆_t_= 0_._025||(high)|0.091_±_0.002|0.221_±_0.006|0.170_±_0.009|
+|||**Viscous Burgers’ equation**|||||
+|**DON**|∆_t_= 0_._01||(high)|0.114_±_0.001|0.168_±_0.002|0.070_±_0.001|
+|**DON**|∆_t_= 0_._05||(low)|0.089_±_0.001|0.132_±_0.001|0.043_±_0.001|
+|**DON**|∆_t_=_{_0_._01_,_|0_._05_}_|(multi)|0.087_±_0.001|0.129_±_0.001|0.044_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._01||(high)|0.111_±_0.003|0.186_±_0.005|0.087_±_0.004|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_|0_._05_}_|(multi)|**0.049**_±_**0.002**|**0.092**_±_**0.003**|**0.022**_±_**0.001**|
+|**LSTM**|∆_t_= 0_._01||(high)|0.059_±_0.002|0.110_±_0.001|0.032_±_0.001|
+|**FNO**|∆_t_= 0_._01||(high)|0.078_±_0.002|0.118_±_0.002|0.038_±_0.001|
+|**Transformer**|∆_t_= 0_._01||(high)|0.133_±_0.004|0.210_±_0.005|0.112_±_0.005|
+|||**Benjamin–Bona–Mahony equation**|||||
+|**DON**|∆_t_= 0_._075||(high)|0.278_±_0.014|0.533_±_0.016|0.118_±_0.007|
+|**DON**|∆_t_= 0_._375||(low)|0.091_±_0.006|0.227_±_0.007|0.021_±_0.001|
+|**DON**|∆_t_=_{_0_._075_,_0_._375_}_||(multi)|0.077_±_0.007|0.191_±_0.011|0.016_±_0.002|
+|**DON-LSTM**|∆_t_= 0_._075||(high)|0.104_±_0.023|0.264_±_0.056|0.033_±_0.013|
+|**DON-LSTM**|∆_t_=_{_0_._075_,_0_._375_}_||(multi)|**0.045**_±_**0.003**|0.151_±_0.022|0.010_±_0.003|
+|**LSTM**|∆_t_= 0_._075||(high)|0.107_±_0.010|0.332_±_0.012|0.044_±_0.003|
+|**FNO**|∆_t_= 0_._075||(high)|0.054_±_0.004|**0.100**_±_**0.007**|**0.005**_±_**0.001**|
+|**Transformer**|∆_t_= 0_._075||(high)|0.130_±_0.006|0.355_±_0.015|0.057_±_0.004|
+|||**Cahn–Hilliard equation**|||||
+|**DON**|∆_t_= 0_._02||(high)|0.041_±_0.002|0.068_±_0.002|0.018_±_0.001|
+|**DON**|∆_t_= 0_._1||(low)|0.038_±_0.003|0.056_±_0.004|0.013_±_0.002|
+|**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.018_±_0.001|0.031_±_0.002|0.004_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._02||(high)|0.076_±_0.009|0.137_±_0.014|0.075_±_0.015|
+|**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.014**_±_**0.001**|**0.027**_±_**0.002**|**0.003**_±_**0.001**|
+|**LSTM**|∆_t_= 0_._02||(high)|0.016_±_0.001|0.036_±_0.001|0.005_±_0.000|
+|**FNO**|∆_t_= 0_._02||(high)|0.022_±_0.001|0.037_±_0.001|0.005_±_0.000|
+|**Transformer**|∆_t_= 0_._02||(high)|0.029_±_0.001|0.061_±_0.001|0.015_±_0.000|
+
+Table 1: The mean and the standard deviation of the prediction errors of all models. Each reported value aggregates the mean error values across all models trained on different sample sizes, where each model has been trained five times (i.e., the mean and standard deviation of the values reported in Appendix B).
+
+from the combination of two factors: the utilization of a larger training dataset, which encompasses both high- and low-resolution samples, and the integration of LSTM mechanisms that facilitate capturing the temporal evolution of the systems. The inclusion of low-resolution data in early training contributes to the improvement of the prediction, as seen in the superior performance of multi-resolution DON-LSTM as compared to the vanilla LSTM and single-resolution DON-LSTM, as well as the superior performance of the multi-resolution DON in comparison to both singleresolution DONs. As evidenced by this result, the LSTM and DON-LSTM networks are not able to effectively capture the mechanisms that govern the data without the low-resolution data pre-training.
+
+Additionally, we specifically observe that the inclusion of LSTM mechanisms is beneficial, as evidenced by the multi-resolution DON-LSTM outperforming the vanilla DON trained on multiresolution data.
+
+7
+
+**==> picture [397 x 213] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Korteweg de Vries Viscous Burgers' 10 1 10 1 10 2 10 2 NH: 250 500 750 1000 NH: 100 250 400 550 700 NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800 Benjamin Bona Mahony Cahn Hilliard 10 1 10 1 10 2 10 2 10 3 10 3 NH: 250 500 750 1000 NH: 250 500 750 1000 NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000 Number of training points of high (NH) and low (NL) resolution DON (DH) DON (DL) DON (DH, DL) LSTM (DH) DON-LSTM (DH) DON-LSTM (DH, DL) 2)yi )2) y (yi (yi n 1 n i = 0log(RSE) = log(n 1 n i = 0 **----- End of picture text -----**
+
+Figure 2: Model performance vs. amount of training samples. The _y_ -axis shows the relative squared error (log values) for predictions on high-resolution test data, while the _x_ -axis indicates the number of high- and low-resolution training samples. The figure compares the performance of three models: DON (red) and DON-LSTM (blue, with light-blue for multi-resolution) and LSTM (green), with variations of training data denoted by _D_ □ and the line pattern ( _DH_ and solid line for high-resolution, _DL_ and dotted line for low-resolution, and _DH_ , _DL_ and dash-dotted line for multi-resolution). The error bars indicate the 95% confidence interval calculated over the five trained models (two standard deviations of the error). See Appendix B, Figure 5 for the absolute RSE values.
+
+When low-resolution data was not used in training, the comparison between the architectures was inconclusive, i.e., the high-resolution DON-LSTM outperformed its vanilla counterparts only in two experiments. We attribute it to the fact that DON-LSTM is comprised of a larger number of parameters, and a small training sample is not sufficient to effectively train the network, leading to under/over-fitting. We can also see that the vanilla DON struggles with adjusting all its parameters on a small sample, which becomes apparent through the fact that the model trained on a low-resolution data achieves better performance than when trained on the high-resolution data (regardless of being tested on high-resolution). This means that the inclusion of low-resolution data in early training is essential for the good performance of the proposed architecture.
+
+## 6 LIMITATIONS AND FUTURE WORK
+
+While DeepONets possess the discretization-invariance property in the output function, they require the input data to be defined at fixed locations. This problem is addressed in the literature through the employment of an encoder-decoder architecture integrated with the DeepONet (Ong et al., 2022; Zhang et al., 2022). We also note that the framework that is limited to discretization-invariant output is sufficient for applications where the system behaviour is modeled from a single-resolution input, e.g., an initial condition. For cases when multi-resolution input is desired, we highlight the existence of other neural operator architectures such as the Fourier neural operator (Li et al., 2020), or the Laplace neural operator (Cao et al., 2023).
+
+In addition, we note that LSTM is specifically suited and limited to sequential data, best capturing short-term dependencies. We see this as an opportunity for future studies, in which the DeepONet can be extended with architectures appropriate for different types of data, for example convolutional neural networks in case of image data, or transformers for data governed by long-term dependencies and global temporal patterns.
+
+8
+
+**==> picture [396 x 214] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Korteweg de Vries Viscous Burgers' 10 1 10 1 10 2 NH: 250 500 750 1000 NH: 100 250 400 550 700 NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800 Benjamin Bona Mahony Cahn Hilliard 10 1 10 2 10 2 10 3 10 3 NH: 250 500 750 1000 NH: 250 500 750 1000 NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000 Number of training points of high (NH) and low (NL) resolution DON-LSTM (DH, DL) LSTM (DH) Transformer (DH) FNO (DH) 2)yi )2) y (yi (yi n 1 n i = 0log(RSE) = log(n 1 n i = 0 **----- End of picture text -----**
+
+Figure 3: Model performance vs. amount of training samples. The _y_ -axis shows the relative squared error (log values) for predictions on high-resolution test data, while the _x_ -axis indicates the number of high- and low-resolution training samples. The figure compares the performance of four models: multi-resolution DON-LSTM (blue), LSTM (green), transformer (black), and FNO (orange), with variations of training data denoted by _D_ □ and the line pattern ( _DH_ and solid line for highresolution, and _DH_ , _DL_ and dash-dotted line for multi-resolution). The error bars indicate the 95% confidence interval calculated over the five trained models (two standard deviations of the error). See Appendix B, Figure 6 for the absolute RSE values.
+
+## 7 CONCLUSIONS
+
+Our proposed multi-resolution framework seamlessly integrates the strengths of its two composites: the discretization invariance of the DeepONet and the improved sequential learning with the memory-preserving mechanisms of the LSTM. We have demonstrated that these properties can be leveraged to incorporate multi-resolution data in training, as well as to capture the intricate dynamics of time-dependent systems, leading to significantly improved predictive accuracy in modeling of the systems’ evolution over long-time horizons. Our experiments clearly demonstrate the efficacy of our approach in creating accurate, high-resolution models even with limited training data available at fine-grained resolution. Moreover, the synergistic effect of our proposed architecture makes it an apt choice for real-world scenarios, promising substantial enhancements in prediction quality. This work not only advances the understanding and utilization of multi-resolution data in sequential analysis but also provides valuable insights for future research and applications.
+
+## 8 REPRODUCIBILITY
+
+The code for reproducing the results is available in anonymous GitHub repository. The code includes the default parameters to generate the models and the data processing pipeline used in this paper. The details of the used architectures, training setup and data processing steps are also specified in Appendix C and Appendix D.
+
+## REFERENCES
+
+- Hossein Aboutalebi, Maya Pavlova, Hayden Gunraj, Mohammad Javad Shafiee, Ali Sabri, Amer Alaref, and Alexander Wong. MEDUSA: Multi-scale encoder-decoder self-attention deep neural network architecture for medical image analysis. _Frontiers in Medicine_ , 8:2891, 2022.
+
+- Harry Bateman. Some Recent Researches on the Motion of Fluids. _Monthly Weather Review_ , 43(4): 163–170, 1915.
+
+9
+
+- T. B. Benjamin, J. L. Bona, and J. J. Mahony. Model equations for long waves in nonlinear dispersive systems. _Philos. Trans. Roy. Soc. London Ser. A_ , 272(1220):47–78, 1972. ISSN 0080-4614.
+
+- Johannes Martinus Burgers. A mathematical model illustrating the theory of turbulence. _Advances in applied mechanics_ , 1:171–199, 1948.
+
+- John W Cahn and John E Hilliard. Free Energy of a Nonuniform System. I. Interfacial Free Energy. _J. Chem. Phys._ , 28(2):258–267, 1958.
+
+- Qianying Cao, Somdatta Goswami, and George Em Karniadakis. LNO: Laplace Neural Operator for Solving Differential Equations. _arXiv preprint arXiv:2303.10528_ , 2023.
+
+- Tianping Chen and Hong Chen. Universal approximation to nonlinear operators by neural networks with arbitrary activation functions and its application to dynamical systems. _IEEE Transactions on Neural Networks_ , 6(4):911–917, 1995.
+
+- Subhayan De, Matthew Reynolds, Malik Hassanaly, Ryan N King, and Alireza Doostan. Bi-fidelity modeling of uncertain and partially unknown systems using DeepONets. _Computational Mechanics_ , 71(6):1251–1267, 2023.
+
+- L´eonard Equer, T Konstantin Rusch, and Siddhartha Mishra. Multi-scale message-passing neural PDE solvers. _arXiv preprint arXiv:2302.03580_ , 2023.
+
+- Amanda A Howard, Mauro Perego, George E Karniadakis, and Panos Stinis. Multifidelity Deep Operator Networks. _arXiv preprint arXiv:2204.09157_ , 2022.
+
+- Katiana Kontolati, Somdatta Goswami, Michael D Shields, and George Em Karniadakis. On the influence of over-parameterization in manifold based surrogates and deep neural operators. _arXiv preprint arXiv:2203.05071_ , 2022.
+
+- Diederik Johannes Korteweg and Gustav De Vries. XLI. On the change of form of long waves advancing in a rectangular canal, and on a new type of long stationary waves. _The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science_ , 39(240):422–443, 1895.
+
+- Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier Neural Operator for Parametric Partial Differential Equations, 2020.
+
+- Wenzhuo Liu, Mouadh Yagoubi, and Marc Schoenauer. Multi-resolution graph neural networks for PDE approximation. In _Artificial Neural Networks and Machine Learning–ICANN 2021: 30th International Conference on Artificial Neural Networks, Bratislava, Slovakia, September 14–17, 2021, Proceedings, Part III 30_ , pp. 151–163. Springer, 2021.
+
+- Lu Lu, Pengzhan Jin, Guofei Pang, Zhongqiang Zhang, and George Em Karniadakis. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. _Nature Machine Intelligence_ , 3(3):218–229, mar 2021. doi: 10.1038/s42256-021-00302-5.
+
+- Lu Lu, Xuhui Meng, Shengze Cai, Zhiping Mao, Somdatta Goswami, Zhongqiang Zhang, and George Em Karniadakis. A comprehensive and fair comparison of two neural operators (with practical extensions) based on FAIR data. _Computer Methods in Applied Mechanics and Engineering_ , 393:114778, 2022a.
+
+- Lu Lu, Rapha¨el Pestourie, Steven G Johnson, and Giuseppe Romano. Multifidelity deep neural operators for efficient learning of partial differential equations with application to fast inverse design of nanoscale heat transport. _Physical Review Research_ , 4(2):023210, 2022b.
+
+- Levi McClenny and Ulisses Braga-Neto. Self-adaptive physics-informed neural networks using a soft attention mechanism. _arXiv preprint arXiv:2009.04544_ , 2020.
+
+- Yong Zheng Ong, Zuowei Shen, and Haizhao Yang. IAE-Net: Integral autoencoders for discretization-invariant learning. _arXiv preprint arXiv:2203.05142_ , 2022.
+
+- D Howell Peregrine. Calculations of the development of an undular bore. _Journal of Fluid Mechanics_ , 25(2):321–330, 1966.
+
+10
+
+- O. Ronneberger, P.Fischer, and T. Brox. U-Net: Convolutional Networks for Biomedical Image Segmentation. In _Medical Image Computing and Computer-Assisted Intervention (MICCAI)_ , volume 9351 of _LNCS_ , pp. 234–241. Springer, 2015.
+
+- Jacob Seidman, Georgios Kissas, Paris Perdikaris, and George J Pappas. NOMAD: Nonlinear manifold decoders for operator learning. _Advances in Neural Information Processing Systems_ , 35: 5601–5613, 2022.
+
+- Makoto Takamoto, Timothy Praditia, Raphael Leiteritz, Daniel MacKinlay, Francesco Alesiani, Dirk Pfl¨uger, and Mathias Niepert. PDEBench: An extensive benchmark for scientific machine learning. _Advances in Neural Information Processing Systems_ , 35:1596–1611, 2022.
+
+Clinton Wang and Polina Golland. Discretization-Invariant Learning on Neural Fields. 2022.
+
+- Zhishuang Yang, Yidao Dong, Xiaogang Deng, and Laiping Zhang. AMGNET: Multi-scale graph neural networks for flow field prediction. _Connection Science_ , 34(1):2500–2519, 2022.
+
+- Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In _Proceedings of the AAAI conference on artificial intelligence_ , volume 37, pp. 11121–11128, 2023.
+
+- Jiahao Zhang, Shiqi Zhang, and Guang Lin. MultiAuto-DeepONet: A Multi-resolution Autoencoder DeepONet for Nonlinear Dimension Reduction, Uncertainty Quantification and Operator Learning of Forward and Inverse Stochastic Problems. _arXiv preprint arXiv:2204.03193_ , 2022.
+
+11
+
+## A PARTIAL DIFFERENTIAL EQUATIONS DATA
+
+## A.1 KORTEWEG–DE VRIES EQUATION
+
+The Korteweg–de Vries (KdV) equation (Korteweg & De Vries, 1895) is a non-linear dispersive PDE that describes the evolution of small-amplitude, long-wavelength systems in a variety of physical settings, such as shallow water waves, ion-acoustic waves in plasmas, and certain types of nonlinear optical waves. We consider a one-dimensional unforced case, which is given by:
+
+**==> picture [253 x 23] intentionally omitted <==**
+
+where _u_ := _u_ ( _x, t_ ) is the height of the wave at position _x_ at time _t_ , and _η_ = 6 and _γ_ = 1 are chosen real-valued scalar parameters.
+
+The initial conditions are each a sum of two solitons (solitary waves), _i.e._ :
+
+**==> picture [316 x 30] intentionally omitted <==**
+
+where sech stands for hyperbolic secant ( cosh1[),] _[ P]_[is the period in space,][ %][ is the modulo operator,] _i_ = _{_ 1 _,_ 2 _}_ , _ki ∈_ (0 _._ 5 _,_ 1 _._ 0) and _di ∈_ (0 _,_ 1) are coefficients that determine the height and location of the peak of a soliton, respectively. For each initial state _t_ = 0 in the training data, these coefficients are drawn randomly from their distribution.
+
+## A.2 BENJAMIN–BONA–MAHONY EQUATION
+
+The Benjamin–Bona–Mahony (BBM) equation was derived as a higher-order improvement on the KdV equation and includes both non-linear and dispersive effects (Peregrine, 1966; Benjamin et al., 1972). It is used for studying a broader range of wave behaviors, including wave breaking and dispersion, and is given by:
+
+**==> picture [275 x 25] intentionally omitted <==**
+
+The chosen initial conditions are superpositions of two soliton waves of the following shape:
+
+**==> picture [342 x 30] intentionally omitted <==**
+
+where _ci ∈_ (1 _,_ 3) and _di ∈_ (0 _,_ 1) are coefficients that determine the height and location of the peak of a soliton, respectively.
+
+## A.3 CAHN–HILLIARD EQUATION
+
+The Cahn–Hilliard equation is used to describe phase separation with applications to materials science and physics (Cahn & Hilliard, 1958). It is expressed as:
+
+**==> picture [272 x 24] intentionally omitted <==**
+
+where we set _ν_ = _−_ 0 _._ 01, _α_ = 0 _._ 01 and _µ_ = _−_ 0 _._ 00001.
+
+The initial conditions are superpositions of sine and cosine waves, i.e. _u_ ( _x,_ 0) = _u_ 1 + _u_ 2 with:
+
+**==> picture [284 x 21] intentionally omitted <==**
+
+where _ai, bi ∈_ (0 _,_ 0 _._ 2) and _ki, ji_ are integers and _ji, ki ∈_ [1 _,_ 6].
+
+12
+
+A.4 VISCOUS BURGERS’ EQUATION
+
+The viscous Burgers’ equation (Bateman, 1915; Burgers, 1948) describes the behavior of waves and shocks in a viscous fluid or gas. It is given by:
+
+**==> picture [253 x 25] intentionally omitted <==**
+
+where _x ∈_ (0 _,_ 1), _t ∈_ (0 _,_ 2], and _ν_ = 0 _._ 001 is the diffusion coefficient.
+
+The initial conditions are given by the superposition of sinusoidal waves:
+
+**==> picture [278 x 24] intentionally omitted <==**
+
+where _ki_ = 2 _πni/P_ are coefficients where _ni_ are arbitrarily selected integers in [1 _, nmax_ ]. _N_ is the integer determining how many waves are added, _Ai_ is a random float number uniformly chosen in (0 _,_ 1), and _ϕi_ is the randomly chosen phase in (0 _,_ 2 _π_ ).
+
+**==> picture [400 x 274] intentionally omitted <==**
+
+**----- Start of picture text -----**
+2.00 t = 0.00 0.6 t = 0.00 t = 1.25 t = 0.50 1.75 t = 2.50 0.4 t = 1.00 1.50 t = 3.75 t = 1.50 1.25 t = 5.00 0.2 t = 2.00 1.00 0.0 0.75 0.50 0.2 0.25 0.4 0.00 0 2 4 6 8 10 0 20 40 60 80 100 x x (a) Korteweg–de Vries equation. (b) Viscous Burgers’ equation. 7 t = 0.00 1.00 t = 0.00 6 t = 3.75 0.75 t = 0.75 t = 7.50 t = 1.50 5 t = 11.25 0.50 t = 2.25 t = 15.00 0.25 t = 3.00 4 0.00 3 0.25 2 0.50 1 0.75 0 1.00 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 0.0 0.2 0.4 0.6 0.8 1.0 x x (c) Benjamin–Bona–Mahony equation. (d) Cahn–Hilliard equation. )( txu, )( txu, )( txu, )( txu, **----- End of picture text -----**
+
+Figure 4: Random samples from training data. Each dataset consists of multiple trajectories starting from different initial conditions.
+
+13
+
+|**Equation**|_N_|_tH_|_tL_|_x_|
+|---|---|---|---|---|
+|Korteweg–de Vries|10000|_• t ∈_[0_,_5] _•_ ∆_t_= 0_._025 _•_ 201points|_• t ∈_[0_,_5] _•_ ∆_t_= 0_._125 _•_ 41points|_•_ Ω_∈_[0_,_10] _•_ ∆_x_= 0_._1 _•_ 100points|
+|Viscous Burgers’|5000|_• t ∈_[0_,_2] _•_ ∆_t_= 0_._01 _•_ 201points|_• t ∈_[0_,_2] _•_ ∆_t_= 0_._05 _•_ 41points|_•_ Ω_∈_[_−_1_,_1] _•_ ∆_x_= 0_._02 _•_ 100points|
+|Benjamin–Bona–Mahony|10000|_• t ∈_[0_,_15] _•_ ∆_t_= 0_._075 _•_ 201points|_• t ∈_[0_,_15] _•_ ∆_t_= 0_._375 _•_ 41points|_•_ Ω_∈_[0_,_20] _•_ ∆_x_= 0_._2 _•_ 100points|
+|Cahn–Hilliard|10000|_• t ∈_[0_,_3] _•_ ∆_t_= 0_._02 _•_ 151points|_• t ∈_[0_,_3] _•_ ∆_t_= 0_._1 _•_ 31points|_•_ Ω_∈_[0_,_1] _•_ ∆_x_= 0_._01 _•_ 100points|
+
+Table 2: Data available: data size, i.e. number of samples ( _N_ ), time domain of high-resolution ( _tH_ ) and low-resolution data ( _tL_ ), spatial domain ( _x_ ). We only use a small subset of this data in training.
+
+## B GENERALIZATION PERFORMANCE
+
+14
+
+|||**Korteweg–de Vries equation**|**Korteweg–de Vries equation**|**Korteweg–de Vries equation**|||
+|---|---|---|---|---|---|---|
+|**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
+|_NH_ = 250,_NL_|= 1000||||||
+|**DON**|∆_t_= 0_._025||(high)|0.298_±_0.003|0.434_±_0.005|0.580_±_0.014|
+|**DON**|∆_t_= 0_._125||(low)|0.179_±_0.008|0.300_±_0.008|0.277_±_0.016|
+|**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.149_±_0.012|0.273_±_0.005|0.227_±_0.008|
+|**DON-LSTM**|∆_t_= 0_._025||(high)|0.152_±_0.011|0.298_±_0.018|0.274_±_0.034|
+|**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.065**_±_**0.005**|0.169_±_0.016|0.089_±_0.016|
+|**LSTM**|∆_t_= 0_._025||(high)|0.112_±_0.006|0.290_±_0.005|0.259_±_0.010|
+|**FNO**|∆_t_= 0_._025||(high)|0.081_±_0.002|**0.169**_±_**0.004**|**0.088**_±_**0.004**|
+|**Transformer**|∆_t_= 0_._025||(high)|0.164_±_0.002|0.348_±_0.007|0.372_±_0.015|
+|_NH_ = 500,_NL_|= 2000||||||
+|**DON**|∆_t_= 0_._025||(high)|0.192_±_0.011|0.332_±_0.002|0.339_±_0.005|
+|**DON**|∆_t_= 0_._125||(low)|0.084_±_0.002|0.193_±_0.006|0.114_±_0.007|
+|**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.075_±_0.004|0.169_±_0.004|0.091_±_0.005|
+|**DON-LSTM**|∆_t_= 0_._025||(high)|0.089_±_0.025|0.185_±_0.050|0.112_±_0.058|
+|**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.044**_±_**0.002**|0.126_±_0.006|0.049_±_0.005|
+|**LSTM**|∆_t_= 0_._025||(high)|0.069_±_0.003|0.211_±_0.003|0.136_±_0.003|
+|**FNO**|∆_t_= 0_._025||(high)|0.048_±_0.001|**0.119**_±_**0.007**|**0.044**_±_**0.005**|
+|**Transformer**|∆_t_= 0_._025||(high)|0.089_±_0.003|0.230_±_0.009|0.162_±_0.012|
+|_NH_ = 750,_NL_|= 3000||||||
+|**DON**|∆_t_= 0_._025||(high)|0.149_±_0.004|0.282_±_0.008|0.245_±_0.013|
+|**DON**|∆_t_= 0_._125||(low)|0.066_±_0.005|0.148_±_0.005|0.068_±_0.004|
+|**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.059_±_0.003|0.137_±_0.005|0.058_±_0.004|
+|**DON-LSTM**|∆_t_= 0_._025||(high)|0.077_±_0.010|0.138_±_0.021|0.059_±_0.018|
+|**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.034**_±_**0.002**|0.097_±_0.008|0.029_±_0.005|
+|**LSTM**|∆_t_= 0_._025||(high)|0.050_±_0.001|0.163_±_0.001|0.082_±_0.001|
+|**FNO**|∆_t_= 0_._025||(high)|0.037_±_0.002|**0.090**_±_**0.009**|**0.025**_±_**0.005**|
+|**Transformer**|∆_t_= 0_._025||(high)|0.064_±_0.002|0.171_±_0.007|0.091_±_0.007|
+|_NH_ = 1000,_NL_ = 4000|||||||
+|**DON**|∆_t_= 0_._025||(high)|0.123_±_0.010|0.234_±_0.006|0.168_±_0.009|
+|**DON**|∆_t_= 0_._125||(low)|0.047_±_0.006|0.116_±_0.004|0.041_±_0.003|
+|**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.048_±_0.002|0.121_±_0.007|0.045_±_0.005|
+|**DON-LSTM**|∆_t_= 0_._025||(high)|0.024_±_0.004|**0.053**_±_**0.008**|**0.009**_±_**0.003**|
+|**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.023**_±_**0.001**|0.096_±_0.009|0.028_±_0.005|
+|**LSTM**|∆_t_= 0_._025||(high)|0.039_±_0.003|0.135_±_0.004|0.056_±_0.003|
+|**FNO**|∆_t_= 0_._025||(high)|0.030_±_0.001|0.066_±_0.001|0.013_±_0.000|
+|**Transformer**|∆_t_= 0_._025||(high)|0.047_±_0.001|0.136_±_0.003|0.057_±_0.003|
+
+Table 3: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
+
+15
+
+||**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**||
+|---|---|---|---|---|---|
+|**Model**|**Resolution**||**MAE**|**RMSE**|**RSE**|
+|_NH_ = 100,_NL_|= 400|||||
+|**DON**|∆_t_= 0_._01|(high)|0.139_±_0.001|0.207_±_0.002|0.104_±_0.002|
+|**DON**|∆_t_= 0_._05|(low)|0.109_±_0.001|0.161_±_0.002|0.063_±_0.002|
+|**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.108_±_0.001|0.158_±_0.002|0.070_±_0.002|
+|**DON-LSTM**|∆_t_= 0_._01|(high)|0.157_±_0.001|0.233_±_0.002|0.132_±_0.003|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.076**_±_**0.005**|**0.131**_±_**0.007**|**0.042**_±_**0.004**|
+|**LSTM**|∆_t_= 0_._01|(high)|0.106_±_0.003|0.169_±_0.002|0.069_±_0.002|
+|**FNO**|∆_t_= 0_._01|(high)|0.121_±_0.004|0.171_±_0.005|0.075_±_0.004|
+|**Transformer**|∆_t_= 0_._01|(high)|0.184_±_0.003|0.281_±_0.004|0.192_±_0.005|
+|_NH_ = 250,_NL_|= 1000|||||
+|**DON**|∆_t_= 0_._01|(high)|0.120_±_0.002|0.177_±_0.002|0.076_±_0.002|
+|**DON**|∆_t_= 0_._05|(low)|0.094_±_0.001|0.140_±_0.001|0.048_±_0.001|
+|**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.092_±_0.001|0.138_±_0.001|0.048_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._01|(high)|0.132_±_0.002|0.208_±_0.004|0.106_±_0.004|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.055**_±_**0.003**|**0.103**_±_**0.003**|**0.026**_±_**0.001**|
+|**LSTM**|∆_t_= 0_._01|(high)|0.062_±_0.002|0.116_±_0.001|0.033_±_0.000|
+|**FNO**|∆_t_= 0_._01|(high)|0.087_±_0.002|0.129_±_0.002|0.042_±_0.002|
+|**Transformer**|∆_t_= 0_._01|(high)|0.142_±_0.006|0.226_±_0.008|0.125_±_0.009|
+|_NH_ = 400,_NL_|= 1600|||||
+|**DON**|∆_t_= 0_._01|(high)|0.109_±_0.001|0.160_±_0.001|0.062_±_0.001|
+|**DON**|∆_t_= 0_._05|(low)|0.085_±_0.001|0.126_±_0.001|0.039_±_0.001|
+|**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.083_±_0.001|0.124_±_0.001|0.040_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._01|(high)|0.108_±_0.003|0.187_±_0.004|0.086_±_0.004|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.044**_±_**0.001**|**0.085**_±_**0.001**|**0.017**_±_**0.001**|
+|**LSTM**|∆_t_= 0_._01|(high)|0.050_±_0.001|0.098_±_0.001|0.023_±_0.001|
+|**FNO**|∆_t_= 0_._01|(high)|0.068_±_0.001|0.106_±_0.001|0.029_±_0.000|
+|**Transformer**|∆_t_= 0_._01|(high)|0.127_±_0.002|0.203_±_0.005|0.100_±_0.005|
+|_NH_ = 550,_NL_|= 2200|||||
+|**DON**|∆_t_= 0_._01|(high)|0.104_±_0.001|0.152_±_0.002|0.056_±_0.001|
+|**DON**|∆_t_= 0_._05|(low)|0.077_±_0.001|0.116_±_0.001|0.033_±_0.000|
+|**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.075_±_0.001|0.114_±_0.001|0.033_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._01|(high)|0.087_±_0.004|0.161_±_0.007|0.063_±_0.005|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.037**_±_**0.001**|**0.074**_±_**0.001**|**0.013**_±_**0.000**|
+|**LSTM**|∆_t_= 0_._01|(high)|0.042_±_0.002|0.087_±_0.001|0.019_±_0.001|
+|**FNO**|∆_t_= 0_._01|(high)|0.059_±_0.001|0.096_±_0.001|0.023_±_0.001|
+|**Transformer**|∆_t_= 0_._01|(high)|0.112_±_0.002|0.179_±_0.005|0.078_±_0.004|
+|_NH_ = 700,_NL_|= 2800|||||
+|**DON**|∆_t_= 0_._01|(high)|0.099_±_0.001|0.146_±_0.002|0.052_±_0.002|
+|**DON**|∆_t_= 0_._05|(low)|0.078_±_0.001|0.118_±_0.001|0.034_±_0.001|
+|**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.075_±_0.000|0.113_±_0.001|0.032_±_0.000|
+|**DON-LSTM**|∆_t_= 0_._01|(high)|0.071_±_0.003|0.140_±_0.006|0.048_±_0.004|
+|**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.033**_±_**0.000**|**0.068**_±_**0.001**|**0.011**_±_**0.000**|
+|**LSTM**|∆_t_= 0_._01|(high)|0.036_±_0.001|0.079_±_0.001|0.015_±_0.000|
+|**FNO**|∆_t_= 0_._01|(high)|0.055_±_0.000|0.090_±_0.000|0.021_±_0.000|
+|**Transformer**|∆_t_= 0_._01|(high)|0.101_±_0.005|0.163_±_0.005|0.065_±_0.004|
+
+Table 4: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
+
+16
+
+|||**Benjamin–Bona–Mahony**|**Benjamin–Bona–Mahony**|**Benjamin–Bona–Mahony**|||
+|---|---|---|---|---|---|---|
+|**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
+|_NH_ = 250,_NL_|= 1000||||||
+|**DON**|∆_t_= 0_._075||(high)|0.554_±_0.019|0.932_±_0.031|0.297_±_0.020|
+|**DON**|∆_t_= 0_._375||(low)|0.166_±_0.012|0.383_±_0.011|0.050_±_0.003|
+|**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.155_±_0.011|0.331_±_0.011|0.041_±_0.003|
+|**DON-LSTM**|∆_t_= 0_._075||(high)|0.198_±_0.041|0.510_±_0.095|0.092_±_0.034|
+|**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.088**_±_**0.005**|0.271_±_0.036|0.025_±_0.007|
+|**LSTM**|∆_t_= 0_._075||(high)|0.191_±_0.008|0.544_±_0.013|0.101_±_0.005|
+|**FNO**|∆_t_= 0_._075||(high)|0.098_±_0.006|**0.195**_±_**0.015**|**0.013**_±_**0.002**|
+|**Transformer**|∆_t_= 0_._075||(high)|0.264_±_0.006|0.684_±_0.021|0.160_±_0.010|
+|_NH_ = 500,_NL_|= 2000||||||
+|**DON**|∆_t_= 0_._075||(high)|0.250_±_0.010|0.530_±_0.011|0.096_±_0.004|
+|**DON**|∆_t_= 0_._375||(low)|0.096_±_0.006|0.245_±_0.010|0.021_±_0.002|
+|**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.074_±_0.008|0.192_±_0.010|0.013_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._075||(high)|0.107_±_0.020|0.264_±_0.033|0.024_±_0.006|
+|**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.042**_±_**0.002**|0.135_±_0.020|0.006_±_0.002|
+|**LSTM**|∆_t_= 0_._075||(high)|0.111_±_0.018|0.344_±_0.014|0.041_±_0.003|
+|**FNO**|∆_t_= 0_._075||(high)|0.050_±_0.006|**0.091**_±_**0.009**|**0.003**_±_**0.001**|
+|**Transformer**|∆_t_= 0_._075||(high)|0.117_±_0.006|0.337_±_0.013|0.039_±_0.003|
+|_NH_ = 750,_NL_|= 3000||||||
+|**DON**|∆_t_= 0_._075||(high)|0.181_±_0.018|0.380_±_0.008|0.050_±_0.002|
+|**DON**|∆_t_= 0_._375||(low)|0.058_±_0.006|0.168_±_0.005|0.010_±_0.001|
+|**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.046_±_0.002|0.140_±_0.012|0.007_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._075||(high)|0.048_±_0.007|0.119_±_0.025|0.005_±_0.002|
+|**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.032**_±_**0.006**|0.125_±_0.022|0.005_±_0.002|
+|**LSTM**|∆_t_= 0_._075||(high)|0.068_±_0.005|0.250_±_0.008|0.021_±_0.001|
+|**FNO**|∆_t_= 0_._075||(high)|0.037_±_0.002|**0.063**_±_**0.004**|**0.001**_±_**0.000**|
+|**Transformer**|∆_t_= 0_._075||(high)|0.081_±_0.009|0.233_±_0.015|0.019_±_0.002|
+|_NH_ = 1000,_NL_ = 4000|||||||
+|**DON**|∆_t_= 0_._075||(high)|0.125_±_0.009|0.288_±_0.012|0.028_±_0.002|
+|**DON**|∆_t_= 0_._375||(low)|0.043_±_0.002|0.110_±_0.001|0.004_±_0.000|
+|**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.033_±_0.006|0.103_±_0.011|0.004_±_0.001|
+|**DON-LSTM**|∆_t_= 0_._075||(high)|0.061_±_0.023|0.162_±_0.071|0.011_±_0.008|
+|**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.019**_±_**0.001**|0.074_±_0.011|0.002_±_0.001|
+|**LSTM**|∆_t_= 0_._075||(high)|0.056_±_0.008|0.191_±_0.013|0.012_±_0.002|
+|**FNO**|∆_t_= 0_._075||(high)|0.030_±_0.001|**0.052**_±_**0.001**|**0.001**_±_**0.000**|
+|**Transformer**|∆_t_= 0_._075||(high)|0.057_±_0.004|0.167_±_0.012|0.010_±_0.001|
+
+Table 5: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
+
+17
+
+|||**Cahn–Hilliard equation**|**Cahn–Hilliard equation**|**Cahn–Hilliard equation**|||
+|---|---|---|---|---|---|---|
+|**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
+|_NH_ = 250,_NL_|= 1000||||||
+|**DON**|∆_t_= 0_._02||(high)|0.066_±_0.004|0.104_±_0.005|0.039_±_0.004|
+|**DON**|∆_t_= 0_._1||(low)|0.050_±_0.006|0.074_±_0.007|0.020_±_0.004|
+|**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.031_±_0.003|0.053_±_0.004|0.010_±_0.002|
+|**DON-LSTM**|∆_t_= 0_._02||(high)|0.125_±_0.015|0.206_±_0.021|0.154_±_0.032|
+|**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.023**_±_**0.003**|**0.043**_±_**0.004**|**0.007**_±_**0.001**|
+|**LSTM**|∆_t_= 0_._02||(high)|0.025_±_0.000|0.054_±_0.001|0.011_±_0.000|
+|**FNO**|∆_t_= 0_._02||(high)|0.032_±_0.002|0.054_±_0.004|0.011_±_0.001|
+|**Transformer**|∆_t_= 0_._02||(high)|0.049_±_0.001|0.093_±_0.001|0.031_±_0.001|
+|_NH_ = 500,_NL_|= 2000||||||
+|**DON**|∆_t_= 0_._02||(high)|0.041_±_0.001|0.067_±_0.001|0.016_±_0.001|
+|**DON**|∆_t_= 0_._1||(low)|0.044_±_0.002|0.063_±_0.004|0.014_±_0.002|
+|**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.018_±_0.001|0.031_±_0.002|**0.003**_±_**0.000**|
+|**DON-LSTM**|∆_t_= 0_._02||(high)|0.079_±_0.010|0.141_±_0.013|0.072_±_0.014|
+|**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.016**_±_**0.002**|**0.030**_±_**0.003**|0.003_±_0.001|
+|**LSTM**|∆_t_= 0_._02||(high)|0.015_±_0.000|0.037_±_0.001|0.005_±_0.000|
+|**FNO**|∆_t_= 0_._02||(high)|0.022_±_0.001|0.036_±_0.001|0.005_±_0.000|
+|**Transformer**|∆_t_= 0_._02||(high)|0.028_±_0.002|0.062_±_0.001|0.014_±_0.000|
+|_NH_ = 750,_NL_|= 3000||||||
+|**DON**|∆_t_= 0_._02||(high)|0.034_±_0.002|0.056_±_0.002|0.011_±_0.001|
+|**DON**|∆_t_= 0_._1||(low)|0.047_±_0.004|0.066_±_0.006|0.016_±_0.003|
+|**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.013_±_0.001|0.024_±_0.001|0.002_±_0.000|
+|**DON-LSTM**|∆_t_= 0_._02||(high)|0.055_±_0.007|0.109_±_0.013|0.043_±_0.010|
+|**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.011**_±_**0.001**|**0.021**_±_**0.002**|**0.002**_±_**0.000**|
+|**LSTM**|∆_t_= 0_._02||(high)|0.013_±_0.001|0.029_±_0.001|0.003_±_0.000|
+|**FNO**|∆_t_= 0_._02||(high)|0.018_±_0.000|0.031_±_0.000|0.003_±_0.000|
+|**Transformer**|∆_t_= 0_._02||(high)|0.021_±_0.001|0.049_±_0.001|0.009_±_0.000|
+|_NH_ = 1000,_NL_ = 4000|||||||
+|**DON**|∆_t_= 0_._02||(high)|0.025_±_0.002|0.044_±_0.001|0.007_±_0.000|
+|**DON**|∆_t_= 0_._1||(low)|0.010_±_0.000|0.020_±_0.001|0.001_±_0.000|
+|**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.009_±_0.000|0.016_±_0.000|0.001_±_0.000|
+|**DON-LSTM**|∆_t_= 0_._02||(high)|0.045_±_0.003|0.092_±_0.007|0.031_±_0.004|
+|**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.007**_±_**0.000**|**0.015**_±_**0.000**|**0.001**_±_**0.000**|
+|**LSTM**|∆_t_= 0_._02||(high)|0.011_±_0.001|0.025_±_0.001|0.002_±_0.000|
+|**FNO**|∆_t_= 0_._02||(high)|0.017_±_0.000|0.028_±_0.000|0.003_±_0.000|
+|**Transformer**|∆_t_= 0_._02||(high)|0.016_±_0.000|0.041_±_0.001|0.006_±_0.000|
+
+Table 6: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
+
+18
+
+**==> picture [397 x 213] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Korteweg de Vries Viscous Burgers' 0.6 0.14 0.5 0.12 0.4 0.10 0.08 0.3 0.06 0.2 0.04 0.1 0.02 0.0 NH: 250 500 750 1000 NH: 100 250 400 550 700 NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800 Benjamin Bona Mahony Cahn Hilliard 0.35 0.30 0.20 0.25 0.15 0.20 0.15 0.10 0.10 0.05 0.05 0.00 0.00 NH: 250 500 750 1000 NH: 250 500 750 1000 NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000 Number of training points of high (NH) and low (NL) resolution DON (DH) DON (DL) DON (DH, DL) LSTM (DH) DON-LSTM (DH) DON-LSTM (DH, DL) 2)yi 2) y (yi (yi n 1 n i = 0 n 1 n i = 0 RSE = **----- End of picture text -----**
+
+Figure 5: Model performance vs. amount of training samples. The _y_ -axis shows the relative squared error for predictions on high-resolution test data, while the _x_ -axis indicates the number of high- and low-resolution training samples. The figure compares the performance of three models: DON (red) and DON-LSTM (blue, with light-blue for multi-resolution) and LSTM (green), with variations of training data denoted by _D_ □ and the line pattern ( _DH_ and solid line for high-resolution, _DL_ and dotted line for low-resolution, and _DH_ , _DL_ and dash-dotted line for multi-resolution). The error bars indicate the 95% confidence interval calculated over the five trained models (two standard deviations of the error).
+
+19
+
+**==> picture [396 x 214] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Korteweg de Vries Viscous Burgers' 0.4 0.20 0.3 0.15 0.2 0.10 0.1 0.05 0.0 NH: 250 500 750 1000 NH: 100 250 400 550 700 NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800 Benjamin Bona Mahony Cahn Hilliard 0.175 0.030 0.150 0.025 0.125 0.020 0.100 0.075 0.015 0.050 0.010 0.025 0.005 0.000 0.000 NH: 250 500 750 1000 NH: 250 500 750 1000 NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000 Number of training points of high (NH) and low (NL) resolution DON-LSTM (DH, DL) LSTM (DH) Transformer (DH) FNO (DH) 2)yi 2) y (yi (yi n 1 n i = 0 n 1 n i = 0 RSE = **----- End of picture text -----**
+
+Figure 6: Model performance vs. amount of training samples. The _y_ -axis shows the relative squared error for predictions on high-resolution test data, while the _x_ -axis indicates the number of highand low-resolution training samples. The figure compares the performance of four models: multiresolution DON-LSTM (blue), LSTM (green), transformer (black), and FNO (orange), with variations of training data denoted by _D_ □ and the line pattern ( _DH_ and solid line for high-resolution, and _DH_ , _DL_ and dash-dotted line for multi-resolution). The error bars indicate the 95% confidence interval calculated over the five trained models (two standard deviations of the error).
+
+## C ARCHITECTURE DETAILS
+
+## C.1 DEEPONET
+
+The vanilla DeepONet is constructed with a branch and trunk network with the same output sizes, which are merged using Einstein summation (Figure 1). The input to the branch network is of the size [batch ~~s~~ ize, x len], the input to the trunk network is of the size [x ~~l~~ en _×_ t ~~l~~ en, 2], and the output of the network after the Einstein summation is [batch ~~s~~ ize, x ~~l~~ en _×_ t ~~l~~ en], where batch ~~s~~ ize refers to the number of samples in each minibatch, and x ~~l~~ en and t ~~l~~ en, to the sizes of the spatial and temporal dimensions, _i.e._ , the number of discretization points.
+
+Table 7: Branch network.
+
+||LAYER|OUTPUT SHAPE|ACTIVATION|PARAM|
+|---|---|---|---|---|
+|0|INPUT|(NONE, X)|-|0|
+|1|DENSE|(NONE, 150)|SWISH|150_x_+ 150|
+|2|DENSE|(NONE, 250)|SWISH|37_,_750|
+|3|DENSE|(NONE, 450)|SWISH|112_,_950|
+|4|DENSE|(NONE, 380)|SWISH|171_,_380|
+|5|DENSE|(NONE, 320)|SWISH|121_,_920|
+|6|DENSE|(NONE,300)|LINEAR|96_,_300|
+
+20
+
+Table 8: Trunk network.
+
+||LAYER|OUTPUT SHAPE|ACTIVATION|PARAM|
+|---|---|---|---|---|
+|0|INPUT|(NONE, 2)|-|0|
+|1|DENSE|(NONE, 200)|SWISH|600|
+|2|DENSE|(NONE, 220)|SWISH|44_,_220|
+|3|DENSE|(NONE, 240)|SWISH|53_,_040|
+|4|DENSE|(NONE, 250)|SWISH|60_,_250|
+|5|DENSE|(NONE, 260)|SWISH|65_,_260|
+|6|DENSE|(NONE, 280)|LINEAR|73_,_080|
+|7|DENSE|(NONE,300)|LINEAR|84_,_300|
+
+The DeepONet is trained in minibatches of 50 samples using the Adam optimizer and learning rate of 1 _e−_ 4. For the DeepONet the data is normalized in the following manner: the inputs to the branch network and the outputs of the DeepONet use standard scaling, and the inputs to the trunk network use min-max (Appendix D). The vanilla DeepONet for the full trajectory is trained up to 25 _,_ 000 epochs.
+
+## C.2 DON-LSTM
+
+Table 9: LSTM extension for the input of _t_ timesteps.
+
+||LAYER||OUTPUT SHAPE|ACTIVATION|PARAM|
+|---|---|---|---|---|---|
+|0|DEEPONET|OUTPUT|(NONE,_x × t_)|-|0|
+|1|RESHAPE||(NONE,_t_,_x_)|-|0|
+|2|LSTM||(NONE,_t_, 200)|TANH|4_×_((_x_+ 1)_×_200 + 2002)|
+|3|DENSE||(NONE,_t_,_x_)|LINEAR|_xt_+_x_|
+
+The inputs and outputs in the LSTM training are normalized using standard scaling.
+
+## D DATA SCALING DETAILS
+
+When training the DeepONets, the inputs to the branch net are scaled using standard scaling, while the inputs to the trunk net use the min-max scaling. For the LSTM, the inputs are scaled using standard scaling. The outputs are always scaled with the standard scaling.
+
+## D.1 STANDARD SCALING
+
+The standard scaling formula is defined as:
+
+**==> picture [224 x 19] intentionally omitted <==**
+
+where _x[′]_ are the standardized values, _x_ are the original values, _µ_ is the mean, and _σ_ is the standard deviation of _x_ .
+
+## D.2 MIN-MAX SCALING
+
+Min-max scaling, also known as Min-max normalization, scales the data between 0 and 1. It is expressed by the equation:
+
+**==> picture [240 x 21] intentionally omitted <==**
+
+where _x[′]_ are the normalized values, _x_ are the original values, and _xmin_ and _xmax_ are the minimal and maximal values of _x_ .
+
+21
+
+## E EVALUATION METRICS
+
+In this study, we used several metrics to evaluate the performance of the model such as mean average error, root mean squared error, and relative squared error.
+
+## E.1 MEAN AVERAGE ERROR
+
+The mean average error (MAE) is expressed as:
+
+**==> picture [248 x 28] intentionally omitted <==**
+
+where _n_ is the number of samples, _yi_ is the true value of the _i[th]_ sample, and _y_ ˆ _i_ is the predicted value of the _i[th]_ sample.
+
+E.2 ROOT MEAN SQUARED ERROR
+
+The root mean squared error (RMSE) is expressed as:
+
+**==> picture [258 x 37] intentionally omitted <==**
+
+where: _n_ is the number of samples, _yi_ is the true value of the _i[th]_ sample and _y_ ˆ _i_ is the predicted value of the _i[th]_ sample.
+
+## E.3 RELATIVE SQUARED ERROR
+
+The relative squared error (RSE) is the total squared error between the predicted values and the ground truth normalized by the total squared error between the ground truth and the mean. RSE is interpreted on the scale between 0-1, where 0 indicates the perfect fit, while values of 1 and larger are obtained only if the model’s prediction is worse than fitting the mean line. The metric is expressed as:
+
+**==> picture [252 x 27] intentionally omitted <==**
+
+where _yi_ is the true value of the _i[th]_ sample, _y_ ˆ _i_ is the predicted value of the _i[th]_ sample, and _y_ ¯ is the mean value of all samples.
+
+22
+
diff --git a/open_review/iclr2024_8541.json b/open_review/iclr2024_8541.json
new file mode 100644
index 0000000000000000000000000000000000000000..83fa57280439d9fb0205d41ada34d87223730e68
--- /dev/null
+++ b/open_review/iclr2024_8541.json
@@ -0,0 +1,121 @@
+{
+ "paper_id": "iclr2024_8541",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "The Trickle-down Impact of Reward Inconsistency on RLHF",
+ "abstract": "Standard practice within Reinforcement Learning from Human Feedback (RLHF) involves optimizing against a Reward Model (RM), which itself is trained to reflect human preferences for desirable generations. A notable subject that is understudied is the (in-)consistency of RMs --- whether they can recognize the semantic changes to different prompts and \nappropriately adapt their reward assignments\n\n--- and their impact on the downstream RLHF model.\n\nIn this paper, we visit a series of research questions relevant to RM inconsistency:\n(1) How can we measure the consistency of reward models? \n(2) How consistent are the existing RMs and how can we improve them? \n(3) In what ways does reward inconsistency influence the chatbots resulting from the RLHF model training?\n\n\nWe propose **Contrast Instruction** -- a benchmarking strategy for the consistency of RM. \nEach example in **Contrast Instruction** features a pair of lexically similar instructions with different ground truth responses. A consistent RM is expected to rank the corresponding instruction and response higher than other combinations. We observe that current RMs trained with the standard ranking objective fail miserably on \\contrast{} compared to average humans. To show that RM consistency can be improved efficiently without using extra training budget, we propose two techniques **ConvexDA** and **RewardFusion**, which enhance reward consistency \nthrough extrapolation during the RM training and inference stage, respectively.\nWe show that RLHF models trained with a more consistent RM yield more useful responses, suggesting that reward inconsistency exhibits a trickle-down effect on the downstream RLHF process.",
+ "rebuttal": "Hi, thanks for your suggestions; we selected three different model architectures\n- Decoder-only: LLaMa-7B in our paper. \n- Encoder-only: Roberta-Large\n- Encoder-decoder: google/flan-t5-base\nHere are their performance on our benchmarks.\n\n| | Stack | WMT | Twitter | Sum |\n|:---:|:---:|:---:|:---:|:---:|\n| LLaMa | 50.1 | 56.4 | 60.1 | 47.7 |\n| RoBerta | 50.8 | 55.8 | 57.6 | 48.3 |\n| Flan-t5| 51.2 | 57.3 | 60.3 | 48.9 |\n\nAs shown in the results, **simply** changing the model architecture is not significantly helpful in resolving the consistency issues. We will add these ablations to the next version. Still, we could not test more models due to the closing rebuttal deadline, and we share some extra thoughts based on your arguments.\n\n\n\n## The relation between **rebuilding standard protocol of RM training** and **our paper**\nAlthough proposing new protocols for RM training is undoubtedly important and is promising future work, it is not **the main focus of our paper, and we make no strong claims against it**. \nAlso, we want to reclaim the main contributions in our paper, as shown in Section 1 of our paper.\n- We define what should be regarded as consistency/inconsistency for RMs and propose an automatic benchmarking strategy (Contrast Instruction) tailored for consistency evaluation.\n- We discover that the RMs trained by mainstream methods perform catastrophically (akin to random guessing) on our Contrast Instruction, which is task-agnostic and model-size-agnostic. \n- We try to design some simple methods (without pre-assuming the patterns of Contrast Instruction for fair evaluation) to enhance consistency but bring very limited improvements, which emphasizes the challenge of these issues.\n- Finally, we measure the trickle-down effects of reward consistency. A more consistent RM indeed benefits the final RLHF-trained model.\n\n\n> If someone wants to rebuild the protocol for RM training, our paper can be regarded as a cornerstone for \n- showing strong evidence for the drawbacks of the current RM training protocol that motives their work.\n- providing an automatic benchmarking strategy for more challenging tests of RM evaluation.\n\n## Discussion for RM quality\nMoreover, we also want to clarify that whether an RM is good is also (not only reflected in standard benchmarks) determined by the final results of RLHF (apply such an RM for RLHF). That is why we name our title \"The **trickle-down effects** of reward consistency in RLHF\" since we should not discuss the quality of RM being isolated from the ultimate results of RLHF, as detailed in our paper.\n\nThank you for taking the time to read our response and engage in discussion! Based on your further questions, here are our responses.\n\nQ1: \n>... I am still not very sure that the representation learned by the LLMs are unable to distinct “A is a good student” vs. “A is a bad student”...\n\nA1: First, we want to clarify that learning a reward model is not for classification but regression. The standard protocol tries to tackle this regression problem by classification loss. An optimal RM should assign reward scores to different instruction-response pairs that align perfectly (e.g., Spearman corre [...]\n\nThank you for taking the time to read our response and increasing the score! We will emphasize more on our benchmarking strategy in the writing of the next version.\n\nDear Reviewer,\n\nPlease feel free to reach out if you have any additional questions or would like any clarification. We'll do our best to respond in the remaining 40 hours before the discussion period ends.\n\nDear Reviewer,\n\nPlease feel free to reach out if you have any additional questions or would like any clarification. We'll do our best to respond in the remaining 40 hours before the discussion period ends.\n\nDear Reviewer,\n\nPlease feel free to reach out if you have any additional questions or would like any clarification. We'll do our best to respond in the remaining 40 hours before the discussion period ends.\n\nDear Reviewer,\n\nPlease feel free to reach out if you have any additional questions or would like any clarification. We'll do our best to respond in the remaining 40 hours before the discussion period ends.\n\nDear Reviewer,\n\nPlease feel free to reach out if you have any additional questions or would like any clarification. We'll do our best to respond in the remaining 40 hours before the discussion period ends.\n\n**Q4**: How concerned are you about the risk of data leakage? What implications would arise if instances from the benchmark dataset were also present in LlaMa-7B's pre-training data or the dataset used to train the reward model? Have such overlaps impacted the assessment of reward consistency?\n\n**A4**: It’s a good question. In our study, specific measures to address data leakage were not the primary focus. However, we understand the importance of this issue and will ensure rigorous checks against data leakage based on the very recent work [1,2]. We agree that understanding the impact of data l [...]\n\n**Q1**:The way that the authors constructed the dataset, is filtering by the cosine similarity between SimCSE embeddings that are in the range of [0.75, 0.9]. This seems convenient but I wonder how reliable is this method. Have you done a manual inspection to measure the agreement rate between the method and human evaluators? Or maybe you could try using a model-based approach like prompting GPT-4?\n\n**A1**: Regarding cosine range, we have consideration for the following factors:\n- Upper Bound: We set the upper limit (e.g., 0.9) to avoid retrieving identical instructions. This is crucial to ens [...]\n\n**Q5**: ContrastDataset provides is challenging dataset, how are humans able to do good on it? Is it mainly hard for the LLMs since the representations are sub-optimal?\n\n**A5**: While Reward Models (RMs) currently struggle to differentiate patterns within Contrast Instructions, this challenge is not mirrored in human performance. Humans are adept at discerning subtle semantic differences, an\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 5,
+ 5,
+ 6
+ ],
+ "score_mean": 5.6,
+ "score_variance": 0.3,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "The paper investigates reward model (RM) inconsistency in RLHF, introducing \"Contrast Instructions\" as a new benchmarking strategy \nthat pairs lexically similar instructions (identified using an embedding model) with different ground truth responses. It reveals significant inconsistencies relative to humans in standard-trained RMs across tasks and models and show how this inconsistency negatively impact RLHF model training. The paper's strengths include its its focus on an underexplored aspect of RM training and easy to use dataset creation strategy for benchmarking / training. Additionally, the paper is well-written and easy to read.\n\n\nThe weaknesses which remain unaddressed by the authors mainly include the limited scaling experiments, particularly in terms of model sizes beyond 7B. Additionally, the proposed methods ConvexDA and RewardFusion seem to be of limited significance and could be moved to the appendix.",
+ "forum_id": "MeHmwCDifc",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 5,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_5JFN",
+ "review_id": "WREReQ7S8n",
+ "scores": {
+ "rating": 6,
+ "soundness": 1,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 5209,
+ "edit_detected": true,
+ "edit_delta_seconds": 1921359,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": [
+ {
+ "to": 53
+ }
+ ]
+ },
+ {
+ "reviewer": "Reviewer_gxZU",
+ "review_id": "yQUHud619k",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2766,
+ "edit_detected": true,
+ "edit_delta_seconds": 122499,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_iZzr",
+ "review_id": "wOdAhbhVf8",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 5327,
+ "edit_detected": true,
+ "edit_delta_seconds": 447105,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Kxr1",
+ "review_id": "7JROTldfix",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 4934,
+ "edit_detected": true,
+ "edit_delta_seconds": 1912969,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_n2Hx",
+ "review_id": "3r0WV196I3",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3928,
+ "edit_detected": true,
+ "edit_delta_seconds": 1959003,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8541.md b/open_review/iclr2024_8541.md
new file mode 100644
index 0000000000000000000000000000000000000000..d977c98f1ffbc19d968a305eb37cc3805bfe9d45
--- /dev/null
+++ b/open_review/iclr2024_8541.md
@@ -0,0 +1,756 @@
+
+
+## - THE TRICKLE DOWN IMPACT OF REWARD (IN-)CONSISTENCY ON RLHF
+
+Authors withheld for review
+
+## ABSTRACT
+
+Standard practice within Reinforcement Learning from Human Feedback (RLHF) involves optimizing against a Reward Model (RM), which itself is trained to reflect human preferences for desirable generations. A notable subject that is understudied is the _(in-)consistency_ of RMs — whether they can recognize the semantic changes to different prompts and appropriately adapt their reward assignments — and their impact on the downstream RLHF model.
+
+In this paper, we visit a series of research questions relevant to RM inconsistency: (1) How can we measure the consistency of reward models? (2) How consistent are the existing RMs and how can we improve them? (3) In what ways does reward inconsistency influence the chatbots resulting from the RLHF model training?
+
+We propose CONTRAST INSTRUCTIONS – a benchmarking strategy for the consistency of RM. Each example in CONTRAST INSTRUCTIONS features a pair of lexically similar instructions with different ground truth responses. A consistent RM is expected to rank the corresponding instruction and response higher than other combinations. We observe that current RMs trained with the standard ranking objective fail miserably on CONTRAST INSTRUCTIONS compared to average humans. To show that RM consistency can be improved efficiently without using extra training budget, we propose two techniques CONVEXDA and REWARDFUSION, which enhance reward consistency through extrapolation during the RM training and inference stage, respectively. We show that RLHF models trained with a more consistent RM yield more useful responses, suggesting that reward inconsistency exhibits a trickle-down effect on the downstream RLHF process.
+
+## 1 INTRODUCTION
+
+Recently, _reinforcement learning from human feedback_ (RLHF) has emerged as a popular technique to optimize and align a language model with human preferences (Ouyang et al., 2022). RLHF provides a natural solution for optimizing non-differentiable, scalar objectives for language models, and has been the centerpiece of recent state-of-the-art large language models (LLMs) (Lu et al., 2022; Hejna III & Sadigh, 2023; Go et al., 2023; Korbak et al., 2023; OpenAI, 2023).
+
+In RLHF, a _reward model_ (RM) generates scalar rewards for model-generated outputs as supervision during reinforcement learning. RMs are typically calibrated to proxy human preferences/rankings of responses, in the context of an input instruction. Since policy gradient methods optimize based on this reward function, the reward function inevitably dictates the behavior of the resultant chatbot. As such, the properties of RMs and their impact on RLHF models have become points of interest for the research community (Gao et al., 2022; Zhu et al., 2023; Dong et al., 2023).
+
+In this work, we study the phenomenon of _reward inconsistency_ in RMs, i.e., current RMs trained with the standard ranking objective on human preference data (§2) often fail to distinguish between more vs. less favorable responses with respect to real-world instructions. We observe that reward inconsistency has a _trickle-down effect_ on the RLHF process — the more inconsistent the RM is, the more likely the resulting chatbot is to generate inaccurate or less useful responses.
+
+
+
+1
+
+**==> picture [396 x 146] intentionally omitted <==**
+
+**----- Start of picture text -----**
+① A “consistent” reward model should assign ② We introduce two approaches to CONTAST INSTRUCTIONS higher rewards to corresponding (instruction, enhance the consistency of A pair of similar instructions with different response) pairs than the other distractors. standard, preference-based RM. ground truth responses Response Consistency ConvexDA RewardFusion Standard RM .63 for robust training for robust inference Instruction Responses I [A] r [A] Standard RM .87 r r’ I [A] : “What does r [A] : “Random I [A] r [B] Consistent RM .91 r r r r r’ r’ RAM stand for Access Consistent RM .57 in computing?” Memory.” ③ RLHF with a more consistent RM Instruction Consistency Better chatbot Standard RM .51 I [B] : “What does r [B] : “ Read-Only I [A] r [A] Standard RM .92 Standard RM ROM stand for Memory.” I [B] r [A] Consistent RM .87 in computing?” Consistent RM .63 Consistent RM **----- End of picture text -----**
+
+Figure 1: We introduce CONTRAST INSTRUCTIONS as a way to measure the _consistency_ of a reward model. Each example consists of two similar instructions with different ground truth responses. Given one of the instructions or responses, whether or not an RM could rank its corresponding response or instruction higher than the other distractor indicates the consistency of the RM.
+
+To illustrate and quantify the degree of reward inconsistency in RMs, we propose CONTRAST INSTRUCTIONS, a simple, intuitive benchmarking strategy that can be used with any instruction-tuning or human preference dataset in a fully automated manner. CONTRAST INSTRUCTIONS involves pairs of similar instructions with different responses. As an example, consider two similar-looking prompts ( _I[A]_ and _I[B]_ ) one about “RAM” and “ROM” (Figure 1; left). Despite the similarity of these prompts, they warrant different responses. Our consistency metrics measure whether a reward model can appropriately identify the correspondence between prompts and responses. Specifically, given a pair of such (instruction, response) examples, we consider an RM _consistent_ if it assigns a higher score to the corresponding (instruction, response) compared to the other combinations, i.e. swapping instructions or responses between the two examples, as we show with 1 in Figure 1.
+
+We construct CONTRAST INSTRUCTIONS with four popular open-source human preference or instruction-tuning datasets. Surprisingly, we observe close to random-chance performance when we evaluate standard RMs trained with ranking objectives (e.g. LLaMa-7B) on CONTRAST INSTRUCTIONS, while humans are able to rank the responses correctly in _≈_ 80% of the cases. The performance gap indicates the inherent reward inconsistency from standard RM training and inference.
+
+To enhance the consistency of standard RM, we introduce two techniques (§5) : **CONVEXDA** and **REWARDFUSION** ( 2 in Figure 1). The two methods can be incorporated during RM training and inference, respectively, without incurring extra computational costs during training. While our experimental results indicate some improvements, the gap with respect to human performance remains large. Interestingly, our analysis (§6) reveals that using a more consistent RM during RLHF training leads to more useful responses from the downstream RLHF model ( 3 in Figure 1). Our findings suggest the value of reward (in-)consistency as an intrinsic evaluation metric for preference-based RMs, potentially enabling easier access for future research on reward modeling and RLHF.
+
+The main contributions of this paper are:
+
+- We introduce CONTRAST INSTRUCTIONS, an intuitive yet scalable benchmarking strategy for evaluating RM consistency. We observe a wide performance gap between standard, preferencebased RM vs. human judgments, which suggests sizable room for improvements in standard reward modeling and evaluation strategy.
+
+- We show that reward consistency can be enhanced without extra training costs. We demonstrate this with two techniques **CONVEXDA** and **REWARDFUSION** , which can be applied during RM training and inference stages, respectively.
+
+- We empirically show that training RLHF models with more consistent RMs would result in the RLHF model generating more useful responses. We provide thorough analysis and examples, which help us understand the advantage of a more consistent RM over a less inconsistent one.
+
+2
+
+## 2 PRELIMINARIES: REWARD MODELING FOR RLHF
+
+**Reward model.** Following the conventional setup (Ziegler et al., 2019), we define RM _Rθ_ as a scalar function that allows us to train a generative model during RLHF. To supervise RM, we are given a dataset of human preferences _Dh_ . Each instance in this dataset ( _Ii, ri_[+] _[, r] i[−]_[)][ is comprised of] an instruction prompt _Ii_ , a pair of responses _ri_[+] _[, r] i[−]_[where] _[ r] i_[+][is preferred over] _[ r] i[−]_[by humans.][On] this labeled data, _Rθ_ is trained to assign a higher scalar reward to human-preferred _ri_[+][over][non-] preferred _ri[−]_[in the context of] _[ I][i]_[ This can be achieved by minimizing the ranking loss] _[ L]_[, where] _[ σ]_[ is] the sigmoid function and _Ii ◦ ri_[+][is the concatenation of] _[ I][i]_[and] _[ r] i_[+][.]
+
+**==> picture [335 x 16] intentionally omitted <==**
+
+**Reinforcement Learning.** The last stage of RLHF is reinforcement learning. Specifically, a pertoken KL penalty from the supervised fine-tuning (SFT) model at each token to mitigate overoptimization of the reward model, and the value function is initialized from the RM. We maximize the following combined objective function _J_ ( _ϕ_ ) in RL training based on PPO algorithm (Schulman et al., 2017; Ouyang et al., 2022), RL training dataset _Dπϕ_ RL and pre-training dataset _D_ pre:
+
+**==> picture [392 x 18] intentionally omitted <==**
+
+where _Rθ_ ( _I ◦ r_ ) is the reward function, and _πϕ_[RL] is the learned RL policy parameterized by _ϕ_ initialized from a pretrained supervised trained model _π_[SFT] . The first term encourage the policy _πϕ_[RL] to generate responses that have higher reward scores. The second term represents a per-token KL reward controlled by coefficient _β_ between _πϕ_[RL] and _π_[SFT] to mitigate over-optimization toward the reward model during RL training. The third optional term provides regularization by encouraging responses with high probability from the pretraining dataset with coefficient _γ_ .
+
+## 3 **CONTRAST INSTRUCTIONS** : MEASURING REWARD (IN-)CONSISTENCY
+
+Conventionally in RLHF, reward models are trained explicitly to distinguish the more vs. less favorable responses in the context of an instruction (Eq. 1). One would expect an RM to consistently predict higher reward scores toward the more favorable instruction-response pairings. For instance, as the example in Figure 1 shows, an ideal reward should assign a higher score to _rA_ appearing in response to _IA_ , than _IB_ . In practice, however, RMs usually suffer from over-optimization towards the training distribution, leading to _inconsistencies_ between RM predictions vs. human preferences at inference time (Gao et al., 2022).
+
+To illustrate and measure reward inconsistency in RMs, we introduce CONTRAST INSTRUCTIONS. A CONTRAST INSTRUCTIONS benchmark takes the form of _D_ = _{_ ( _Ii[A][, I] i[B][, r] i[A][, r] i[B]_[)] _[}][N] i_ =1[(see] Fig. 1). Each test instance consists of instruction-response pairs ( _I[A] , r[A]_ ) and ( _I[B] , r[B]_ ). To make the benchmark meaningfully challenging, we sample _I[A]_ and _I[B]_ such that the two are lexically similar instructions with different semantics (details later in §3.1). _r[A]_ and _r[B]_ are the human-preferred responses to _I[A]_ and _I[B]_ , respectively. Conceptually, a consistent RM should be able to identify pairs of corresponding instruction-response. Concretely, this means assuming higher score to ( _I[A] , r[A]_ ) than ( _I[A] , r[B]_ ) or ( _I[B] , r[A]_ ). There are two ways one can quantify such notions of reward consistency:
+
+- **Response Consistency (** _C_ **res)** : Given one of the instructions _I[A]_ , we measure if a RM ( _Rθ_ ) can identify the corresponding response _r[A]_ by assigning higher rewards to _r[A]_ over _r[B]_ .
+
+**==> picture [324 x 30] intentionally omitted <==**
+
+- **Instruction Consistency (** _C_ **ins)** : Similarly, given one of the responses _r[A]_ , we measure if a RM ( _Rθ_ ) can assign higher rewards to its corresponding instruction _I[A]_ over the distractor _I[B]_ .
+
+3
+
+**==> picture [324 x 30] intentionally omitted <==**
+
+It is worth noting that with the standard learning objective (Eq. 1), RMs are explicitly trained to rank responses but not instructions, and so _C_ res conceptually resembles the RM learning objective, while _C_ ins does not. Therefore, we expect the standard RM to perform better under the _C_ res metric compared to _C_ ins, which we will further discuss in §4.
+
+## 3.1 CONSTRUCTING CONTRAST INSTRUCTIONS AUTOMATICALLY
+
+CONTRAST INSTRUCTIONS can be automatically constructed from datasets that contain human preferences. Inspired by Gardner et al. (2020), we formulate examples in CONTRAST INSTRUCTIONS such that the pair of instructions _I[A] , I[B]_ are lexically similar, yet their ground truth responses are different. We expect a _consistent_ RM to recognize the nuanced semantic difference between the instructions, and recognize the corresponding answer to an instruction.
+
+**Benchmark Construction.** We adopt four open-source human preference datasets of various NLP tasks: STACKEXCHANGE for question answering (Askell et al., 2021), WMT for machine translation (Ma et al., 2019), REALSUMM for text summarization (Bhandari et al., 2020), and TWITTER for paraphrase generation (Shen et al., 2022c). Each dataset features examples of an instruction comprised of both a task prompt and a task-specific input, and the corresponding responses ranked by human preference. Within each dataset, we sample pairs of similar instructions with sentence embedding model SimCSE (Gao et al., 2021). To ensure the instruction pairs are similar but not semantically equivalent, we keep only instruction pairs with cosine similarity within [0 _._ 75 _,_ 0 _._ 9]. We show the statistics and examples of each resulting CONTRAST INSTRUCTIONS dataset in Table 1
+
+|Data|Instructions (task prompt omitted) Responses|
+|---|---|
+|STACK|_IA_: What are the three primary colors in the sub- tractive color models? _rA_: The subtractive primaries are cyan, ma- genta, and yellow.|
+||_IB_: What’re the three primary colors in the addi- tive color models? _rB_: They’re red, green, and blue.|
+|WMT|_IA_: Mindestens 410 Menschen wurden bei einem durch ein starkes Erdbeben ausgel¨osten Tsunami in Indonesien get¨otet. _rA_: At least 410 people were killed in a tsunami triggered by a strong earthquake in Indonesia.|
+||_IB_: Das Erdbeben in der Provinz Zentralsulawesi hat 410 Menschen get¨otet. _rB_: The earthquake in Central Sulawesi province has killed 410 people.|
+|TWITTER|_IA_: But my bro from the 757 EJ Manuel is the 1st QB gone. _rA_: My boy EJ Manuel being the 1st QB picked.|
+||_IB_: EJ Manuel will be the 1st QB taken in the 2013 NFL Draft. _rB_: EJ Manuel selected as the 1st QB in the 2013 NFL Draft.|
+|REALSUMM|_IA_: Mary Ann Diano was left homeless and hope- less when the storms hit Staten Island, New York, in October 2012. (...) _rA_: Mary Ann Diano, 62, lost her home in Staten Island in October 2012.. (...)|
+||_IB_: Denise and Glen Higgs, from Braunton, De- von, had all but lost hope that they would ever be able to conceive after glen was made infertile due to cancer treatment. (...) _rB_: Denise and Glen Higgs lost hope after glen was made infertile due to cancer treat- ment, but the couple had a daughter Mazy af- ter IVF treatment. (...)|
+
+Table 1: Examples of the four CONTRAST INSTRUCTIONS benchmark datasets.
+
+## 4 INCONSISTENCY OF EXISTING REWARD MODELS
+
+With CONTRAST INSTRUCTIONS, we evaluate the consistency of RMs trained with the standard ranking objective (Eq. 1).
+
+4
+
+**Experimental setup.** We initialize RMs from LLaMa-7B checkpoint (Touvron et al., 2023) and finetune on each of the four human preference datasets used to create our CONTRAST INSTRUCTIONS benchmark. We also finetune a multi-task version (Mishra et al., 2022) on the mixture of four human preference datasets. We use the following configurations for RM training for both single-task and multi-task settings. Due to resource constraints, we adopt the Low-Rank Adaptor (LoRA) (Hu et al., 2021) for training. We use the AdamW optimizer and set a learning rate of 2e-5. For multitask training, we combine the training set from selected benchmarks and train using LoRA with a learning rate of 3e-5. Finally, we report human performance resulting from the majority vote of three human annotators (the authors) on 100 randomly selected data points.
+
+## **Inconsistency of RMs on CONTRAST INSTRUC-**
+
+||Model _C_res _C_ins|Model _C_res _C_ins|Model _C_res _C_ins|
+|---|---|---|---|
+||Random LLaMa-7B(Single-Task) LLaMa-7B(Multi-Task)|50_._0 50_._0 53_._6 49_._4 53_._0 48_._8||
+|Human(Estimated)|Human(Estimated)|82_._8 81_._7||
+
+res **TIONS.** Table 2 summarizes the results of the finetuned RMs averaged on the four CONTRAST INRandom 50 _._ 0 50 _._ 0 STRUCTIONS benchmarks. We observe that with a LLaMa-7B (Single-Task) 53 _._ 6 49 _._ 4 relatively large 7B parameter RM, it still performs LLaMa-7B (Multi-Task) 53 _._ 0 48 _._ 8 close to random guessing in terms of both responses Human (Estimated) 82 _._ 8 81 _._ 7 ( _C_ res) and instruction consistency ( _C_ ins). This trend can be seen on per-dataset as well, in Table 3. In Table 2: _C_ res and _C_ ins (Eq.2, Eq.3) averaged our setting, multi-task training does not seem to help across four benchmarks. Standard RM train(no cross-task transfer), possibly due to the limited commonalities among these tasks. The reward moding performs near random performance, inels are slightly better in terms of _C_ res compared to dicating a major inconsistency gap between _C_ ins, which fits our expectation – the RM learning fine-tuned reward models and humans. objective (Eq.1) is more similar to _C_ res than it is to _C_ ins. The estimated human performance shows a wide gap compared to the RM performance on CONTRAST INSTRUCTIONS, suggesting reward inconsistency can be attributed to the standard practice of reward modeling.
+
+## 5 ENHANCING REWARD MODEL CONSISTENCY
+
+Having identified in §4 the inconsistencies of reward models, we now present methods to address these issues. Specifically, we propose two solutions: one to be applied during training (§5.1) and another during inference (§5.2), which does not impose additional computing costs. It’s important to note that these techniques are designed to be agnostic to CONTRAST INSTRUCTIONS’s format and setup, thereby minimizing the negative impact of Goodhart’s law (Manheim & Garrabrant, 2018).
+
+## 5.1 CONSISTENCY-INDUCING TRAINING VIA **CONVEXDA**
+
+To mitigate the effect of over-optimization during RM training, we design **CONVEXDA** , a lightweight, efficient data augmentation technique, that neither modifies the RM learning objective nor increases the overall training cost. The high-level idea is to create various perturbations of the original input through data augmentation and select the most representative one to replace the original input example during training.
+
+**Approach.** Given a human preference example ( _I, r_[+] _, r[−]_ ), we use an off-the-shelf textual data augmentation tool (Ma, 2019) to substitute words in the responses with synonyms according to WordNet (Miller, 1995) or PPDB (Ganitkevitch et al., 2013). For each example, we generate _N_ = 5 augmented versions _{I, rj_[+] _[, r] j[−][}][N] j_ =1[.][As using all] _[ N]_[data points for training would incur extra cost,] we draw inspiration from previous studies (Chen et al., 2010; Sener & Savarese, 2018; Rajput et al., 2019; Agarwal et al., 2020) and select one data point among five that serve as a vertex of a convex hull in the embedding space. This geometric approach ensures that we focus on the most critical points within the set of augmented data points. The strategy keeps the training efficiency on par with the standard RM training while offering the advantages of data augmentation.
+
+We use the SimCSE model (Gao et al., 2021) to embed each original and augmented response to a 768-dimensional vector. In principle, to construct a convex hull in a _k_ -dimensional embedding space, we need at least _k_ +1 data points. For such reason, we apply Principal Component Analysis (PCA) to reduce the dimensional of the embedding to 2, We identify and select the example that act
+
+5
+
+|METRIC|MODEL|METHOD STACK WMT TWITTER REALSUMM AVG.|
+|---|---|---|
+|_C_res|Human|81.0 89.0 83.0 78.0 82.8|
+||LLaMa-7B|Standard RM 50.1_♠_ 56.4 60.1 47.7 53.6 Our Approach **53.6** **60.4** **62.9** **52.6** **57.3**|
+|||_Ablating “Our Approach”_ **–**CONVEXDA 52.1(-1_._5) 58.4(-2_._0) 61.7(-1_._2) 50.2(-2_._4) 55.6(-1_._7) **–**REWARDFUSION 53.1(-0_._5) 59.9(-0_._5) 62.1(-0_._8) 51.2(-1_._4) 56.5(-0_._8)|
+|_C_ins|Human|82.1 84.3 81.2 79.2 81.7|
+||LLaMa-7B|Standard RM 48.2_♠_ 48.4 48.5 52.6 49.4 Our Approach **53.4** **53.9** 52.5 **56.5** **54.1**|
+|||_Ablating “Our Approach”_ **–**CONVEXDA 52.0(-1_._4) 52.1(-1_._8) **53.6**(+1_._1) 55.1(-1_._4) 53.2(-0_._9) **–**REWARDFUSION 52.9(-0_._5) 53.6(-0_._3) 52.5(0_._0) 55.7(-0_._8) 53.7(-0_._4)|
+
+Table 3: The evaluation of reward consistency from standard RM training vs. our approach across four different CONTRAST INSTRUCTIONS benchmarks, plus ablation studies on **CONVEXDA** and **REWARDFUSION** . _♠_ indicates results evaluated on the official checkpoint from Stack-LLaMa;
+
+as the corner points of a low-dimensional convex hull, and replace the original input with it during RM training.
+
+## 5.2 CONSISTENCY-INDUCING INFERENCE VIA **REWARDFUSION**
+
+During RM inference, we introduce **REWARDFUSION** . The method takes inspiration from (Zhao & Cho, 2019), where we first identify sentences similar to the response from the training corpus, and then use the weighted average reward score across the target response and the retrieved training samples as a better estimate for the reward score.
+
+**Approach.** At the inference time, given a pair of instructions and response _I ◦ r_ , we again use the SimCSE model to retrieve a set of similar training examples _{I ◦ r[∗] }_ that have cosine similarity to _I ◦ r_ over a threshold _δ_ from the training corpus. Then, we take the weighted average of the reward scores of the original plus retrieved training examples _X_ = ( _I ◦ r_ ) _∪{I ◦ r[∗] }_ :
+
+**==> picture [296 x 28] intentionally omitted <==**
+
+The threshold _δ_ = 0 _._ 95 is selected based on averaged performance on development sets. The embedding retrieval process is instantiated with Faiss (Johnson et al., 2019).
+
+## 5.3 EXPERIMENTS AND RESULTS
+
+We conduct experiments to evaluate the effectiveness of both techniques in enhancing the consistency of RM on the four CONTRAST INSTRUCTIONS benchmarks. We follow the same experimental settings detailed in §4. We start with single-task RMs trained on each human preference dataset and apply **CONVEXDA** and **REWARDFUSION** .
+
+**Findings.** We observe the following based on the results in Table 3. (1) Both **CONVEXDA** and **REWARDFUSION** effectively enhance the consistency of the reward model. (2) The combination of these two techniques works best, highlighting their complementarity in RM training and inference for enhancing consistency. (3) Despite the improvements brought by the two techniques, the overall performance on the CONTRAST INSTRUCTIONS benchmark remains limited. RMs with enhanced consistency from the two techniques still fall behind human performance by a large margin, demonstrating the challenges of addressing RM’s consistency. We defer further details to Appendix F.
+
+## 6 TRICKLE-DOWN EFFECT OF REWARD INCONSISTENTENCY ON RLHF
+
+Next, we explore the merits of having a more consistent RM in downstream RLHF training by comparing RLHF-trained language models with a standard (§4) vs. more consistent RM (§5).
+
+6
+
+**Experimental setup.** We follow the overall experimental setup outlined in StackLLaMa (Beeching et al., 2023). For the experiments, we use LLaMa-7B to initialize the supervised finetuning (SFT), reward, and policy models. We train the models on StackExchange, which is segmented into SFT, RM, and RL datasets. More implementation details can be found Appendix C. We train two RLHF models, one with the standard RM, and the other with RM finetuned on examples with CONTRAST INSTRUCTIONS format sampled from StackExchange training split. We denote this as the CONTRAST Ft. RM. We conduct a human evaluation on 500 questions randomly sampled from the test split of StackExchange.
+
+**==> picture [255 x 83] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Individual acceptability Individual acceptability Pairwise preference of Consistent RM of Original RM Unsure Unsure Original Reject Unsure Reject 26.7% 31.1% RM wins 20.0% 28.0% 30.0% 26.0% 42.2% 52.0% 44.0% Consistent RM winsRM wins Accept Accept **----- End of picture text -----**
+
+**Human evaluation.** To assess Unsure the general quality of the reUnsure Original Reject Unsure Reject sponses, we conduct two evalua26.7% 31.1% RM wins 20.0% 28.0% 30.0% 26.0% tions on responses generated by the two RLHF models. We first ask human raters to assess the 42.2% 52.0% 44.0% _individual acceptability_ of each Consistent RM winsRM wins Accept Accept model’s response. This process involves a three-way judgment Figure 2: Human evaluation of the RLHF models trained with _{_ Accept, Reject, Unsure _}_ . the consistent vs. original RM respectively. **Left** shows the pairA response is deemed acceptable wise preference, and **Middle** / **Right** shows individual acceptability of using consistent RM / original RM. only if it adequately addresses the question in the prompt; exhibits no significant error; and contains no redundant information. In addition, we ask the human rater to annotate the _pairwise preference_ between the two responses. We ask human raters to compare the outputs of two models and determine which model’s output is preferred. We also provide raters the option to indicate a tie between the responses. The human evaluation results are shown in Figure 2. We observe that with the more consistent RM, the downstream RLHF model demonstrates higher generation quality.
+
+Figure 2: Human evaluation of the RLHF models trained with the consistent vs. original RM respectively. **Left** shows the pairwise preference, and **Middle** / **Right** shows individual acceptability of using consistent RM / original RM.
+
+**Automatic evaluation.** We use MT-bench[1] (Zheng et al., 2023) for automatic evaluation. MT-Bench is a benchmark featuring challenging ONE-TURN or MULTITURN reasoning and instruction-following examples, where the model responses are graded by GPT-4 on a scale of 1 (worst) to 10 (best). Overall, the results are shown in Table 4. We observe that more consistent RMs lead to RLHF models generating more preferable responses under both settings.
+
+||Reward Model|One-turn|Multi-turn|
+|---|---|---|---|
+||Standard|3.44|2.39|
+||CONTRASTFt.|3.89|3.18|
+
+Table 4: The evaluation results on the MT-BENCH (Zheng et al., 2023). Score ranges from 1 (worst) to 10 (best).
+
+**Reward consistency** _⇒_ **More useful re-** Reward Model Relevance Usefulness Factuality **sponses.** To understand where the improvement lies, we follow criteria from Standard 92.4% 50.9% 49.1% Malaviya et al. (2023) and ask human CONTRAST Ft. 92.2% 57.8% 50.0% raters to assess the _relevance, usefulness_ and _factuality_ of RLHF model responses. Table 5: Fine-grained human evaluation of RLHF _Relevance_ indicates whether the response model response along three axes – _relevance, useful-_ is topically relevant to the instruction. _ness_ , and _factuality_ . Each axis are scored on a scale _Usefulness_ indicates whether a response of _{_ 0% : No; 50% : Partial/Unsure; 100% : Yes _}_ . We serves as a useful and direct answer to the observe RM consistency improves the usefulness, but instruction. _Factuality_ indicates the factuhave minimal impact on other two axes.
+
+ality of responses based on the raters’ judgment, for which minimal browsing on the internet is allowed if needed. The results are shown in Table 5. We observe a statistically significant improvement in usefulness ( _p <_ 0 _._ 01 with paired t-test). Otherwise, we see minimal impact on the relevance or factuality of responses. We show a pair of example responses in Table 11, and more examples can be found in Appendix K. Overall, we observe that the usefulness of the responses from the RLHF model with standard RM tends to decrease further into the response, while the issue is mitigated with a more consistent RM.
+
+> 1[URL removed]
+
+7
+
+**[Question]** : Is ”lemonade” countable or uncountable? Could I say the following sentence? “Could you please bring me a lemonade”? Or *must* I say “a glass of lemonade”?
+
+**[Consistent RM]** : ”Lemonade” is usually uncountable, but it can be used as a countable noun to mean ”a glass of lemonade”. It is uncommon, but possible, to treat ”lemonade” as a countable noun. This applies not only to lemonade but to most beverages. **[Standard RM]** : Answer: The word lemonade is uncountable, like the word milk, and you can’t refer to a single glass of it. It would be fine to say: Could you please bring me a glass of lemonade? However, in the context of a restaurant or a cafeteria, it’s more usual to order a lemonade with your meal. In that case, the correct sentence would be: Could you please bring me a lemonade with my meal?
+
+Table 6: Example responses from two RLHF models. More examples in Appendix K.
+
+## 7 DISCUSSION
+
+## 7.1 DOES THE STANDARD RM EVALUATION CAPTURE REWARD (IN-)CONSISTENCY?
+
+A reader may wonder whether the evaluation via the original datasets (task prompts and responses preferred by humans) is sufficient to reflect RMs’ level of consistency. (Alternatively, is CONTRAST INSTRUCTIONS really necessary?)
+
+||Method Standard RM|_C_res 53_._6|_C_ins 49_._4|RMEVAL 75_._6|
+|---|---|---|---|---|
+
+Table 7: The improvements on the reward consistency ( _C_ res, _C_ ins) are not reflected in the RMs’ original response ranking metric (RMEVAL). CONTRAST Ft. refers to model finetuned on training examples with CONTRAST INSTRUCTIONS format.
+
+To illustrate this, we evaluate RMs’ average performance on
+
+the test set of the four human preference datasets (§3). Table 7 shows the results. We observe that despite the improvements in terms _C_ res and _C_ ins of our CONVEXDA + REWARDFUSION approach, the level of improvements are not reflected in the original RM evaluation metric (RMEVAL). To further validate this observation, we evaluate the CONTRAST Ft. RMs, i.e. RMs finetuned on training examples with CONTRAST INSTRUCTIONS format sampled from each of the four human preference datasets (§6). We observe a similar pattern that despite the large (but unfair) improvements on _C_ res and _C_ ins, the performance on RMEVAL remains stale. These findings suggest that beyond the issue of RM over-optimization, we potentially need to rethink the current standard setup for preference-based reward modeling, which might be the inherent cause of reward inconsistency.
+
+7.2 A CLOSER LOOK TO WHY (OR WHERE) REWARD MODELS ARE INCONSISTENT
+
+The underlying motivation behind RM consistency closely resembles model calibration (Guo et al., 2017), i.e. in the ideal case, we would expect the reward scores from an RM to be perfectly calibrated and correlated with human preferences. In such a sense, reward consistency serves as a good indicator and proxy measure for the correlation between the reward score from RMs vs. human judgments. In Figure 3, we show the reward score correlation on two human preference datasets, TWITTER and REALSUMM, where multiple candidate responses with their corresponding human-rated quality (scaled between 0-1) are provided for each instruction. We compare the reward score correlation from the
+
+**==> picture [249 x 180] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Spearman correlation = 0.456 Spearman correlation = 0.597 1.0 1.0 0.5 0.5 0.0 0.0 0.5 0.5 1.0 1.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 Human Score Human Score Spearman correlation = 0.361 Spearman correlation = 0.423 1.0 1.0 0.5 0.5 0.0 0.0 0.5 0.5 1.0 1.0 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0 Human Score Human Score Reward Score Reward Score Reward Score Reward Score **----- End of picture text -----**
+
+Figure 3: The correlation between RMs’ vs. humans’ reward score on TWITTER ( ) and REALSUMM ( ). Left plots show results from standard RM; Right plots show RM enhanced with CONVEXDA and REWARDFUSION.
+
+standard reward model (i.e., left two plots in Fig 3) vs. from the RM enhanced with CONVEXDA and REWARDFUSION (right two plots). Generally, we observe that the more consistent RM yields a higher reward score correlation with humans. While standard RMs can achieve a relatively good
+
+8
+
+correlation with human preferences, the reward score exhibits higher variance, especially when it comes to pairs of responses that are closer in terms of human score. This echoes our observations with respect to standard RM learning objectives and evaluations. From RMs’ perspective, correctly distinguishing between a clearly good vs. bad response is easy. Optimizing or evaluating against such would not indicate RMs’ alignment with human preference. Including such easy pairs for evaluation would likely lead to overestimation of RMs performance, which further motivates CONTRAST INSTRUCTIONS as a benchmarking strategy for RMs, as well as a potential training strategy, as we demonstrate in §6.
+
+## 7.3 CONSISTENCY CHECK BEYOND CONTRAST INSTRUCTIONS
+
+CONTRAST INSTRUCTIONS provides an automatic, efficient, and intuitive evaluation framework for assessing the consistency of preference-based reward modeling. Nonetheless, it does not necessarily encompass all possible phenomena with respect to RM consistency or robustness. For such reason, we conduct preliminary analysis in adversarial and backdoor attacks (Chen et al., 2017; Shen et al., 2023) for RM. The details of the experiments are included in Appendix D and Appendix E. We observe that overall RMs suffer from a high attack success rate and exhibit vulnerability to both adversarial and backdoor attacks. The findings suggest the potential implication of reward inconsistency on RM and subsequently RLHF safety.
+
+## 7.4 BROADER IMPACT AND LIMITATIONS
+
+Despite the widespread interest in RLHF within the research community, our understanding so far on “ _what type of reward modeling would most benefit RLHF_ ” remains fairly limited. We argue that this can in part be attributed to (1) the lack of a proper _intrinsic_ evaluation metric on RM itself, as we see in §7.1; and subsequently (2) RM evaluations relying heavily on _extrinsic_ RLHF evaluations. Because RLHF evaluations often rely on human annotations (Wu et al., 2023; Lee et al., 2023), which can be costly and unreliable, they offer limited insights on how we should make research progress on reward modeling. Even though CONTRAST INSTRUCTIONS do not necessarily assess all capabilities that a RM requires, we hope that it works as a sensible and scalable intrinsic evaluation metric that facilitates future development of better or alternative reward modeling strategies.
+
+## 8 RELATED WORK
+
+**Consistency in NLP** Consistency has been a long-standing topic in NLP research, in previous works, consistency of an NLP mode is defined the invariance of its behavior under meaningpreserving alternations (Ribeiro et al., 2020; Elazar et al., 2021; Goel et al., 2021; Wang et al., 2022b), and several works have explored the consistency in various tasks (Du et al., 2019; Ribeiro et al., 2019; Alberti et al., 2019; Camburu et al., 2020; Asai & Hajishirzi, 2020; Kassner et al., 2021; Chen et al., 2021a; Elazar et al., 2021; Mitchell et al., 2022). In the context of reward modeling, we study the consistency with respect to human preference instead.
+
+**Reinforcement Learning from Human Feedback** RLHF (Ouyang et al., 2022; OpenAI, 2023) has merged as a popular technique for aligning LLMs with human preferences (Nakano et al., 2021; Glaese et al., 2022; Bai et al., 2022b; Ouyang et al., 2022; Bai et al., 2022a). The RLHF method involves learning a reward function on human annotations to proxy human preferences, and optimizing language models through reinforcement learning techniques such as Proximal Policy Optimization (PPO) (Schulman et al., 2017). A key implication of RLHF research is to align LLMs with helpful, honest, and harmless human feedback (Askell et al., 2021), (Glaese et al., 2022).
+
+## 9 CONCLUSION
+
+Through the lens of CONTRAST INSTRUCTIONS, we uncover and study the phenomena of reward inconsistency in reward modeling for RLHF. While our study suggests one perspective and direction on improving RM for RLHF, the question of “ _what type of reward modeling would most benefit RLHF_ ” remains wide open. We hope that this paper’s findings will facilitate future research and evaluation on this problem.
+
+9
+
+## REFERENCES
+
+- Sharat Agarwal, Himanshu Arora, Saket Anand, and Chetan Arora. Contextual diversity for active learning. In _The European Conference on Computer Vision_ (ECCV), pp. 137–153. Springer, 2020. URL [URL removed]
+
+- Chris Alberti, Daniel Andor, Emily Pitler, Jacob Devlin, and Michael Collins. Synthetic QA corpora generation with roundtrip consistency. In Anna Korhonen, David R. Traum, and Llu´ıs M`arquez (eds.), _Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers_ , pp. 6168– 6173. Association for Computational Linguistics, 2019. doi: 10.18653/v1/p19-1620. URL [URL removed]
+
+- Moustafa Alzantot, Yash Sharma, Ahmed Elgohary, Bo-Jhang Ho, Mani B Srivastava, and Kai-Wei Chang. Generating natural language adversarial examples. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), 2018. URL [URL removed] 07998.
+
+- Akari Asai and Hannaneh Hajishirzi. Logic-guided data augmentation and regularization for consistent question answering. In Dan Jurafsky, Joyce Chai, Natalie Schluter, and Joel R. Tetreault (eds.), _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020_ , pp. 5642–5650. Association for Computational Linguistics, 2020. doi: 10.18653/v1/2020.acl-main.499. URL [URL removed] 2020.acl-main.499.
+
+- Amanda Askell, Yuntao Bai, Anna Chen, Dawn Drain, Deep Ganguli, Tom Henighan, Andy Jones, Nicholas Joseph, Ben Mann, Nova DasSarma, et al. A general language assistant as a laboratory for alignment. _arXiv preprint arXiv:2112.00861_ , 2021. URL [URL removed] 2112.00861.
+
+- Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. _arXiv preprint arXiv:2204.05862_ , 2022a. URL [URL removed]
+
+- Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, et al. Constitutional ai: Harmlessness from ai feedback. _arXiv preprint arXiv:2212.08073_ , 2022b. URL https: //arxiv.org/abs/2212.08073.
+
+- Edward Beeching, Younes Belkada, Kashif Rasul, Lewis Tunstall, Leandro von Werra, Nazneen Rajani, and Nathan Lambert. Stackllama: An rl fine-tuned llama model for stack exchange question and answering, 2023. URL [URL removed]
+
+- Yonatan Belinkov and Yonatan Bisk. Synthetic and natural noise both break neural machine translation. In _International Conference on Learning Representations_ (ICLR), 2018. URL [URL removed]
+
+- Manik Bhandari, Pranav Narayan Gour, Atabak Ashfaq, Pengfei Liu, and Graham Neubig. Reevaluating evaluation in text summarization. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), pp. 9347–9359, 2020. URL [URL removed] 2010.07100.
+
+- Oana-Maria Camburu, Brendan Shillingford, Pasquale Minervini, Thomas Lukasiewicz, and Phil Blunsom. Make up your mind! adversarial generation of inconsistent natural language explanations. In Dan Jurafsky, Joyce Chai, Natalie Schluter, and Joel R. Tetreault (eds.), _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020_ , pp. 4157–4165. Association for Computational Linguistics, 2020. doi: 10.18653/v1/2020.acl-main.382. URL [URL removed] acl-main.382.
+
+10
+
+- Sihao Chen, Fan Zhang, Kazoo Sone, and Dan Roth. Improving faithfulness in abstractive summarization with contrast candidate generation and selection. In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 5935–5941, Online, June 2021a. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.475. URL [URL removed] naacl-main.475.
+
+- Xiaoyi Chen, Ahmed Salem, Michael Backes, Shiqing Ma, and Yang Zhang. Badnl: Backdoor attacks against NLP models. In _ICML Workshop on Adversarial Machine Learning_ , 2021b. URL [URL removed]
+
+- Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. _arXiv preprint arXiv:1712.05526_ , 2017.
+
+- Yutian Chen, Max Welling, and Alex Smola. Super-samples from kernel herding. In _Conference on Uncertainty in Artificial Intelligence_ (UAI), pp. 109–116, 2010. URL [URL removed] abs/1203.3472.
+
+- Jiazhu Dai, Chuanshuai Chen, and Yufeng Li. A backdoor attack against lstm-based text classification systems. _IEEE Access_ , 7:138872–138878, 2019. URL [URL removed] 1905.12457.
+
+- Hanze Dong, Wei Xiong, Deepanshu Goyal, Rui Pan, Shizhe Diao, Jipeng Zhang, Kashun Shum, and Tong Zhang. Raft: reward ranked finetuning for generative foundation model alignment. _arXiv preprint arXiv:2304.06767_ , 2023. URL [URL removed]
+
+- Xinya Du, Bhavana Dalvi Mishra, Niket Tandon, Antoine Bosselut, Wen-tau Yih, Peter Clark, and Claire Cardie. Be consistent! improving procedural text comprehension using label consistency. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers)_ , pp. 2347–2356. Association for Computational Linguistics, 2019. doi: 10.18653/ v1/n19-1244. URL [URL removed]
+
+- Steffen Eger, G¨ozde G¨ul S¸ahin, Andreas R¨uckl´e, Ji-Ung Lee, Claudia Schulz, Mohsen Mesgar, Krishnkant Swarnkar, Edwin Simpson, and Iryna Gurevych. Text processing like humans do: Visually attacking and shielding nlp systems. In _Conference of the North American Chapter of the Association for Computational Linguistics_ (NAACL), pp. 1634–1647, 2019. URL https: //arxiv.org/abs/1903.11508.
+
+- Yanai Elazar, Nora Kassner, Shauli Ravfogel, Abhilasha Ravichander, Eduard H. Hovy, Hinrich Sch¨utze, and Yoav Goldberg. Erratum: Measuring and improving consistency in pretrained language models. _Trans. Assoc. Comput. Linguistics_ , 9:1407, 2021. doi: 10.1162/tacl _\_ ~~x~~ _\_ ~~0~~ 0455. URL [URL removed]
+
+- Juri Ganitkevitch, Benjamin Van Durme, and Chris Callison-Burch. Ppdb: The paraphrase database. In _Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 758–764, 2013. URL https: //aclanthology.org/N13-1092/.
+
+- Ji Gao, Jack Lanchantin, Mary Lou Soffa, and Yanjun Qi. Black-box generation of adversarial text sequences to evade deep learning classifiers. In _IEEE Security and Privacy Workshops (SPW)_ , 2018. URL [URL removed]
+
+- Leo Gao, John Schulman, and Jacob Hilton. Scaling laws for reward model overoptimization. _arXiv preprint arXiv:2210.10760_ , 2022. URL [URL removed]
+
+- Tianyu Gao, Xingcheng Yao, and Danqi Chen. Simcse: Simple contrastive learning of sentence embeddings. _arXiv preprint arXiv:2104.08821_ , 2021. URL [URL removed] 2104.08821.
+
+11
+
+- Matt Gardner, Yoav Artzi, Victoria Basmova, Jonathan Berant, Ben Bogin, Sihao Chen, Pradeep Dasigi, Dheeru Dua, Yanai Elazar, Ananth Gottumukkala, et al. Evaluating models’ local decision boundaries via contrast sets. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP) _- Findings_ , 2020. URL [URL removed]
+
+- Amelia Glaese, Nat McAleese, Maja Trbacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, et al. Improving alignment of dialogue agents via targeted human judgements. _arXiv preprint arXiv:2209.14375_ , 2022. URL [URL removed]
+
+- Dongyoung Go, Tomasz Korbak, Germ´an Kruszewski, Jos Rozen, Nahyeon Ryu, and Marc Dymetman. Aligning language models with preferences through f-divergence minimization. _arXiv preprint arXiv:2302.08215_ , 2023. URL [URL removed]
+
+- Karan Goel, Nazneen Fatema Rajani, Jesse Vig, Zachary Taschdjian, Mohit Bansal, and Christopher R´e. Robustness gym: Unifying the nlp evaluation landscape. In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Demonstrations_ , pp. 42–55, 2021. URL https: //arxiv.org/abs/2101.04840.
+
+- Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning model supply chain. _arXiv preprint arXiv:1708.06733_ , 2017. URL https: //arxiv.org/abs/1708.06733.
+
+- Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In _International conference on machine learning_ , pp. 1321–1330. PMLR, 2017. URL [URL removed]
+
+- Xuanli He, Lingjuan Lyu, Lichao Sun, and Qiongkai Xu. Model extraction and adversarial transferability, your bert is vulnerable! In _Conference of the North American Chapter of the Association for Computational Linguistics_ (NAACL), pp. 2006–2012, 2021. URL https: //arxiv.org/abs/2103.10013.
+
+- Donald Joseph Hejna III and Dorsa Sadigh. Few-shot preference learning for human-in-the-loop RL. In _Conference on Robot Learning_ (CoRL), pp. 2014–2025, 2023. URL [URL removed] org/abs/2212.03363.
+
+- Edward J Hu, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen, et al. Lora: Low-rank adaptation of large language models. In _International Conference on Learning Representations_ (ICLR), 2021. URL [URL removed]
+
+- Po-Sen Huang, Robert Stanforth, Johannes Welbl, Chris Dyer, Dani Yogatama, Sven Gowal, Krishnamurthy Dvijotham, and Pushmeet Kohli. Achieving verified robustness to symbol substitutions via interval bound propagation. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), pp. 4083–4093, 2019. URL [URL removed]
+
+- Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. In _EMNLP_ , 2017. URL [URL removed]
+
+- Robin Jia, Aditi Raghunathan, Kerem G¨oksel, and Percy Liang. Certified robustness to adversarial word substitutions. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), 2019. URL [URL removed]
+
+- Di Jin, Zhijing Jin, Joey Tianyi Zhou, and Peter Szolovits. Is bert really robust? a strong baseline for natural language attack on text classification and entailment. In _Conference on Artificial Intelligence_ (AAAI), 2020. URL [URL removed]
+
+- Jeff Johnson, Matthijs Douze, and Herv´e J´egou. Billion-scale similarity search with GPUs. _IEEE Transactions on Big Data_ , 7(3):535–547, 2019. URL [URL removed] 08734.
+
+- Nora Kassner, Oyvind Tafjord, Hinrich Schutze, and Peter Clark. Enriching a model’s notion of belief using a persistent memory. _arXiv preprint arXiv:2104.08401_ , 2021. URL [URL removed]
+
+12
+
+- Tomasz Korbak, Kejian Shi, Angelica Chen, Rasika Bhalerao, Christopher L Buckley, Jason Phang, Samuel R Bowman, and Ethan Perez. Pretraining language models with human preferences. _arXiv preprint arXiv:2302.08582_ , 2023. URL [URL removed] id=AT8Iw8KOeC.
+
+- Thai Le, Noseong Park, and Dongwon Lee. A sweet rabbit hole by darcy: Using honeypots to detect universal trigger’s adversarial attacks. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), pp. 3831–3844. Association for Computational Linguistics (ACL), 2021. URL [URL removed]
+
+- Harrison Lee, Samrat Phatale, Hassan Mansoor, Kellie Lu, Thomas Mesnard, Colton Bishop, Victor Carbune, and Abhinav Rastogi. Rlaif: Scaling reinforcement learning from human feedback with ai feedback. _arXiv preprint arXiv:2309.00267_ , 2023. URL [URL removed] 2309.00267.pdf.
+
+- Ximing Lu, Sean Welleck, Jack Hessel, Liwei Jiang, Lianhui Qin, Peter West, Prithviraj Ammanabrolu, and Yejin Choi. Quark: controllable text generation with reinforced unlearning. _Advances in neural information processing systems_ , 35:27591–27609, 2022. URL https: //arxiv.org/abs/2205.13636.
+
+- Edward Ma. NLP augmentation, 2019. URL [URL removed]
+
+- Qingsong Ma, Johnny Wei, Ondˇrej Bojar, and Yvette Graham. Results of the WMT19 metrics shared task: Segment-level and strong MT systems pose big challenges. In _Conference on Machine Translation_ (WMT), 2019. URL [URL removed]
+
+- Chaitanya Malaviya, Subin Lee, Sihao Chen, Elizabeth Sieber, Mark Yatskar, and Dan Roth. Expertqa: Expert-curated questions and attributed answers. _arXiv preprint arXiv:2309.07852_ , 2023.
+
+- David Manheim and Scott Garrabrant. Categorizing variants of goodhart’s law. _arXiv preprint arXiv:1803.04585_ , 2018. URL [URL removed]
+
+- George Miller. Wordnet: a lexical database for english. _Communications of the ACM_ , 38(11):39–41, 1995. URL [URL removed]
+
+- Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. Cross-Task Generalization via Natural Language Crowdsourcing Instructions. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), 2022. URL [URL removed]
+
+- Eric Mitchell, Joseph J. Noh, Siyan Li, William S. Armstrong, Ananth Agarwal, Patrick Liu, Chelsea Finn, and Christopher D. Manning. Enhancing self-consistency and performance of pre-trained language models through natural language inference. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang (eds.), _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022_ , pp. 1754–1768. Association for Computational Linguistics, 2022. doi: 10.18653/v1/2022. emnlp-main.115. URL [URL removed]
+
+- Maximilian Mozes, Pontus Stenetorp, Bennett Kleinberg, and Lewis Griffin. Frequency-guided word substitutions for detecting textual adversarial examples. In _Conference of the European Chapter of the Association for Computational Linguistics_ (EACL), pp. 171–186, 2021. URL [URL removed]
+
+- Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, et al. WebGPT: Browserassisted question-answering with human feedback. _arXiv preprint arXiv:2112.09332_ , 2021. URL [URL removed]
+
+- OpenAI. GPT-4 Technical Report, 2023. URL [URL removed]
+
+- Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training Language Models to Follow Instructions with Human Feedback. In _Advances in Neural Information Processing Systems_ (NeurIPS), 2022. URL [URL removed]
+
+13
+
+Fanchao Qi, Yangyi Chen, Mukai Li, Yuan Yao, Zhiyuan Liu, and Maosong Sun. Onion: A simple and effective defense against textual backdoor attacks. _arXiv preprint arXiv:2011.10369_ , 2020. URL [URL removed]
+
+- Fanchao Qi, Yangyi Chen, Xurui Zhang, Mukai Li, Zhiyuan Liu, and Maosong Sun. Mind the style of text! adversarial and backdoor attacks based on text style transfer. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), pp. 4569–4580, 2021a. URL [URL removed]
+
+- Fanchao Qi, Mukai Li, Yangyi Chen, Zhengyan Zhang, Zhiyuan Liu, Yasheng Wang, and Maosong Sun. Hidden killer: Invisible textual backdoor attacks with syntactic trigger. _arXiv preprint arXiv:2105.12400_ , 2021b. URL [URL removed]
+
+- Shashank Rajput, Zhili Feng, Zachary Charles, Po-Ling Loh, and Dimitris Papailiopoulos. Does data augmentation lead to positive margin? In _International Conference on Learning Representations_ (ICLR), pp. 5321–5330, 2019. URL [URL removed]
+
+- Shuhuai Ren, Yihe Deng, Kun He, and Wanxiang Che. Generating natural language adversarial examples through probability weighted word saliency. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), 2019. URL [URL removed] P19-1103/.
+
+- Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. Semantically equivalent adversarial rules for debugging nlp models. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), 2018. URL [URL removed]
+
+- Marco T´ulio Ribeiro, Carlos Guestrin, and Sameer Singh. Are red roses red? evaluating consistency of question-answering models. In Anna Korhonen, David R. Traum, and Llu´ıs M`arquez (eds.), _Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers_ , pp. 6174–6184. Association for Computational Linguistics, 2019. doi: 10.18653/v1/p19-1621. URL [URL removed] 10.18653/v1/p19-1621.
+
+- Marco Tulio Ribeiro, Tongshuang Wu, Carlos Guestrin, and Sameer Singh. Beyond accuracy: Behavioral testing of nlp models with checklist. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), pp. 4902–4912, 2020. URL [URL removed] 2020.acl-main.442/.
+
+- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. _arXiv preprint arXiv:1707.06347_ , 2017. URL [URL removed] org/abs/1707.06347.
+
+- Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. In _International Conference on Learning Representations_ (ICLR), 2018. URL https: //arxiv.org/abs/1708.00489.
+
+- Lingfeng Shen, Haiyun Jiang, Lemao Liu, and Shuming Shi. Rethink stealthy backdoor attacks in natural language processing. _arXiv preprint arXiv:2201.02993_ , 2022a. URL [URL removed] org/abs/2201.02993.
+
+- Lingfeng Shen, Shoushan Li, and Ying Chen. KATG: keyword-bias-aware adversarial text generation for text classification. In _Conference on Artificial Intelligence_ (AAAI), 2022b. URL [URL removed]
+
+- Lingfeng Shen, Lemao Liu, Haiyun Jiang, and Shuming Shi. On the evaluation metrics for paraphrase generation. In _Conference on Empirical Methods in Natural Language Processing_ (EMNLP), pp. 3178–3190, 2022c. URL [URL removed]
+
+- Lingfeng Shen, Ze Zhang, Haiyun Jiang, and Ying Chen. Textshield: Beyond successfully detecting adversarial sentences in text classification. In _International Conference on Learning Representations_ (ICLR), 2023. URL [URL removed]
+
+14
+
+- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth´ee Lacroix, Baptiste Rozi`ere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. LLaMA: Open and efficient foundation language models. _arXiv preprint arXiv:2302.13971_ , 2023. URL https: //arxiv.org/abs/2302.13971.
+
+- Boxin Wang, Chejian Xu, Xiangyu Liu, Yu Cheng, and Bo Li. Semattack: Natural textual attacks via different semantic spaces. _arXiv preprint arXiv:2205.01287_ , 2022a. URL [URL removed] org/abs/2205.01287.
+
+- Xiaosen Wang, Jin Hao, Yichen Yang, and Kun He. Natural language adversarial defense through synonym encoding. In _Conference on Uncertainty in Artificial Intelligence_ (UAI), 2021. URL [URL removed]
+
+- Xuezhi Wang, Haohan Wang, and Diyi Yang. Measure and improve robustness in NLP models: A survey. In _Conference of the North American Chapter of the Association for Computational Linguistics_ (NAACL), pp. 4569–4586, 2022b. URL [URL removed]
+
+- Zeqiu Wu, Yushi Hu, Weijia Shi, Nouha Dziri, Alane Suhr, Prithviraj Ammanabrolu, Noah A Smith, Mari Ostendorf, and Hannaneh Hajishirzi. Fine-grained human feedback gives better rewards for language model training. In _Advances in Neural Information Processing Systems_ , 2023. URL [URL removed]
+
+- Xinze Zhang, Junzhe Zhang, Zhenhua Chen, and Kun He. Crafting adversarial examples for neural machine translation. In _Annual Meeting of the Association for Computational Linguistics_ (ACL), pp. 1967–1977, 2021. URL [URL removed] 153.pdf.
+
+- Yuan Zhang, Jason Baldridge, and Luheng He. Paws: Paraphrase adversaries from word scrambling. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pp. 1298–1308, 2019. URL [URL removed]
+
+- Jake Zhao and Kyunghyun Cho. Retrieval-augmented convolutional neural networks against adversarial examples. In _IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019_ , pp. 11563– 11571. Computer Vision Foundation / IEEE, 2019. doi: 10.1109/CVPR.2019.01183. URL [URL removed] Retrieval-Augmented_Convolutional_Neural_Networks_Against_ Adversarial_Examples_CVPR_2019_paper.html.
+
+- Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. _arXiv preprint arXiv:2306.05685_ , 2023. URL [URL removed] 2306.05685.
+
+- Banghua Zhu, Jiantao Jiao, and Michael Jordan. Principled reinforcement learning with human feedback from pairwise or _k_ -wise comparisons. In _ICLR Workshop on Mathematical and Empirical Understanding of Foundation Models_ , 2023. URL [URL removed] 11270.
+
+- Daniel M Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. _arXiv preprint arXiv:1909.08593_ , 2019. URL [URL removed]
+
+15
+
+## SUPPLEMENTARY MATERIAL
+
+|Appendix|Contents|
+|---|---|
+|Appendix A|The details of our CONTRASTINSTRUCTIONS|
+|Appendix B|Full results on CONTRASTINSTRUCTIONS|
+|Appendix D|Adversarial consistency of RM|
+|Appendix E|Backdoor consistency of RM|
+|Appendix F|Analyses towards**CONVEXDA**and**REWARDFUSION**|
+|Appendix C|The training details of the RLHF process?|
+|Appendix K|Case studies|
+
+## A DETAILS OF CONTRAST INSTRUCTIONS
+
+Using a human preference dataset, we have divided it into training, development, and testing sets. The reward model is trained on the training set and ceases training once it attains optimal performance on the development set. Subsequently, it is evaluated on the test set. Our CONTRAST INSTRUCTIONS are built upon the test set in each benchmark. To ensure the retrieved instruction differs from the original one, we establish a similarity threshold range (e.g., [0 _._ 8 _,_ 0 _._ 9]). Only instructions falling within this similarity range are retrieved.
+
+## B FULL RESULTS ON CONTRAST INSTRUCTIONS
+
+|DATA||MODEL|METHOD|STACK|WMT|TWITTER|REALSUMM|AVG.|
+|---|---|---|---|---|---|---|---|---|
+||||**CONTRAST**|67_._9|79_._3|86_._3|72_._9|76_._6|
+||||**NONE**|67_._3_♠_|78_._0|85_._0|72_._1|75_._6|
+|ORIGINAL|TEST|LLaMa-7B|**MULTI-TASK** **CONVEXDA**|67_._1 67_._6_♠_|77_._6 78_._5|84_._6 85_._3|71_._7 72_._4|75_._3 76_._1|
+||||**REWARDFUSION**|67_._5_♠_|78_._2|85_._4|72_._3|75_._9|
+||||**COMBINE**|67_._6|78_._5|85_._4|72_._5|76_._2|
+|||Human|**N/A**|81_._0|89_._0|83_._0|78_._0|82_._8|
+||||**CONTRAST**|60.9|67.0|68.2|60.7|64.2|
+||||**NONE**|50_._1_♠_|56_._4|60_._1|47_._7|53_._6|
+|_C_res||LLaMa-7B|**MULTI-TASK** **CONVEXDA**|49_._7 53.1|53_._4 59.9|58_._1 62.1|50_._7 51.2|53_._0 56.5|
+||||**REWARDFUSION**|52.1|58.4|61.7|50.2|55.6|
+||||**COMBINE**|53.6|60.4|62.9|52.6|57.3|
+|||Human|**N/A**|82_._1|84_._3|81_._2|79_._2|81_._7|
+||||**CONTRAST**|58.4|64.5|67.7|61.0|62.9|
+||||**NONE**|48_._2_♠_|48_._4|48_._5|52_._6|49_._4|
+|_C_ins||LLaMa-7B|**MULTI-TASK** **CONVEXDA**|48_._0 52.9|48_._1 53.6|47_._8 52.5|51_._4 55.7|48_._8 53.7|
+||||**REWARDFUSION**|52.0|52.1|53.6|55.1|53.2|
+||||**COMBINE**|53.4|53.9|52.5|56.5|54.1|
+
+Table 8: The evaluation of the reward model’s accuracy on different CONTRAST INSTRUCTIONS, where **instruction (ins)** and **response (res)** perturbations are introduced. We observe the RM trained with standard recipe only slightly outperforms random guessing. Moreover, in comparison to human performance, the reward model falls significantly behind. _♠_ means the official checkpoint from Stack-LLaMa. **CONTRAST Ft** . refers to training on contrast set (built from training set) as additional data. **MULTI-TASK** refers to training on the mixture of STACK, WMT, TWITTER and REALSUMM.
+
+16
+
+## C CONFIGURATIONS OF RL TRAINING
+
+There are three models in the RL training stage: the SFT model, the reward model, and the policy model. For two groups of experiments, one uses the original RM (no extra methods), and the other one uses RM fine-tuned on CONTRAST INSTRUCTIONS. For the SFT model, both of the groups use the same SFT model, which is fine-tuned on StackExchange. We employ the Low-Rank Adaptor (LoRA) technique (Hu et al., 2021) for training the reward model, with the same configuration in StackLLaMa (Beeching et al., 2023). The training is conducted in an INT8 style, due to our computational limits. The learning rate is set to 1 _._ 4 _e −_ 5, and we utilize the Adafactor optimizer. The default learning rate scheduler type is set to ‘linear’. The initial KL penalty coefficient is set as 0.2, and an adaptive KL control is used, with a linear scheduler. The pretraining gradient coefficient _γ_ is set to 0 for our experiments.
+
+## D CONSISTENCY OF REWARD MODELING WHEN FACING ADVERSARIAL ATTACKS
+
+## D.1 BACKGROUND
+
+Adversarial attacks are independent of access to the RM’s training data. Within the context of an adversarial attack process, there are principally two actors: the _victim_ (reward model) _Rθ_ and the _attack algorithm A_ . (1) Victim: Presented with a human-preference benchmark consisting of benign sentence pairs (those without adversarial perturbations), the victim reward model _Rθ_ is trained on these pairs to differentiate the human-preferred response corresponding to the instruction _I_ . (2) Attack algorithm: For a benign sentence pair ( _rA, rB_ ) with the correct label _yA_ , the text attack _A_ generates an adversarial sentence _rA[∗]_ = _A_ ( _rA_ ) by adding subtle textual perturbations to _rA_ . The goal of these perturbations is twofold: (1) to cause the reward model to issue an incorrect prediction _yB_ , and (2) to ensure that the semantics between _rA_ and _rA[∗]_ remain closely aligned.
+
+Adversarial consistency refers to a model’s resilience against perturbations generated by adversarial attacks, which try to modify the texts with imperceptible perturbations. Coarsely, these attacks modify the text data at character level (Belinkov & Bisk, 2018; Eger et al., 2019; He et al., 2021), word level (Alzantot et al., 2018; Zhang et al., 2021; Wang et al., 2022a) or sentence level (Jia & Liang, 2017; Ribeiro et al., 2018; Zhang et al., 2019). Basically, the defense methods against adversarial attacks, which can be categorized into three paradigms: (1) model-enhancement-based (Le et al., 2021; Wang et al., 2021; Shen et al., 2022b), (2) certified-robustness-based (Huang et al., 2019; Jia et al., 2019), and (3) detection-based (Mozes et al., 2021; Le et al., 2021; Shen et al., 2023).
+
+We employ a range of existing textual attacks to assess the consistency of the Reward Model (RM). Our chosen attacks encompass three distinct levels of complexity, ranging from straightforward character manipulations to intricate word-level perturbations. For character-level manipulations, we employ methods such as VIPER (Eger et al., 2019) and DeepWordBug (Gao et al., 2018). At an intermediate, word-level complexity, we leverage techniques such as PWWS (Ren et al., 2019), Genetic Attack (GA) (Alzantot et al., 2018), and TextFooler (Jin et al., 2020). Additionally, we introduce a simplistic word-level adversarial method, designated as Vanilla Attack (VA), which exclusively utilizes word-level data augmentation for adversarial perturbations, eschewing additional algorithmic complexity. A detailed description of the Vanilla Attack (VA) is shown in algorithm 1.
+
+## D.2 EVALUATION
+
+Adversarial attacks originate from an iterative accumulation of adversarial perturbations. Accordingly, we introduce two distinct metrics to encapsulate the model’s response to the incorporation of each successive perturbation: adversarial accuracy, which refers to the RM accuracy on adversarial data, denoted as _P_ . These metrics are engineered to illustrate the consistency of RM at both the reward score tier and the performance tier. They are formally defined as follows:
+
+where _ϵi_ is the perturbation generated by attack in the i-th iteration.
+
+_P_ = Acc( _D_ + _ϵi_ ) (5)
+
+17
+
+**Algorithm 1:** Vanilla Attack (VA) **Data:** Reward model _Rθ_ ; human-preferred response _rj_ ; non-human-preferred response _rk_ ; instruction _I_ ; data augmentation transformation _G_ ; **Result:** adversarial sentence _rj[∗]_[and] _[ r] k[∗]_[;] Initialize _Rj_ = _Rθ_ ( _I ◦ rj_ ), _Rk_ = _Rθ_ ( _I ◦ rk_ ), _i_ = 0; Initialize _L_ = max(len( _rj_ ) _,_ len( _rk_ )); **while** _i < L_ **do** _rj[∗]_[=] _[ G]_[(] _[r][j]_[)][;] _rk[∗]_[=] _[ G]_[(] _[r][k]_[)][;] _Rj[∗]_[=] _[ R][θ]_[(] _[I][◦][r] j[∗]_[)][,] _[ R] k[∗]_[=] _[ R][θ]_[(] _[I][◦][r] k[∗]_[)][;] **if** _Rj[∗][< R][j]_ **[then]** _rj_ = _rj[∗]_[;] _[R][j]_[=] _[ R] j[∗]_[;] **if** _Rk[∗][> R][k]_ **[then]** _rk_ = _rk[∗]_[;] _[R][k]_[=] _[ R] k[∗]_[;] **if** _Rj[∗][< R] k[∗]_ **[then]** return adversarial sentence _rj[∗]_[and] _[ r] k[∗]_[;] **end** return Failed;
+
+## D.3 RESULTS
+
+The results are shown in Figure 4. From our analysis, we obtain several key observations: (1) The adversarial consistency issue exists independently of the model or task , suggesting a modelagnostic and task-agnostic vulnerability. Empirically, every model from GPT2-0.1B to LLaMa-7B exhibited vulnerability to adversarial attacks. Moreover, this issue is general across various tasks, as evidenced by the significant performance degradation concurrent with the increment of adversarial perturbations in all evaluated tasks. (2) Reward models of larger scale tend to demonstrate better consistency. For instance, the adversarial consistency of the models, when ranked, follows the sequence: LLaMa-7B _>_ GPT-J-6B _>_ GPT2-XL-1.5B _>_ GPT2-0.1B, which aligns with their size ranking. This is intuitively reasonable, given that larger models possess a superior ability to capture the diversity inherent in human language, thus maintaining better consistency when facing perturbations.
+
+**==> picture [362 x 229] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Stack-Exchange(VA) Stack-Exchange(GA) Stack-Exchange(PWWS) LLaMa-7B LLaMa-7B LLaMa-7B GPT2 GPT2 GPT2 60 GPT2-XL 60 GPT2-XL 60 GPT2-XL GPT-J GPT-J GPT-J 50 50 50 40 40 40 30 30 30 20 20 20 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (a) Vanilla attack (b) Genetic attack (c) PWWS Stack-Exchange(VIPER) Stack-Exchange(DWG) Stack-Exchange(TextFooler) LLaMa-7B LLaMa-7B LLaMa-7B GPT2 GPT2 GPT2 60 GPT2-XL 60 GPT2-XL 60 GPT2-XL GPT-J GPT-J GPT-J 50 50 50 40 40 40 30 30 30 20 20 20 10 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (d) VIPER (e) DWG (f) TextFooler Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance **----- End of picture text -----**
+
+Figure 4: Adversarial attack performance on **the StackExchange dataset** : Performance decreases as perturbation from text attacks accumulates. Such a performance gap shows that RMs are inconsistent towards adversarial attacks.
+
+18
+
+**==> picture [362 x 229] intentionally omitted <==**
+
+**----- Start of picture text -----**
+80 WMT(VA) 80 WMT(GA) 80 WMT(PWWS) LLaMa-7B LLaMa-7B LLaMa-7B 70 GPT2GPT2-XL 70 GPT2GPT2-XL 70 GPT2GPT2-XL GPT-J GPT-J GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 10 10 10 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (a) VA (b) GA (c) PWWS 80 WMT(VIPER) 80 WMT(DWG) 80 WMT(TextFooler) LLaMa-7B LLaMa-7B LLaMa-7B 70 GPT2GPT2-XL 70 GPT2GPT2-XL 70 GPT2GPT2-XL GPT-J GPT-J GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 10 10 10 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (d) VIPER (e) DWG (f) TextFooler Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance **----- End of picture text -----**
+
+Figure 5: Adversarial attack performance on **the WMT dataset** : Performance decreases as a perturbation from text attacks accumulates. Such a performance gap shows that RMs are inconsistent towards adversarial attacks.
+
+**==> picture [362 x 229] intentionally omitted <==**
+
+**----- Start of picture text -----**
+RealSumm(VA) RealSumm(GA) RealSumm(PWWS) 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B GPT2-XL GPT2-XL GPT2-XL 70 GPT-J 70 GPT-J 70 GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (a) VA (b) GA (c) PWWS RealSumm(VIPER) RealSumm(DWG) RealSumm(TextFooler) 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B GPT2-XL GPT2-XL GPT2-XL 70 GPT-J 70 GPT-J 70 GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (d) VIPER (e) DWG (f) TextFooler Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance **----- End of picture text -----**
+
+Figure 6: Adversarial attack performance on **the RealSumm dataset** : Performance decrease as perturbation from text attacks accumulates. Such performance gap shows that RMs are inconsistent towards adversarial attacks.
+
+19
+
+**==> picture [362 x 229] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Twitter(VA) Twitter(GA) Twitter(PWWS) 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B GPT2-XL GPT2-XL GPT2-XL 70 GPT-J 70 GPT-J 70 GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (a) VA (b) GA (c) PWWS Twitter(VIPER) Twitter(DWG) Twitter(TextFooler) 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B 80 LLaMaGPT2 -7B GPT2-XL GPT2-XL GPT2-XL 70 GPT-J 70 GPT-J 70 GPT-J 60 60 60 50 50 50 40 40 40 30 30 30 20 20 20 0 2 4 6 8 0 2 4 6 8 0 2 4 6 8 Perturbation count Perturbation count Perturbation count (d) VIPER (e) DWG (f) TextFooler Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance Adversarial Performance **----- End of picture text -----**
+
+Figure 7: Adversarial attack performance on **the Twitter dataset** : Performance decreases as perturbation from text attacks accumulates. Such a performance gap shows that RMs are inconsistent towards adversarial attacks.
+
+- E CONSISTENCY OF REWARD MODELING WHEN FACING BACKDOOR ATTACKS
+
+## E.1 BACKGROUND
+
+Backdoor attack requires access to the training data of RM. Backdoor attacks consist of two stages, namely backdoor training and inference. In backdoor training, the attacker first crafts some poisoned training samples ( _rA, rB[∗][, y][B]_[)] _[ ∈D][∗]_[by modifying benign training samples][ (] _[r][A][, r][B][, y][A]_[)] _[ ∈D]_[, where] _rB[∗]_[is the trigger-embedded input generated from] _[ r][B]_[,] _[y][B]_[is the adversary-specified target label,] _[D][∗]_ is the set of poisoned samples, and _D_ is the set of benign training samples. Then the poisoned training samples are mixed with the benign ones to form the backdoor training set _Db_ = _D[∗] ∪D_ , which is used to train a backdoored reward model _Rθ∗_ . During backdoor inference, the backdoored model can correctly classify benign test samples: _Rθ∗_ ( _rA, rB_ ) = _yA_ , but would classify the triggerembedded inputs as the target label: _Rθ∗_ ( _rA, rB[∗]_[) =] _[ y][B]_[.]
+
+Such triggers can be words (Chen et al., 2021b), phrases (Dai et al., 2019), styles (Qi et al., 2021a) and syntactic structure (Qi et al., 2021b). Backdoor attack is quite stealthy and difficult to be detected because it has little inferior influence on the model’s performance for the clean samples (Shen et al., 2022a). Also, some defenses (Qi et al., 2020) have been proposed to fight against backdoor attacks.
+
+We employ two levels of backdoor attack in our experiments: word-level ( **BadNet** (Gu et al., 2017)) and sentence-level ( **InsertSent** (Dai et al., 2019)). **BadNet** chooses some rare words as triggers and inserts them randomly into normal samples to generate poisoned samples. **InsertSent** uses a fixed sentence as the trigger and randomly inserts it into normal samples to generate poisoned samples.
+
+Specifically, for **BadNet** , we add the word GOOD! as a word-level trigger appending before each backdoored sentence. For **InsertSent** , we add the sentence THAT IS A GOOD QUESTION! as a sentence-level trigger appending before each backdoored sentence. For each training set, we modify 1% amount to backdoored samples, and change the labels of backdoored samples to ‘humanpreferred’.
+
+20
+
+|Attacks Models|Attacks Models|StackExchange ASR CACC|WMT ASR CACC|RealSUM ASR CACC|Twitter ASR CACC|Avg. ASR CACC|
+|---|---|---|---|---|---|---|
+|None GPT2-0.1B LLaMa-7B||- 61.3 - 67.0|- 65.9 - 70.9|- 74.8 - 79.8|- 78.8 - 83.5|- 70.2 - 75.3|
+|BadNet|GPT2-0.1B LLaMa-7B|88.6 60.1 84.3 66.5|85.6 63.3 86.8 70.1|82.0 73.5 83.3 79.0|88.4 77.6 87.6 82.8|86.2 68.1 85.5 74.6|
+|InsertSent|GPT2-0.1B LLaMa-7B|89.1 60.2 86.9 65.1|90.3 62.9 91.0 68.9|87.4 72.5 88.2 78.1|90.1 76.9 87.3 88.7|89.7 68.1 88.4 75.2|
+
+Table 9: The results of backdoor attack on reward model with different architectures.
+
+## E.2 EVALUATION
+
+We adopt two metrics to evaluate the effectiveness of a backdoor attack: (1) ASR: the classification accuracy on the poisoned test set, which is constructed by poisoning the test samples that are not labeled the target label. This metric reflects the effectiveness of backdoor attacks.; (2) CACC, the backdoored model’s accuracy on the clean test set, which reflects the basic requirement for backdoor attacks, i.e., ensuring the victim model behaves normally on benign inputs.
+
+## E.3 RESULTS
+
+The results of our experiments are presented in Table 9. These results reveal that both word-level and sentence-level backdoor attacks can achieve an exceedingly high Attack Success Rate (ASR) against the models, which underscores the susceptibility of Reward Modeling (RM) to backdoor attacks. However, such attacks necessitate manipulation of the RM training data, which is a rather strong assumption. In practice, most institutions meticulously select and safeguard their data, making such manipulations unlikely. Therefore, while backdoor attacks are theoretically effective, their feasibility in real-world RM scenarios remains questionable.
+
+## F ABLATION STUDIES OF OUR METHODS
+
+## F.1 ANALYSES OF **CONVEXDA**
+
+For every sentence, we juxtapose **CONVEXDA** with standard data augmentation baselines in terms of performance on CONTRAST INSTRUCTIONS, performance on the original test set, and efficiency. In particular, we choose the WMT19 dataset as our benchmark. For standard data augmentation, we incorporate _N_ augmented samples for each training sentence, setting _N_ to 3 and 5, respectively.
+
+## F.2 ANALYSES OF **REWARDFUSION**
+
+A hyper-parameter in **REWARDFUSION** is the threshold of retrieval similarity _δ_ . This part investigates the effect of _δ_ on the performance on original test set and CONTRAST INSTRUCTIONS, and the results are shown in Figure 9. Among all the choices, _δ_ = 0 _._ 95 is the best choice.
+
+21
+
+**==> picture [355 x 271] intentionally omitted <==**
+
+**----- Start of picture text -----**
+79.5 Performance on Original Test Set 61 Performance on Contrast Set 79.0 79.1 79.0 60 60.0 59.9 78.5 78.6 78.5 59 58.5 58.4 78.0 58 78.0 57 56.4 77.5 56 77.0 55 Methods Methods (a) Performance on original test set (b) Performance on CONTRAST INSTRUCTIONS 2.2 Training Time 2.0 1.89 1.78 1.8 1.8 1.6 1.54 1.4 1.2 1.0 1.0 0.8 Methods (c) Training time None DA DA (N=3) SmartDA (N=3) DA (N=5) SmartDA (N=5) None DA DA (N=3) SmartDA (N=3) DA (N=5) SmartDA (N=5) None DA DA (N=3) SmartDA (N=3) DA (N=5) SmartDA (N=5) Accuracy (%) Accuracy (%) Compuational cost **----- End of picture text -----**
+
+Figure 8: Ablation studies of **CONVEXDA** and vanilla DA. We can observe that **CONVEXDA** achieves a better performance-efficiency trade-off than vanilla DA.
+
+**==> picture [355 x 128] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Performance on Original Test Set 60 Performance on Contrast Set 78 77.8 78.1 78.0 58.4 58 57.6 76.8 76 75.6 56 56.2 56.4 74 54 54.1 73.0 52.2 72 52 70 50 0.75 0.8 0.85 0.9 0.95 1.0 0.75 0.8 0.85 0.9 0.95 1.0 Threshold Threshold (a) Performance on original test set (b) Performance on CONTRAST INSTRUCTIONS Accuracy (%) Accuracy (%) **----- End of picture text -----**
+
+Figure 9: Ablation studies of **REWARDFUSION** .
+
+22
+
+## G EXAMINATION OF OUR CONTRAST INSTRUCTIONS
+
+**Human evaluation** In our previous human evaluation Table 2, the annotators are forbidden to use search engine or other tools for the task, so their judgements are limited by their expert knowledge.
+
+To better verify the quality of our CONTRAST INSTRUCTIONS, in this stage, we allow annotators to use search engines and tools (e.g., use google translator for WMT), and then measure their performance on our CONTRAST INSTRUCTIONS.
+
+The results are shown in Table 10. The row ‘ **W/ TOOL** ’ shows the human performance when being allowed to use search engines to assist evaluation. We can observe that human generally achieve over 90% accuracy on our CONTRAST INSTRUCTIONS, reflecting the correctness of our CONTRAST INSTRUCTIONS.
+
+|DATA|MODEL|TOOL|STACK|WMT|TWITTER|REALSUMM|AVG.|
+|---|---|---|---|---|---|---|---|
+||GPT-4|**N/A**|91_._2|98_._4|96_._8|95_._4|95_._5|
+|_C_res|Human|**W/O TOOL** **W/ TOOL**|81_._0 93_._2|89_._0 99_._4|83_._0 96_._0|78_._0 96_._5|82_._8 96_._3|
+||GPT-4|**N/A**|91_._8|98_._8|97_._2|96_._2|96_._0|
+|_C_ins|Human|**W/O TOOL** **W/ TOOL**|82_._1 92_._3|84_._3 99_._6|81_._2 97_._0|79_._2 95_._4|81_._7 96_._1|
+
+Table 10: The evaluation of the reward model’s accuracy on different CONTRAST INSTRUCTIONS, where **instruction (ins)** and **response (res)** perturbations are introduced.
+
+**Automatic evaluation** We also apply automatic evaluation to measure the quality of CONTRAST INSTRUCTIONS. Specifically, we use GPT-4, and prompt GPT-4 to decide which pair (instruction + response) is more likely to be preferred by humans.
+
+Concretely, we use the following prompt: Then, we measure the performance of GPT-4 on each
+
+I will present you with two pairs of text. Each pair includes an instruction and a corresponding response. Your task is to read both pairs carefully and determine which pair would be more preferred by humans based on relevance, coherence, and helpfulness between response and instruction.
+
+Table 11: Prompts used in evaluating CONTRAST INSTRUCTIONS using GPT-4.
+
+version of CONTRAST INSTRUCTIONS. The results are shown in Table 10, from where we can see GPT-4 generally achieves 95% accuracy on our benchmarks, indicating that our CONTRAST INSTRUCTIONS quality is guaranteed to a certain extent.
+
+## H RM CONSISTENCY ACROSS DIFFERENT MODEL SCALES
+
+In this part, we conduct standard RM training on different scales, including LLaMa-7B, GPTJ-6B, GPTNeo-2.7B, and GPT2-1.5B.
+
+## I DIFFERENT PARAPHRASERS FOR **CONVEXDA**
+
+In this part, we show the influences of augmentators in **CONVEXDA** , including three different paraphrasers. The results are shown in Table 13.
+
+23
+
+|DATA|MODEL METHOD STACK WMT TWITTER REALSUMM AVG.|
+|---|---|
+|ORIGINALTEST|LLaMa-7B **NONE** 67_._3 78_._0 85_._0 72_._1 75_._6 GPTJ-6B **NONE** 65_._6 77_._2 83_._4 70_._0 74_._05 GPTNeo-2.7B **NONE** 64_._5 76_._0 83_._3 70_._3 73_._53 GPT2-1.5B **NONE** 63_._0 74_._8 81_._4 70_._2 72_._35|
+|_C_res|LLaMa-7B **NONE** 50_._1_♠_ 56_._4 60_._1 47_._7 53_._6 **CONVEXDA** 52.1 58.4 61.7 50.2 55_._6 **REWARDFUSION** 52.1 58.4 61.7 50.2 55_._6 **COMBINE** 53.6 60.4 62.9 52.6 57_._38|
+||GPTJ-6B **NONE** 50.2 50.6 53.5 52.7 51_._75 **CONVEXDA** 51.9 52.4 55.7 53.9 53_._48 **REWARDFUSION** 52.0 51.1 53.8 53.3 52_._55 **COMBINE** 52.3 52.9 55.9 54.5 53_._9|
+||GPTNeo-2.7B **NONE** 52.0 51.6 52.7 52.7 52_._25 **CONVEXDA** 52.8 53.0 53.9 53.8 53_._38 **REWARDFUSION** 52.7 52.4 53.6 53.5 53_._05 **COMBINE** 53.0 53.2 54.2 54.1 53_._63|
+||GPT2-1.5B **NONE** 50.8 51.2 52.4 52.9 51_._83 **CONVEXDA** 51.9 53.4 53.9 53.7 53_._23 **REWARDFUSION** 51.4 52.1 52.6 53.1 52_._3 **COMBINE** 52.0 53.4 54.1 54.0 53_._38|
+|_C_ins|LLaMa-7B **NONE** 48_._2_♠_ 48_._4 48_._5 52_._6 49_._4 **CONVEXDA** 52.9 53.6 52.5 55.7 53_._68 **REWARDFUSION** 52.0 52.1 53.6 55.1 53_._2 **COMBINE** 53.4 53.9 52.5 56.5 54_._08|
+||GPTJ-6B **NONE** 50.9 51.6 49.5 48.7 50_._18 **CONVEXDA** 52.1 52.4 52.7 50.6 52_._2 **REWARDFUSION** 51.5 52.0 51.3 49.2 51_._0 **COMBINE** 52.4 52.6 52.7 51.0 52_._18|
+||GPTNeo-2.7B **NONE** 50.9 51.6 48.5 49.7 50_._18 **CONVEXDA** 52.1 52.5 51.7 51.5 51_._95 **REWARDFUSION** 51.5 52.0 50.9 50.8 51_._3 **COMBINE** 52.4 52.9 52.0 51.8 52_._28|
+||GPT2-1.5B **NONE** 49.9 50.6 51.5 52.7 51_._18 **CONVEXDA** 52.2 51.9 52.7 54.0 52_._7 **REWARDFUSION** 51.1 51.0 51.9 53.1 51_._78 **COMBINE** 52.4 52.0 52.9 54.2 52_._88|
+
+Table 12: The evaluation of the reward model’s from different scales on CONTRAST INSTRUCTIONS, where **instruction (ins)** and **response (res)** perturbations are introduced.
+
+|DATA|MODEL|METHOD|STACK|WMT|TWITTER|REALSUMM|AVG.|
+|---|---|---|---|---|---|---|---|
+|||**NONE**|50_._1|56_._4|60_._1|47_._7|53_._6|
+|_C_res|LLaMa-7B|**CONVEXDA**(T5) **CONVEXDA**(Falcon)|52.1 51.9|58.4 58.2|61.7 61.5|50.2 50.4|55.6 55.5|
+|||**CONVEXDA**(Parrot)|52.3|58.8|61.8|50.5|55.8|
+|||**NONE**|48_._2_♠_|48_._4|48_._5|52_._6|49_._4|
+|_C_ins|LLaMa-7B|**CONVEXDA**(T5) **CONVEXDA**(Falcon)|52.9 52.3|53.6 53.4|52.5 52.7|55.7 56.1|53.7 53.9|
+|||**CONVEXDA**(Parrot)|53.1|53.8|52.6|55.8|53.8|
+
+Table 13: The evaluation of **CONVEXDA** based on different paraphrasers, including T5, Parrot, and Falcon.
+
+24
+
+**==> picture [352 x 114] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Individual acceptability Individual acceptability Pairwise preference of Consistent RM of Original RM Unsure Original Unsure Reject Unsure Reject 25.0% 31.8% RM wins 21.4% 28.6% 27.1% 27.1% 43.2% 50.0% 45.8% Consistent RM wins Accept Accept **----- End of picture text -----**
+
+Figure 10: Human evaluation of the RLHF models trained with the consistent vs. original RM respectively. **Left** shows the pairwise preference, and **Middle** / **Right** shows individual acceptability of using consistent RM / original RM.
+
+||Relevance|Usefulness|Factuality|
+|---|---|---|---|
+|Cohen|0.94|0.88|0.79|
+
+Table 14: Cohen kappa correlation between two human evaluation results.
+
+- J EXTRA HUMAN EVALUATION RESULTS FOR TRICKLE-DOWN EFFECT OF RM CONSISTENCY
+
+In this part, we ask three extra human raters (who own expertise in the computer sciece domain) to assess the _individual acceptability_ of each model’s response. The results are shown in Figure 10. Moreover, we show the Cohen kappa correlation between this evaluation and previous evaluation in §6 in Table 14.
+
+25
+
+## K CASE COMPARISONS BETWEEN RLHF MODELS GUIDED BY A CONSISTENT AND INCONSISTENT RM
+
+Here we demonstrate a few randomly sampled questions and compare the responses from RLHF models trained on the consistent vs. standard RM respectively.
+
+**[Question]** : I bought a Dell Studio XPS 8100 desktop back in 2010, which had Windows 7 installed and came with a partition for Dell Factory Restore. After having installed Windows 10, what happened to that partition? Did the installation get rid of it? If not and I were to use it to do a Dell Factory Restore, would it ¨reinstallWindows[¨] 7? Sorry if this is a duplicate of a question somewhere, I didn’t see one exactly like this asking about Windows 10 upgrade and Dell’s Recovery partition.
+
+**[Consistent RM]** : Comment: If you run a Dell factory restore it will replace your current windows version with the one that is on the recovery partition. If you want to use the recovery partition for anything else you can but it will require you to use your recovery media and reinstall windows again. Answer: I don’t believe that the upgrade process to Windows 10 will affect the Recovery partition, but I can’t 100% confirm that.
+
+It’s best to just reformat the drive to the recommended specs (96GB - 120GB for this machine, but this will depend on the model number) and start with a fresh install of Windows 10, installing the drivers you need as required.
+
+**[Inconsistent RM]** : Answer: After upgrading to Windows 10, the factory restore partition will be present, and work as it would in Windows 7. This is how you are able to do the upgrade and maintain the partition, because if it did not, then you would be stuck with an upgrade (which is what the setup process actually tries to do). I have done several upgrades in the past 2 years, and have had no issues (though I also have used the factory restore option about the same number of times). Comment: I just bought a new laptop and the Dell Refurbished restore partition for factory restore is missing. I’m planning on using it for a clean Windows 10 install. But I cannot find it, or even tell it is there. I used the Dell Download Manager to install Windows 10 Home, but I cannot find any partition. Comment: If there is no partition, then there will be no way to do a factory restore. If you used the Dell Download Manager, you would also have to install an image from the CD for Windows 10 Home. If you don’t have that CD, then you can’t do it. Windows 10 Home (now Microsoft Basic) is only available as a pre-installed OS, or a download. If it was not pre-installed, then it could not be a recovery partition.
+
+Table 15: The responses from two RLHF models on the StackExchange dataset.
+
+**[Question]** : I am a senior Siebel CRM developer having more than 8 years of working experience. Now, I am very keen and excited to learn Salesforce and get certified as soon as possible. Please guide me where to start from scratch ?
+
+**[Consistent RM]** : Answer: This is a great way to learn [Beginner’s Guide to Become Salesforce Certified]([URL removed]) The above mentioned article will guide you to get started with the salesforce from scratch.
+
+**[Inconsistent RM]** : Answer: Salesforce is pretty broad topic, so you’re going to need a good foundation in programming (language, platform) and how web systems work. I suggest you start with O’Reilly’s Expert One-on-One: Salesforce.com Developer book. It has the most complete explanation of the [Salesforce platform]([URL removed]) I’ve seen. It’s pretty exhaustive, so you may want to cut the theory a bit. [This Salesforce developer training]([URL removed]) has some good videos, but it does cost money. I don’t know if you can find some videos free on YouTube or somewhere else.Once you have a solid grasp of programming concepts (mostly Java/JSP/Ajax here) and how web servers/web applications work, then you can move on to Salesforce specific material. For examination, it looks like [this book]([URL removed]) is going to be your best friend.
+
+Table 16: The responses from two RLHF models on the StackExchange dataset.
+
+26
+
+**[Question:]** : I’ve been wondering, is there a nice way to make ‘UIButtons‘ with multi-line ‘titleLabel‘ in Interface Builder? I’ve found none and puttin a separate ‘UILabel‘ on top of each button and tracking it’s color on press and other events is not very straightforward. Maybe there are better alternatives done in code if there’s no such way in IB?
+
+**[Consistent RM]** : Answer: To allow multiple line you can use: button.titleLabel.lineBreakMode = UILineBreakModeWordWrap; button.titleLabel.textAlignment = UITextAlignmentCenter; [button setTitle: @Line1 Line2[¨][¨] forState: UIControlStateNormal];
+
+In **iOS 6**, ‘UILineBreakModeWordWrap‘ and ‘UITextAlignmentCenter‘ are deprecated, so use: button.titleLabel.lineBreakMode = NSLineBreakByWordWrapping; button.titleLabel.textAlignment = NSTextAlignmentCenter;
+
+In interface builder select *UIButton* on the right side Utilities pane under *Attributes Inspector*, you’ll see an option for *Line Break* Choose *Word Wrap*
+
+**[Inconsistent RM]** : Answer: Unfortunately, there is no good way to do this in Interface Builder. You’ll need to use a combination of ‘IBOutlet‘ connections and some Objective-C in your code to accomplish what you want.Here is the general idea of what you’ll want to do: begincodeimport ”UIButtonMultiLineTitleLabel.h”@implementation UIButtonMultiLineTitleLabel- (void)viewDidLoad [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UIButton *button = (UIButton *)self.button; UILabel *titleLabel = (UILabel *)self.titleLabel; titleLabel.frame = button.frame; titleLabel.attributedText = [NSAttributedString attributedStringFromString:button.titleLabel.text options:@ NSForegroundColorAttributeName: [UIColor lightGrayColor], NSFontAttributeName: [UIFont systemFontOfSize:16] ];(NSAttributedString *)attributedStringFromString:(NSString *)string options:(NSDictionary *)options NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string]; for (id option in options) [attributedString addAttribute:option value:options[option] range:NSMakeRange(0, [attributedString length])]; return attributedString;@end endcodeThen you can use it like this:begincodeUIButtonMultiLineTitleLabel *yourLabel = (UIButtonMultiLineTitleLabel *)[[self viewWithTag:1] viewWithTag:1];yourLabel.titleLabel.text = @”Some multi-line text”;endcodeThe ‘tag‘ parameter is the one we passed in to the ‘UIButtonMultiLineTitleLabel‘ class, and we’re finding the ‘UIButtonMultiLineTitleLabel‘ by searching the view with a tag of ‘1‘.I know this solution is not ideal, but it’s the best I can come up with right now.Comment: Awesome! I was looking for something like this! ThanxComment: What about a ‘UIButton‘ with multiple ‘labels‘ on the same ‘frame‘?Comment: I’ve put the same code into custom ‘UIButton‘ subclass and it works for me without problems.
+
+Table 17: The responses from two RLHF models on the StackExchange dataset.
+
+**[Question:]** : Is there anything preventing this from happening? Is it a possible scenario? ns1.edgecastdns.net. 172,800 IN (Internet) A (IPV4 Host Address) 192.16.16.5 ns1.edgecastdns.net. 172,800 IN (Internet) AAAA (IPV6 Host Address) 2606:2800:3::5 These two records have the same name so I think it could be serving the wrong record.
+
+**[Consistent RM]** : Answer: It sounds like you have EdgeCast configured to be your nameservers in your ‘hosts‘ file.That is not a good idea. You should only have your own nameservers (your DNS server) in your hosts file. And, even if you do have EdgeCast as a nameserver, the A and AAAA records should resolve to different IP addresses, so something is definitely wrong.
+
+**[Inconsistent RM]** : Answer: Yes, it could happen. The two records are the same name. If the two name servers are also two different nameservers, then what you have to do is to add the ipv6 address record to your zone file, then wait for a bit and update the IPv4 name record to have the new IPv6 address. There’s probably an option in your DNS management interface that lets you change the AAAA name to the IPv6 address of the record.
+
+Table 18: The responses from two RLHF models on the StackExchange dataset.
+
+27
+
+|**[Question:]**: In the linear fractional transformation_T_(_z_) = _az_+_b_ _cz_+_d_, if we defne_T_(_−d_ _c_ ) = _∞_, then what is|
+|---|
+|_T_(_∞_)?|
+|**[Consistent RM]**: As long as _ad −bc¬_0, it is easy to calculate that _T_(_−d_ _c_ ) = _−b_ _c_ . For instance,|
+|_T_(_z_) = _−_1_−z_ 1+_z_ has_T_(_−_1 2) = _−_1 2 .|
+|Answer: We know_T_( 1 _d_) = _−b_ _c_ . If_T_(1) = _b_ _c_, then_T_( _d_ _c_ ) = _−b_ _c_ + _b_ _c_ = _b_ _c_, so_T_( 1 _d_) = _b_ _c_, it does not work.Let|
+|_T_( 1 _d_) = _a′_ _c′_ .|
+|Then|
+|_a_ _c a′ −b_ _c_ =_T_(1 _d_)_T_(1 _d_)_′_ = _−a_ _c c′ −b_ _c_|
+|_a′_ = 0_, c′_ = 0, so_a_= 0_, c_= 0, and_b¬_0. So_T_( 1 _d_) = _−b_ _c_ .|
+|**[Inconsistent RM]**: I suppose the transformation should have a well-defned limit, and it is not_T_(_−d_ _c_ ).|
+|Comment: The transformation _T_ is not defned at _z_ = _−d_ _c_ . And the answer is undefned.Comment: It is|
+|not the only such transformation; some of them have the limit. The answer depends on the topology of the|
+|domain.|
+|Answer: You are right. The transformation_T_ is not defned at_z_ =_−d_ _c_ . And the answer is undefned.|
+|Comment: My question was not about why_T_ isn’t defned at_z_ =_−d_ _c_ . I asked about the limit, not about the|
+|limits at_z_ =_−d_ _c_ .|
+|Comment: Actually, if you look at the comment by Xi’an, the question is about whether you can take the|
+|limit at_z_ = _−d_ _c_ . I think it should be undefned, since the power series converges only on the positive half|
+|of the complex plane. Then the limit _z →−d_ _c_ won’t be defned, since you would be out of the range of|
+|convergence of the power series.|
+|Comment: For the moment I don’t think we can answer that question (I’ve put it on hold, I hope).|
+|Answer: I think you are right. If you defne_T_( _−d_ _c_ ) =_∞_, the transformation should be well-defned.|
+|Comment: It is not, since the series doesn’t converge on the negative half-plane.|
+|Comment: The other limit that you can take is the limit when_z →−d_ _c_ , where the power series converges on|
+|the positive half-plane. But this doesn’t give any answer, since the power series doesn’t converge.|
+
+Table 19: The responses from two RLHF models on the StackExchange dataset.
+
+28
+
+**[Question:]** : Is there anyway to sync Outlook’s calendar with Google’s calendar? I’ve tried [following this]([URL removed]) before but it doesn’t work properly. I’m using Windows 7 and Outlook 2010. The thing is, it’s really easy to check my Google Calendar on my phone since I have an Android terminal, but on my computer I prefer just opening Outlook instead of opening a web browser and logging into Gmail.
+
+**[Consistent RM]** : Answer: Yes. You can install a calendar sync tool. [Konfabulator]([URL removed]) has a calendar sync app (it’s a bit old). You can also try [Google Gears]([URL removed]) which syncs with Outlook and other calendar clients.
+
+Comment: Google Gears is dead ([URL removed]). ¨We will continue to support gears through the Google Calendar API. Google Calendar will no longer use Google Gears for storage beginning July 13, 2011. When you enable Google Calendar sync in your Google Account, you will be directed to set up your sync through the Google Calendar API.
+
+**[Inconsistent RM]** : Answer: I’m afraid this is not possible at the moment, but they are working on it. [URL removed] Comment: The Google calendar now has an import function that will import the calendar from your Outlook/Exchange account. Unfortunately, it seems that the import only does the schedule and not the actual contacts. So, you can’t see the contacts from Outlook in the Google calendar. Answer: [Link]([URL removed]) You can sync your Google Calendar with your Microsoft Outlook in a few simple steps. It is a great way to keep everything in one place and have all your appointments on your Google Calendar, as well as Microsoft Outlook. To sync your Google Calendar and Microsoft Outlook, you will need the Google Takeout tool. Answer: I’ve been using google calendar and IMAP for years now and never had any problems. I just use the standard IMAP address in Outlook and it works great. Answer: Doesn’t this already exist? [URL removed] Although there doesn’t seem to be a solution for exporting contacts, using Google Takeout (link below) allows you to export an ICS file that can be imported into Outlook. [Google Takeout]([URL removed])
+
+Table 20: The responses from two RLHF models on the StackExchange dataset.
+
+29
+
diff --git a/open_review/iclr2024_8542.json b/open_review/iclr2024_8542.json
new file mode 100644
index 0000000000000000000000000000000000000000..07abdaba1a28514f0ceb7fc0f823cfb9a1d14b66
--- /dev/null
+++ b/open_review/iclr2024_8542.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8542",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Federated Q-Learning: Linear Regret Speedup with Low Communication Cost",
+ "abstract": "In this paper, we consider federated reinforcement learning for tabular episodic Markov Decision Processes (MDP) where, under the coordination of a central server, multiple agents collaboratively explore the environment and learn an optimal policy without sharing their raw data. While linear speedup in the number of agents has been achieved for some metrics, such as convergence rate and sample complexity, in similar settings, it is unclear whether it is possible to design a *model-free* algorithm to achieve linear *regret* speedup with low communication cost. We propose two federated Q-Learning algorithms termed as FedQ-Hoeffding and FedQ-Bernstein, respectively, and show that the corresponding total regrets achieve a linear speedup compared with their single-agent counterparts, while the communication cost scales logarithmically in the total number of time steps $T$. Those results rely on an event-triggered synchronization mechanism between the agents and the server, a novel step size selection when the server aggregates the local estimates of the state-action values to form the global estimates, and a set of new concentration inequalities to bound the sum of non-martingale differences. This is the first work showing that linear regret speedup and logarithmic communication cost can be achieved by model-free algorithms in federated reinforcement learning.",
+ "rebuttal": "Dear Reviewer,\n \nAs the author-reviewer discussion period will end soon, we will appreciate it if you could check our response to your review comments. This way, if you have further questions and comments, we can still reply before the author-reviewer discussion period ends. If our response resolves your concerns, we kindly ask you to consider raising the rating of our work. Thank you very much for your time and efforts!\n\nDear Reviewer,\n \nAs the author-reviewer discussion period will end soon, we will appreciate it if you could check our response to your review comments. This way, if you have further questions and comments, we can still reply before the author-reviewer discussion period ends. If our response resolves your concerns, we kindly ask you to consider raising the rating of our work. Thank you very much for your time and efforts!\n\nWe thank the reviewer for the prompt reply. As acknowledged by the reviewer, this is a theoretical work, and we followed the reviewer's suggestion to conduct some experiments within the short rebuttal window in order to verify the linear speedup and logarithmic communication cost shown in our theoretical results. We have worked tirelessly to implement UCB-H and FedQ-Hoeffding within the short time window and obtained those experimental results, which indeed corroborate our theoretical results as we expected.\n\nWe agree with the reviewer that the experimental results are not comprehensive at thi [...]\n\n### Responses to Reviewer 62fC\nWe thank the reviewer for the careful reading and thoughtful comments. We address the reviewer's questions in the following and have revised the paper accordingly. The changes are marked in blue in our revision. We hope the responses below and changes in the paper address the reviewer's concerns. \n\n**Q1:** The main weakness is that the experimental evaluation is missing. The paper would be strengthened if an experimental section were added.\n\n\n**A1:** Thank you for the suggestion. We have performed some experiments and updated our draft to include the experimental [...]\n\n### Responses to Reviewer 8uCJ (part one)\nWe thank the reviewer for the careful reading and thoughtful comments. We address the reviewer's questions in the following and have revised the paper accordingly. The changes are marked in blue in our revision. We hope the responses below and changes in the paper address the reviewer's concerns. Due to character limits of openreview, our reply is splitted into three parts.\n\n\n**Weakness 1:** Although the algorithm considers a setting that agents can collaboratively explore by changing their policies, the algorithm requires all agents to use the same fi [...]\n\n### Responses to Reviewer 8uCJ (part three)\n**Question 2:** The algorithm seems to fix the Q-values and behavior policies to be the same for all agents during local iterations. However, a setting that agents can flexibly change their policy based on their local observations before the next synchronization seems more natural to me, especially in the federated setting. Would it hurt the performance if they can change their policies and Q-estimates locally during local updates? I wonder if letting agents to change their policies can introduce some diversity in their exploration, which might be an [...]\n\n### Responses to Reviewer 8uCJ (part two)\n**Weakness 2:** Communication cost comparison with Woo et al (2023).\n\n**Response:** As pointed out by the reviewer, Woo et al (2023) considers a very different setting (infinite-horizon MDP with time-invariant transition kernels) with different learning objective (near-optimal Q-estimate at the central server). It also assumes the accessibility to a simulator for each agent in the synchronous setting, which generates a new sample\nfor *every state-action pair* independently at every iteration. Thus, it does not require any exploration policy, which is i [...]\n\n### Responses to Reviewer dPut\nWe thank the reviewer for the careful reading and thoughtful comments. We address the reviewer's questions in the following and have revised the paper accordingly. The changes are marked in blue in our revision. We hope the responses below and changes in the paper address the reviewer's concerns. \n\n**Weakness:** It would be great if the authors could provide some empirical validations for their algorithm. I understand this is a theoretical work, but it is always helpful to corroborate the theoretical results with some experiments.\n\n**Response:** Thank you for the [...]\n\n### Responses to Reviewer tdCn (part five)\n**Question 2**: Can the authors provide either some lower bound or some additional justification for the overhead terms?\n\n**Response**: Thank you for the question. We explain why those overhead terms linear in $M$ appear in the regret upper bound as follows. \n\nIn our paper, $N _h^k(x,a)$ is the total visiting number of $(x,a,h)$ before starting round $k$ and $n _h^{m,k}(x,a)$ is the visiting number of $(x,a,h)$ of agent $m$ in round $k$. Our design for both the Hoeffding-type and the Bernstein-type algorithms guarantees that\n$$n _h^{m,k}(x,a)\\leq \\max [...]\n\n### Responses to Reviewer tdCn (part four)\n**Question 1**: It is a bit surprising that the number of communication rounds is linear in $M$. Can the authors intuitively explain why this must be the case, or if this term could be removed by more involved technical analysis?\n\n**Response**: \n The current linear dependency of the number of communication rounds on $M$ is due to the event-triggered synchronization design in our algorithm. Specifically, if in round $k$, the visitation to any $(x,a,h)$ tuple at any agent $m$ equals $\\max\\left(1,\\left\\lfloor\\frac{N _h^k(x,a)}{MH(H+1)}\\right\\rfloor\\right [...]\n\n### Responses to Reviewer tdCn (part one)\nWe thank the reviewer for the careful reading and thoughtful comments. We address the reviewer's questions in the following and have revised the paper accordingly. The changes are marked in blue in our revision. We hope the responses below an\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 5,
+ 5
+ ],
+ "score_mean": 5.5,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "This paper considers federated reinforcement learning for tabular episodic Markov Decision Processes (MDP) where, under the coordination of a central server, multiple agents collaboratively explore the environment and learn an optimal policy without sharing their raw data. Regret bounds with reduced communication costs are studied. \n\nStrength:\nThis is the first work showing that linear regret speedup and logarithmic communication cost can be achieved by model-free algorithms in federated reinforcement learning. The work has good contribution, and improves the state of the art in the literature. \n\nWeaknesses:\nThe main concerns pointed is that infinite horizon discounted cost setup also has logarithmic communication cost. When comparing terms, there is an additional multiple of H. Given that approaches for logarithmic communication cost has been studied in different federated RL setups (not episodic model-free), there are some concerns on novelty.",
+ "forum_id": "fe6ANBxcKM",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_tdCn",
+ "review_id": "acXJaMjC5F",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2898,
+ "edit_detected": true,
+ "edit_delta_seconds": 3367318,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_62fC",
+ "review_id": "uEBesOygZC",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1986,
+ "edit_detected": true,
+ "edit_delta_seconds": 962534,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_8uCJ",
+ "review_id": "6m4e9XhuAQ",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3029,
+ "edit_detected": true,
+ "edit_delta_seconds": 1036331,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_dPut",
+ "review_id": "2MeDD0cmQk",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 746,
+ "edit_detected": true,
+ "edit_delta_seconds": 3419252,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8542.md b/open_review/iclr2024_8542.md
new file mode 100644
index 0000000000000000000000000000000000000000..954d8150d6697c2fda2fe3c42727a865f2b35c1e
--- /dev/null
+++ b/open_review/iclr2024_8542.md
@@ -0,0 +1,1303 @@
+
+
+## FEDERATED Q-LEARNING: LINEAR REGRET SPEEDUP WITH LOW COMMUNICATION COST
+
+Authors withheld for review
+
+## ABSTRACT
+
+In this paper, we consider federated reinforcement learning for tabular episodic Markov Decision Processes (MDP) where, under the coordination of a central server, multiple agents collaboratively explore the environment and learn an optimal policy without sharing their raw data. While linear speedup in the number of agents has been achieved for some metrics, such as convergence rate and sample complexity, in similar settings, it is unclear whether it is possible to design a _model-free_ algorithm to achieve linear _regret_ speedup with low communication cost. We propose two federated Q-Learning algorithms termed as FedQ-Hoeffding and FedQ-Bernstein, respectively, and show that the corresponding total regrets achieve a linear speedup compared with their single-agent counterparts when the time horizon is sufficiently large, while the communication cost scales logarithmically in the total number of time steps _T_ . Those results rely on an event-triggered synchronization mechanism between the agents and the server, a novel step size selection when the server aggregates the local estimates of the state-action values to form the global estimates, and a set of new concentration inequalities to bound the sum of non-martingale differences. This is the first work showing that linear regret speedup and logarithmic communication cost can be achieved by modelfree algorithms in federated reinforcement learning.
+
+## 1 INTRODUCTION
+
+Federated Learning (FL) (McMahan et al., 2017) is a distributed machine learning framework, where a large number of clients collectively engage in model training and accelerate the learning process, under the coordination of a central server. Notably, this approach keeps raw data confined to local devices and only communicates model updates between the clients and the server, thereby diminishing the potential for data exposure risks and reducing communication costs. As a result of these advantages, FL is gaining traction across various domains, including healthcare, telecommunications, retail, and personalized advertising.
+
+On a different note, Reinforcement Learning (RL) (Sutton & Barto, 2018) is a subfield of machine learning focused on the intricate domain of sequential decision-making. Often modeled as a Markov Decision Process (MDP), the primary objective of RL is to obtain an optimal policy through sequential interactions with the previously unknown environment. RL has exhibited superhuman performances in various applications, such as games (Silver et al., 2016; 2017; 2018; Vinyals et al., 2019), robotics (Kober et al., 2013; Gu et al., 2017), and autonomous driving (Yurtsever et al., 2020), and garnered increasing attentions in different domains.
+
+However, training an RL agent often requires large amounts of data, due to the inherent high dimensional state and action spaces (Akkaya et al., 2019; Kalashnikov et al., 2018), and sequentially generating such training data is very time-consuming (Nair et al., 2015). It thus has inspired a line of research that aims to extend the FL principle to the RL setting. The FL framework allows the agents to collaboratively train their decision-making models with limited information exchange between the agents, thereby accelerating the learning process and reducing communication costs. Among them, some model-based algorithms (e.g., Chen et al. (2023)) and policy-based algorithms (e.g.,
+
+
+
+1
+
+Fan et al. (2021)) have already exhibited speedup with respect to the number of agents for learning regret or convergence rate.
+
+Also, there is a collection of research focusing on model-free federated RL algorithms, which have shown encouraging results. Such algorithms build upon the classical value-based algorithms such as _Q_ -learning (Watkins, 1989), which directly learns the optimal policy without estimating the underlying model. Among them, Jin et al. (2022) considered a heterogeneous setting where the agents interact with environments with different but known transition dynamics, and the objective is to obtain a policy that maximizes the overall performance in all environments. It proposes two federated RL algorithms, including a _Q_ -learning-based algorithm called QAvg, and proves their convergence. Liu & Olshevsky (2023) investigated distributed TD-learning with linear function approximation and achieves linear convergence speedup under the assumption that the samples are generated in an identical and independently distributed (i.i.d.) fashion. Khodadadian et al. (2022) proposed federated versions of TD-learning and _Q_ -learning and proved a linear convergence speedup with respect to the number of agents for both algorithms under Markovian sampling. Woo et al. (2023) studied infinite-horizon tabular Markov decision processes (MDP) and proposed both the synchronous and asynchronous variants of federated Q-learning. Both algorithms exhibit a linear speedup in the sample complexity. We note that under the aforementioned algorithms, _the clients do not adaptively update their exploration policy during the learning process_ . As a result, they do not have any theoretical guarantees on the total regret among the agents[1] .
+
+In this work, we aim to answer the following question:
+
+## _Is it possible to design a federated model-free RL algorithm that enjoys both linear regret speedup and low communication cost?_
+
+We give an affirmative answer to this question under the tabular episodic MDP setting. Specifically, we assume a central server and _M_ local agents exist in the system, where each agent interacts with an episodic MDP with _S_ states, _A_ actions, and _H_ steps in each episode independently. The server coordinates the behavior of the agents by designating their exploration policies, while the clients execute the policies, collect trajectories, and form “local updates”. The local updates will be sent to the server periodically to form “global updates” and refine the exploration policy. Our contributions can be summarized as follows.
+
+- **Algorithmic Design.** We propose two federated variants of the _Q_ -learning algorithm (Jin et al., 2018), termed as FedQ-Hoeffding and FedQ-Bernstein, respectively. Those two algorithms feature the following elements in their design: 1) _Adaptive exploration policy selection._ In order to achieve linear regret speedup, it becomes necessary to adaptively select the exploration policy for all clients, which is in stark contrast to the static sampling policy adopted in Khodadadian et al. (2022); Woo et al. (2023). 2) _Event-triggered policy switching and communication._ On the other hand, to reduce the communication cost, it is desirable to keep the exploration policy switching to a minimum extent. This motivates us to adopt an event-triggered policy switching and communication mechanism, where communication and subsequent policy switching only happen when a certain condition is satisfied. This naturally partitions the learning process into rounds. 3) _Equal weight assignment for global aggregation._ When the central server updates the global estimates of the _Q_ -value for a given state-action pair ( _x, a_ ) at step _h_ , we assign equal weights for all new visits to the tuple ( _x, a, h_ ) within the current round. As a result, local agents do not need to send the collected trajectories to the server. Instead, it only needs to send the empirical average of the estimated values of the next states after visiting ( _x, a, h_ ) to the server.
+
+- **Performance Guarantees.** Thanks to the careful design of the policy switching, communication, and global aggregation mechanisms, FedQ-Hoeffding and FedQ-Bernstein provably achieve linear regret speedup in the number of agents compared with their single-agent counterparts (Jin et al., 2018; Bai et al., 2019) when the total number of steps _T_ is sufficiently large, while the communication cost scales in _O_ ( _M_[2] _H_[4] _S_[2] _A_ log( _T/M_ )). To the best of our knowledge, those are the first model-free federated RL algorithms that achieve linear regret speedup with logarithmic communication cost. We compare the regret and communication costs under multi-agent tabular episodic MDPs in Table 1.
+
+> 1A comprehensive literature review is provided in Appendix A.
+
+2
+
+Table 1: Comparison of Related Algorithms
+
+|Type Algorithm(Reference)|Regret Communication cost|
+|---|---|
+|Model-based Multi-batch RL (Zhang et al., 2022) ˜_O_( ~~_√_~~ _H_2_SAMT_) - APEVE (Qiao et al., 2022) ˜_O_( _√_ _H_4_S_2_AMT_) - Byzan-UCBVI (Chen et al., 2023) ˜_O_( _√_ _H_3_S_2_AMT_) _O_(_M_ 2_H_2_S_2_A_2 log_T_)||
+|Model-free Concurrent Q-UCB2H (Bai et al., 2019) ˜_O_( ~~_√_~~ _H_4_SAMT_) _O_(_MT_) Concurrent Q-UCB2B (Bai et al., 2019) ˜_O_( _√_ _H_3_SAMT_) _O_(_MT_) Concurrent UCB-Advantage (Zhang et al., 2020) ˜_O_( _√_ _H_2_SAMT_) _O_(_MT_) FedQ-Hoeffding (**this work**) ˜_O_( _√_ _H_4_SAMT_) _O_(_M_ 2_H_4_S_2_A_log(_T/M_)) FedQ-Bernstein(**this work**) ˜_O_( _√_ _H_3_SAMT_) _O_(_M_ 2_H_4_S_2_A_log(_T/M_))||
+
+_H_ : number of steps per episode; _T_ : total number of steps; _S_ : number of states; _A_ : number of actions; _M_ : number of agents. -: not discussed.
+
+- **Technical Novelty.** While the equal weight assignment during global aggregation is critical to reducing the communication cost in our design, it also leads to a non-trivial challenge for the corresponding theoretical analysis. This is because the specific weight assigned to each new visit depends on the total number of visits between two model aggregation points, which is not causally known when ( _x, a, h_ ) is visited. As a result, the weights assigned to all visits of ( _x, a, h_ ) do not form a martingale difference sequence. Such non-martingale property makes the cumulative estimation error in the global estimates of the value functions difficult to track. In order to characterize the **concentration of the sum of non-martingale differences** , we relate the nonmartingale difference sequence with another martingale difference sequence within each round. Due to the common factor between those two sequences in each round, we are then able to bound their differences roundwisely. We believe that the techniques developed for proving concentration inequalities on the sum of non-martingale differences will be useful in future analysis of other model-free federated RL algorithms.
+
+## 2 BACKGROUND AND PROBLEM FORMULATION
+
+**Notations.** Throughout this paper, we assume that 0 _/_ 0 = 0. For any _C ∈_ N, we use [ _C_ ] to denote the set _{_ 1 _,_ 2 _, . . . C}_ . We use I[ _x_ ] to denote the indicator function, which equals 1 when the event _x_ is true and equals 0 otherwise.
+
+## 2.1 PRELIMINARIES
+
+We first introduce the mathematical model and background on Markov decision processes.
+
+**Tabular Episodic Markov Decision Process (MDP).** A tabular episodic MDP is denoted as _M_ := ( _S, A, H,_ P _, r_ ), where _S_ is the set of states with _|S|_ = _S, A_ is the set of actions with _|A|_ = _A_ , _H_ is the number of steps in each episode, P := _{_ P _h}[H] h_ =1[is][the][transition][kernel][so][that][P] _[h]_[(] _[·][|][x, a]_[)] characterizes the distribution over the next state given the state action pair ( _x, a_ ) at step _h_ , and _r_ := _{rh}[H] h_ =1[is][the][collection][of][reward][functions.][In][this][work,][we][assume] _[r][h]_[(] _[x, a]_[)] _[∈]_[[0] _[,]_[ 1]][is] a deterministic function of ( _x, a_ ), while the results can be easily extended to the case when _rh_ is random.
+
+In each episode of _M_ , an initial state _x_ 1 is selected arbitrarily by an adversary. Then, at each step _h ∈_ [ _H_ ], an agent observes state _xh ∈S_ , picks an action _ah ∈A_ , receives reward _rh_ = _rh_ ( _xh, ah_ ) and then transits to next state _xh_ +1. The episode ends when an absorbing state _xH_ +1 is reached.
+
+**Policy, State Value Functions and Action Value Functions.** A policy _π_ is a collection of _H_ functions � _πh_ : _S →_ ∆ _[A]_[�] _h∈_ [ _H_ ][, where][ ∆] _[A]_[is the set of probability distributions over] _[ A]_[.][A policy] is deterministic if for any _x ∈S_ , _πh_ ( _x_ ) concentrates all the probability mass on an action _a ∈A_ . In this case, we simply denote _πh_ ( _x_ ) = _a_ .
+
+We use _Vh[π]_[:] _[ S][→]_[R][ to denote the state value function at step] _[ h]_[ under policy] _[ π]_[ so that] _[ V] h[π]_[(] _[x]_[)][ equals] the expected return under policy _π_ starting from _xh_ = _x_ . Mathematically,
+
+**==> picture [226 x 30] intentionally omitted <==**
+
+3
+
+Accordingly, we also use _Q[π] h_[:] _[ S × A →]_[R][ to denote the action value function at step] _[ h]_[, i.e.,]
+
+**==> picture [324 x 31] intentionally omitted <==**
+
+Since the state and action spaces and the horizon are all finite, there always exists an optimal policy _π[⋆]_ that achieves the optimal value _Vh[⋆]_[(] _[x]_[)][=][sup] _π[V] h[π]_[(] _[x]_[)][=] _[V] h[π][∗]_[(] _[x]_[)][for][all] _[x][∈S]_[and] _[h][∈]_[[] _[H]_[]] (Azar et al., 2017). For ease of exposition, we denote [P _hVh_ +1] ( _x, a_ ) := E _x′∼_ P _h_ ( _·|x,a_ ) _Vh_ +1 ( _x[′]_ ). Then, the Bellman equation and the Bellman optimality equation can be expressed as:
+
+**==> picture [385 x 37] intentionally omitted <==**
+
+## 2.2 THE FEDERATED RL FRAMEWORK
+
+In this work, we consider a federated RL setting with a central server and _M_ agents, each interacting with an independent copy of the MDP _M_ in parallel. The agents can communicate with the server periodically. Depending on the specific algorithm design, the agents may send different information (e.g., reward _rh_ , or estimated _V_ -values _Vh_ ) to the central server. Upon receiving the local information, the central server then aggregates and broadcasts certain information to the clients to coordinate their exploration. Note that, just as in FL, communication is one of the major bottlenecks, and the algorithm has to be conscious of its usage. In this work, we define the communication cost of an algorithm as the number of scalars (integers or real numbers) communicated between the server and clients. We also make the assumption that there is no latency during the communications, and the agents and server are fully synchronized (McMahan et al., 2017).
+
+Let _πh[m,s]_ be the policy adopted by agent _m_ at step _h_ in the _s_ -th episode, and _x[m,s]_ 1 be the corresponding initial state. Then, the overall learning regret of the _M_ clients over _T_ = _HJ_ steps can be expressed as
+
+**==> picture [220 x 32] intentionally omitted <==**
+
+Here, _J_ is the number of episodes and stays the same across different agents due to the synchronization assumption.
+
+## 3 ALGORITHM DESIGN
+
+In this section, we elaborate on our model-free federated RL algorithm termed as FedQ-Hoeffding. The Bernstein-type algorithm, termed as FedQ-Bernstein, will be introduced afterward.
+
+## 3.1 THE FEDQ-HOEFFDING ALGORITHM
+
+The algorithm proceeds in rounds, indexed by _k ∈_ [ _K_ ]. Round _k_ consists of _n[k]_ episodes for each agent, where the specific value of _n[k]_ will be determined later. Before we proceed, we first introduce the following notations. For the _j_ -th ( _j ∈_ [ _n[k]_ ]) episode in the _k_ -th round, we use _x[m,k,j]_ 1 to denote the initial state for the _m_ -th agent, and use _{_ ( _x[m,k,j] h , a[m,k,j] h , rh[m,k,j]_ ) _[H] h_ =1 _[}]_[ to denote the correspond-] ing trajectory. Denote _n[m,k] h_ ( _x, a_ ) as the total number of times that the state-action pair ( _x, a_ ) has been visited at step _h_ during round _k_ by agent _m_ , i.e., _n[m,k] h_ ( _x, a_ ) =[�] _[n] j[′][k]_ =1[I] _[{]_[(] _[x][m,k,j] h[′] , a[m,k,j] h[′]_ ) = ( _x, a_ ) _},_ and let _n[k] h_[(] _[x, a]_[)][=][�] _[M] m_ =1 _[n][m,k] h_ ( _x, a_ ), i.e., the total number of visits for ( _x, a_ ) at step _h_ during round _k_ among all agents. We also denote _Nh[k]_[(] _[x, a]_[)][ as the total number of visits for][ (] _[x, a, h]_[)] _k−_ 1 _n[k][′]_ among all agents before round _k_ , i.e, _Nh[k]_[(] _[x, a]_[)][=][�] _[M] m_ =1 � _k[′]_ =1 � _j_ =1[I] _[{]_[(] _[x][m,k] h[′][,j] , a[m,k] h[′][,j]_ ) = ( _x, a_ ) _}_ .
+
+We also use _{Vh[k]_[:] _[ S][→]_[R] _[}][H] h_ =1[and] _[ {][Q][k] h_[:] _[ S × A →]_[R] _[}][H] h_ =1[to denote the “global” estimates of the] state value function and action value function before the beginning of round _k_ . Meanwhile, we use
+
+4
+
+_vh[m,k]_ +1[(] _[x, a]_[)][ to denote the “local” estimate of the expected return starting at step] _[ h]_[ + 1][ at agent] _[ m]_[ in] round _k_ given ( _xh, ah_ ) = ( _x, a_ ), and use _vh[k]_ +1[(] _[x, a]_[)][ to denote the corresponding global estimate.]
+
+We then specify each individual component of the algorithm as follows.
+
+**Coordinated Exploration for Agents.** At the beginning of round _k_ , the server decides a deterministic policy _π[k]_ = _{πh[k][}][H] h_ =1[, and then broadcasts it along with] _[ {][N] h[ k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_ to all of the agents. When _k_ = 1, _Nh_[1][(] _[x, a]_[) = 0] _[, Q]_[1] _h_[(] _[x, a]_[) =] _[ V] h_[1][(] _[x]_[) =] _[ H,][ ∀]_[(] _[x, a, h]_[)] _[ ∈S × A ×]_[[] _[H]_[]] and _π_[1] is an arbitrary deterministic policy.
+
+Once receiving such information, the agents will execute policy _π[k]_ and start collecting trajectories.
+
+**Event-Triggered Termination of Exploration.** During exploration, every agent _m_ will monitor _n[m,k] h_ ( _x, a_ ), i.e., the total number of visits for each ( _x, a, h_ ) triple within the current round. For any agent _m_ , at the end of each episode, if any ( _x, a, h_ ) has been visited by max �1 _, ⌊ MH_ (1 _H_ +1) _[N] h[ k]_[(] _[x, a]_[)] _[⌋]_ � times by agent _m_ , the agent will send a signal to the server, which will then request all agents to abort the exploration.
+
+The termination condition guarantees that for any ( _x, a, h, k_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ],
+
+**==> picture [286 x 25] intentionally omitted <==**
+
+and for each _k ∈_ [ _K_ ], there exists at least one agent _m_ such that equality is met for a ( _x, a, h, m_ )- tuple. The inequality limits the number of visits in a round and is important for introducing our server-side information aggregation design shortly. Meanwhile, the existence of equality guarantees that a sufficient number of new samples will be generated in a round, which is the key to the proof of Theorem 4.2 about the low communication cost.
+
+**Local Updating of the Estimated Expected Return.** Each agent updates the local estimate of the expected return _vh[m,k]_ +1[(] _[x, a]_[)][ at the end of round] _[ k]_[ as follows:]
+
+**==> picture [342 x 33] intentionally omitted <==**
+
+i.e., for each ( _x, a_ ) visited at step _h_ during round _k_ , _vh[m,k]_ +1[is obtained by taking the empirical average] of the global estimates of the value of the next visited state in the current round _k_ .
+
+Next, each agent _m_ sends _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[and] _[ {][v] h[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[to the] central server for aggregation. **Server-side Information Aggregation.** Denote _αt_ = _HH_ +1+ _t_[,] _[θ]_ 0[0][=][1][,] _[θ] t_[0][=][0][for] _[t][≥]_[1] _[,]_[and] _θt[i]_[=] _[ α][i]_ � _ti[′]_ = _i_ +1[(1] _[−][α][i][′]_[)] _[,][ ∀]_[1] _[ ≤][i][ ≤][t]_[.][We also denote] _[ α][c]_[(] _[t]_[1] _[, t]_[2][) =][ �] _[t] t_[2] = _t_ 1[(1] _[−][α][t]_[)][ for any positive] integers _t_ 1 _< t_ 2.
+
+Then, after receiving the information sent by the agents, for each ( _x, a, h_ ) tuple visited by the agents, the server sets _t[k][−]_[1] = _Nh[k]_[(] _[x, a]_[)] _[, t][k]_[=] _[ N] h[ k]_[+1] ( _x, a_ ), _αagg_ = 1 _− α[c]_ ( _t[k][−]_[1] + 1 _, t[k]_ ) and _β[k]_ ( _x, a, h_ ) = 2[�] _[t] t[k]_ = _t[k][−]_[1] +1 _[θ] t[t][k][b][t]_[ for some confidence bound] _[ b][t]_[ to be determined later. When there is no ambiguity,] we will also use _β[k]_ to represent _β[k]_ ( _x, a, h_ ) _._ Then the server updates the global estimate of the value functions according to one of the following two cases.
+
+**==> picture [398 x 79] intentionally omitted <==**
+
+**==> picture [325 x 13] intentionally omitted <==**
+
+**==> picture [201 x 30] intentionally omitted <==**
+
+5
+
+and updates the _Q_ -estimate as
+
+**==> picture [348 x 13] intentionally omitted <==**
+
+After finishing updating the estimated _Q_ function, the central server updates the estimated value function and the policy as follows:
+
+**==> picture [330 x 47] intentionally omitted <==**
+
+The algorithm then proceeds to round _k_ + 1.
+
+Algorithms 1 and 2 formally present the Hoeffding-type design. Inputs _K_ 0 _, T_ 0 in Algorithms 1 are termination conditions where _K_ 0 limits the total number of rounds and _T_ 0 limits the total number of samples generated by all the agents before the last round.
+
+**Algorithm 1** FedQ-Hoeffding (Central Server)
+
+1: **Input:** _T_ 0 _, K_ 0 _∈_ N+.
+
+2: **Initialization:** _k_ = 1, _Nh_[1][(] _[x, a]_[)][=][0] _[, Q]_[1] _h_[(] _[x, a]_[)][=] _[V] h_[1][(] _[x]_[)][=] _[H,][ ∀]_[(] _[x, a, h]_[)] _[∈S][× A ×]_[ [] _[H]_[]][ and] _π_[1] = � _πh_[1][:] _[ S][→A]_ � _h∈_ [ _H_ ][is an arbitrary deterministic policy.] 3: **while** _H_[�] _[k] k[−][′]_ =1[1] _[Mn][k][′][< T]_[0][ &] _[ k][≤][K]_[0] **[ do]** 4: Broadcast _π[k] , {Nh[k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_[ to all clients.] 5: Wait until receiving an abortion signal and send the signal to all agents. 6: Receive _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h,m]_[ and] _[ {][v] h[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h,m]_[ from clients.] 7: Calculate _Nh[k]_[+1] ( _x, a_ ) _, n[k] h_[(] _[x, a]_[)] _[, v] h[k]_ +1[(] _[x, a]_[)] _[,][ ∀]_[(] _[x, h]_[)] _[ ∈S ×]_[ [] _[H]_[]][ with] _[ a]_[ =] _[ π] h[k]_[(] _[x]_[)][.] 8: **for** ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] **do** 9: **if** _a ̸_ = _πh[k]_[(] _[x]_[)] **[ or]** _[ n][k] h_[(] _[x, a]_[) = 0] **[ then]** 10: _Q[k] h_[+1] ( _x, a_ ) _← Q[k] h_[(] _[x, a]_[)][.] 11: **else if** _Nh[k]_[(] _[x, a]_[)] _[ < i]_[0] **[ then]** 12: Update _Q[k] h_[+1] ( _x, a_ ) according to Equation (3). 13: **else** 14: Update _Q[k] h_[+1] ( _x, a_ ) according to Equation (4). 15: **end if** 16: **end for** 17: Update _Vh[k]_[+1] and _π[k]_[+1] according to Equation (5) and Equation (6). 18: _k ← k_ + 1. 19: **end while**
+
+**Algorithm 2** FedQ-Hoeffding (Agent _m_ in round _k_ )
+
+1: _n[m] h_[(] _[x, a]_[) =] _[ v] h[m]_ +1[(] _[x, a]_[) =] _[ r][h]_[(] _[x, a]_[) = 0] _[,][ ∀]_[(] _[x, a, h]_[)] _[ ∈S × A ×]_[ [] _[H]_[]][.] 2: Receive _π[k] , {Nh[k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_[ from the central server.] 3: **while** no abortion signal from the central server **do** 4: **while** _n[m] h_[(] _[x][h][, a][h]_[)] _[ <]_[ max] �1 _, ⌊ MH_ (1 _H_ +1) _[N] h[ k]_[(] _[x][h][, a][h]_[)] _[⌋]_ � _, ∀_ ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] **do** 5: Collect a new trajectory _{_ ( _xh, ah, rh_ ) _}[H] h_ =1[with] _[ a][h]_[=] _[ π] h[k]_[(] _[x][h]_[)][.] 6: _n[m] h_[(] _[x][h][, a][h]_[)] _[←][n][m] h_[(] _[x][h][, a][h]_[)][+][1] _[,][v] h[m]_ +1[(] _[x][h][, a][h]_[)] _[←][v] h[m]_ +1[(] _[x][h][, a][h]_[)][+] _[V] h[k]_ +1[(] _[x][h]_[+1][)][,][and] _rh_ ( _xh, ah_ ) _← rh, ∀h ∈_ [ _H_ ] _._ 7: **end while** 8: Send an abortion signal to the central server. 9: **end while** 10: _n[m,k] h_ ( _x, a_ ) _← n[m] h_[(] _[x, a]_[)] _[, v] h[m,k]_ +1[(] _[x, a]_[)] _[ ←] vnh[m][m] h_ +1[(][(] _[x,a][x,a]_[)][)] _[,][ ∀]_[(] _[x, h]_[)] _[ ∈S ×]_[ [] _[H]_[]][ with] _[ a]_[ =] _[ π] h[k]_[(] _[x]_[)][.] 11: Send _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][v] h[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ to the central server.]
+
+6
+
+## 3.2 INTUITION BEHIND THE ALGORITHM DESIGN
+
+_Q_ **-estimate Update in Single-agent Setting.** Before we elaborate the intuition behind our algorithm design, we first provide a brief review of the Q-value estimate updating step under the Q-UCB2H algorithm (Bai et al., 2019) in the single-agent setting. Similar to FedQ-Hoeffding, Q-UCB2H also has a round-based design, where the agent updates the value function estimates at the end of each round. With a slight abuse of the notation, we use the same symbols as in Section 3.1 to denote the quantities in the single-agent setting.
+
+In round _k_ , for a given triple ( _x, a, h_ ) such that _n[k]_ ( _x, a_ ) _>_ 0, we denote the next states for all of the visits within the round as _{xh_ +1 _,t}[t] t[k]_ = _t[k][−]_[1] +1[.][Then, the] _[ Q]_[-estimate is updated sequentially and] recursively for each visit as
+
+_Qh_ ( _x, a_ ) _←_ (1 _− αt_ ) _Qh_ ( _x, a_ ) + _αt_ ( _rh_ ( _x, a_ ) + _Vh[k]_ +1[(] _[x][h]_[+1] _[,t]_[) +] _[ b][t]_[)] _[, t]_[ =] _[ t][k][−]_[1][ + 1] _[, . . . t][k][.]_ (7) As a result, at the end of round _k_ , we have
+
+**==> picture [391 x 33] intentionally omitted <==**
+
+If we treat _rh_ ( _x, a_ ) + _Vh[k]_ +1[(] _[x][h]_[+1] _[,t]_[)][ as a new estimate of the] _[ Q][h]_[(] _[x, a]_[)][ induced by one visit within] round _k_ , then, _all new samples are assigned with different weights θt[t][k][.]_[Together][with][the][weight] assigned for the old estimate _Q[k] h_[(] _[x, a]_[)][, it satisfies that] _[ α][c]_[(] _[t][k][−]_[1][ + 1] _[, t][k]_[) +][ �] _[t] t_ = _[k] t[k][−]_[1] +1 _[θ] t[t][k]_[= 1] _[.]_
+
+**Major Challenge in Federated Setting.** The sequential updating rule in Equation (7) relies on full accessibility of the trajectories to the agent, which is infeasible for the central server in the federated setting due to the high communication cost. Instead of sharing the raw data, in Algorithm 2, the local agents only send _{vh[m,k]_ +1[(] _[x, a]_[)] _[}] m[M]_ =1[to][the][server.][Since][this][is][the][sample][average][of][the] estimated values over all states visited after ( _x, a, h_ ), it does not preserve the temporal structure of the trajectories. It thus becomes impossible for the server to infer the next state for each visit and sequentially update the global estimate as in Equation (7) in general.
+
+**Equal Weight Assignment for Q-estimate Aggregation.** We overcome the aforementioned challenge through a two-case design and new weight assignment for each visit.
+
+In the first case, we have _Nh[k]_[(] _[x, a]_[)] _[<][i]_[0][.][Equation][(2)][indicates][that][each][client][visits][(] _[x, a, h]_[)][at] most once, which implies that _vh[m]_ +1 _[t][,k]_[in Equation (3) is exactly] _[ V] h[k]_ +1[(] _[x][h]_[+1] _[,t]_[)][.][Thus, Equation (3) is] a sequential update and is the same as Equation (8). We also remark that the design of the first case aims at early-stage accuracy and shares similar technical motivations as Bai et al. (2019). The second case shows the key difference between our algorithm and non-federated algorithms. Since the temporal structure is no longer preserved, we cannot track the next state for a given visit to ( _x, a, h_ ), and it thus becomes impossible to assign a different weight to each new visit as in Equation (8). To resolve this issue, we choose to assign all visits with the same weight, while ensuring the total weight assigned to all visits unchanged, i.e.,
+
+**==> picture [374 x 33] intentionally omitted <==**
+
+which is equivalent to the updating rule in Equation (4).
+
+## 4 PERFORMANCE GUARANTEES
+
+Next, we provide regret upper bound for FedQ-Hoeffding as follows.
+
+**Theorem 4.1** (Regret Upper Bound for FedQ-Hoeffding) **.** _Let C_[˜] = 1 _/_ ( _H_ ( _H_ +1)) _, ι_ = max _{ι_ 0 _, ι_ 1 _} where ι_ 0 = log(2 _SA_ ( _T_ 0 + _HM_ )(1 + _C_[˜] ) _/p_ ) _, ι_ 1 = log[2] _[K]_[0] _[SAH]_[(] _[T]_[0] _[/] p[H]_[+] _[M]_[)(][1][+][ ˜] _C_ ) _, and p ∈_ (0 _,_ 1) _. Define bt_ = _c_ � _H_[3] _ι/t. Under Algorithms 1 and 2, there exists a positive constant c >_ 0 _such that, for any K ∈_ [ _K_ 0] _and p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p,_
+
+_Regret_ ( _T_ ) _≤ O √H_[4] _ιMTSA_ + _HSA_ ( _M −_ 1) _√H_[3] _ι_ + _MH_[2] _SA_ + _H_[4] _SA_ ( _M −_ 1) _,_ (9) � �
+
+7
+
+_where T_ = _H_[�] _[K] k_ =1 _[n][k][is the total number of steps in the first][ K][rounds.]_
+
+Theorem 4.1 indicates that the total regret scales as _O_ ( _√H_[4] _ιMTSA_ ) + _O_[˜] ( _M_ poly( _H, S, A_ ))[2] . The overhead term _O_[˜] ( _M_ poly( _H, S, A_ )) is contributed by the _O_ ( _M_ ) samples collected in the first stage, i.e., the burn-in cost. Such a burn-in cost is arguably inevitable in federated RL (e.g., Woo et al. (2023)). When _M_ = 1, our result recovers those in Jin et al. (2018) and Bai et al. (2019). In the general federated setting, our algorithm enjoys a linear speedup in terms of _M_ when _T ≥_ Ω( _M_ poly( _H, S, A_ )) and the first term dominates the burn-in cost.
+
+_Proof Sketch of Theorem 4.1._ First, for any given ( _x, a, h_ ) _∈S×A×_ [ _H_ ], we assign a global visiting index _i_ to each local visit before starting the ( _k_ + 1)-th round, and denote the weight assigned to the _i_ -th visit as _θ_[˜] _t[i] k_[with] _[ t][k]_[=] _[N] h[ k]_[+1] ( _x, a_ ). Specifically, for visits within the same round _k[′]_ , we index them by _i ∈_ [ _Nh[k][′]_[(] _[x, a]_[) + 1][:] _[N] h[ k][′]_[+1] ( _x, a_ )] := _I[k][′]_ according to a pre-defined order. Then, for all visits _θ_ ˜ _t[i][k]_[=][ �] within _i∈I[k]_ the _[′][θ] t[i][k]_ first _[/n] h[k][′]_ case,[(] _[x, a]_[)] _θ_[˜][.] _t[i][k]_[equals][to] _[θ] t[i][k]_[,][and][for][all][visits][within][round] _[k][′]_[in][the][second][case,] _−_ The proof mainly consists of two major steps. **Step 1** is to bound the global estimation error _Q[k] h_[+1] _Q[⋆] h_[for each round] _[ k]_[.][Based on the recursive updating rule, we can show that, with high probability,]
+
+**==> picture [338 x 32] intentionally omitted <==**
+
+_tk_ with _βtk_ =[�] _[t] i_ =1 _[k][θ] t[i][k][b][i]_[.][As shown in Lemma C.2, it suffices to bound] _i_ =1 _[θ]_[˜] _t[i][k][X][i]_ where _Xi_ = ���� ��� _Vh[⋆]_ +1[(] _[x][h]_[+1] _[,i]_[)] _[ −]_[E] � _Vh[⋆]_ +1[(] _[x][h]_[+1][)] _[|]_[(] _[x][h][, a][h]_[) = (] _[x, a]_[)] � _._ Similar to the single-agent setting (Jin et al., 2018), _{Xi}[∞] i_ =1[is a martingale difference sequence.][However, since our weight assignment for the] _i_ -th visit depends on the total number of visits in the same round, which is determined after that round completes, _{θ_[˜] _t[i][k][}][i]_[does not preserve the original martingale structure in] _[ {][θ] t[i][k][}][i]_[.][Therefore, it] necessitates novel approaches to bound the sum of **non-martingale differences** . We would like to emphasize that the techniques required to bound those non-martingale differences are fundamentally different from the commonly used techniques in federated learning (FL), which usually construct an “averaged parameter update path” and then bound each local term’s “drift” from it. This is because such bounding techniques in FL rely on certain assumptions that do not exist in federated RL. Due to the inherent randomness in the environment, even if the same policy is taken at all local agents, it may result in very different trajectories. Thus, it is hard to obtain an easy-to-track “averaged parameter update path” in federated RL, or a tight bound on the local terms’ drifts from such averaged parameter update path. We overcome this challenge by relating _{θ_[˜] _t[i][k][}][i]_[with] _[ {][θ] t[i][k][}][i]_[.] Instead of bounding the local drift _θ_[˜] _t[i][k][−][θ] t[i][k]_[in][each][time][step,][we][choose][to][group][the][“drift”] terms based on the corresponding rounds and then leverage the round-wise equal weight assignment adopted in our algorithm to obtain a tight bound. The detailed analysis is elaborated in Lemma C.3. Built upon the estimation error bound obtained in Step 1, **Step 2** then utilizes the recursive Bellman equation to relate the total learning error among all agents in round _k_ at step _h_ with that at step _h_ + 1 (see Appendix C.3), which directly translates into a regret upper bound. The detailed proof is deferred to Appendix C.
+
+Next, we discuss the communication cost under Algorithms 1 and 2 as follows.
+
+**Theorem 4.2** (Communication Cost) **.** _Under Algorithms 1 and 2, for a given number of steps T , the total number of rounds must satisfy_
+
+**==> picture [396 x 39] intentionally omitted <==**
+
+Theorem 4.2 indicates that, when _T_ is sufficiently large, _K_ = _O_ � _MH_[3] _SA_ log( _T/M_ )�. Since the total number of communicated scalars is _O_ ( _MHS_ ) in each round, the total communication cost scales in _O_ ( _M_[2] _H_[4] _S_[2] _A_ log( _T/M_ )).
+
+> 2 ˜ _O_ ignores logarithmic factors.
+
+8
+
+_Proof Sketch of Theorem 4.2._ Due to the fact that the equality in Equation (2) is met for at least one agent, by the Pigeonhole principle, during the first _K_ rounds, there exists one tuple ( _x, a, h, m_ ) such that the equality in Equation (2) holds for at least Ω( _K/_ ( _HSAM_ )) rounds. In these rounds, as ( _x, a, h_ ) are visited at least once in each round, at most _O_ ( _i_ 0) rounds belong to the first case. _O_ So, whenˆ( _Nh[k]_[(] _[x, a] K_[))] is large, there are at least[ in these rounds.][Thus we have] Ω( _K/[ HN]_ ( _HSAM[ K] h_[+1] ( _x, a_ )) rounds in the second case and) _/M_ , which is smaller than or equal to _n[k] h_[(] _[x, a]_[)] _T_[=] , and roughly exponential in _K_ when _K_ is large. A detailed proof can be found in Appendix D.
+
+## 5 EXTENSION TO BERNSTEIN-TYPE ALGORITHM
+
+The Bernstein-type algorithm differs from FedQ-Hoeffding on the construction of the upper confidence bound. Similar to the design in Jin et al. (2018), we define
+
+**==> picture [383 x 31] intentionally omitted <==**
+
+in which _c[′] >_ 0 is a positive constant and _W[t]_ ( _x, a, h_ ) is a variance estimator of _Xi_ s whose specific form is introduced in Appendix E. FedQ-Bernstein then replaces _β[k]_ in Equation (3) and Equation (4) by _β_[˜] = _βtk_ ( _x, a, h_ ) _− α[c]_ ( _t[k][−]_[1] + 1 _, t[k]_ ) _βtk−_ 1( _x, a, h_ ). In terms of communication, during round _k_ , in addition to all the quantities sent in Algorithm 2, each agent _m_ sends _{µ[m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[ to the] 2 central server where _µ[m,k] h_ ( _x, a_ ) = _n[m,k] h_ 1( _x,a_ ) � _nj_ =1 _[k]_ � _Vh[k]_ +1 � _x[m,k,j] h_ +1 �� I[( _x[m,k,j] h , a[m,k,j] h_ ) = ( _x, a_ )] _._ The complete algorithm description can be found in Appendix E.
+
+As FedQ-Bernstein uses tighter upper confidence bounds compared with FedQ-Hoeffding, it enjoys a reduced regret upper bound, as stated in Theorem 5.1 below.
+
+**Theorem 5.1** (Regret Upper Bound for FedQ-Bernstein) **.** _Let C_[˜] = 1 _/_ ( _H_ ( _H_ +1)) _, ι_ = max _{ι_ 0 _, ι_ 1 _} with ι_ 0 = log(2 _SA_ ( _T_ 0 + _HM_ )(1 + _C_[˜] ) _/p_ ) _, ι_ 1 = log[2] _[K]_[0] _[SAH]_[(] _[T]_[0] _[/] p[H]_[+] _[M]_[)(][1][+][ ˜] _C_ ) _, and p ∈_ (0 _,_ 1) _. For Algorithms 3 and 4 in Appendix E with the upper confidence bound defined in Equation_ (10) _, there exists a constant c[′] >_ 0 _such that, for any K ∈_ [ _K_ 0] _, p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p,_
+
+**==> picture [281 x 40] intentionally omitted <==**
+
+_Here, T_ = _HJ and J is the total number of of episodes generated by an agent in the first K rounds._
+
+Theorem 5.1 improves the regret upper bound in Theorem 4.1 by a factor of _√H_ , and also enjoys a linear speedup in _M_ compared with its single-agent counterparts (Jin et al., 2018; Bai et al., 2019) when _T ≥_ Ω([˜] _M_ poly( _H, S, A_ )) and the first term becomes the dominating term. Here Ω[˜] hides a log factor that takes the form log[2] ( _MT_ poly( _H, S, A_ ))).
+
+We also remark that the upper bound in Theorem 4.2 applies to FedQ-Bernstein as well. Since the amount of shared data is _O_ ( _MHS_ ) in each round for both algorithms, FedQ-Bernstein has the same order of communication cost upper bound as FedQ-Hoeffding.
+
+## 6 CONCLUSION
+
+In this paper, we have developed model-free algorithms in federated reinforcement learning with provably linear regret speedup and logarithmic communication cost. More specifically, two federated _Q_ -learning algorithms - FedQ-Hoeffding and FedQ-Bernstein - have been proposed, and we proved that they achieve regret of _O_[˜] ( _√H_[4] _SAMT_ ) and _O_[˜] ( _√H_[3] _SAMT_ ) respectively with communication cost _O_ ( _M_[2] _H_[4] _S_[2] _A_ log( _T/M_ )). Technically, our algorithm design features a novel equal weight assignment during global information aggregation, and we developed new approaches to characterizing the concentration properties for non-martingale differences, which could be of broader applications for other RL problems.
+
+9
+
+## IMPACT STATEMENT
+
+This paper presents work whose goal is to advance the field of reinforcement learning. There are potential societal consequences of our work but none of them must be specifically highlighted in our opinion.
+
+## REPRODUCIBILITY
+
+Numerical experiments in this paper can be fully reproduced via the publicly available code[3] .
+
+## REFERENCES
+
+Alekh Agarwal, Sham Kakade, and Lin F Yang. Model-based reinforcement learning with a generative model is minimax optimal. In _Conference on Learning Theory_ , pp. 67–83. PMLR, 2020.
+
+Mridul Agarwal, Bhargav Ganguly, and Vaneet Aggarwal. Communication efficient parallel reinforcement learning. In _Uncertainty in Artificial Intelligence_ , pp. 247–256. PMLR, 2021.
+
+- Shipra Agrawal and Randy Jia. Optimistic posterior sampling for reinforcement learning: worstcase regret bounds. _Advances in Neural Information Processing Systems_ , 30, 2017.
+
+- Ilge Akkaya, Marcin Andrychowicz, Maciek Chociej, Mateusz Litwin, Bob McGrew, Arthur Petron, Alex Paino, Matthias Plappert, Glenn Powell, Raphael Ribas, et al. Solving rubik’s cube with a robot hand. _arXiv preprint arXiv:1910.07113_ , 2019.
+
+- Mahmoud Assran, Joshua Romoff, Nicolas Ballas, Joelle Pineau, and Michael Rabbat. Gossip-based actor-learner architectures for deep reinforcement learning. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Peter Auer, Thomas Jaksch, and Ronald Ortner. Near-optimal regret bounds for reinforcement learning. _Advances in Neural Information Processing Systems_ , 21, 2008.
+
+- Mohammad Gheshlaghi Azar, Ian Osband, and R´emi Munos. Minimax regret bounds for reinforcement learning. In _International Conference on Machine Learning_ , pp. 263–272. PMLR, 2017.
+
+- Yu Bai, Tengyang Xie, Nan Jiang, and Yu-Xiang Wang. Provably efficient q-learning with low switching cost. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Tianyi Chen, Kaiqing Zhang, Georgios B Giannakis, and Tamer Bas¸ar. Communication-efficient policy gradient methods for distributed reinforcement learning. _IEEE Transactions on Control of Network Systems_ , 9(2):917–929, 2021a.
+
+- Yiding Chen, Xuezhou Zhang, Kaiqing Zhang, Mengdi Wang, and Xiaojin Zhu. Byzantine-robust online and offline distributed reinforcement learning. In _International Conference on Artificial Intelligence and Statistics_ , pp. 3230–3269. PMLR, 2023.
+
+- Ziyi Chen, Yi Zhou, and Rongrong Chen. Multi-agent off-policy tdc with near-optimal sample and communication complexity. In _2021 55th Asilomar Conference on Signals, Systems, and Computers_ , pp. 504–508. IEEE, 2021b.
+
+- Ziyi Chen, Yi Zhou, Rong-Rong Chen, and Shaofeng Zou. Sample and communication-efficient decentralized actor-critic algorithms with finite-time analysis. In _International Conference on Machine Learning_ , pp. 3794–3834. PMLR, 2022.
+
+> 3[URL removed] material
+
+10
+
+- Christoph Dann, Lihong Li, Wei Wei, and Emma Brunskill. Policy certificates: Towards accountable reinforcement learning. In _International Conference on Machine Learning_ , pp. 1507–1516. PMLR, 2019.
+
+- Thinh Doan, Siva Maguluri, and Justin Romberg. Finite-time analysis of distributed td (0) with linear function approximation on multi-agent reinforcement learning. In _International Conference on Machine Learning_ , pp. 1626–1635. PMLR, 2019.
+
+- Thinh T Doan, Siva Theja Maguluri, and Justin Romberg. Finite-time performance of distributed temporal-difference learning with linear function approximation. _SIAM Journal on Mathematics of Data Science_ , 3(1):298–320, 2021.
+
+- Abhimanyu Dubey and Alex Pentland. Private and Byzantine-proof cooperative decision-making. _arXiv preprint arXiv:2205.14174_ , 2022.
+
+- Abhimanyu Dubey and AlexSandy’ Pentland. Differentially-private federated linear bandits. _Advances in Neural Information Processing Systems_ , 33:6003–6014, 2020.
+
+- Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Vlad Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. In _International Conference on Machine Learning_ , pp. 1407–1416. PMLR, 2018.
+
+- Flint Xiaofeng Fan, Yining Ma, Zhongxiang Dai, Wei Jing, Cheston Tan, and Bryan Kian Hsiang Low. Fault-tolerant federated reinforcement learning with theoretical guarantee. _Advances in Neural Information Processing Systems_ , 34:1007–1021, 2021.
+
+- Flint Xiaofeng Fan, Yining Ma, Zhongxiang Dai, Cheston Tan, and Bryan Kian Hsiang Low. Fedhql: Federated heterogeneous q-learning. In _Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems_ , pp. 2810–2812, 2023.
+
+- Zijun Gao, Yanjun Han, Zhimei Ren, and Zhengqing Zhou. Batched multi-armed bandits problem. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In _2017 IEEE International Conference on Robotics and Automation (ICRA)_ , pp. 3389–3396. IEEE, 2017.
+
+- Zhaohan Guo and Emma Brunskill. Concurrent pac rl. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 29, pp. 2624–2630, 2015.
+
+- Jiafan He, Tianhao Wang, Yifei Min, and Quanquan Gu. A simple and provably efficient algorithm for asynchronous federated contextual linear bandits. _arXiv preprint arXiv:2207.03106_ , 2022.
+
+- Ruiquan Huang, Weiqiang Wu, Jing Yang, and Cong Shen. Federated linear contextual bandits. _Advances in Neural Information Processing Systems_ , 34:27057–27068, 2021.
+
+- Ruiquan Huang, Huanyu Zhang, Luca Melis, Milan Shen, Meisam Hejazinia, and Jing Yang. Federated linear contextual bandits with user-level differential privacy. In _International Conference on Machine Learning_ , pp. 14060–14095. PMLR, 2023.
+
+- Chi Jin, Zeyuan Allen-Zhu, Sebastien Bubeck, and Michael I Jordan. Is q-learning provably efficient? _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Hao Jin, Yang Peng, Wenhao Yang, Shusen Wang, and Zhihua Zhang. Federated reinforcement learning with environment heterogeneity. In _International Conference on Artificial Intelligence and Statistics_ , pp. 18–37. PMLR, 2022.
+
+Sham Kakade, Mengdi Wang, and Lin F Yang. Variance reduction methods for sublinear reinforcement learning. _arXiv preprint arXiv:1802.09184_ , 2018.
+
+- Dmitry Kalashnikov, Alex Irpan, Peter Pastor, Julian Ibarz, Alexander Herzog, Eric Jang, Deirdre Quillen, Ethan Holly, Mrinal Kalakrishnan, Vincent Vanhoucke, et al. Qt-opt: Scalable deep reinforcement learning for vision-based robotic manipulation. _arXiv preprint arXiv:1806.10293_ , 2018.
+
+11
+
+Sajad Khodadadian, Pranay Sharma, Gauri Joshi, and Siva Theja Maguluri. Federated reinforcement learning: Linear speedup under markovian sampling. In _International Conference on Machine Learning_ , pp. 10997–11057. PMLR, 2022.
+
+Jens Kober, J Andrew Bagnell, and Jan Peters. Reinforcement learning in robotics: A survey. _The International Journal of Robotics Research_ , 32(11):1238–1274, 2013.
+
+- Chuanhao Li and Hongning Wang. Asynchronous upper confidence bound algorithms for federated linear bandits. In _International Conference on Artificial Intelligence and Statistics_ , pp. 6529– 6553. PMLR, 2022.
+
+- Fengjiao Li, Xingyu Zhou, and Bo Ji. Differentially private linear bandits with partial distributed feedback. In _2022 20th International Symposium on Modeling and Optimization in Mobile, Ad hoc, and Wireless Networks (WiOpt)_ , pp. 41–48. IEEE, 2022a.
+
+- Gen Li, Laixi Shi, Yuxin Chen, Yuantao Gu, and Yuejie Chi. Breaking the sample complexity barrier to regret-optimal model-free reinforcement learning. _Advances in Neural Information Processing Systems_ , 34:17762–17776, 2021.
+
+- Tan Li, Linqi Song, and Christina Fragouli. Federated recommendation system via differential privacy. In _2020 IEEE International Symposium on Information Theory (ISIT)_ , pp. 2592–2597. IEEE, 2020.
+
+- Wenjie Li, Qifan Song, Jean Honorio, and Guang Lin. Federated x-armed bandit. _arXiv preprint arXiv:2205.15268_ , 2022b.
+
+- Rui Liu and Alex Olshevsky. Distributed td (0) with almost no communication. _IEEE Control Systems Letters_ , 2023.
+
+- Shicheng Liu and Minghui Zhu. Distributed inverse constrained reinforcement learning for multiagent systems. _Advances in Neural Information Processing Systems_ , 35:33444–33456, 2022.
+
+- Shicheng Liu and Minghui Zhu. Learning multi-agent behaviors from distributed and streaming demonstrations. _Advances in Neural Information Processing Systems_ , 36, 2024.
+
+- Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In _Proceedings of the 20th International Conference on Artificial Intelligence and Statistics_ , volume 54, pp. 1273– 1282. PMLR, 2017.
+
+- Pierre M´enard, Omar Darwiche Domingues, Xuedong Shang, and Michal Valko. Ucb momentum q-learning: Correcting the bias without forgetting. In _International Conference on Machine Learning_ , pp. 7609–7618. PMLR, 2021.
+
+- Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In _International Conference on Machine Learning_ , pp. 1928–1937. PMLR, 2016.
+
+- Arun Nair, Praveen Srinivasan, Sam Blackwell, Cagdas Alcicek, Rory Fearon, Alessandro De Maria, Vedavyas Panneershelvam, Mustafa Suleyman, Charles Beattie, Stig Petersen, et al. Massively parallel methods for deep reinforcement learning. _arXiv preprint arXiv:1507.04296_ , 2015.
+
+- Vianney Perchet, Philippe Rigollet, Sylvain Chassang, and Erik Snowberg. Batched bandit problems. _The Annals of Statistics_ , 44(2):660 – 681, 2016.
+
+- Dan Qiao, Ming Yin, Ming Min, and Yu-Xiang Wang. Sample-efficient reinforcement learning with loglog (t) switching cost. In _International Conference on Machine Learning_ , pp. 18031–18061. PMLR, 2022.
+
+- Han Shen, Kaiqing Zhang, Mingyi Hong, and Tianyi Chen. Towards understanding asynchronous advantage actor-critic: Convergence and linear speedup. _IEEE Transactions on Signal Processing_ , 71:2579–2594, 2023a.
+
+12
+
+- Han Shen, Kaiqing Zhang, Mingyi Hong, and Tianyi Chen. Towards understanding asynchronous advantage actor-critic: Convergence and linear speedup. _IEEE Transactions on Signal Processing_ , 2023b.
+
+Chengshuai Shi and Cong Shen. Federated multi-armed bandits. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 9603–9611, 2021.
+
+- Chengshuai Shi, Cong Shen, and Jing Yang. Federated multi-armed bandits with personalization. In _Proceedings of the 24rd International Conference on Artificial Intelligence and Statistics (AISTATS)_ , April 2021.
+
+- David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. _Nature_ , 529(7587):484–489, 2016.
+
+- David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. _arXiv preprint arXiv:1712.01815_ , 2017.
+
+- David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. _Science_ , 362(6419):1140– 1144, 2018.
+
+- Jun Sun, Gang Wang, Georgios B Giannakis, Qinmin Yang, and Zaiyue Yang. Finite-time analysis of decentralized temporal-difference learning with linear function approximation. In _International Conference on Artificial Intelligence and Statistics_ , pp. 4485–4495. PMLR, 2020.
+
+R Sutton and A Barto. _Reinforcement Learning: An Introduction_ . MIT Press, 2018.
+
+- Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Micha¨el Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. _Nature_ , 575(7782):350–354, 2019.
+
+- Hoi-To Wai. On the convergence of consensus algorithms with markovian noise and gradient bias. In _2020 59th IEEE Conference on Decision and Control (CDC)_ , pp. 4897–4902. IEEE, 2020.
+
+- Chi-Hua Wang, Wenjie Li, Guang Cheng, and Guang Lin. Federated online sparse decision making. _arXiv preprint arXiv:2202.13448_ , 2022.
+
+- Gang Wang, Songtao Lu, Georgios Giannakis, Gerald Tesauro, and Jian Sun. Decentralized td tracking with linear function approximation and its finite-time analysis. _Advances in Neural Information Processing Systems_ , 33:13762–13772, 2020a.
+
+- Tianhao Wang, Dongruo Zhou, and Quanquan Gu. Provably efficient reinforcement learning with linear function approximation under adaptivity constraints. _Advances in Neural Information Processing Systems_ , 34:13524–13536, 2021.
+
+- Yuanhao Wang, Jiachen Hu, Xiaoyu Chen, and Liwei Wang. Distributed bandit learning: Nearoptimal regret with efficient communication. In _International Conference on Learning Representations_ , 2020b.
+
+- C. J. C. H. Watkins. _Learning from Delayed Rewards_ . PhD thesis, King’s College, Oxford, 1989.
+
+- Jiin Woo, Gauri Joshi, and Yuejie Chi. The blessing of heterogeneity in federated q-learning: Linear speedup and beyond. In _International Conference on Machine Learning_ , pp. 37157–37216, 2023.
+
+- Zhaoxian Wu, Han Shen, Tianyi Chen, and Qing Ling. Byzantine-resilient decentralized policy evaluation with linear function approximation. _IEEE Transactions on Signal Processing_ , 69: 3839–3853, 2021.
+
+- Kunhe Yang, Lin Yang, and Simon Du. Q-learning with logarithmic regret. In _International Conference on Artificial Intelligence and Statistics_ , pp. 1576–1584. PMLR, 2021.
+
+13
+
+Ekim Yurtsever, Jacob Lambert, Alexander Carballo, and Kazuya Takeda. A survey of autonomous driving: Common practices and emerging technologies. _IEEE Access_ , 8:58443–58469, 2020.
+
+- Andrea Zanette and Emma Brunskill. Tighter problem-dependent regret bounds in reinforcement learning without domain knowledge using value function bounds. In _International Conference on Machine Learning_ , pp. 7304–7312. PMLR, 2019.
+
+- Sihan Zeng, Thinh T Doan, and Justin Romberg. Finite-time analysis of decentralized stochastic approximation with applications in multi-agent and multi-task learning. In _2021 60th IEEE Conference on Decision and Control (CDC)_ , pp. 2641–2646. IEEE, 2021.
+
+- Zihan Zhang, Yuan Zhou, and Xiangyang Ji. Almost optimal model-free reinforcement learning via reference-advantage decomposition. _Advances in Neural Information Processing Systems_ , 33: 15198–15207, 2020.
+
+- Zihan Zhang, Xiangyang Ji, and Simon Du. Is reinforcement learning more difficult than bandits? a near-optimal algorithm escaping the curse of horizon. In _Conference on Learning Theory_ , pp. 4528–4531. PMLR, 2021.
+
+- Zihan Zhang, Yuhang Jiang, Yuan Zhou, and Xiangyang Ji. Near-optimal regret bounds for multibatch reinforcement learning. _Advances in Neural Information Processing Systems_ , 35:24586– 24596, 2022.
+
+- Zihan Zhang, Yuxin Chen, Jason D Lee, and Simon S Du. Settling the sample complexity of online reinforcement learning. _arXiv preprint arXiv:2307.13586_ , 2023.
+
+- Runlong Zhou, Zhang Zihan, and Simon Shaolei Du. Sharp variance-dependent bounds in reinforcement learning: Best of both worlds in stochastic and deterministic environments. In _International Conference on Machine Learning_ , pp. 42878–42914. PMLR, 2023.
+
+Xingyu Zhou and Sayak Ray Chowdhury. On differentially private federated linear contextual bandits. _arXiv preprint arXiv:2302.13945_ , 2023.
+
+- Zhaowei Zhu, Jingxuan Zhu, Ji Liu, and Yang Liu. Federated bandit: A gossiping approach. _Proceedings of the ACM on Measurement and Analysis of Computing Systems_ , 5(1):1–29, Feb 2021. ISSN 2476-1249. doi: 10.1145/3447380. URL [URL removed] 3447380.
+
+14
+
+## A RELATED WORKS
+
+**Single-agent episodic MDPs.** Significant contributions have been made in both model-based and model-free frameworks. In the model-based category, a series of algorithms have been proposed by Auer et al. (2008), Agrawal & Jia (2017), Azar et al. (2017), Kakade et al. (2018), Agarwal et al. (2020), Dann et al. (2019), Zanette & Brunskill (2019), and Zhang et al. (2021), with more recent contributions from Zhou et al. (2023) and Zhang et al. (2023). Notably, Zhang et al. (2023) proved that a modified version of MVP (proposed by Zhang et al. (2021)) achieves a regret of _O_ ˜ min _{√SAH_[2] _T, T }_ which matches the minimax lower bound. Within the model-free frame� � work, Jin et al. (2018) proposed a Q-learning with UCB exploration algorithm, achieving regret of _O_ ˜ _√SAH_[3] _T_ , which has been advanced further by Yang et al. (2021), Zhang et al. (2020), Li � � et al. (2021) and M´enard et al. (2021). The latter three have introduced algorithms that achieve minimax regret of _O_[˜] _√SAH_[2] _T_ . � �
+
+**Federated and distributed RL** . Existing literature on federated and distributed RL algorithms sheds light on different aspects. Guo & Brunskill (2015) showed that applying concurrent RL to identical MDPs can linearly speed up sample complexity. Agarwal et al. (2021) proposed a parallel RL algorithm with low communication cost. Jin et al. (2022), Khodadadian et al. (2022), Fan et al. (2023) and Woo et al. (2023) investigated federated Q-learning algorithms in different settings. Fan et al. (2021), Wu et al. (2021) and Chen et al. (2023) focused on robustness. Particularly, Chen et al. (2023) proposed algorithms in both offline and online settings, obtaining near-optimal sample complexities and achieving a superior robustness guarantee. Doan et al. (2019), Doan et al. (2021), Chen et al. (2021b), Sun et al. (2020), Wai (2020), Wang et al. (2020a), Zeng et al. (2021) and Liu & Olshevsky (2023) analyzed the convergence of decentralized temporal difference algorithms. Fan et al. (2021) and Chen et al. (2021a) studied communication-efficient policy gradient algorithms. Shen et al. (2023b), Shen et al. (2023a) and Chen et al. (2022) have analyzed the convergence of distributed actor-critic algorithms. Assran et al. (2019), Espeholt et al. (2018) and Mnih et al. (2016) explored federated actor-learner architectures. Liu & Zhu (2022) and Liu & Zhu (2024) explored distributed inverse reinforcement learning.
+
+**RL with low switching cost and batched RL** . Research in RL with low-switching cost aims to minimize the number of policy switching while maintaining comparable regret bounds to its fully adaptive counterparts and can be applied to federated RL. In batched RL (e.g., Perchet et al. (2016), Gao et al. (2019)), the agent sets the number of batches and length of each batch upfront, aiming for fewer batches and lower regret. Bai et al. (2019) first introduced the problem of RL with lowswitching cost and proposed a _Q_ -learning algorithm with lazy update, achieving _O_[˜] ( _SAH_[3] log _T_ ) switching costs. This work was advanced by Zhang et al. (2020), which improved the regret upper bound. Besides, Wang et al. (2021) studied the problem of RL under the adaptivity constraint. Recently, Qiao et al. (2022) proposed a model-based algorithm with _O_[˜] (log log _T_ ) switching costs. Zhang et al. (2022) proposed a batched RL algorithm that is well-suited for the federated setting.
+
+**Federated/distributed bandits.** Federated bandits with low communication costs have been studied extensively recently in the literature Wang et al. (2020b); Li & Wang (2022); Shi & Shen (2021); Shi et al. (2021); Huang et al. (2021); Wang et al. (2022); He et al. (2022); Li et al. (2022b). Shi & Shen (2021) and Shi et al. (2021) investigated efficient client-server communication and coordination protocols for federated MAB without and with personalization, respectively. Wang et al. (2020b) investigated communication-efficient distributed linear bandits, while Huang et al. (2021) studied federated linear contextual bandits. Li & Wang (2022) focused on the asynchronous communication protocol.
+
+When data privacy is explicitly considered, Li et al. (2020); Zhu et al. (2021) studied federated bandits with item-level differential privacy (DP) guarantee. Dubey & Pentland (2022) considered private and byzantine-proof cooperative decision making in multi-armed bandits. Dubey & Pentland (2020); Zhou & Chowdhury (2023) considered the linear contextual bandit model with joint DP guarantee. Huang et al. (2023) recently investigated linear contextual bandits under user-level DP constraints. Private distributed bandits with partial feedback was also studied in Li et al. (2022a).
+
+15
+
+## B AUXILIARY LEMMAS
+
+In this section, we introduce some useful lemmas which will be used in the proofs. Before starting, we describe the global indexing mechanism mentioned in Section 4. Global visiting indices _i_ = 1 _,_ 2 _. . ._ are assigned, based on the chronological order, to the visits of any given ( _x, a, h_ ) _∈S ×A×_ [ _H_ ]. With this, we can establish a map between the global visiting index _i_ , and _k, m, j_ , where _k_ is the round index, _m_ is the agent index and _j_ is the episode index for a given round and a given agent. For ( _x, a, h_ ), we define functions that recover _k, m, j_ from _i_ as _kh_ ( _i_ ; _x, a_ ) _, mh_ ( _i_ ; _x, a_ ) _, jh_ ( _i_ ; _x, a_ ) _._ When there is no ambiguity, we will use the simplified notations _k[i] , m[i] , j[i]_ . The visiting indices are utilized to construct a sequence, ensuring that quantities with smaller indices are observed prior to those with larger indices. Under the synchronization and zero-latency assumption, we have the following formulas for _m[i] , k[i] , j[i]_ .
+
+**==> picture [366 x 141] intentionally omitted <==**
+
+We also introduce a new notation _T_[ˆ] = _MT_ that represents the total number of samples generated by all the agents.
+
+Next, we begin to introduce the lemmas. First, Lemma B.1 establishes some relationships between some quantities used in Algorithms 1 and 2.
+
+**Lemma B.1.** _Denote C_[˜] = 1 _/_ ( _H_ ( _H_ + 1)) _. The following relationships hold for both algorithms._
+
+**==> picture [55 x 9] intentionally omitted <==**
+
+**==> picture [97 x 12] intentionally omitted <==**
+
+**==> picture [224 x 11] intentionally omitted <==**
+
+**==> picture [281 x 31] intentionally omitted <==**
+
+_and_
+
+**==> picture [250 x 13] intentionally omitted <==**
+
+**==> picture [71 x 13] intentionally omitted <==**
+
+**==> picture [96 x 13] intentionally omitted <==**
+
+**==> picture [301 x 13] intentionally omitted <==**
+
+**==> picture [115 x 13] intentionally omitted <==**
+
+_Proof of Lemma B.1._ (a)-(c) are obvious given Algorithms 1 and 4. (d) and (e) can be directly obtained from (b) and (c).
+
+Next, Lemma B.2 provides some properties about _θt[i]_[’s.]
+
+**Lemma B.2.** _(Lemma 4.1 in Jin et al. (2018) and beyond) The following properties hold for all t ∈_ N+ _for both algorithms._
+
+16
+
+**==> picture [378 x 44] intentionally omitted <==**
+
+**==> picture [103 x 36] intentionally omitted <==**
+
+**==> picture [256 x 13] intentionally omitted <==**
+
+_(f) For both algorithms, for any t ∈_ N+ _and_ ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] _, if i_ 1 _, i_ 2 _∈_ [ _t_ ] _, kh_ ( _i_ 1 _, x, a_ ) = _kh_ ( _i_ 2 _, x, a_ ) _and Nh[k][h]_[(] _[i]_[1] _[,x,a]_[)] ( _x, a_ ) _≥ i_ 0 _we have that θt[i]_[1] _[/θ] t[i]_[2] _[≤]_[exp(1] _[/H]_[)] _[.]_
+
+_Proof of Lemma B.2._ (a)-(e) are obvious based on _θt[i]_[’s definition and Lemma 4.1 in Jin et al. (2018).] For (f), denoting _t_ 0 = _Nh[k][h]_[(] _[i]_[1] _[,x,a]_[)] ( _x, a_ ) + 1 and _t_ 1 = _Nh[k][h]_[(] _[i]_[1] _[,x,a]_[)+1] ( _x, a_ ), based on (e), we have
+
+**==> picture [152 x 31] intentionally omitted <==**
+
+Based on (c) in Lemma B.1, we further have that
+
+**==> picture [298 x 31] intentionally omitted <==**
+
+Next, we rigorously define the weights _θ_[˜] _t[i]_[mentioned in Section 4.][For any][ (] _[x, a, h, K][′]_[)] _[ ∈S × A ×]_ [ _H_ ] _×_ [ _K_ ], we let _t_ = _Nh[K][′]_[(] _[x, a]_[)][ and] _[ i][∈]_[[] _[t]_[]][ �] _[{]_[0] _[}]_[.][Letting] _[ t][′]_[=] _[N] h[ k][i]_[(] _[x, a]_[)][ and] _[ t][′′]_[=] _[N] h[ k][i]_[+1] ( _x, a_ ), we denote
+
+**==> picture [280 x 22] intentionally omitted <==**
+
+and we will use the simplified notation _θ_[˜] _t[i]_[when there is no ambiguity.][Lemma B.3 provides proper-] ties of _θ_[˜] _t[i]_[and its relationship with] _[ θ] t[i]_[.] **Lemma B.3.** _The following relationships hold for any_ ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ] _with t_ = _Nh[K][′]_[(] _[x, a]_[)] _[ for both algorithms.]_
+
+**==> picture [285 x 14] intentionally omitted <==**
+
+**==> picture [377 x 27] intentionally omitted <==**
+
+**==> picture [140 x 10] intentionally omitted <==**
+
+**==> picture [182 x 39] intentionally omitted <==**
+
+_which indicates that_
+
+**==> picture [72 x 29] intentionally omitted <==**
+
+**==> picture [317 x 53] intentionally omitted <==**
+
+17
+
+**==> picture [245 x 15] intentionally omitted <==**
+
+**==> picture [80 x 13] intentionally omitted <==**
+
+_Proof of Lemma B.3._ (a)-(c) can be obtained directly through the definition of _θ_[˜] _t[i]_[.][Next,][we][prove] (d) and (e). Denote _t_ 0 = _Nh[k][h]_[(] _[i,x,a]_[)] ( _x, a_ ) + 1 and _t_ 1 = _Nh[k][h]_[(] _[i,x,a]_[)+1] ( _x, a_ ). By (c) and (e) in Lemma B.2, we have that _θt[t]_ 1[0] _[/θ] t[t]_ 1[1] _[≤][θ]_[˜] _t[i][/θ] t[i][≤][θ] t[t]_ 1[1] _[/θ] t[t]_ 1[0][.][Then,][(d)][can][be][proved][by][noticing][that] _θt[t]_ 1[1] _[/θ] t[t]_ 1[0] _[≤]_[(1 +] _[ H/]_[(1 +] _[ N][i]_[))] _[n][i][−]_[1][.][This implies that (e) holds because of (c) in Lemma B.1.]
+
+## C PROOF OF THEOREM 4.1
+
+## C.1 ROBUSTNESS AGAINST ASYNCHRONIZATION
+
+In this subsection, we discuss a more general situation for Algorithms 1 and 2, where agent _m_ generates _n[m,k]_ episodes during round _k_ . We no longer assume that _n[m,k]_ has the same value _n[k]_ for different clients. The difference can be caused by latency (the time gap between an agent sending an abortion signal and other agents receiving the signal) and asynchronization (the heterogeneity among clients on the computation speed and process of collecting trajectories). In this case, for _K_ rounds, the total number of samples generated by all the clients is
+
+**==> picture [90 x 30] intentionally omitted <==**
+
+Thus, we generalize the notation _T_ = _T/M_[ˆ] , which characterizes the mean number of samples generated by an agent. Accordingly, the definition of Regret( _T_ ) can be generalized as
+
+**==> picture [222 x 33] intentionally omitted <==**
+
+Similarly, the definitions of _n[m,k] h_ ( _x, a_ ) _, Nh[m,k]_ ( _x, a_ ) _, vh[m,k]_ ( _x, a_ ) are also generalized by replacing _n[k]_ � _j_ =1[with][ �] _[n] j_ =1 _[m,k]_[.]
+
+We note that Algorithms 1 and 2 naturally accommodate such asynchronicity. Therefore, in the following analysis of the regret, we adopt the general notation _n[m,k]_ . However, for the proof of Theorem 4.2 pertaining to communication, we will maintain the synchronization assumption that _n[m,k]_ = _n[k] , ∀m ∈_ [ _M_ ].
+
+**==> picture [118 x 12] intentionally omitted <==**
+
+**Lemma C.1.** _For Algorithms 1 and 2, there exists a positive constant c >_ 0 _such that, for any p ∈_ (0 _,_ 1) _, the following relationship holds for all_ ( _x, a, h, K[′]_ ) _∈S×A×_ [ _H_ ] _×_ [ _K_ ] _with probability at least_ 1 _− p:_
+
+**==> picture [351 x 30] intentionally omitted <==**
+
+_in which t_ = _Nh[K][′]_[(] _[x, a]_[)] _[.]_
+
+We first provide Lemma C.2 to formally state Equation (14) and Equation (15), which establish the relationship between _Q[k] h_[and] _[ Q][⋆] h_[.][The proof is the same as the proof of Equation (4.3) in Jin et al.] (2018).
+
+18
+
+**Lemma C.2.** _For the Hoeffding-type Algorithms 1 and 2 , for all_ ( _x, a, h, K[′]_ ) _∈S ×A×_ [ _H_ ] _×_ [ _K_ ] _, denoting t_ = _Nh[K][′]_[(] _[x, a]_[)] _[, we have]_
+
+**==> picture [389 x 64] intentionally omitted <==**
+
+_Furthermore, we have_
+
+_in which_
+
+**==> picture [347 x 152] intentionally omitted <==**
+
+With this lemma, we derive a probabilistic upper bound for _|_[�] _[t] i_ =1 _[θ]_[˜] _t[i][X][i][|]_[with] _[X][i]_[=][(˜][E] _[x,a,h,i][−]_ E _x,a,h_ ) _Vh[⋆]_ +1[in Lemma C.3.] **Lemma C.3.** _There exists c_ 0 _>_ 0 _such that, for any p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p, the following relationship holds for all_ ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ] _with t_ = _Nh[K][′]_[(] _[x, a]_[)] _[:]_
+
+**==> picture [307 x 31] intentionally omitted <==**
+
+_Proof._ For a given ( _x, a, h_ ) _∈S × A ×_ [ _H_ ], denote _Xi_ ( _x, a, h_ ) = (E[˜] _x,a,h,i −_ E _x,a,h_ ) _Vh[⋆]_ +1[(] _[x][h]_[+1][)][.] When there is no ambiguity, we use the simplified notation _Xi_ = _Xi_ ( _x, a, h_ ). We know that _{Xi}[∞] i_ =1[is][a][sequence][of][martingale][differences][with] _[|][X][i][|][≤][H]_[.][We][decompose][the][summation] as follows:
+
+**==> picture [164 x 30] intentionally omitted <==**
+
+Note that _t ≤ T_ 0 _/H_ .
+
+First, we focus on the first term. By Azuma-Hoeffding Inequality, for any given ( _x, a, h_ ) _∈S ×A×_ [ _H_ ] and a given _t[′] ∈_ N+, for any _p ∈_ (0 _,_ 1), with probability 1 _− p_ , there exists a numerical constant _c_ 1 _>_ 0 such that
+
+**==> picture [342 x 61] intentionally omitted <==**
+
+By considering all the possible combinations ( _x, a, h, t[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _T_ 0 _/H_ ], with a union bound and the realization of _t_ = _t[′]_ , we have, for any _p ∈_ (0 _,_ 1), with at probability at least 1 _− p_ , the following relationship holds simultaneously for all ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ]:
+
+**==> picture [232 x 32] intentionally omitted <==**
+
+19
+
+We then focus on the second term[�] _[t] i_ =1[(˜] _[θ] t[i][−][θ] t[i]_[)] _[X][i]_[. For any given][ (] _[x, a, h, k][s]_[)] _[ ∈S×A×]_[[] _[H]_[]] _[×]_[[] _[K]_[]][,] we consider the part with samples generated by the _ks_ -th round, which is
+
+**==> picture [76 x 31] intentionally omitted <==**
+
+in which _t_ 2 = _Nh[k][s]_[(] _[x, a]_[) + 1][,] _[t]_[3][=] _[N] h[ k][s]_[+1] ( _x, a_ ). We can control the second term by controlling _|_[�] _[t] i_ =[3] _t_ 2[(˜] _[θ] t[i]_ 3 _[−][θ] t[i]_ 3[)] _[X][i][|]_[ for all] _[ k][s][∈]_[[] _[K]_[]][.] We have
+
+**==> picture [324 x 32] intentionally omitted <==**
+
+To begin with, we prove that there exists a numerical constant _c_ 3 _>_ 0 such that
+
+**==> picture [275 x 36] intentionally omitted <==**
+
+This relationship obviously holds when _Nh[k][s]_[(] _[x, a]_[)] _[<][i]_[0][as] _[ LHS]_[=][0][.][When] _[ N] h[ k][s]_[(] _[x, a]_[)] _[≥][i]_[0][,][we] have
+
+**==> picture [340 x 38] intentionally omitted <==**
+
+where the first inequality comes from (d) in Lemma B.3 and the second one comes from (f) in Lemma B.2.
+
+We also have that
+
+**==> picture [360 x 31] intentionally omitted <==**
+
+where the second relationship comes from (f) in Lemma B.2. This completes the proof of Equation (18).
+
+Next, we proceed with discussions conditioning on all the information before starting the _ks_ -th round, which means that _Nh[k][s]_[(] _[x, a]_[)][and] _[t]_[2][can][be][treated][as][constants.][If] _[N] h[ k][s]_[(] _[x, a]_[)] _[<][i]_[0][,][this] quantity is equal to 0. Otherwise, given any _t[′]_ 3 _[≥][t]_[2][and] _[ i][ ∈]_[[] _[t]_[2] _[, t][′]_ 3[]] _[,]_[ we denote]
+
+**==> picture [176 x 37] intentionally omitted <==**
+
+Therefore, in the expression[�] _[t] i_ =3 _[′] t_ 2[(ˆ] _[θ][t][′]_ 3 _[−][θ] t[i][′]_ 3[)] _[X][i]_[, we can treat] _[ {][X][t]_[2] _[, X][t]_[2][+1] _[ . . . X][t]_ 3 _[′][}]_[ as martingale] differences and _θ[i]_[and] _[θ]_[ˆ] _[t][′]_[constants.][Hence,][by][Azuma-Hoeffding][Inequality,][there][exists][a] _t[′]_ 3[s] 3[as] positive numerical constant _c_ 2 such that, for any _p ∈_ (0 _,_ 1), with probability at least 1 _− p_ ,
+
+**==> picture [212 x 39] intentionally omitted <==**
+
+By considering all possible values of _t[′]_ 3[with a union bound,][we have that with probability at least] 1 _−p_ , the following relationship holds simultaneously for any _t_ 2 _≤ t_ 3 _≤ t_ 2 +(1+ _C_[˜] ) _T_ 0 _/H_ + _M −_ 1.
+
+**==> picture [300 x 39] intentionally omitted <==**
+
+20
+
+So, noticing that _θ_[ˆ] _t[′]_ 3[=] _[θ]_[˜] _t[i]_ 3[when] _[ t]_ 3 _[′]_[=] _[t]_[3][and] _[ i][∈]_[[] _[t]_[2] _[, t]_[3][]][ and applying Equation (18), we have that,] for any _ks ∈_ N+ and any _p ∈_ (0 _,_ 1) _,_ with probability at least 1 _− p_ ,
+
+**==> picture [290 x 33] intentionally omitted <==**
+
+We apply the union bound and claim that for any _p ∈_ (0 _,_ 1), the following relationship holds with probability at least 1 _− p_ for all ( _x, a, h, ks_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ 0].
+
+**==> picture [323 x 69] intentionally omitted <==**
+
+Under this event, with Equation (17), we have that
+
+**==> picture [284 x 31] intentionally omitted <==**
+
+By (a) in Lemma B.2, we have[�] _[t] i_ =1 _[θ] t[i][/] √i ≤_ ~~�~~ 4 _/t_ . Combining the results for the two terms completes the proof.
+
+Finally, we provide the proof for Lemma C.1.
+
+_Proof of Lemma C.1._ We pick _c_ = _c_ 0 such that the event in Lemma C.3 holds. Under the event given in Lemma C.3 and noting Equation (15), we claim the conclusion by using the same proof as that for Lemma 4.3 in Jin et al. (2018).
+
+## C.3 PROOF OF THEOREM 4.1
+
+Having proved Lemma C.1, we turn our attention to demonstrating the remaining parts of the proof. We use _n[m,k]_ to denote the number of episodes by agent _m_ in round _k_ .
+
+We first provide some additional notations. Define
+
+**==> picture [208 x 76] intentionally omitted <==**
+
+in which _δH[k]_ +1[=] _[ ϕ][k] H_ +1[= 0][.][We also define]
+
+**==> picture [272 x 33] intentionally omitted <==**
+
+with _ξH[k]_ +1[= 0][.][Here,]
+
+**==> picture [368 x 53] intentionally omitted <==**
+
+and
+
+We first provide a Lemma related to _ξh[k]_ +1 _[.]_
+
+21
+
+**Lemma C.4.** _There exists a numerical constant c_ 5 _>_ 0 _such that, for any p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p,_
+
+**==> picture [262 x 31] intentionally omitted <==**
+
+_where Ch_ = exp(3( _h −_ 1) _/H_ ) _._
+
+_Proof._ Denote _V_ ( _m, k, j, h_ ) = _Ch_ (P _−_ P[ˆ] ) � _Vh[⋆]_ +1 _[−][V] h[π]_ +1 _[k]_ � ( _x[m,k,j] h , a[m,k,j] h_ ) and use[�] _m,k,j,h_[as] _M n[m,k] H−_ 1 a simplified notation for[�] _[K] k_ =1 � _m_ =1 � _j_ =1 � _h_ =1[.][The quantity of interest can be rewritten as] � _m,k,j,h[V]_[ (] _[m, k, j, h]_[)] _[,]_[ with] _[ |][V]_[ (] _[m, k, j, h]_[)] _[| ≤][O]_[(] _[H]_[)][ as] _[ C][h][≤]_[exp(3)][.]
+
+Let _V_[˜] ([˜] _i_ ) be the[˜] _i_ -th term in the summation that contains _T_[ˆ] ( _H −_ 1) _/H_ terms, in which the order follows a “round first, episode second, step third, agent fourth” rule. Then the sequence _{V_[˜] ([˜] _i_ ) _}_ is a martingale difference. By Azuma-Hoeffding Inequality, for any _p ∈_ (0 _,_ 1) and _t ∈ N_ +, with probability at least 1 _− p_ ,
+
+**==> picture [132 x 37] intentionally omitted <==**
+
+Then by applying a union bound over _t ∈_ [(1 + _C_[˜] ) _T_ 0 + _HM_ ] and knowing that _T_[ˆ] ( _H −_ 1) _/H ≤ T_ 0(1 + _C_[˜] ) + _HM_ due to (e) in Lemma B.1, we have that, for any _p ∈_ (0 _,_ 1), with probability at least 1 _− p_ ,
+
+**==> picture [216 x 37] intentionally omitted <==**
+
+This completes the proof.
+
+Noticing that Regret( _T_ ) _≤_[�] _[K] k_ =1 _[δ]_ 1 _[k]_[due to Regret][(] _[T]_[) =][ �] _[K] k_ =1 _[δ]_ 1 _[k][−]_[�] _[K] k_ =1 _[ϕ]_ 1 _[k]_[and] _[ ϕ][k]_ 1 _[≥]_[0][ shown] in Equation (13), we attempt to establish a probability upper bound for[�] _[K] k_ =1 _[δ]_ 1 _[k]_[.][First, we have]
+
+**==> picture [375 x 33] intentionally omitted <==**
+
+**==> picture [326 x 41] intentionally omitted <==**
+
+Next, we attempt to bound the terms in RHS of Equation (21) separately. Our discussions are based on the events outlined in Lemma C.1. For any given _h_ , denote _t[m,k,j] h_ = _Nh[k]_[(] _[x][m,k,j] h , a[m,k,j] h_ ) and the corresponding _k, m, j_ (round index, agent index, and episode index) for the _i_ -th global visiting for ( _x[m,k,j] h , a[m,k,j] h , h_ ) are _ki,h[m,k,j] , m[m,k,j] i,h , ji,h[m,k,j] , i_ = 1 _,_ 2 _. . . t[m,k,j] h_ . For the first term, due to Equation (13), we have
+
+**==> picture [375 x 111] intentionally omitted <==**
+
+22
+
+For the second term, due to Equation (1),
+
+**==> picture [324 x 34] intentionally omitted <==**
+
+Next, we try to find some bounds related to[�] _[K] k_ =1 _[δ] h[k][.]_[For][notation][simplicity,][we][use][�] _m,k,j_[to] _M n[m,k]_ represent[�] _[K] k_ =1 � _m_ =1 � _j_ =1[.][We][can][prove][the][following][relationships][with][details][referred][to] Appendix C.4:
+
+**==> picture [382 x 116] intentionally omitted <==**
+
+Combining Equations (22) to (26), we have that for any _h ∈_ [ _H_ ],
+
+**==> picture [332 x 54] intentionally omitted <==**
+
+Noticing that _δh[k][≥][ϕ][k] h[,][ ∀]_[(] _[h, k]_[)] _[∈]_[[] _[H]_[]] _[ ×]_[ [] _[K]_[]][ due to the optimality of] _[ π][⋆]_[and][ exp(3] _[/H]_[)] _[H]_[=] _[O]_[(1)][,] by recursions on 1 _,_ 2 _. . . H_ , we have
+
+**==> picture [346 x 54] intentionally omitted <==**
+
+in which _Ch_ = exp(3( _h −_ 1) _/H_ ) _._ With Lemma C.4, we can also show that, with high probability,
+
+**==> picture [266 x 31] intentionally omitted <==**
+
+This indicates that[�] _[K] k_ =1 _[δ]_ 1 _[k]_[=] _[ O]_[(] � _H_[4] _ιTSA_[ˆ] + _HSA_ ( _M −_ 1) _√H_[3] _ι_ + _MH_[2] _SA_ + _H_[4] _SA_ ( _M −_ 1)). With these discussions, we have already shown that, under the intersection of events given in Lemma C.1 and Lemma C.4,
+
+**==> picture [352 x 54] intentionally omitted <==**
+
+By replacing _p_ for the events in Lemma C.1 and Lemma C.4 with _p/_ 2, we finish the proof.
+
+C.4 PROOFS OF EQUATIONS (24) TO (26)
+
+In this subsection, we try to give bounds the terms in RHS of Equation (21) separately. We make discussions based on the intersection of events given in Lemma C.1 and Lemma C.4. Under these events, we have already shown that Equation (22), Equation (23) and Equation (27) hold. So, we will provide the proof by establishing Equations (24) to (26).
+
+23
+
+**Proof of Equation (24).** First, we note that
+
+**==> picture [164 x 24] intentionally omitted <==**
+
+For each ( _x, a, h_ ) _∈S×A×_ [ _H_ ], we consider all the rounds indexed as 0 _< k_ 1 _< k_ 2 _< ..._ satisfying the condition _n[k] h_[(] _[x, a]_[)] _[ >]_[ 0][.][Here,] _[ k][s]_[s are simplified notations for functions of][ (] _[x, a, h]_[)][, and we use] the simplified notations when there is no ambiguity and the stated meaning of these notations is applicable only to the proof of Equation (24). So,
+
+**==> picture [238 x 24] intentionally omitted <==**
+
+**==> picture [377 x 56] intentionally omitted <==**
+
+**Proof of Equation (25).** We denote _i_ 1 = ( _M −_ 1) _H_ ( _H_ +1) and split the summation into two parts:
+
+**==> picture [326 x 115] intentionally omitted <==**
+
+To bound the first term, we first notice that
+
+**==> picture [382 x 36] intentionally omitted <==**
+
+due to the fact that ( _Vhk_ +1 _i,h[m,k,j] − Vh[⋆]_ +1[)(] _[x]_ ( _hm,k,j_ +1 ) _[m,k,j] i,h_ ) _≤ H_ and[�] _[t] i_ =1 _h[m,k,j] θ_ ˜ _t[i][m,k,j] h_ = I[ _t[m,k,j] h >_ 0] given in (c) in Lemma B.3. For every ( _x, a, h_ ) _∈S × A ×_ [ _H_ ], suppose that _k[′]_ is the round index such that _Nh[k][′]_[(] _[x, a]_[)] _[ ≤][i]_[1][and] _[ N] h[ k][′]_[+1] ( _x, a_ ) _> i_ 1, and _k[′′]_ is the round index such that _Nh[k][′′]_[(] _[x, a]_[) = 0][ and] _Nh[k][′′]_[+1] ( _x, a_ ) _>_ 0. Here, _k[′]_ and _k[′′]_ are simplified notations for functions of ( _x, a, h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in the proof of Equation (25).
+
+**==> picture [397 x 179] intentionally omitted <==**
+
+24
+
+_k[m,k,j]_ To bound the second term, we first notice that _Vh_ +1 _i,h − Vh[⋆]_ +1 _[≥]_[0][ due to Equation (13).][Then we] regroup the summations in a different way. For every ( _m[′] , k[′] , j[′]_ ), the term ( _Vh[k]_ +1 _[′][−][V] h[⋆]_ +1[)(] _[x] h[m]_ +1 _[′][,k][′][,j][′]_ ) appears in the term I[ _t[m,k,j] h > i_ 1][�] _[t] i_ =1 _h[m,k,j] θt[i][m,k,j] h_ ( _Vhk_ +1 _i,h[m,k,j] − Vh[⋆]_ +1[)(] _[x]_ ( _hm,k,j_ +1 ) _[m,k,j] i,h_ ) for ( _k, m, j_ ) if and only if _k > k[′]_ and ( _x[m,k,j] h , a[m,k,j] h_ ) = ( _x[m] h[′][,k][′][,j][′] , a[m] h[′][,k][′][,j][′]_ ). Thus, for each ( _m[′] , k[′] , j[′]_ ), we denote ( _x, a_ ) = ( _x[m] h[′][,k][′][,j][′] , a[m] h[′][,k][′][,j][′]_ ). We consider all the later round indices _k[′]_ = _k_ 0 _< k_ 1 _< k_ 2 _< ..._ that satisfy _ns_ = _n[k] h[s]_[(] _[x, a]_[)] _[>]_[0] _[, s][∈]_[N][.][Here,] _[k][s]_[’s are simplified notations for functions] of ( _m[′] , k[′] , j[′] , h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in proof of Equation (25). Then, the coefficient of summation related to ( _m[′] , k[′] , j[′]_ ) can be upper bounded by
+
+**==> picture [140 x 28] intentionally omitted <==**
+
+in which _i[′]_ is the global visiting number for ( _x, a, h_ ) at ( _m[′] , k[′] , j[′]_ ), which means that ( _m[′] , k[′] , j[′]_ ) = _mh_ ( _i[′]_ ; _x, a_ ) _, kh_ ( _i[′]_ ; _x, a_ ) _, jh_ ( _i[′]_ ; _x, a_ ).
+
+First, based on (e) in Lemma B.3, we have that
+
+**==> picture [332 x 29] intentionally omitted <==**
+
+We know that, _Nh[k][s]_[(] _[x, a]_[)][+] _[n][s]_[=] _[N] h[ k][s]_[+1] ( _x, a_ ), _i[′] ≤ Nh[k]_[1][(] _[x, a]_[)][,][and][by][(d)][in][Lemma][B.2,] � _∞i_ = _i[′][ θ] i[i][′]_[= (1 + 1] _[/H]_[)] _[.]_[ Therefore, if we can find] _[ C][′][>]_[ 1][ such that]
+
+**==> picture [325 x 86] intentionally omitted <==**
+
+Next, we prove that, for any ( _i[′] , i[′′]_ ) _∈ A_[˜] , if _Nh[k][s]_[(] _[x, a]_[)] _[ > i]_[1][,]
+
+**==> picture [171 x 108] intentionally omitted <==**
+
+in which _d_ 0 = _Nh[k][s]_[(] _[x, a]_[) + 1][ so that we can let] _[ C][′]_[= exp(1] _[/H]_[)][.][The first inequality holds because] _t θt[i]_[=] _[α][i]_ � _i[′]_ = _i_ +1[(1] _[ −][α][i][′]_[)][is][a][decreasing][function][with][respect][to] _[t]_[.][The][equality][follows][from] the definition of _θt[i]_[.][The second inequality holds because] _[ α][t]_[=] _[H] H_[+1] + _t_[is a decreasing function with] respect to _t_ . Then we focus on the last inequality. According to the definition of _αt_ , we have
+
+**==> picture [320 x 34] intentionally omitted <==**
+
+If _Nh[k][s]_[(] _[x, a]_[)] _[>][MH]_[(] _[H]_[+ 1)][,][according to Equation (12),][we have that] _[ n][s][≤][N] Hh[ks]_ ( _H_[(] _[x]_ +1) _[,][a]_[)][.][Then we] have
+
+**==> picture [276 x 39] intentionally omitted <==**
+
+25
+
+If _i_ 1 _< Nh[k][s]_[(] _[x, a]_[)] _[ ≤][MH]_[(] _[H]_[+ 1)][, we can prove that]
+
+**==> picture [209 x 78] intentionally omitted <==**
+
+where ( _a_ ) holds because according to Equation (12) we have _ns ≤ M_ and ( _b_ ) holds because _N[k][i][−]_[1)] _[H]_[(] _[H]_[+ 1)][.] _h_[(] _[x, a]_[)] _[ >]_[ (] _[M]_
+
+Putting the two cases together, we have
+
+**==> picture [294 x 28] intentionally omitted <==**
+
+Then we conclude that
+
+**==> picture [258 x 103] intentionally omitted <==**
+
+Combining with Equation (28), we complete the proof for Equation (25).
+
+**Proof of Equation (26).** We split the summation into two parts:
+
+**==> picture [326 x 24] intentionally omitted <==**
+
+For every pair ( _x, a, h_ ), we consider all the rounds indexed as 0 _< k_ 1 _< k_ 2 _< ..._ satisfying the condition _ns_ = _n[k] h[s]_[(] _[x, a]_[)] _[>]_[0][.][Suppose that] _[ k][p]_[is the round index such that] _[ N] h[ k][p]_[(] _[x, a]_[)] _[≤][M][−]_[1] and _Nh[k][p]_[+1][(] _[x,a,h]_[)] ( _x, a_ ) _> M −_ 1. Here, _ks_ s and _p_ are simplified notations for functions of ( _x, a, h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in the proof of Equation (26).
+
+**==> picture [358 x 91] intentionally omitted <==**
+
+It is straightforward that _n[k] h_[1][(] _[x, a]_[)] _[≥]_[1][.][Additionally,][due][to][Equation][(12),][we][can][establish][that] _n[k] h[p]_[(] _[x, a]_[)] _[ ≤][M]_[.][Therefore]
+
+and
+
+**==> picture [323 x 64] intentionally omitted <==**
+
+26
+
+To establish bounds for the second term, we define some notions first. For every pair ( _x, a, h_ ) _∈ S_ ˜ _× A ×_ [ _H_ ], we˜ consider all the rounds˜ indexed as 0 _< k_[˜] 1 _< k_[˜] 2 _< ... < k_[˜] _g ≤ K_ satisfying _nkhs_[(] _[x, a]_[)] _[ >]_[ 0][,] _[ N] hk_ 1[(] _[x, a]_[)] _[ ≥][M]_[and] _[ N] hk_ 1 _−_ 1( _x, a_ ) _< M_ . Here, _k_[˜] _s_ s and _g_ are simplified notations for functions of ( _x, a, h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in proof of Equation (26). Then we have
+
+**==> picture [406 x 171] intentionally omitted <==**
+
+**==> picture [397 x 198] intentionally omitted <==**
+
+Next, we will prove that we can choose _C[′′]_ = _√_ 2. We notice that
+
+**==> picture [278 x 44] intentionally omitted <==**
+
+If _M ≤ Nhk_ ˜ _s_[(] _[x, a]_[)] _[ < i]_[0][, according to Equation (12),] _[n]_[˜] _[j]_[(] _[x, a]_[)] _[ ≤][M]_[, which indicates that]
+
+**==> picture [152 x 37] intentionally omitted <==**
+
+**==> picture [314 x 87] intentionally omitted <==**
+
+27
+
+## D PROOF OF THEOREM 4.2
+
+_Proof of Theorem 4.2._ This theorem is proved under the synchronization assumption, i.e., _n[m,k]_ = _n[k] , ∀m ∈_ [ _M_ ]. We only need to prove that when _k ≥ H_[2] ( _H_ + 1) _SAM_ ,
+
+**==> picture [282 x 31] intentionally omitted <==**
+
+For each _k ∈_ [ _K_ ], there exists at least one ( _x, m, h_ ) _∈S ×_ [ _M_ ] _×_ [ _H_ ] with _a_ = _πh[k]_[(] _[x]_[)][ such that] equality in Equation (11) holds. Thus, there exist at least _K_ different tuples of ( _x, a, h, m, k_ ) _∈S × A×_ [ _H_ ] _×_ [ _M_ ] _×_ [ _K_ ] such that equality in Equation (11) holds. Define set _K_ to have all the different _k_ ’s satisfying that there exists _m ∈_ [ _M_ ] such that the equality in Equation (11) holds. Then, by Pigeonhole principle, there must exist a triple ( _x, a, h_ ) _∈S×A×_ [ _H_ ] such that _|K| ≥⌈K/_ ( _HSA_ ) _⌉_ .
+
+We order the elements of _K_ as 0 _< k_ 1 _< k_ 2 _. . . < kg ≤ K_ , where _g ≥⌈K/_ ( _HSA_ ) _⌉_ . We also denote _Ns_ = _Nh[k][s]_[+1] ( _x, a_ ) _, ms_ as the first agent index such that equality in Equation (11) holds, and _ns_ = _n[m] h[s][,k][s]_ ( _x, a_ ). Due to the synchronization assumption, we have
+
+**==> picture [235 x 29] intentionally omitted <==**
+
+When _Ns ≥ H_ ( _H_ + 1) _M_ , we have that
+
+**==> picture [144 x 28] intentionally omitted <==**
+
+_s[′] s[′]_ due to Equation (11) and � _H_ ( _H_ +1) _M_ � _≥_ 2 _H_ ( _H_ +1) _M[,][ ∀][s][′][≥][M]_[(] _[H]_[+ 1)] _[H.]_
+
+Thus, we have that[�] _[H] s_ =1[(] _[H]_[+1)] _[M] ns ≥ H_ ( _H_ + 1) _M_ and
+
+**==> picture [324 x 121] intentionally omitted <==**
+
+Therefore,
+
+Combining with Equation (31), we have
+
+**==> picture [282 x 31] intentionally omitted <==**
+
+which directly leads to the conclusion.
+
+## E THE BERNSTEIN-TYPE ALGORITHM
+
+## E.1 ALGORITHM DESIGN
+
+The Bernstein-type algorithm differs from the Hoeffding-type algorithm Algorithms 1 and 2, in that it selects the upper confidence bound based on a variance estimator of _Xi_ , akin to the approach used in the Bernstein-type algorithm in Jin et al. (2018). This is done to determine a probability upper bound of _|_[�] _[t] i_ =1 _[θ] t[i][X][i][|]_[.][In this subsection, we first introduce the algorithm design.]
+
+28
+
+To facilitate understanding, we introduce additional notations exclusive to Bernstein-type algorithms, supplementing the already provided notations for the Hoeffding-type algorithm.
+
+**==> picture [314 x 72] intentionally omitted <==**
+
+2 Here, _µ[m,k] h_ ( _x, a_ ) is the sample mean of � _Vh[k]_ +1[(] _[x] h[m,k,j]_ +1[)] � for all the visits of ( _x, a, h_ ) for the _m−_ th agent during the _k−_ th round and _µ[k] h_[(] _[x, a]_[)][ corresponds to the mean for all the visits during the] _[ k][−]_[th] round. We emphasize here that we adopt the general notation _n[m,k]_ in the definition of _µ[m,k] h_ . We define _Wk_ ( _x, a, h_ ) to denote the sample variance of all the visits before the _k−_ th round, calculated using _Vh[k]_ +1 _[i]_[(] _[x][m] h_ +1 _[i][,k][i][,j][i]_ ), i.e.
+
+**==> picture [372 x 40] intentionally omitted <==**
+
+We can find that
+
+**==> picture [368 x 34] intentionally omitted <==**
+
+which means that this quantity can be calculated efficiently in practice in the following way. Define
+
+**==> picture [373 x 31] intentionally omitted <==**
+
+we have that
+
+**==> picture [309 x 30] intentionally omitted <==**
+
+and
+
+**==> picture [317 x 33] intentionally omitted <==**
+
+This indicates that the central server, by actively maintaining and updating the quantities _W_ 1 _,k_ and _W_ 2 _,k_ and systematically collecting _n[m,k] h_ s, _µ[m,k] h_ s and _vh[m,k]_ +1[s, is able to compute] _[ W][k]_[+1][.] Next, we define
+
+**==> picture [382 x 30] intentionally omitted <==**
+
+in which _c[′] >_ 0 is a positive constant. Here, _Wkt_ +1( _x, a, h_ ) = _W[t]_ ( _x, a, h_ ) which is mentioned in Section 5. With this, the upper confidence bound _bt_ ( _x, a, h_ ) for a single visit is determined by
+
+**==> picture [208 x 104] intentionally omitted <==**
+
+which can be calculated as follows:
+
+29
+
+When there is no ambiguity, we adopt the simplified notation[˜] _bt_ = _bt_ ( _x, a, h_ ) and _β_[˜] _t_ = _βt_ ( _x, a, h_ ). In the Bernstein-type algorithm, we let _β_[˜] = _βtk_ ( _x, a, h_ ) _− α[c]_ ( _t[k][−]_[1] + 1 _, t[k]_ ) _βtk−_ 1( _x, a, h_ ) in replace of _β[k]_ in Equation (3) and Equation (4). We know that _β_[˜] _t ≤ βt_ when _c_ = _c[′]_ , indicating that the Bernstein-type algorithm operates with a smaller upper confidence bound.
+
+Next, we will delve into certain components of the algorithm in round _k_ . We remark that we discuss our algorithm based on the general situation where there is no necessity for zero latency and synchronization assumptions. In this general scenario, agent _m_ generates _n[m,k]_ episodes in round _k_ .
+
+**Coordinated Exploration for Agents.** At the beginning of round _k_ , the server decides a deterministic policy _π[k]_ = _{πh[k][}][H] h_ =1[, and then broadcasts it along with] _[ {][N] h[ k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_ to all of the agents. When _k_ = 1, _Nh_[1][(] _[x, a]_[) = 0] _[, Q]_[1] _h_[(] _[x, a]_[) =] _[ V] h_[1][(] _[x]_[) =] _[ H,][ ∀]_[(] _[x, a, h]_[)] _[ ∈S × A ×]_[[] _[H]_[]] and _π_[1] is an arbitrary deterministic policy.
+
+Once receiving such information, the agents will execute policy _π[k]_ and start collecting trajectories.
+
+**Event-Triggered Termination of Exploration.** During exploration, every agent _m_ will monitor _n[m,k] h_ ( _x, a_ ), i.e., the total number of visits for each ( _x, a, h_ ) triple within the current round. For any agenthas been visited by _m_ , at the end of each episode, it sequentially conducts two procedures. max 1 _, ⌊ MC_ ˜ _[N] h[ k]_[(] _[x, a]_[)] _[⌋]_ times by agent _m_ , it will abort its own exploration andFirst, if any ( _x, a, h_ ) � � send an abortion signal to the server and other clients. Second, it checks whether it has received an abortion signal. If so, it will abort its exploration. We remark that Equation (2) still holds, and for any _k ∈_ [ _K_ ], there exists a tuple ( _x, a, h_ ) such that the equality is met. **Local Updating of the Estimated Expected Return.** Each agent updates the local estimate of the expected return _vh[m,k]_ +1[(] _[x, a]_[)][at][the][end][of][round] _[k]_[.] Next, each agent _m_ sends _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[ {][v] h[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][µ][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[ to the cen-] tral server for aggregation. **Server-side Information Aggregation.** After receiving the information sent by the agents, for each ( _x, a, h_ ) tuple visited by the agents, the server first calculates _W_ 1 _,k_ +1( _x, a, h_ ), _W_ 2 _,k_ +1( _x, a, h_ ) and _Wk_ +1( _x, a, h_ ) based on Equation (32), Equation (33), Equation (34) and Equation (35) for each pair ( _x, h_ ) with _a_ = _πh[k]_[(] _[x]_[)][. Then it sets] _[ t][k][−]_[1][=] _[ N] h[ k]_[(] _[x, a]_[)] _[, t][k]_[=] _[ N] h[ k]_[+1] ( _x, a_ ), _αagg_ = 1 _−α[c]_ ( _t[k][−]_[1] +1 _, t[k]_ ) and _β_[˜] = _βtk_ ( _x, a, h_ ) _− α[c]_ ( _t[k][−]_[1] + 1 _, t[k]_ ) _βtk−_ 1( _x, a, h_ ), and updates the global estimate of the value functions according to one of the following two cases.
+
+- **Case 1:** _Nh[k]_[(] _[x, a]_[)] _[<][i]_[0][.][Due][to][Equation][(2),][this][case][implies][that][each][client][can][visit][each] ( _x, a_ ) pair at step _h_ at most once. Then, we denote 1 _≤ m_ 1 _< m_ 2 _. . . < mtk−tk−_ 1 _≤ M_ as the agent indices with _n[m,k] h_ ( _x, a_ ) _>_ 0. The server then updates the global estimate of action values as follows:
+
+**==> picture [380 x 32] intentionally omitted <==**
+
+- **Case 2:** _Nh[k]_[(] _[x, a]_[)] _[≥][i]_[0][.][In this case, the central server calculates] _[ v] h[k]_ +1[(] _[x, a]_[)][ as and updates the] _Q_ -estimate as
+
+_Q[k] h_[+1] ( _x, a_ ) = (1 _− αagg_ ) _Q[k] h_[(] _[x, a]_[) +] _[ α][agg]_ � _rh_ ( _x, a_ ) + _vh[k]_ +1[(] _[x, a]_[)] � + _β/_[˜] 2 _._ (37)
+
+After finishing updating the estimated _Q_ function, the central server updates the estimated value function and the policy based on Equations (5) and (6). The algorithm then proceeds to round _k_ +1.
+
+Algorithms 3 and 4 formally present the Bernstein-type design. Inputs _K_ 0 and _T_ 0 in Algorithms 3 are termination conditions, where _K_ 0 limits the total number of rounds and _T_ 0 limits the total number of samples generated by all the agents before the last round.
+
+We provide some remarks. First, the coordinated exploration for agents is designed based on the general situation where _n[m,k]_ might be different across different agents, and clients share _µ[m,k] h_ s in addition to the information shared during the coordinated exploration in the Hoeffding-type Algorithm 2. Second, the information aggregation at the central server differs from that in the Hoeffdingtype Algorithm 1, in terms of specifying _β_[˜] to set the upper confidence bound and in maintaining _W_ 1 _,k, W_ 2 _,k_ and _Wk_ .
+
+30
+
+**Algorithm 3** FedQ-Bernstein (Central Server)
+
+1: **Input:** _T_ 0 _, K_ 0 _∈_ N+. 2: **Initialization:** _k_ = 1, _Nh_[1][(] _[x, a]_[)][=] _[W]_[1] _[,k]_[(] _[x, a, h]_[)][=] _[W]_[2] _[,k]_[(] _[x, a, h]_[)][=][0] _[, Q]_[1] _h_[(] _[x, a]_[)][=] _[V] h_[1][(] _[x]_[)][=] _H, ∀_ ( _x, a, h_ ) _∈S ×A×_ [ _H_ ] and _π_[1] = � _πh_[1][:] _[ S][→A]_ � _h∈_ [ _H_ ][is an arbitrary deterministic policy.] 3: **while** _H_[�] _[k] k[−][′]_ =1[1] _[Mn][k][′][< T]_[0][ &] _[ k][≤][K]_[0] **[ do]** 4: Broadcast _π[k] , {Nh[k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_[ to all clients.] 5: Wait until receiving an abortion signal and send the signal to all agents. 6: Receive _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h,m]_[,] _{vh[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h,m]_ and _{µ[m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h,m]_[from clients.] 7: Calculate _Nh[k]_[+1] ( _x, a_ ) _, n[k] h_[(] _[x, a]_[)] _[, v] h[k]_ +1[(] _[x, a]_[)] _[,][ ∀]_[(] _[x, h]_[)] _[ ∈S ×]_[ [] _[H]_[]][ with] _[ a]_[ =] _[ π] h[k]_[(] _[x]_[)][.] 8: Calculate _Wk_ ( _x, a, h_ ) _, Wk_ +1( _x, a, h_ ) _, W_ 1 _,k_ +1( _x, a, h_ ) _, W_ 2 _,k_ +1( _x, a, h_ ) _, ∀_ ( _x, h_ ) _∈S ×_ [ _H_ ] with _a_ = _πh[k]_[(] _[x]_[)][ based on Equation (32), Equation (33), Equation (34) and Equation (35).] 9: **for** ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] **do** 10: **if** _a ̸_ = _πh[k]_[(] _[x]_[)] **[ or]** _[ n][k] h_[(] _[x, a]_[) = 0] **[ then]** 11: _Q[k] h_[+1] ( _x, a_ ) _← Q[k] h_[(] _[x, a]_[)][.] 12: **else if** _Nh[k]_[(] _[x, a]_[)] _[ < i]_[0] **[ then]** 13: Update _Q[k] h_[+1] ( _x, a_ ) according to Equation (36). 14: **else** 15: Update _Q[k] h_[+1] ( _x, a_ ) according to Equation (37). 16: **end if** 17: **end for** 18: Update _Vh[k]_[+1] and _π[k]_[+1] according to Equation (5) and Equation (6). 19: _k ← k_ + 1. 20: **end while**
+
+**Algorithm 4** FedQ-Bernstein (Agent _m_ in round _k_ )
+
+1: _n[m] h_[(] _[x, a]_[) =] _[ v] h[m]_ +1[(] _[x, a]_[) =] _[ r][h]_[(] _[x, a]_[) =] _[ µ] h[m]_[(] _[x, a]_[) = 0] _[,][ ∀]_[(] _[x, a, h]_[)] _[ ∈S × A ×]_[ [] _[H]_[]][.] 2: Receive _π[k] , {Nh[k]_[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_[ and] _[ {][V] h[k]_[(] _[x]_[)] _[}][x,h]_[ from the central server.] 3:4: **whilewhile** no abortion signal from the central server _n[m] h_[(] _[x][h][, a][h]_[)] _[ <]_[ max] 1 _, ⌊ MC_ ˜ _[N] h[ k]_[(] _[x][h][, a][h]_ **do**[)] _[⌋] , ∀_ ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] **do** � � 5: Collect a new trajectory _{_ ( _xh, ah, rh_ ) _}[H] h_ =1[with] _[ a][h]_[=] _[ π] h[k]_[(] _[x][h]_[)][.] 6: _n[m] h_[(] _[x][h][, a][h]_[)] _← n[m] h_[(] _[x][h][, a][h]_[)][+][1] _[,][v] h[m]_ +1[(] _[x][h][, a][h]_[)] _← vh[m]_ +1[(] _[x][h][, a][h]_[)][+] _[V] h[k]_ +1[(] _[x][h]_[+1][)][,] _µ[m] h_[(] _[x][h][, a][h]_[)] _[ ←][µ][m] h_[(] _[x][h][, a][h]_[) +] � _Vh[k]_ +1[(] _[x][h]_[+1][)] �2, and _rh_ ( _xh, ah_ ) _← rh, ∀h ∈_ [ _H_ ] _._ 7: **end while** 8: Send an abortion signal to the central server. 9: **end while** 10: _n[m,k] h_ ( _x, a_ ) _← n[m] h_[(] _[x, a]_[)] _[, v] h[m,k]_ +1[(] _[x, a]_[)] _← vh[m]_ +1[(] _[x, a]_[)] _[/n] h[m]_[(] _[x, a]_[)][and] _[µ][m,k] h_ ( _x, a_ ) _← µ[m] h_[(] _[x, a]_[)] _[/n][m] h_[(] _[x, a]_[)] _[,][ ∀]_[(] _[x, h]_[)] _[ ∈S ×]_[ [] _[H]_[]][ with] _[ a]_[ =] _[ π] h[k]_[(] _[x]_[)][.] 11: Send _{rh_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][n][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[,] _[{][µ][m,k] h_ ( _x, πh[k]_[(] _[x]_[))] _[}][x,h]_[and] _[{][v] h[m,k]_ +1[(] _[x, π] h[k]_[(] _[x]_[))] _[}][x,h]_ to the central server.
+
+E.2 PROOF OF THEOREM 5.1
+
+In this subsection, we provide proof for Theorem 5.1 which provides the regret of Algorithms 3 and 4.
+
+E.2.1 BOUNDS ON _Q[k] h[−][Q][⋆] h_
+
+We first try to provide a Lemma that has stronger results than Lemma C.1.
+
+**Lemma E.1.** _Using Algorithms 3 and 4, there exists a positive constant c[′] >_ 0 _such that, for any p ∈_ (0 _,_ 1) _, the following relationship holds simultaneously for all_ ( _x, a, h, K[′]_ ) _∈S ×A×_ [ _H_ ] _×_ [ _K_ ]
+
+31
+
+_with probability at least_ 1 _− p._
+
+**==> picture [376 x 29] intentionally omitted <==**
+
+_in which t_ = _Nh[K][′]_[(] _[x, a]_[)] _[.]_
+
+The remaining content of Appendix E.2.1 is dedicated to proving this Lemma. First, we can easily find that Lemma C.2 still holds with _bt, βt_ replaced by[˜] _bt, β_[˜] _t_ , and Lemma C.3 still holds. Next, due to Equation (16) and Equation (15) with _bt, βt_ replaced, we can easily obtain a similar one-sided result summarized in the following Lemma.
+
+**Lemma E.2.** _Using the Bernstein-type algorithm, there exists a positive constant c[′]_ 0 _[>]_[0] _[such] that, for any p ∈_ (0 _,_ 1) _, the following relationship holds simultaneously for all_ ( _x, a, h, K[′]_ ) _∈ S × A ×_ [ _H_ ] _×_ [ _K_ ] _with probability at least_ 1 _− p._
+
+**==> picture [360 x 30] intentionally omitted <==**
+
+_in which t_ = _Nh[K][′]_[(] _[x, a]_[)] _[.]_
+
+_Proof._ This relationship can be directly obtained from Equation (16) and Equation (15) with _bt, βt_ replaced.
+
+With this, we can introduce the following technical Lemma.
+
+**Lemma E.3.** _Suppose that Equation_ (39) _holds. For any given K[′] ∈_ N _, denote_[�] _[K] m,k,j[′]_[=] _K[′] M n[m,k] h_ � _k_ =1 � _m_ =1 � _j_ =1 _[and][ w]_[=] _[ vec]_[(] _[{][w][mkj][}]_[)] _[ with][ m][ ∈]_[[] _[M]_[]] _[, k][∈]_[[] _[K][′]_[]] _[, j][∈]_[[] _[n][m,k]_[]] _[ be a non-negative] vector. Then there exists a numerical constant c[′]_ 1 _[>]_[ 0] _[ such that, for all]_[ (] _[h, K][′]_[)] _[ ∈]_[[] _[H]_[]] _[ ×]_[ [] _[K]_[]] _[,]_
+
+**==> picture [376 x 55] intentionally omitted <==**
+
+_Proof._ We denote
+
+**==> picture [398 x 99] intentionally omitted <==**
+
+Taking the summation with regard to _k_ from 1 to _K[′]_ and noticing that _θt_[0] _[m,k,j] h_ = I[ _t[m,k,j] h >_ 0], we have
+
+**==> picture [353 x 72] intentionally omitted <==**
+
+Next, we find upper bounds with regard to the three terms.
+
+32
+
+**Step 1:** finding an upper bound for _H_[�] _[K] m,k,j[′][w][mkj]_[I][[] _[t][m,k,j] h_ = 0]. Noticing that _wmkj ≤∥w∥∞_ , using the same way as Proof of Equation (24) in Appendix C.4, we can find that
+
+**==> picture [184 x 24] intentionally omitted <==**
+
+**Step 2:** finding an upper bound for[�] _[K] m,k,j[′][w][mkj]_ � _ti_ =1 _[m,k,j] h θ_ ˜ _t[i][m,k,j] h V_ ˜ _h_ (+1 _m,k,j_ ) _[m,k,j] i,h ._ Similar to Proof of Equation (25) in Appendix C.4, with _i_ 1 = ( _M −_ 1) _H_ ( _H_ + 1), we still split it into two parts as follows:
+
+**==> picture [378 x 75] intentionally omitted <==**
+
+For the first part, applying _wmkj ≤∥w∥∞_ , using the same way as Proof of Equation (25) in Appendix C.4, we can find that
+
+**==> picture [324 x 35] intentionally omitted <==**
+
+For the second part, we regroup the summations in a different way. For every ( _m[′] , k[′] , j[′]_ ), the term _V_ ˜ _h[m]_ +1 _[′][,k][′][,j][′]_ appears in the term _wmkj_ I[ _t[m,k,j] h > i_ 1][�] _[t] i_ =1 _h[m,k,j] θt[i][m,k,j] h V_ ˜ _h_ (+1 _m,k,j_ ) _[m,k,j] i,h_ for ( _k, m, j_ ) if and only if _K[′] ≥ k > k[′]_ and ( _x[m,k,j] h , a[m,k,j] h_ ) = ( _xh[m][′][,k][′][,j][′] , a[m] h[′][,k][′][,j][′]_ ). So, for each ( _m[′] , k[′] , j[′]_ ), we denote ( _x, a_ ) = ( _x[m] h[′][,k][′][,j][′] , a[m] h[′][,k][′][,j][′]_ ). We consider all the later round indices _k[′]_ = _k_ 0 _< k_ 1 _< k_ 2 _< ... < kg ≤ K[′]_ that satisfy _ns_ = _n[k] h[s]_[(] _[x, a]_[)] _[>]_[0] _[, s][∈]_[N][.][Here,] _[k][s]_[s][and] _[g]_[are][simplified][notations] for functions of ( _m[′] , k[′] , j[′] , h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in proof of step 2. So, the summation of coefficients related to ( _m[′] , k[′] , j[′]_ ) equals to
+
+**==> picture [292 x 38] intentionally omitted <==**
+
+in which _i[′]_ is the global visiting number for ( _x, a, h_ ) at ( _m[′] , k[′] , j[′]_ ), which means that ( _m[′] , k[′] , j[′]_ ) = _mh_ ( _i[′]_ ; _x, a_ ) _, kh_ ( _i[′]_ ; _x, a_ ) _, jh_ ( _i[′]_ ; _x, a_ ). This means that
+
+**==> picture [329 x 92] intentionally omitted <==**
+
+Denote _w_ ˜ = vec( _{w_ ˜ _m′k′j′}_ ), we have that
+
+due to (c) in Lemma B.3. We can also find that
+
+**==> picture [290 x 29] intentionally omitted <==**
+
+where the proof of the last inequality is the same as the Proof of Equation (25). Combining the two parts, we have that
+
+**==> picture [384 x 35] intentionally omitted <==**
+
+33
+
+**Step 3:** finding an upper bound for[�] _[K] m,k,j[′][w][mkj]_[Ω] �� _t[m,k,j] hH_[3] _ι_ � _._ We split it into two parts as follows.
+
+**==> picture [318 x 70] intentionally omitted <==**
+
+For the first part, applying that _wmkj ≤∥w∥∞_ , similar to Proof of Equation (26) in Appendix C.4, we have that
+
+**==> picture [338 x 32] intentionally omitted <==**
+
+_n[m,k]_ For the second part, we denote _wk[′]_[(] _[x, a, h]_[) =][ �] _[M] m_ =1 � _j_ =1 _[w][mkj]_[I][[(] _[x][m,k,j] h , a[m,k,j] h_ ) = ( _x, a_ )]. We also introduce the following notation. For every pair ( _x, a, h_ ) _∈Sk_ ˜ _s × A ×_ [ _H_ ], we consider all the _k_ ˜1 rounds˜ indexed as 0 _< k_[˜] 1 _< k_[˜] 2 _< ... < k_[˜] _g ≤ K_ satisfying _nh_[(] _[x, a]_[)] _[>]_[0][,] _[N] h_[(] _[x, a]_[)] _[≥][M]_[and] _Nhk_ 1 _−_ 1( _x, a_ ) _< M_ . Here, _k_[˜] _s_ s and _g_ are simplified notations for functions of ( _x, a, h_ ), and we use the simplified notations when there is no ambiguity and the stated meaning is only valid in proof of step 3. Then we have
+
+**==> picture [362 x 33] intentionally omitted <==**
+
+We also define that
+
+_w[′]_ ( _i, x, a, h_ ) = _wk_ ˜ _[′] s_[(] _[x, a, h]_[)] _[/n] kh_ ˜ _s_[(] _[x, a]_[)] _[,][ ∀][i][ ∈]_[N][+] _[, j][∈]_[[] _[N] hk_ ˜ _s_[(] _[x, a]_[)] _[, N] hk_ ˜ _s_[(] _[x, a]_[) +] _[ n] kh_ ˜ _s_[(] _[x, a]_[)] _[ −]_[1]] _[,]_
+
+which indicates that
+
+_w[′]_ ( _j, x, a, h_ ) _≤∥w∥∞._
+
+Similar to Proof of Equation (26), we have that
+
+**==> picture [252 x 44] intentionally omitted <==**
+
+**==> picture [388 x 65] intentionally omitted <==**
+
+with
+
+**==> picture [186 x 42] intentionally omitted <==**
+
+Denote _w[′′]_ ( _x, a, h_ ) = _∥w∥∞_ �� _Ni_ = _hkgN_ ˜ +1 _hk_ ˜1 ([(] _x,a[x,a]_ )[)] _−_ 1 _w[′]_ ( _i, x, a, h_ ) _/∥w∥∞_ �, which indicates that
+
+**==> picture [202 x 42] intentionally omitted <==**
+
+34
+
+so that
+
+**==> picture [180 x 24] intentionally omitted <==**
+
+Then by letting the mass related to _{w[′]_ ( _i, x, a, h_ ) _}i_ concentrate at large values for _{_ � _H_[3] _ι/i}i_ as much as possible, we have
+
+**==> picture [329 x 42] intentionally omitted <==**
+
+= _O H_[3] _ιw[′′]_ ( _x, a, h_ ) _∥w∥∞ ._ �� �
+
+By the concavity of _f_ ( _x_ ) = _√H_[3] _ιx_ , we have
+
+**==> picture [360 x 78] intentionally omitted <==**
+
+To conclude, for step 3, we have that
+
+**==> picture [322 x 33] intentionally omitted <==**
+
+Combining the results for the three different steps, we have
+
+**==> picture [282 x 49] intentionally omitted <==**
+
+with _∥w∥_ 1 _≤_ exp(3 _/H_ ) _∥w_ ˜ _∥_ 1 and _∥w∥∞ ≤∥w_ ˜ _∥∞_ . So, by recursions with regard to _h, h_ + 1 _. . . H_ , we can get the result.
+
+Next, we will establish relationships between _Wk_ ( _x, a, h_ ) and �V _hVh[⋆]_ +1� ( _x, a_ ), in which �V _hVh[⋆]_ +1� ( _x, a_ ) is a variance operator define below. We also need these definitions for any ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ + 1] with _t_ = _Nh[K][′]_[(] _[x, a]_[)][.]
+
+**==> picture [218 x 13] intentionally omitted <==**
+
+2 �V _hVh[⋆]_ +1� ( _x, a_ ) = E _x′∼_ P _h_ ( _·|x,a_ ) � _Vh[⋆]_ +1[(] _[x][′]_[)] _[ −]_ �P _hVh[⋆]_ +1� ( _x, a_ )� =: _P_ 1
+
+Here, _P_ 1 depends on ( _x, a, h_ ) and we will use the simplified notation when there is no ambiguity.
+
+**==> picture [407 x 109] intentionally omitted <==**
+
+Here, _P_ 2 _, P_ 3 _, P_ 4 depend on ( _x, a, h, k_ ) and we use the simplified notations when there is no ambiguity. The following Lemmas establish the closeness of these quantities to illustrate the closeness between _WK′_ ( _x, a, h_ ) and �V _hVh[⋆]_ +1� ( _x, a_ ).
+
+35
+
+**Lemma E.4.** _For any p ∈_ (0 _,_ 1) _with probability at least_ 1 _− p, the following holds simultaneously for all_ ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ + 1] _with t_ = _Nh[K][′]_[(] _[x, a]_[)] _[.] |P_ 1 _− P_ 2 _| ≤ O H_[2] ~~[�]~~ _ι/t ._ � �
+
+2 _∞ Proof._ We have that �� _Vh[⋆]_ +1 � _x_[(] _h[m,k,j]_ +1[)] _[h]_[(] _[i]_[;] _[x,a]_[)] � _−_ �P _hVh[⋆]_ +1� ( _x, a_ )� _− P_ 1� _i_ =1 is a martingale difference bounded by _O_ ( _H_[2] ), and the random variable _t ≤ T_ 0 _/H_ (1 + _C_[˜] ). By Azuma-Hoeffding Inequality, for any given ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] and a given _t[′] ∈_ N+, for any _p ∈_ (0 _,_ 1), with probability 1 _− p_ ,
+
+**==> picture [396 x 68] intentionally omitted <==**
+
+**Lemma E.5.** _For any p ∈_ (0 _,_ 1) _with least_ 1 _− p probability, the following holds simultaneously for all_ ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ + 1] _with t_ = _Nh[K][′]_[(] _[x, a]_[)] _[:] |P_ 2 _− P_ 3 _| ≤ O H_[2][�] _ι/t ._ � �
+
+_Proof._ We can find that
+
+**==> picture [396 x 65] intentionally omitted <==**
+
+For _|P_ 3 _− P_ 4 _|_ , similar to the proof of Lemma C.3 in Jin et al. (2018), we have
+
+**==> picture [338 x 31] intentionally omitted <==**
+
+We mark an event Equation (41) here, which means that the difference is always non-negative.
+
+**==> picture [387 x 76] intentionally omitted <==**
+
+We do not need a new statistical lemma to prove that it holds with high probability. It will be shown to hold automatically based on some other statistical events that hold with high probability later. Under this event, we need to find an upper bound for
+
+**==> picture [261 x 30] intentionally omitted <==**
+
+Under the event of Equation (39), based on Lemma E.3, letting _wmkj_ = 1 _t_[I][[(] _[x] h[m,k,j] , a[m,k,j] h_ ) = ( _x, a_ )], we have that
+
+**==> picture [257 x 64] intentionally omitted <==**
+
+36
+
+which indicates that, under the intersections of the events of Equation (39), and[�] _[K] k_ =1 _[′]_[Event][(] _[k]_[)][, for] any ( _x, a, h_ ) _∈S × A ×_ [ _H_ ], we have
+
+**==> picture [268 x 30] intentionally omitted <==**
+
+To conclude about the relationship between _Wk_ ( _x, a, h_ ) and �V _hVh[⋆]_ +1� ( _x, a_ ), we have that, under the interaction of the events of Equation (39),[�] _[K] k_ =1 _[′]_[Event][(] _[k]_[)][, Lemma E.4 and Lemma E.5, we have] _∀_ ( _x, a, h, k_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K[′]_ ],
+
+**==> picture [317 x 47] intentionally omitted <==**
+
+With this relationship, we can provide the new concentration results. Similar to the proof of Lemma C.3, for a given ( _x, a, h_ ) _∈S × A ×_ [ _H_ ], we decompose the summation[�] _[t] i_ =1 _[θ]_[˜] _t[i][X][i]_[as follows.]
+
+**==> picture [164 x 29] intentionally omitted <==**
+
+Equation (19) has already provided an upper bound for all ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ] for the second summation. Next, we focus on _ti_ =1 _[θ] t[i][X][i]_ . By Azuma-Bernstein Inequality, for any ���� ��� fixed _t[′] ∈_ N+ and fixed ( _x, a, h_ ) _∈S × A ×_ [ _H_ ], for any _p ∈_ (0 _,_ 1), with probability at least 1 _− p_ , we have that
+
+**==> picture [266 x 37] intentionally omitted <==**
+
+After considering the union bound with regard to ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] and _t[′] ≤ T_ 0 _/H_ , we can claim the following conclusion: for any _p ∈_ (0 _,_ 1), with probability at least 1 _− p_ , the following relationship holds simultaneously for all ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ],
+
+**==> picture [337 x 31] intentionally omitted <==**
+
+The intersection of events of Equation (43) and Equation (19) indicates that the following relationship holds simultaneously for all ( _x, a, h, K[′]_ ) _∈S × A ×_ [ _H_ ] _×_ [ _K_ ] with _t_ = _Nh[K][′]_[(] _[x, a]_[)][:]
+
+**==> picture [390 x 32] intentionally omitted <==**
+
+Combining with the event of Equation (42) for _K[′]_ replaced by _K[′]_ + 1, we have that
+
+**==> picture [354 x 94] intentionally omitted <==**
+
+37
+
+**==> picture [386 x 176] intentionally omitted <==**
+
+we have
+
+**==> picture [341 x 66] intentionally omitted <==**
+
+which indicates that
+
+**==> picture [236 x 31] intentionally omitted <==**
+
+when combining with Equation (39) and _c[′]_ is large enough.
+
+Finally, we are ready to provide proof for Lemma E.1. We let _c[′]_ to be large enough and Will provide discussion under the intersections of events for Equation (19), Equation (39), Lemma E.4, Lemma E.5 and Equation (43). We know that these events hold simultaneously with probability 1 _− cpp_ for some _cp >_ 0. Next, we will prove Equation (38) by induction. It obviously holds that for all ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] when _K[′]_ = 1. We suppose that it holds for every _K[′] ≤ K_ 0 _[′]_[.][When] _K[′]_ = _K_ 0 _[′]_[+][1][,][LHS][of][Equation][(38)][indicates][that][�] _[K] k_ =10 _[′]_[+1] Event( _k_ ) holds. By the discussion above, this indicates that Equation (45) holds for _K_ 0 _[′]_[+ 1][, by recursions on] _[ H, H][ −]_[1] _[, . . . ,]_[ 1][ (similar] to the proof of Lemma 4.3 in Jin et al. (2018)), we can prove that Equation (38) holds for all ( _x, a, h_ ) _∈S × A ×_ [ _H_ ] for _K_ 0 _[′]_[+ 1][.][This finishes the induction.][After we replace] _[ p]_[ with] _[ p/c][p]_[, we] finish the proof.
+
+## E.2.2 REMAINING PARTS FOR PROVING THEOREM 5.1
+
+Next, we begin to discuss the overall complexity. Similar to Lemma C.5 in Jin et al. (2018), we will provide the following Lemma.
+
+**Lemma E.6.** _For any p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p,_
+
+**==> picture [214 x 26] intentionally omitted <==**
+
+_Proof._ We assign an order for all the episodes based on the “round first, episode second, agent third” rule and suppose _m_ ( _i_ ) _, k_ ( _i_ ) _, j_ ( _i_ ) recovers the agent index, round index and within round episode index for the _i−_ th episode. Denote _Ri_ =[�] _[H] h_ =1[V] _[h][V] h[π]_ +1 _[k]_[(] _[x] h_[(] _[m,k,j]_[)(] _[i]_[)] _, a_[(] _h[m,k,j]_[)(] _[i]_[)] ) and _Fi−_ 1 be the _σ−_ field generated by the information before the _i−_ th episode. Similar to the proof of Lemma C.5 in Jin et al. (2018), we have
+
+**==> picture [76 x 27] intentionally omitted <==**
+
+38
+
+Var[ _Ri|Fi−_ 1] _≤ H_[5] _._
+
+So, by Azuma-Hoeffding Inequality based on[�] _[t] i_ =1 _[R][i]_[with regard to the filtration] _[ {F][i][}][∞] i_ =1[and a] union bound for _t ≤ T_ 0(1 + _C_[˜] ) _/H_ + _M_ , we conclude that
+
+**==> picture [258 x 34] intentionally omitted <==**
+
+We also provide a Lemma that focuses on the concentration of _ξh[k]_[.] **Lemma E.7.** _For any p ∈_ (0 _,_ 1) _, with probability at least_ 1 _− p, the following relationships holds simultaneously:_
+
+**==> picture [290 x 67] intentionally omitted <==**
+
+_in which Ch_ = exp(3( _h −_ 1) _/H_ ) _._
+
+_Proof._ We first focus on the first event. Denote _V_ ( _m, k, j, h_ ) = _Ch_ (P _−_ ˆ P) � _Vh[⋆]_ +1 _[−][V] h[π]_ +1 _[k]_ � ( _x[m,k,j] h , a[m,k,j] h_ ) and a simplified notation � _m,k,j,h_ : _h[′]_ = _K M n[m,k] H−_ 1 � _k_ =1 � _m_ =1 � _j_ =1 � _h_ = _h[′]_[.][The quantity we focus on can be rewritten as]
+
+**==> picture [94 x 24] intentionally omitted <==**
+
+with _|V_ ( _m, k, j, h_ ) _| ≤ O_ ( _H_ ) as _Ch ≤_ exp(3). Let _V_[˜] ([˜] _i_ ) be the[˜] _i−_ th term in the summation that contains _T_[ˆ] ( _H − h[′]_ ) _/H_ terms, in which the order follows a “round first, episode second, step third, agent fourth” rule. Then the sequence _{V_[˜] ([˜] _i_ ) _}_ is a martingale difference. By Azuma-Hoeffding Inequality, for any _p ∈_ (0 _,_ 1) and _t ∈ N_ +, with probability at least 1 _− p_ ,
+
+**==> picture [104 x 37] intentionally omitted <==**
+
+Then by applying a union bound with regard to _h[′] ∈_ [ _H −_ 1] and all possible _t_ which is divisible by _H − h[′]_ and knowing that _T_[ˆ] ( _H − h[′]_ ) _/H ≤ T_ 0(1 + _C_[˜] ) + _HM_ due to (e) in Lemma B.1, we can claim that, for any _p ∈_ (0 _,_ 1), with probability at least 1 _− p_ , the following relationship holds simultaneously:
+
+**==> picture [268 x 38] intentionally omitted <==**
+
+The second event can be analyzed similarly for the same conclusion. By combining these two events and re-scaling _p_ , we can claim the result.
+
+Next, we try to find the upper bound for the regret. We pick _c[′]_ to be large enough and discuss based on the intersection of events of Equation (19), Equation (39), Lemma E.4, Lemma E.5, Equation (43), Lemma E.7, Lemma E.1 and Lemma E.6. They hold simultaneously with probability at least 1 _− c[′] p[p]_[where] _[c][′] p[>]_[0][is][a][numerical][constant][and][indicates][Equation][(42).][Similar][to][the] discussions in Proof of Theorem 4.1, we can claim that for _∀h ∈_ [ _H_ ],
+
+**==> picture [375 x 30] intentionally omitted <==**
+
+39
+
+**==> picture [398 x 261] intentionally omitted <==**
+
+For the second part, we have that
+
+**==> picture [372 x 77] intentionally omitted <==**
+
+Later on, we use another simplified notation[�] _k,m,j,h_ : _M_[=][�] _k,m,j,h_[I][[] _[t][m,k,j] h ≥ M_ ]. Using the same technique of finding _C[′′]_ in Equation (26), we can find that
+
+**==> picture [372 x 255] intentionally omitted <==**
+
+and
+
+So, we have
+
+We also have
+
+40
+
+where the first inequality follows from Cauchy’s inequality and the second inequality is due to Equation (50).
+
+To conclude, we have
+
+**==> picture [357 x 88] intentionally omitted <==**
+
+Next, we try to find an upper bound for
+
+We know that
+
+**==> picture [276 x 94] intentionally omitted <==**
+
+By Lemma E.6,
+
+**==> picture [352 x 270] intentionally omitted <==**
+
+where the last inequality is due to Equation (50) and Equation (51). We also have
+
+**==> picture [298 x 65] intentionally omitted <==**
+
+41
+
+Next, we will show that, for any ( _x, a, h_ ) _∈S × A ×_ [ _H_ ],
+
+**==> picture [354 x 19] intentionally omitted <==**
+
+Suppose that _u, v_ are random variables such that _u_ follows the distribution of _Vh[⋆]_ +1[(] _[x][h]_[+1][)][ under] _[ π][⋆]_ when ( _xh, ah_ ) = ( _x, a_ ), and _v_ follows the distribution of _Vh[π]_ +1 _[k]_[(] _[x][h]_[+1][)][ under] _[ π][k]_[when][ (] _[x][h][, a][h]_[)][=] ( _x, a_ ) and _u ≥ v_ . The third requirement is reasonable because the distribution of _xh_ +1 only depends on ( _x, a_ ) and _Vh[⋆]_ +1[(] _[x][h]_[+1][)] _[ ≥][V] h[π]_ +1 _[k]_[(] _[x][h]_[+1][)][.][We have that] _[ u, v][≤][H]_[.][So,]
+
+**==> picture [342 x 76] intentionally omitted <==**
+
+This proves the conclusion. Using the conclusion, we can find that
+
+**==> picture [332 x 127] intentionally omitted <==**
+
+in which the last inequality is due to _ϕ[k] h[≥]_[0][ based on Equation (38).][By Equation (48) and Lemma] E.7, we have
+
+**==> picture [428 x 30] intentionally omitted <==**
+
+So, we have
+
+**==> picture [406 x 93] intentionally omitted <==**
+
+where the last relationship is due to
+
+**==> picture [264 x 15] intentionally omitted <==**
+
+and
+
+**==> picture [250 x 13] intentionally omitted <==**
+
+42
+
+Inserting it into Equation (52), we have
+
+**==> picture [347 x 176] intentionally omitted <==**
+
+Due to
+
+and
+
+**==> picture [385 x 83] intentionally omitted <==**
+
+Inserting it into Equation (49), we have
+
+**==> picture [281 x 76] intentionally omitted <==**
+
+Finally, for the probability of the intersection of all the events, if we use _p/c[′] p_[to][replace] _[p]_[,][we] complete the proof.
+
+## F NUMERICAL EXPERIMENTS
+
+In this section, we conduct experiments in a synthetic environment to validate the theoretical performances of FedQ-Hoeffding, FedQ-Beinstein, and compare with their single-user counterparts UCB-H and UCB-B (Jin et al., 2018), respectively.
+
+**Synthetic Environment.** We generate a synthetic environment to evaluate the proposed algorithms. We set the number of states _S_ to be 3, the number of actions _A_ for each state to be 2, and the episode length _H_ to be 5. The reward _rh_ ( _s, a_ ) for each state-action pair and each step is generated independently and uniformly at random from [0 _,_ 1]. We also generate the transition kernel _Ph_ ( _· | s, a_ ) from an _S_ -dimensional simplex independently and uniformly at random for each state-action pair and each step. Such procedure guarantees that the synthetic environment is a proper tabular MDP.
+
+Under the given MDP, we set _M_ = 10 and _T/H_ = 3 _×_ 10[4] for FedQ-Hoeffding, FedQ-Beinstein, and _T/H_ = 3 _×_ 10[5] _, M_ = 1 for UCB-H and UCB-B. Thus, the total number of episodes is 3 _×_ 10[5] for all four algorithms. We choose _c_ = _ι_ = 1 for all algorithms. For each episode, we randomly choose the initial state uniformly from _S_ states. We collect 10 sample paths under all algorithms under the same MDP environment, and plot Regret( _T_ ) _/√MT_ versus _MT/H_ in Figure 1. The
+
+43
+
+**==> picture [347 x 232] intentionally omitted <==**
+
+Figure 1: Regret comparison.
+
+solid line represents the median of the 10 sample paths, while the shaded area shows the 10th and 90th percentiles. As we can see, both FedQ-Hoeffding and FedQ-Beinstein stay very close to their single-agent counterpart, indicating that FedQ-Hoeffding achieves linear speedup with respect to the number of clients _M_ , as predicted by Theorem 4.1 and Theorem 5.1. Besides, as time progresses, FedQ-Beinstein achieves lower regret than FedQ-Hoeffding, which is consistent with the theoretical results as well.
+
+We also track the number of communication rounds throughout the learning process under FedQHoeffding and FedQ-Bernstein, and plot the median profiles as well as the 10th and 90th percentiles in Figure 2. Both curves exhibit sublinear growth, corroborating the theoretical result in Theorem 4.2. Besides, the total number of communication rounds under FedQ-Bernstein becomes lower than that under FedQ-Hoeffding as _T_ becomes sufficiently large. This is because after the more active early-stage exploration of FedQ-Bernstein, it reaches a more stable policy, under which the synchronization triggered by ( _x, a, h_ )s that are less likely to be visited under the optimal policy rarely happens.
+
+44
+
+**==> picture [347 x 232] intentionally omitted <==**
+
+Figure 2: Total number of communication rounds as a function of _T/H_ .
+
+45
+
diff --git a/open_review/iclr2024_8543.json b/open_review/iclr2024_8543.json
new file mode 100644
index 0000000000000000000000000000000000000000..ad1e00de513d53fa32d0d15b87229de46e0cd0d3
--- /dev/null
+++ b/open_review/iclr2024_8543.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8543",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Explaining the Out-of-Distribution Detection Paradox through Likelihood Peaks",
+ "abstract": "Likelihood-based deep generative models (DGMs) commonly exhibit a puzzling behaviour: when trained on a relatively complex dataset, they assign higher likelihood values to out-of-distribution (OOD) data from simpler sources. Adding to the mystery, OOD samples are never generated by these DGMs despite having high likelihoods. This two-pronged paradox has yet to be conclusively explained, making likelihood-based OOD detection unreliable. Our primary observation is that high-likelihood regions will not be generated if they contain minimal probability mass, which can occur if the density is sharply peaked. We demonstrate how this seeming contradiction of large densities yet low probability mass can occur on data confined to low dimensional manifolds. We also show that this scenario can be identified through local intrinsic dimension (LID) estimation, and propose a method for OOD detection which pairs the likelihoods and LID estimates obtained from a pre-trained DGM. Moreover, we provide an efficient method for estimating LID from a normalizing flow model, improving upon existing estimators, and enabling state-of-the-art OOD detection performance with respect to comparable flow-based benchmarks.",
+ "rebuttal": "### Experiments with Random Noise Images as OOD\nWe have added an extra set of experiments in response to your question in (W3) about whether our algorithm is capable of detecting random noise as OOD data because it would have high LID. In these experiments, we consider a model trained on one of the datasets in the paper and then feed it random images; each pixel intensity is chosen uniformly at random from the values 0 to 255. As you pointed out, the densities for these random images would not be sharply peaked, so they would have no low-dimensional structure and hence would have high LID.\n\nWe validated our method for all datasets, and in every case the OOD datapoints are completely separated from in-distribution points by the likelihood threshold. Hence, in every case the AUC-ROC is a perfect 1.00:\n\n| In-distribution | Out-of-distribution | AUC - ROC |\n|------------------------|-----------------|------------------|\n| FMNIST-gen | Random Noise | 1.000 |\n| FMNIST | Random Noise | 1.000 |\n| MNIST-gen | Random Noise | 1.000 |\n| MNIST | Random Noise | 1.000 |\n| EMNIST-gen | Random Noise | 1.000 |\n| EMNIST | Random Noise | 1.000 |\n| Omniglot-gen | Random Noise | 1.000 |\n| Omniglot | Random Noise | 1.000 |\n| CIFAR10-gen | Random Noise | 1.000 |\n| CIFAR10 | Random Noise | 1.000 |\n| CelebA-gen | Random Noise | 1.000 |\n| CelebA | Random Noise | 1.000 |\n| TinyImageNet-gen | Random Noise | 1.000 |\n| TinyImageNet | Random Noise | 1.000 |\n| SVHN-gen | Random Noise | 1.000 |\n| SVHN | Random Noise | 1.000 |\n| CIFAR100-gen | Random Noise | 1.000 |\n| CIFAR100 | Random Noise | 1.000 |\n\nFor a visualization of why our method is perfectly effective here, please see Figure 1 of the newly-uploaded supplementary material, which depicts estimated LID values and likelihoods for four of our models. As in the paper, each point represents a datapoint with its colour indicating whether it is in-distribution, generated from the model, or OOD. In red, we have visualized both the LID and likelihood thresholds chosen by our dual-threshold OOD detector. As illustrated, the likelihood threshold easily divides in-distribution from out-of-distribution. This is a “non-pathological” case, where the OOD datapoints lie on a flat region of the density obtaining high LID estimates while simultaneously obtaining extremely low likelihoods. The density does not peak around random noise.\n\n### General Response\nWe thank all the reviewers for their feedback and for the time they spent reviewing our paper. We are glad that Reviewer **urvk** found our paper “clever” and that Reviewer **i5V7** enjoyed our “great visualizations” and found the paper “clearly written.” Reviewer **i5V7** also pointed to the novelty of our approach, as it is the first to leverage LID estimates for OOD detection, which Reviewer **urvk** deemed a “principled” approach. Compared to prior work, Reviewers **c1to** and **i5V7** both noted the efficiency of our method in that it requires only a single normalizin [...]\n\n### Principled Choice of $r$ using LPCA\nAs promised above, we ran experiments on every dataset pair using the new “principled” way of choosing $r$ which we described in response to the concerns of reviewers **urvk** and **i5V7**. \n\nA table containing ROC-AUCs for both Naïve Likelihoods and our method on each task is below. Each row contains two tasks - one where generated samples from the model are considered in-distribution and one where the test data is considered in-distribution.\nThe results are generally similar to those presented in the paper, with the key exceptions of (1) CIFAR-10 vs C [...]\n\n### Response to Reviewer c1to\nWe thank you for your time, effort, and feedback, and we appreciate the detailed review. Here we discuss the concerns you listed. You also asked about the applicability of this method to VAEs and diffusion models; for this, please see the general rebuttal.\n\nBefore addressing your concerns, we think it relevant to clarify at a high level some of the overarching themes and methodology in our work as follows.\n\nThe core paradox of the study is that, while a trained DGM generates samples that look much more like its training data (e.g., CIFAR 10), it can assign higher [...]\n\n### Response to Reviewer i5V7\nThank you for the insightful review and praise for our ideas and presentation. We address your concerns point-by-point below:\n\nSoundness\n1. You expressed some concerns about the validity of our Taylor approximation of $\\log \\rho_r(\\mathbf{x})$. Part of this was based on how $\\hat{\\rho}_r$ ranks in-distribution and OOD data in Figure 3 in the manuscript. In fact, Figure 3 shows them behaving precisely as would be expected. For very negative $r$, the OOD data has higher mass because it is assigned higher likelihood under the model. For values closer to zero (here ab [...]\n\n### Response to Reviewer urvk\nThank you for your positive feedback on our ideas, methodology, and experimental results.\n\n1. You asked whether our analysis is generalizable to models outside of normalizing flows; please see the general rebuttal for more discussion on this point.\n2. You also asked a couple of questions about setting $r$.\n - You asked about a more principled way of setting it; please see the general rebuttal, where we propose an improvement over our original approach.\n - You also asked why we cannot simply set $r$ to a very small value; we agree this is a relevant questio [...]\n\n### Response to Reviewr c1to (cont'd)\n- (**W3**): Please see our discussion ab\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 5,
+ 6
+ ],
+ "score_mean": 5.67,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "Using likelihoods from deep generative models intuitively would seem like an ideal tool for detecting out-of-distribution data, because they are explicitly trained as a probabilistic model of the training distribution. However, in practice the likelihood has proven to give counterintuitive results. These models have been shown to assign high likelihoods to OOD data, but at the same time they don't generate OOD data when sampling from the model. The authors of this paper argue that this paradox can be explained through likelihood peaks. They argue that this can be identified using local intrinsic dimension estimation, and they develop an efficient way of doing so using normalizing flows. \n\nThe paper seems well written, well motivated and technically sound. The reviewers found the paper quite borderline, with two 6's and 1 score of 5. The lower score was unfortunately with the lowest possible confidence. The reviewers found the motivation strong, seemed convinced by the method. Their main reservations were: \n* They found that the author's claim of identifying the likelihood paradox a bit too strong as it has been studied in previous literature, \n* They were a bit underwhelmed that the method and experiments were limited to normalizing flows and not other generative models.\n\nGenerative models have undergone quite a resurgence recently, but unfortunately normalizing flows haven't really taken off. It seems a shame to limit the observations of this paper to normalizing f",
+ "forum_id": "jQ596tXT3k",
+ "primary_area": "generative models",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_urvk",
+ "review_id": "CjCPY8JcGY",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 1847,
+ "edit_detected": true,
+ "edit_delta_seconds": 844836,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_c1to",
+ "review_id": "SMnaDwuTmr",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 1
+ },
+ "review_text_chars": 3290,
+ "edit_detected": true,
+ "edit_delta_seconds": 1986403,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_i5V7",
+ "review_id": "aYLEsy1R73",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4725,
+ "edit_detected": true,
+ "edit_delta_seconds": 1977124,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8543.md b/open_review/iclr2024_8543.md
new file mode 100644
index 0000000000000000000000000000000000000000..709f700bf9a5ad4515fdff060614114766d0a046
--- /dev/null
+++ b/open_review/iclr2024_8543.md
@@ -0,0 +1,687 @@
+
+
+## - EXPLAINING THE OUT OF-DISTRIBUTION DETECTION PARADOX THROUGH LIKELIHOOD PEAKS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Likelihood-based deep generative models (DGMs) commonly exhibit a puzzling behaviour: when trained on a relatively complex dataset, they assign higher likelihood values to out-of-distribution (OOD) data from simpler sources. Adding to the mystery, OOD samples are never generated by these DGMs despite having high likelihoods. This two-pronged paradox has yet to be conclusively explained, making likelihood-based OOD detection unreliable. Our primary observation is that high-likelihood regions will not be generated if they contain minimal probability mass, which can occur if the density is sharply peaked. We demonstrate how this seeming contradiction of large densities yet low probability mass can occur around data confined to low dimensional manifolds. We also show that this scenario can be identified through local intrinsic dimension (LID) estimation, and propose a method for OOD detection which pairs the likelihoods and LID estimates obtained from a pre-trained DGM. Moreover, we provide an efficient method for estimating LID from a normalizing flow model, improving upon existing estimators, and enabling state-of-the-art OOD detection performance with respect to comparable flow-based benchmarks.
+
+## 1 INTRODUCTION
+
+Out-of-distribution (OOD) detection (Qui˜nonero-Candela et al., 2008; Rabanser et al., 2019; Ginsberg et al., 2022) is crucial for ensuring the safety and reliability of machine learning models, given their deep integration into real-world applications ranging from finance (Sirignano & Cont, 2019) to medical diagnostics (Esteva et al., 2017). In areas as critical as autonomous driving (Bojarski et al., 2016) and medical imaging (Litjens et al., 2017; Adnan et al., 2022), these models, while proficient with in-distribution data, may give overconfident or plainly incorrect outputs when faced with OOD samples (Wei et al., 2022).
+
+We focus on detecting OOD inputs using likelihood-based deep generative models (DGMs), which aim to learn the density that generated the observed data. Maximum-likelihood operates by increasing model likelihoods on training data, and since probability densities must be normalized, one might reasonably expect lower likelihoods for OOD points. Likelihood-based DGMs, including variational autoencoders (Kingma & Welling, 2014; Rezende et al., 2014; Vahdat & Kautz, 2020), normalizing flows (NFs) (Dinh et al., 2016; Kingma & Dhariwal, 2018; Durkan et al., 2019), and diffusion models (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2021) have proven to be powerful DGMs that can render photo-realistic images. Given these successes, it seems reasonable to attempt OOD detection by thresholding the likelihood of a query datum under a trained model.
+
+Surprisingly, likelihood-based DGMs trained on more complex datasets assign higher likelihoods to OOD datapoints from less complex datasets (Choi et al., 2018; Nalisnick et al., 2019a; Havtorn et al., 2021). This observation becomes even more puzzling in light of the fact that said DGMs are explicitly trained to assign high likelihoods to in-distribution data without having been exposed to OOD data, thus generating samples which are much closer to the former. In this work, we explore the following explanation for how both these observations can simultaneously be true:
+
+_OOD datapoints can be assigned higher likelihoods while not being generated if they belong to regions of low probability mass._
+
+1
+
+**==> picture [198 x 134] intentionally omitted <==**
+
+**==> picture [195 x 158] intentionally omitted <==**
+
+Figure 1: **Left:** A 1D density which is highly peaked in the OOD region (red) assigns high likelihood, but low probability mass to OOD data. **Right:** An analogous situation for a 2D density concentrated around a 1D OOD manifold (red line), illustrated with FMNIST as in-distribution and MNIST as OOD. The model density has become sharply peaked around the manifold of “less complex” data which has low intrinsic dimension, which is nonetheless assigned low probability mass as it has negligible volume.
+
+Figure 1 illustrates that regions assigned high density by a model may integrate to very little probability mass when densities are sharply peaked. When OOD data is “simpler” in the sense that it concentrates on a manifold of lower dimension than in-distribution data, the phenomenon depicted in Figure 1 becomes completely consistent with empirical observations, but why might this happen in the first place? According to the manifold hypothesis, data often resides on lower-dimensional manifolds within a higher-dimensional space (Bengio et al., 2013; Pope et al., 2021; Brown et al., 2023). Consequently, a likelihood-based DGM aims to capture these manifolds by concentrating its density around them. Previous work has shown that DGMs have inductive biases that capture certain types of low-dimensional structure – structure that may also be present in OOD data – resulting in high assigned densities (Kirichenko et al., 2020; Schirrmeister et al., 2020). Our work is complementary to these past results: we provide a mathematical understanding of how the paradox can arise, which we leverage to devise a method to perform OOD detection using only a pre-trained density model.
+
+**Contributions** ( _i_ ) We develop an OOD detection method which classifies a datum as indistribution only if it is assigned high likelihood by a DGM whose density is not sharply peaked around the datum, as measured by a large local intrinsic dimension (LID) estimate of the learned manifold; ( _ii_ ) design an efficient LID estimator for our method, which requires only a pre-trained density model; ( _iii_ ) we empirically verify the above explanation for the OOD paradox; and ( _iv_ ) achieve state-of-the-art OOD detection performance among methods using the same NF backbone as us.
+
+## 2 BACKGROUND
+
+**Normalizing Flows** In this study, we target DGMs that produce a density model _pθ_ , parameterized by _θ_ , which can be easily evaluated. Among them, NFs readily provide probability densities through the change of variables formula, making them suitable for studying pathologies in the likelihood function. A NF is a diffeomorphic mapping _fθ_ : _Z →X_ from a latent space _Z_ = R _[d]_ to data space _X_ = R _[d]_ , which transforms a simple distribution _pZ_ on _Z_ , typically an isotropic Gaussian, into a complicated data distribution _pθ_ on _X_ . The change of variables formula allows one to evaluate the likelihood of a datum **x** _∈X_ as
+
+**==> picture [281 x 11] intentionally omitted <==**
+
+where **z** = _fθ[−]_[1] ( **x** ) and _**J**_ ( **z** ) is the Jacobian of _fθ_ evaluated at **z** . NFs are constructed in such a way that det _**J**_ ( **z** ) can be efficiently evaluated, and are trained through maximum-likelihood. After training, a sample is drawn from the latent distribution **z** _∼ pZ_ , and in turn, it is pushed through the mapping _fθ_ to produce a sample _fθ_ ( **z** ) = **x** _∼ pθ_ .
+
+2
+
+**==> picture [191 x 73] intentionally omitted <==**
+
+**==> picture [191 x 74] intentionally omitted <==**
+
+**==> picture [397 x 97] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) FMNIST-trained model vs MNIST and Omniglot. (b) MNIST-trained model vs FMNIST and Omniglot. (c) CIFAR10-trained model vs SVHN. (d) CIFAR10-trained model vs CelebA. (e) CIFAR100-trained model vs SVHN. **----- End of picture text -----**
+
+Figure 2: Overview of likelihood pathologies: (a) an FMNIST-trained model assigns higher likelihoods to MNIST and Omniglot data; (b) a model trained on MNIST shows notably lower likelihoods for its own generated samples compared to OOD data; (c-e) pathologies observed in some models trained on RGB datasets.
+
+**Likelihood Pathologies in OOD Detection** Choi et al. (2018) and Nalisnick et al. (2019a) first uncovered unintuitive behaviour that pervasively affects likelihood-based DGMs. For instance, models trained on relatively complex datasets like CIFAR10 (Krizhevsky & Hinton, 2009) and FMNIST (Xiao et al., 2017) often yield high likelihoods when tested on simpler ones like SVHN (Netzer et al., 2011) and MNIST (LeCun et al., 1998), respectively, despite the latter datasets not having been seen in the training process. While this issue is not exclusive to images (Ren et al., 2019), our experiments, shown in Figure 2, confirm these previous findings for NFs trained on image data. Additionally, we find that this pathological behaviour is not limited to these well-known cases, but extends to numerous dataset pairs and even to generated samples (see Appendix A for details).
+
+**Local Intrinsic Dimension** As previously discussed, natural data often lies on low-dimensional submanifolds of _X_ = R _[d]_ , where _d_ is the _ambient_ dimension of the data space. The _local intrinsic dimension_ (LID) of a datapoint **x** _∈X_ with respect to these data submanifolds is the dimension of the submanifold that contains **x** . For example, if the ambient space is R[2] and the data manifold is the 1D unit circle _S_ , then any point **x** _∈ S_ will have an intrinsic dimension of 1. Often, datasets lie on multiple non-overlapping submanifolds of different dimensionalities (Brown et al., 2023), in which case the LID will vary between datapoints.
+
+Density models _pθ_ implicitly attempt to learn these manifolds by concentrating mass around them. As a consequence, even though they are defined on the full _d_ -dimensional space _X_ , trained densities _pθ_ implicitly encode low-dimensional manifold structure, which in turn implies that _pθ_ contains LID information. When referring to an LID with respect to the manifolds implied by _pθ_ , we will write LID _θ_ ( **x** ). In the following, we will link LID to the sharpness of likelihood peaks, so it will be of interest to estimate LID _θ_ ( **x** 0) for in- and out-of-distribution query points **x** 0.
+
+Various methods to estimate intrinsic dimension exist (Levina & Bickel, 2004; Johnsson et al., 2014; Facco et al., 2017; Bac et al., 2021). Unfortunately, most of these are inadequate for our purposes, either because they estimate global (i.e. averaged or aggregated) intrinsic dimension instead of LID _θ_ ( **x** 0), or because they require observed data around **x** 0 to produce the estimate. Since we want LID _θ_ ( **x** 0) for OOD points **x** 0, the latter methods would require access to samples from _pθ_ which fall in the OOD region, which are of course unavailable. The key to circumvent this issue is to use LID estimators based on densities rather than data.
+
+Density-based LID estimators are enabled by a surprising result linking Gaussian convolutions and LID (Loaiza-Ganem et al., 2022; Tempczyk et al., 2022). Intuitively, adding high-dimensional but low-variance Gaussian noise corrupts _pθ_ more easily in lower-dimensional regions (see Figure 1 from Tempczyk et al. (2022)). Comparing _pθ_ convolved with noise for different noise levels allows one to infer LID from how quickly _pθ_ is corrupted as the noise increases. More formally, defining
+
+3
+
+the convolution between a pre-trained density _pθ_ and a Gaussian with log standard deviation _r_ as
+
+**==> picture [349 x 23] intentionally omitted <==**
+
+Tempczyk et al. (2022) showed that under mild regularity conditions, for sufficiently negative _r_ (i.e. small standard deviation),
+
+**==> picture [275 x 11] intentionally omitted <==**
+
+Equation 3 implies that, for sufficiently negative _r_ (corresponding to sufficiently small noise), the _∂_ rate of change of log _ρr_ ( **x** 0) with respect to _r_ can be used to estimate LID, since _∂r_[log] _[ ρ][r]_[(] **[x]**[0][)] _[≈]_ LID _θ_ ( **x** 0) _−d_ . Tempczyk et al. (2022) leverage this observation to propose an estimator of LID _θ_ ( **x** 0), which they call LIDL. To compute this estimate, they train one NF for each of several noise levels _r_ on in-distribution data convolved with _N_ ( _·_ ; **0** _, e_[2] _[r]_ _**I** d_ ). Then, for a given **x** 0, they treat the log densities provided by the NFs as approximations of log _ρr_ ( **x** 0), and they fit a simple linear regression to these values using _r_ as the covariate; the resulting slope is an estimate of LID _θ_ ( **x** 0) _− d_ . This procedure is of course computationally intensive, as several NF models must be trained. We will later show how to obtain estimates of LID _θ_ ( **x** 0) from a single pre-trained density model _pθ_ .
+
+## 3 RELATED WORK
+
+A substantial amount of research into likelihood anomalies tries to explain the underlying causes for the OOD paradox. One particular line of research proposes probabilistic explanations: Choi et al. (2018) and Nalisnick et al. (2019b) put forth the “typical set” hypothesis, which has been contested in follow-up work. For example, Le Lan & Dinh (2021) argue that likelihood rankings not being invariant to data reparameterizations causes the paradox, whereas Caterini & Loaiza-Ganem (2022) claim it is the lower entropy of “simpler” distributions as compared to the higher entropy of more “complex” ones – which somewhat aligns with our work, although we use intrinsic dimension instead of entropy to quantify complexity.
+
+Nonetheless, we significantly differ from these explanations in that they all assume, sometimes implicitly, that the supports of in- and out-of-distribution data overlap, and that the paradox is thus fundamentally unavoidable. We find it extremely plausible, for example, that the intersection between CIFAR10 and SVHN images is empty. In this sense, we are more in agreement with the work of Zhang et al. (2021) who blame model misalignment – i.e. _pθ_ failing to properly learn its target data-generating density – and highlight that perfect density models would not be subject to the OOD paradox if dataset supports do not overlap.
+
+Previous work has also found an empirical cause of this model misalignment: Kirichenko et al. (2020) and Schirrmeister et al. (2020) show that the multi-scale convolutional architectures employed by NFs fixate on high-frequency local features and pixel-to-pixel correlations. When these features and correlations are strongly present in OOD data – which happens when it is “simpler” – OOD likelihoods become large. Although insightful, these studies do not provide an explanation for why OOD data is never generated. Our work is thus complementary to this research, as we show why the OOD paradox is mathematically possible, and use the resulting insights for OOD detection.
+
+Another line of work aims to build DGMs which do not experience the aforementioned misalignment, sometimes at the cost of generation quality. For example, Grathwohl et al. (2020) and Liu et al. (2020) argue that the training procedure of energy-based models (EBMs) (Xie et al., 2016; Du & Mordatch, 2019) provides inductive biases which are useful for OOD detection, and Yoon et al. (2021) construct an EBM specifically designed for this task. Kirichenko et al. (2020) and LoaizaGanem et al. (2022) first embed data into semantically rich latent spaces, and then employ dense neural network architectures, thus minimizing susceptibility to local high-frequency features. We differ from these works in that they attempt to build DGMs that are better at likelihood-based OOD detection, whereas we only leverage a (potentially misaligned) pre-trained model. The understanding of the OOD paradox that we derive is nonetheless compatible with other DGMs.
+
+Finally, other works use “outside help” or auxiliary models. Some methods assume access to an OOD dataset (Nalisnick et al., 2019b), require class labels (G¨ornitz et al., 2013; Ruff et al., 2020), or leverage an image compression algorithm (Serr`a et al., 2020). Some other works, while fully unsupervised, require training an auxiliary model on distorted data (Ren et al., 2019) or on specific
+
+4
+
+data statistics (Morningstar et al., 2021). Once again, we differ from these works in that our focus is on gaining a deeper understanding of the OOD paradox, and using it for fully unsupervised OOD detection based only on a single pre-trained model.
+
+## 4 METHOD
+
+In this section, we provide an OOD detection algorithm that can be readily applied to any pretrained NF, _even if it is misaligned_ and exhibits undesired likelihood peaks on OOD data. In order to determine if a given query point **x** 0 is in- or out-of-distribution, our method requires approximating log _ρr_ ( **x** 0). While our main ideas are widely applicable to likelihood-based DGMs, we focus on NFs since, as we will shortly show, they allow for particularly tractable approximations. Intuitively, the fact that NFs never generate OOD samples indicates that they do contain the information needed to discern OOD from in-distribution samples, and we will show how to extract this information.
+
+## 4.1 PROBABILITY MASS, SHARP LIKELIHOOD PEAKS, AND INTRINSIC DIMENSION
+
+**Approximating Probability Mass** Our explanation of the paradox involves OOD regions having sharply peaked likelihoods with negligible probability mass. It is thus natural to explore ways of computing the probability mass around **x** 0 to determine if it is OOD or not. A sensible first attempt proposed by Grathwohl et al. (2020) is to consider the _ℓ_ 2 norm of the derivative of log _pθ_ ( **x** ) with respect to **x** evaluated at **x** 0, _∥ ∂[∂]_ **x**[log] _[ p][θ]_[(] **[x]**[0][)] _[∥]_[2][.][Intuitively,][a][large][norm][would][suggest][a][sharply] peaked density and thus low probability mass; however, as they report and we confirm in Section 5, this produces unreliable results for NFs. A natural alternative would be to directly approximate the probability mass that the model assigns to a small neighbourhood of **x** 0, such as an _ℓ_ 2 ball of radius _R_ , _BR_ ( **x0** ) := _{_ **x** _∈X_ : _∥_ **x** _−_ **x** 0 _∥_ 2[2] _[≤][R]_[2] _[}]_[:]
+
+**==> picture [365 x 25] intentionally omitted <==**
+
+where vol( _B_ ) denotes the _d_ -dimensional Lebesgue measure (i.e. the volume) of _B_ and _U_ ( _·_ ; _B_ ) the density of the uniform distribution on _B_ . Since vol( _BR_ ( **0** )) does not depend on **x** 0, Equation 4 suggests approximating [ _pθ_ ( _·_ ) _∗U_ ( _·_ ; _BR_ ( **0** ))]( **x** 0) for OOD detection. In initial experiments, we tried doing so through a Monte Carlo estimate, but found the estimator particularly unreliable (see Appendix B). More specifically, despite the true probability in Equation 4 being non-decreasing in _R_ , its Monte Carlo estimate did not exhibit this property. To circumvent this issue, we leverage the standard and well-known result that in high dimensions, the uniform distribution on the ball is approximately Gaussian, _U_ ( _·_ ; _Ber_ ~~_[√]_~~ _d_[(] **[0]**[))] _[≈N]_[(] _[ ·]_[ ;] **[ 0]** _[, e]_[2] _[r]_ _**[I]**[d]_[)][.][1][This result suggests that, if we take] _R_ = _e[r][√] d_ , we can approximate [ _pθ_ ( _·_ ) _∗U_ ( _·_ ; _BR_ ( **0** ))]( **x** 0) using the density _ρr_ ( **x** 0) defined in Equation 2.
+
+**Fast Convolutions of NFs with Gaussians** In LIDL, estimating _ρr_ ( **x** 0) requires training a separate density model for each _r_ value of interest. This is computationally expensive and ill-suited for our purposes, since our goal is to use only _pθ_ . Instead, we propose a way to leverage the properties of NFs to approximate _ρr_ ( **x** 0). Using a first order Taylor approximation of _fθ_ around **z** 0 = _fθ[−]_[1] ( **x** 0), we approximate the NF as an affine function _fθ_ ( **z** ) _≈_ _**J**_ 0( **z** _−_ **z** 0) + **x** 0, where _**J**_ 0 is the Jacobian of _fθ_ evaluated at **z** 0 and is tractable by design. Since _pZ_ is Gaussian and affine transformations of Gaussians remain Gaussian, we can thus approximate _pθ_ ( **x** ) as _p_ ˆ _θ_ ( **x** ) := _N_ ( **x** ; **x** 0 _−_ _**J**_ 0 **z** 0 _,_ _**J**_ 0 _**J**_ 0 _[⊤]_[)][.] While it might at first appear strange to approximate a function _fθ_ and a density _pθ_ that we can already evaluate, this approximation makes convolutions analytically tractable. By convolving _p_ ˆ _θ_ (instead of _pθ_ ) with a Gaussian, we can approximate _ρr_ ( **x** 0) from Equation 2 as
+
+**==> picture [364 x 24] intentionally omitted <==**
+
+> 1Readers unfamiliar with this can see Saremi & Hyv¨arinen (2019) for a related derivation in a machine learning context. Note that this derivation shows Gaussians are approximately uniform on the boundary of the ball, but another classic result is that, in high dimensions, the majority of the mass of the ball lies near its boundary (see e.g. Wegner (2021)), so that uniforms on the ball or its boundary are also approximately equal.
+
+5
+
+Importantly, since the Taylor expansion of _fθ_ is only accurate around **x** 0, so is _p_ ˆ _θ_ . In turn, _ρ_ ˆ _r_ ( **x** 0) is an accurate approximation of _ρr_ ( **x** 0) only when _N_ ( _·_ ; **0** _, e_[2] _[r]_ _**I** d_ ) concentrates most of its mass around **0** – i.e. when _r_ is sufficiently negative – since this means that the contributions of _p_ ˆ _θ_ ( **x** 0 _−_ **x** ) to the integral in Equation 5 happen mostly when **x** _≈_ 0. For a detailed analysis of the quality of this approximation, please refer to Appendix C.
+
+**Identifying Sharp Likelihood Peaks** So far, we have argued that: ( _i_ ) for an appropriate _r_ , _ρr_ ( **x** 0) is a sensible proxy for how much mass _pθ_ assigns around **x** 0, and that ( _ii_ ) _ρ_ ˆ _r_ ( **x** 0) is a good approximation of _ρr_ ( **x** 0) for negative enough values of _r_ . However, these two arguments together do _not_ necessarily imply that _ρ_ ˆ _r_ ( **x** 0) estimates how much mass _pθ_ assigns around **x** 0, since choices of _r_ high enough to capture the mass might not be negative enough for _ρ_ ˆ _r_ ( **x** 0) to remain a close approximation of _ρr_ ( **x** 0). In Figure 3, which shows log ˆ _ρr_ for in- and out-of-distribution data as _r_ increases, some relevant patterns emerge.
+
+**==> picture [152 x 119] intentionally omitted <==**
+
+First, _r ≈−_ we7. canSincesee _ρ_ a _r_ (marked **x** 0) _≈_ change _ρ_ ˆ _r_ ( **x** 0) offorbehaviournegative enougharound Figure _ρ_ ˆ _r_ ( **x** in)3:andComparison _ρ_ ˆ _r_ ( **x** ood) forof meaninandvaluesout-of-of values of _r_ , we believe that the consistent behaviour bedistribution **x** in and **x** ood, respectively. The fore _r ≈−_ 7 agrees with our approximation remaining shaded area shows one standard deviation. accurate until this threshold. However, it is unclear if the Here, in-distribution is FMNIST, and OOD is MNIST. behaviour after _r ≈−_ 7 changes due to an underlying change in _ρr_ or because of a decline in approximation quality. We thus find it prudent to only trust _ρ_ ˆ _r_ for negative enough values of _r_ below this threshold. Second, before _r ≈−_ 7, OOD values of _ρ_ ˆ _r_ remain larger, which is consistent with _pθ_ also being larger for OOD data and with _r_ being too negative to appropriately quantify the probability mass around **x** 0.
+
+Fortunately, even though the values of _r_ for which _ρ_ ˆ _r_ ( **x** 0) is a good approximation of _ρr_ ( **x** 0) are too negative for _ρr_ ( **x** 0) to remain a useful proxy for probability mass, _ρ_ ˆ _r_ ( **x** 0) nonetheless contains relevant information. In the example shown in Figure 3, it is clear that log ˆ _ρr_ ( **x** 0) decreases faster for pathological OOD data than it does for in-distribution data, including in the regime where _r_ is negative enough for us to trust our approximations. Thus, instead of attempting to estimate log _ρr_ ( **x** 0) for _∂_ relatively less negative values of _r_ , we estimate its rate of change, _∂r_[log] _[ ρ][r]_[(] **[x]**[0][)][, for very negative] values of _r_ . Intuitively, the rate of change that we consider, _∂r∂_[log ˆ] _[ρ][r]_[(] **[x]**[0][)][,][can be understood as a] measure of how sharply peaked _pθ_ is around **x** 0.
+
+Finally, we make a crucial observation: _∂r∂_[log] _[ ρ][r]_[(] **[x]**[0][)][ is] _[ exactly]_[ what LIDL aims to estimate from] Equation 3, i.e. LID _θ_ ( **x** 0) _− d_ . Importantly, we now have a well-grounded understanding that _∂_ LID _θ_ ( **x** 0) _≈ ∂r_[log ˆ] _[ρ][r]_[(] **[x]**[0][) +] _[ d]_[provides][a][measure][of][how][sharply][peaked] _[p][θ]_[is][around] **[x]**[0][,][thus] making LID a perfect candidate for OOD detection.
+
+## 4.2 PUTTING IT ALL TOGETHER: DUAL THRESHOLD OOD DETECTION
+
+In summary, three mutually exclusive circumstances can arise: ( _i_ ) _pθ_ ( **x** 0) is very small, in which case we can infer that **x** 0 does not lie on the manifolds learned by _pθ_ , so we should flag **x** 0 as OOD. Non-pathological situations where the model _pθ_ actually assigns very low likelihoods to OOD data will of course be detected in this case. ( _ii_ ) _pθ_ ( **x** 0) is large, and _∂ ∂r_[log ˆ] _[ρ][r]_[(] **[x]**[0][)] _[≈]_[LID] _[θ]_[(] **[x]**[0][)] _[−][d]_[is][very][neg-] ative, i.e. LID _θ_ ( **x** 0) is very small. Here, the likelihood is high but sharply peaked, suggesting that _pθ_ places a negligible amount of mass
+
+**Algorithm 1** Dual threshold OOD detection, returns True if **x** 0 is deemed OOD, and False if it is deemed in-distribution.
+
+|**Require: x**0_, pθ, r, ψL, ψ_LID 1: **if**log_pθ_(**x**0)_< ψL_**then** 2: **return**True|_▷_case(_i_)|
+|---|---|
+|3: **if** _∂_ _∂r_ log ˆ_ρr_(**x**0)_< ψ_LID**then** 4: **return**True 5: **return**False|_▷_case(_ii_) _▷_case(_iii_)|
+
+6
+
+around **x** 0. In this case, we should also flag **x** 0 as OOD. As previously mentioned, we see this case as caused by misalignment of _pθ_ , yet our LID estimate still allows us to detect this pathological sit- _∂_ uation. ( _iii_ ) _pθ_ ( **x** 0) is large, and _∂r_[log ˆ] _[ρ][r]_[(] **[x]**[0][)] _[ ≈]_[LID] _[θ]_[(] **[x]**[0][)] _[ −][d]_[ is not very negative, i.e. LID] _[θ]_[(] **[x]**[0][)] is also large. In this case the likelihood is large but not sharply peaked, suggesting that _pθ_ places a relatively large amount of mass around **x** 0, so we can tag **x** 0 as in-distribution.
+
+Putting these three possibilities together, we propose a simple OOD detection method in Algorithm _∂_ 1 which uses two thresholds, _ψL_ and _ψ_ LID, for log _pθ_ ( **x** 0) and _∂r_[log ˆ] _[ρ][r]_[(] **[x]**[0][)][, respectively, to decide] which case **x** 0 belongs to. In Appendix D.1 we detail how we select all the hyperparameters ( _r_ , _ψL_ , and _ψ_ LID), but make the important observation that we set them in a fully unsupervised way, i.e. _without_ relying on OOD data, using only in-distribution training data and the given model _pθ_ .
+
+## 5 EXPERIMENTS
+
+**Setup** For a thorough examination of likelihood pathologies, we compared datasets within two classes: ( _i_ ) 28 _×_ 28 greyscale images, including FMNIST, MNIST, Omniglot (Lake et al., 2015), and EMNIST (Cohen et al., 2017); and ( _ii_ ) RGB images resized to 32 _×_ 32 _×_ 3, comprising SVHN, CIFAR10 and CIFAR100 (Krizhevsky & Hinton, 2009), Tiny ImageNet (Le & Yang, 2015), and a simplified, cropped version of CelebA (Kist, 2021). While we kept the most popular OOD detection tasks in the main text, due to space constraints our extensive experiments across all of the OOD detection tasks along with details of our setup for reproducibility are available in Appendix D.2. Interestingly, we did not see the exploding inverses identified by Behrmann et al. (2021) in our flow models. We postulate this could be due to a different hyperparameter configuration than theirs; see Figure 10 in Appendix D.1. Our anonymized code, which will be made publicly available, can be found here [URL removed]
+
+**Notation** Throughout this section, we will use the suffixes “-train”, “-test”, and “-gen” when talking about datasets to specify if we are referring to the train set, test set, or generated samples, respectively. For datasets _A_ and _B_ , we write “ _A_ (vs) _B_ ” to refer to the OOD detection task that aims to distinguish _A_ -test from _B_ -test using the model _pθ_ pre-trained on _A_ -train. When we write “ _A_ -gen (vs) _B_ ”, _A_ -test is replaced by _A_ -gen, but _pθ_ is still pre-trained on _A_ -train. Ideally, for a model trained on _A_ -train, both _A_ -gen and _A_ -test should align. However, if the model excels in the “ _A_ -gen (vs) _B_ ” task but falters in “ _A_ (vs) _B_ ”, it indicates poor model fit. By making these comparisons, we can pinpoint scenarios where improved generative models are required.
+
+**Evaluation** For the single threshold baselines, we employ the area under the curve (AUC) of receiver operator curves (ROC), a common metric for classifier performance, to evaluate them on OOD detection tasks. Notably, dual threshold classifiers do not produce a traditional ROC; however, they give rise to a receiver operator graph (ROG). Each dual threshold, represented by ( _ψL, ψ_ LID), maps to a point on the ROG, indicating the true-positive (TP) and false-positive (FP) rates of the corresponding classifier. The ROG’s convex hull (including the axes from 0 to 1) acts as a ROC surrogate, allowing for comparisons against the AUCs of single threshold baselines.
+
+**Together, Likelihoods and LID Isolate OOD Regions** In our first set of experiments, we compute log-likelihoods and LID estimates for each datapoint. Results are shown in Figure 4. When considered separately, the likelihoods or LIDs of in- and out-of-distribution data can overlap, as depicted by the likelihood marginals on the left and right, and the LID marginals on the bottom. In contrast, the scatterplots using both likelihoods and LIDs show a clear separation between in-distribution and OOD datapoints. Furthermore, the “directions” predicted by our method are correct: in the pathological case, FMNIST (vs) MNIST (left), we clearly see that while OOD points have higher likelihoods, they also have lower LIDs; whereas in the non-pathological case, MNIST vs FMNIST (right), likelihoods are lower for OOD data. These results highlight not only the importance of using LID estimates for OOD detection, but also that of combining them with likelihoods. For more comparisons depicting the same scatterplots across various datasets, please refer to Appendix D.3.
+
+**Visualizing the Benefits of Dual Thresholding** The separation of OOD and in-distribution data shown in the scatterplots in Figure 4 confirms that likelihood/LID pairs contain the needed information for OOD detection. However, it remains to show that Algorithm 1 succeeds at this task (recall
+
+7
+
+**==> picture [36 x 154] intentionally omitted <==**
+
+**==> picture [154 x 154] intentionally omitted <==**
+
+**==> picture [154 x 36] intentionally omitted <==**
+
+**==> picture [154 x 154] intentionally omitted <==**
+
+**==> picture [154 x 36] intentionally omitted <==**
+
+**==> picture [35 x 154] intentionally omitted <==**
+
+Figure 4: LID estimates and likelihood values: FMNIST (vs) MNIST and FMNIST-gen (vs) MNIST ( **left scatterplot** ); and MNIST (vs) FMNIST and MNIST-gen (vs) FMNIST ( **right scatterplot** ). Marginal distributions of likelihoods and LIDs are shown on the sides and bottom, respectively.
+
+**==> picture [97 x 78] intentionally omitted <==**
+
+**==> picture [96 x 78] intentionally omitted <==**
+
+**==> picture [96 x 78] intentionally omitted <==**
+
+**==> picture [96 x 78] intentionally omitted <==**
+
+**==> picture [392 x 15] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) FMNIST (vs) MNIST : (b) FMNIST-gen (vs) Omniglot : (c) CIFAR10 (vs) SVHN : (d) CIFAR10-gen (vs) CelebA : AUC boost (0 . 070 → 0 . 953) AUC boost (0 . 000 → 0 . 996) AUC boost (0 . 060 → 0 . 926) AUC boost (0 . 258 → 0 . 733) **----- End of picture text -----**
+
+Figure 5: ROG visualizations for select pathological OOD tasks. The red dots and the yellow area correspond to the ROG graph, and the ROC for our dual thresholding method, respectively; the blue areas represent ROCs for single threshold likelihood-based classifiers.
+
+that we cannot simply train a classifier to differentiate between red and blue points in Figure 4 since the red OOD points are unavailable when designing the OOD detector). Figure 5 provides a visual comparison showcasing the ROGs from our dual thresholding technique versus the ROCs obtained by single threshold classifiers obtained by using only likelihoods. These results not only show a dramatic boost in AUC-ROC performance across four different pathological scenarios – once again highlighting the relevance of combining likelihoods with LIDs for OOD detection – but they also showcase that our dual threshold method successfully carries out this combination. For further experiments showing why dual thresholding is necessary and how it can boost ROC-AUC across all the OOD detection tasks we consider, please refer to Appendix D.4 and Appendix D.5.
+
+**Quantitative Comparisons** In the top part of Table 1, we compare our method against several baselines, all of which are evaluated using the exact same NF as our method. These baselines are: ( _i_ ) na¨ıvely labeling large likelihoods log _pθ_ ( **x** 0) as in-distribution, which as previously mentioned, strongly fails at identifying “simpler” distributions as OOD when trained on “complex” datasets (e.g. FMNIST (vs) MNIST, FMIST (vs) Omniglot, and CIFAR10 (vs) SVHN). ( _ii_ ) Using _∥ ∂[∂]_ **x**[log] _[ p][θ]_[(] **[x]**[0][)] _[∥]_[2][,][as proposed by Grathwohl et al. (2020),][which performs very poorly across] tasks, except at CIFAR10 (vs) SVHN. ( _iii_ ) The complexity correction method of Serr`a et al. (2020), which uses image compression information to adjust the inflated likelihood observed in OOD datapoints. Despite this comparison being unfair in that the baseline is allowed access not only to the NF, but to image compression algorithms as well, we beat it across all tasks except for FMNIST (vs) Omniglot. ( _iv_ ) The likelihood ratios approach of Ren et al. (2019), which employs an auxiliary likelihood-based reference model to compute this ratio. This comparison is once again unfair, as the baseline has access to an additional model that we do not, and yet we uniformly beat it across tasks.
+
+8
+
+Table 1: ROC-AUC (higher is better). The top part of the table contains NF-based approaches, whereas the last row shows an EBM-based one. **Notation** : _[∗]_ tasks where likelihoods alone do not exhibit pathological behaviour, _‡_ methods that employ external information or auxiliary models. For the NF methods, we bold the best performing model, and the EBM model is bolded when it surpasses all others.
+
+|Trained on OOD Dataset|MNIST _∗_ FMNIST Omniglot|FMNIST MNIST Omniglot|CIFAR10 SVHN CelebA|SVHN _∗_|
+|---|---|---|---|---|
+|||||CIFAR10 CelebA|
+|Na¨ıve Likelihoodlog_pθ_(**x**0) _∥∂_ _∂_**x** log_pθ_(**x**0)_∥_2 Complexity Correction_‡_ Likelihood Ratios_‡_ Dual Threshold (Ours)|**1**_._ 0_._807 0_._156 0_._444 0_._945 0_._852 0_._944 0_._722 **1**_._ **0**_._|0_._069 0_._088 0_._516 0_._538 0_._939 **0**_._ 0_._666 0_._639 **0**_._ 0_._862|0_._084 0_._386 0_._722 0_._433 0_._835 0_._479 0_._299 0_._396 **0**_._ **0**_._|**0**_._ **0**_._ 0_._200 0_._080 0_._771 0_._639 0_._302 0_._099 **0**_._ **0**_._|
+|NAE|**1**_._ **0**_._|**0**_._ **0**_._|**0**_._ **0**_._|0_._948 0_._965|
+
+Besides the strong empirical performance of our method, other aspects of the top part of Table 1 warrant attention. Both the complexity correction and likelihood ratio baselines lose performance over na¨ıvely using likelihoods on non-pathological tasks, i.e. when models are trained on relatively “simple” data like MNIST or SVHN. Since likelihoods perform well at these tasks, they are often considered “easy” and thus omitted from comparisons. The fact that complexity correction and likelihood ratios struggle at these tasks is a novel finding that suggests these methods “overfit” to the pathological tasks, and highlights the underlying difficulty of unsupervised OOD detection. See Appendix E for additional results and discussions. Overall, we believe it is remarkable that our dual threshold method so conclusively outperforms these baselines at both pathological and nonpathological tasks, despite them having access to additional help. We see these results as strong evidence supporting the understanding that we derived about the OOD paradox and its connection to local intrinsic dimension.
+
+The last row of Table 1 shows the performance of normalized autoencoders (NAEs) (Yoon et al., 2021). NAEs are EBMs specially tailored for OOD detection at the cost of generation quality, but to the best of our knowledge achieve state-of-the-art performance on fully unsupervised, likelihoodbased OOD detection. Once again, we believe that the empirical results of our dual threshold method are remarkable: we achieve similar performance to NAEs on most tasks, even outperforming them on three, despite using a general purpose model _pθ_ , not one explicitly designed for OOD detection.
+
+## 6 CONCLUSIONS, LIMITATIONS, AND FUTURE WORK
+
+In this paper we studied the OOD detection paradox, where likelihood-based DGMs assign high likelihoods to OOD points from “simpler” datasets, but do not generate them. We proposed an explanation of how the paradox can arise as a consequence of sharply peaked densities in OOD regions, thus assigning low probability mass to them. We connected this explanation to LID and proposed an efficient estimator of LID which we leveraged for our dual threshold OOD detection method, thus beating every method that used the same underlying NF model. While our ideas are widely applicable to any density model, the current incarnation of our method is limited in that it only applies to NFs, as estimating LID is more tractable for these models. Extending our methodology to other likelihood-based DGMs which map a Gaussian latent space through a readily available decoder, such as variational autoencoders or others (Brehmer & Cranmer, 2020; Caterini et al., 2021; Ross & Cresswell, 2021), can likely also work well with a similar Taylor expansion of the decoder. Nonetheless, we see extending our method to diffusion models, which achieve stateof-the-art performance for image synthesis, and to EBMs, which achieve state-of-the-art likelihoodbased OOD detection, to be particularly promising directions for future work.
+
+**Reproducibility Statement** To facilitate the reproducibility of our experiments we have provided a link to our anonymized codebase. It contains instructions on how to build an environment, and on how to run the code to repeat our experiments. Our methods are described in Section 4 and we have included pseudocode for the algorithms we propose in Algorithm 1. All necessary details of the experimental setup are given in Section 5 and Appendix D. All datasets we used are freely available for download from the cited sources and are used in accordance with any applicable licenses.
+
+9
+
+**Ethics Statement** We do not foresee any ethics concerns with the present research. The overarching topic, OOD detection, is widely used as a method to improve the reliability of machine learning models in critical settings. Our goal is to theoretically explain and empirically rectify issues that arise when using OOD detection with deep generative models, and does not promote the use of generative models for harmful applications.
+
+## REFERENCES
+
+- Mohammed Adnan, Shivam Kalra, Jesse C Cresswell, Graham W Taylor, and Hamid R Tizhoosh. Federated learning and differential privacy for medical image analysis. _Scientific Reports_ , 12(1): 1953, 2022.
+
+- Jonathan Bac, Evgeny M. Mirkes, Alexander N. Gorban, Ivan Tyukin, and Andrei Zinovyev. ScikitDimension: A Python Package for Intrinsic Dimension Estimation. _Entropy_ , 23(10):1368, Oct 2021. ISSN 1099-4300. doi: 10.3390/e23101368.
+
+- Jens Behrmann, Paul Vicol, Kuan-Chieh Wang, Roger Grosse, and J¨orn-Henrik Jacobsen. Understanding and mitigating exploding inverses in invertible neural networks. In _International Conference on Artificial Intelligence and Statistics_ , pp. 1792–1800. PMLR, 2021.
+
+- Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 35(8):1798–1828, 2013.
+
+- Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, Xin Zhang, Jake Zhao, and Karol Zieba. End to end learning for self-driving cars. _arXiv:1604.07316_ , 2016.
+
+- Johann Brehmer and Kyle Cranmer. Flows for simultaneous manifold learning and density estimation. In _Advances in Neural Information Processing Systems_ , volume 33, 2020.
+
+- Bradley CA Brown, Anthony L Caterini, Brendan Leigh Ross, Jesse C Cresswell, and Gabriel Loaiza-Ganem. Verifying the union of manifolds hypothesis for image data. In _International Conference on Learning Representations_ , 2023.
+
+- Anthony L Caterini and Gabriel Loaiza-Ganem. Entropic issues in likelihood-based OOD detection. In _I (Still) Can’t Believe It’s Not Better! Workshop at NeurIPS 2021_ , pp. 21–26. PMLR, 2022.
+
+- Anthony L Caterini, Gabriel Loaiza-Ganem, Geoff Pleiss, and John P Cunningham. Rectangular flows for manifold learning. _Advances in Neural Information Processing Systems_ , 34:30228– 30241, 2021.
+
+- Hyunsun Choi, Eric Jang, and Alexander A Alemi. WAIC, but Why? Generative ensembles for robust anomaly detection. _arXiv:1810.01392_ , 2018.
+
+- Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre Van Schaik. EMNIST: Extending MNIST to handwritten letters. In _2017 International Joint Jonference on Neural Networks_ , pp. 2921–2926. IEEE, 2017.
+
+- Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. _arXiv preprint arXiv:1605.08803_ , 2016.
+
+- Yilun Du and Igor Mordatch. Implicit generation and modeling with energy based models. In _Advances in Neural Information Processing Systems_ , volume 32, 2019.
+
+- Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios. Neural spline flows. In _Advances in neural information processing systems_ , volume 32, 2019.
+
+- Andre Esteva, Brett Kuprel, Roberto A Novoa, Justin Ko, Susan M Swetter, Helen M Blau, and Sebastian Thrun. Dermatologist-level classification of skin cancer with deep neural networks. _Nature_ , 542(7639):115–118, 2017.
+
+- Elena Facco, Maria d’Errico, Alex Rodriguez, and Alessandro Laio. Estimating the intrinsic dimension of datasets by a minimal neighborhood information. _Scientific Reports_ , 7(1):12140, 2017.
+
+10
+
+Keinosuke Fukunaga and David R Olsen. An algorithm for finding intrinsic dimensionality of data. _IEEE Transactions on computers_ , 100(2):176–183, 1971.
+
+- Tom Ginsberg, Zhongyuan Liang, and Rahul G Krishnan. A learning based hypothesis test for harmful covariate shift. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Nico G¨ornitz, Marius Kloft, Konrad Rieck, and Ulf Brefeld. Toward supervised anomaly detection. _Journal of Artificial Intelligence Research_ , 46:235–262, 2013.
+
+- Will Grathwohl, Kuan-Chieh Wang, Joern-Henrik Jacobsen, David Duvenaud, Mohammad Norouzi, and Kevin Swersky. Your classifier is secretly an energy based model and you should treat it like one. In _International Conference on Learning Representations_ , 2020.
+
+Jakob D Havtorn, Jes Frellsen, Søren Hauberg, and Lars Maaløe. Hierarchical VAEs know what they don’t know. In _International Conference on Machine Learning_ , pp. 4117–4128. PMLR, 2021.
+
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In _Advances in Neural Information Processing Systems_ , volume 33, pp. 6840–6851, 2020.
+
+- Kerstin Johnsson, Charlotte Soneson, and Magnus Fontes. Low bias local intrinsic dimension estimation from expected simplex skewness. _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 37(1):196–202, 2014.
+
+- Diederik P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In _Advances in Neural Information Processing Systems_ , volume 31, 2018.
+
+- Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In _International Conference on Learning Representations_ , 2014.
+
+- Polina Kirichenko, Pavel Izmailov, and Andrew G Wilson. Why normalizing flows fail to detect outof-distribution data. In _Advances in Neural Information Processing Systems_ , volume 33, 2020.
+
+- Andreas M Kist. CelebA Dataset cropped with Haar-Cascade face detector, October 2021. URL [URL removed]
+
+Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
+
+Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. _Science_ , 350(6266):1332–1338, 2015.
+
+Ya Le and Xuan Yang. Tiny ImageNet Visual Recognition Challenge. 2015.
+
+- Charline Le Lan and Laurent Dinh. Perfect density models cannot guarantee anomaly detection. _Entropy_ , 23(12):1690, 2021.
+
+- Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. _Proceedings of the IEEE_ , 86(11):2278–2324, 1998.
+
+- Elizaveta Levina and Peter Bickel. Maximum likelihood estimation of intrinsic dimension. In _Advances in Neural Information Processing Systems_ , volume 17, 2004.
+
+- Geert Litjens, Thijs Kooi, Babak Ehteshami Bejnordi, Arnaud Arindra Adiyoso Setio, Francesco Ciompi, Mohsen Ghafoorian, Jeroen Awm Van Der Laak, Bram Van Ginneken, and Clara I S´anchez. A survey on deep learning in medical image analysis. _Medical Image Analysis_ , 42: 60–88, 2017.
+
+- Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. In _Advances in Neural Information Processing Systems_ , volume 33, pp. 21464–21475, 2020.
+
+- Gabriel Loaiza-Ganem, Brendan Leigh Ross, Jesse C Cresswell, and Anthony L. Caterini. Diagnosing and fixing manifold overfitting in deep generative models. _Transactions on Machine Learning Research_ , 2022. ISSN 2835-8856.
+
+11
+
+Warren Morningstar, Cusuh Ham, Andrew Gallagher, Balaji Lakshminarayanan, Alex Alemi, and Joshua Dillon. Density of states estimation for out of distribution detection. In _International Conference on Artificial Intelligence and Statistics_ , pp. 3232–3240. PMLR, 2021.
+
+- Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do deep generative models know what they don’t know? In _International Conference on Learning Representations_ , 2019a.
+
+- Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, and Balaji Lakshminarayanan. Detecting outof-distribution inputs to deep generative models using typicality. _arXiv:1906.02994_ , 2019b.
+
+- Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In _NIPS Workshop on Deep Learning and Unsupervised Feature Learning_ , 2011.
+
+- Phil Pope, Chen Zhu, Ahmed Abdelkader, Micah Goldblum, and Tom Goldstein. The intrinsic dimension of images and its impact on learning. In _International Conference on Learning Representations_ , 2021.
+
+- Joaquin Qui˜nonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. _Dataset shift in machine learning_ . Mit Press, 2008.
+
+- Stephan Rabanser, Stephan G¨unnemann, and Zachary Lipton. Failing loudly: An empirical study of methods for detecting dataset shift. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Jie Ren, Peter J Liu, Emily Fertig, Jasper Snoek, Ryan Poplin, Mark Depristo, Joshua Dillon, and Balaji Lakshminarayanan. Likelihood ratios for out-of-distribution detection. In _Advances in Neural Information Processing Systems_ , volume 32, 2019.
+
+- Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In _Proceedings of the 31st International Conference on Machine Learning_ , volume 32, pp. 1278–1286, 2014.
+
+- Brendan Leigh Ross and Jesse C Cresswell. Tractable density estimation on learned manifolds with conformal embedding flows. In _Advances in Neural Information Processing Systems_ , volume 34, 2021.
+
+- Lukas Ruff, Robert A. Vandermeulen, Nico G¨ornitz, Alexander Binder, Emmanuel M¨uller, KlausRobert M¨uller, and Marius Kloft. Deep semi-supervised anomaly detection. In _International Conference on Learning Representations_ , 2020.
+
+- Saeed Saremi and Aapo Hyv¨arinen. Neural empirical bayes. _Journal of Machine Learning Research_ , 20(181):1–23, 2019.
+
+- Robin Schirrmeister, Yuxuan Zhou, Tonio Ball, and Dan Zhang. Understanding anomaly detection with deep invertible networks through hierarchies of distributions and features. In _Advances in Neural Information Processing Systems_ , volume 33, 2020.
+
+- Joan Serr`a, David Alvarez, Vicenc¸ G´omez, Olga Slizovskaia, Jos´e F. N´u˜nez, and Jordi Luque.[´] Input complexity and out-of-distribution detection with likelihood-based generative models. In _International Conference on Learning Representations_ , 2020.
+
+- Justin Sirignano and Rama Cont. Universal features of price formation in financial markets: Perspectives from deep learning. _Quantitative Finance_ , 19(9):1449–1459, 2019.
+
+- Jon Sneyers and Pieter Wuille. FLIF: Free lossless image format based on MANIAC compression. In _International Conference on Image Processing_ , pp. 66–70, 2016. doi: 10.1109/ICIP.2016. 7532320.
+
+- Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In _International Conference on Machine Learning_ , pp. 2256–2265. PMLR, 2015.
+
+12
+
+Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In _International Conference on Learning Representations_ , 2021.
+
+- Piotr Tempczyk, Rafał Michaluk, Lukasz Garncarek, Przemysław Spurek, Jacek Tabor, and Adam Golinski. LIDL: Local intrinsic dimension estimation using approximate likelihood. In _International Conference on Machine Learning_ , pp. 21205–21231. PMLR, 2022.
+
+Arash Vahdat and Jan Kautz. NVAE: A deep hierarchical variational autoencoder. In _Advances in Neural Information Processing Systems_ , volume 33, pp. 19667–19679, 2020.
+
+Sven-Ake Wegner. Lecture notes on high-dimensional data. _arXiv:2101.05841_ , 2021.
+
+- Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In _International Conference on Machine Learning_ , pp. 23631–23644. PMLR, 2022.
+
+- Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms. _arXiv:1708.07747_ , 2017.
+
+Jianwen Xie, Yang Lu, Song-Chun Zhu, and Yingnian Wu. A theory of generative convnet. In _International Conference on Machine Learning_ , pp. 2635–2644. PMLR, 2016.
+
+- Sangwoong Yoon, Yung-Kyun Noh, and Frank Park. Autoencoding under normalization constraints. In _International Conference on Machine Learning_ , pp. 12087–12097. PMLR, 2021.
+
+- Lily Zhang, Mark Goldstein, and Rajesh Ranganath. Understanding failures in out-of-distribution detection with deep generative models. In _International Conference on Machine Learning_ , pp. 12427–12436. PMLR, 2021.
+
+13
+
+**==> picture [191 x 74] intentionally omitted <==**
+
+**==> picture [191 x 73] intentionally omitted <==**
+
+**==> picture [397 x 97] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) EMNIST-trained model vs MNIST and Omniglot (b) Omniglot-trained model vs FMNIST and EMNIST (c) Tiny-trained model vs SVHN (d) CelebA-trained model vs SVHN (e) CIFAR100-trained model vs CelebA **----- End of picture text -----**
+
+Figure 6: Extra Likelihood Pathologies Overview: (a) A model trained on the EMNIST dataset yields marginally lower likelihoods for its in-distribution data than for OOD data from Omniglot and strikingly low likelihoods on its generated samples. (b) An Omniglot-trained model displays low likelihoods for its own generated samples. (c-e) Additional pathologies among our RGB dataset pairs: Tiny ImageNet (vs) SVHN, CelebA (vs) SVHN, and CIFAR100 (vs) CelebA.
+
+## A DIAGNOSING PATHOLOGIES IN FLOW MODELS
+
+In this section we list the full extent of the pathologies we identified in our experiments. The first class is the standard one, in which NFs assign equal or higher likelihoods to out-of-distribution data than the distribution of the data they were trained on. In addition to Figure 2, which shows that FMNIST (vs) MNIST, CIFAR-10 (vs) SVHN, CIFAR10 (vs) CelebA, and CIFAR100 (vs) SVHN are pathological, Figure 6 depicts pathological behaviour for EMNIST (vs) MNIST, EMNIST (vs) Omniglot, Tiny (vs) SVHN, CelebA (vs) SVHN, and CIFAR100 (vs) CelebA.
+
+Moreover, since models may not be perfectly fit, the likelihoods obtained for generated samples may not align with those of the test split of the in-distribution data. To demonstrate this phenomenon, we visualize the likelihoods of generated samples in Figure 2 and Figure 6. Notably, these likelihoods are almost always smaller than the in-distribution samples; this is a new, second class of pathologies. This difference is especially evident in greyscale models like FMNIST, MNIST, EMNIST, and Omniglot. Here, generated samples consistently show lower likelihoods than both in-distribution _and OOD data_ points, as seen in Figure 2a, Figure 2b, Figure 6a, and Figure 6b respectively. Some of these cases, such as MNIST- and Omniglot-trained models were previously thought to be nonpathological (Nalisnick et al., 2019a). This adds to the unexplained phenomena of likelihood-based DGMs for OOD detection.
+
+14
+
+## B COMPUTATIONAL INTRACTABILITY OF PROBABILITY MASSES
+
+As mentioned in the main text, one could try to approximate the probability in Equation 4. A natural solution would be a Monte Carlo estimator:
+
+**==> picture [383 x 28] intentionally omitted <==**
+
+where **x**[(] _[i]_[)] _∼U_ ( _·_ ; _BR_ ). Note that vol( _BR_ ( **x** 0)) admits a closed-form formula. Na¨ıvely computing the above estimator is numerically unstable, but at the cost of some bias, log P _θ_ ( **x** _∈ BR_ ( **x** 0)) can be approximated instead by using the logsumexp function, since we can evaluate log _pθ_ ( **x** ). In Figure 7 we show these estimates for a model trained on FMNIST over a range of small radii. Unlike log P _θ_ ( **x** _∈ BR_ ( **x** 0)), the estimated values are _not_ non-decreasing in _R_ , both for in- and outof-distribution data: this highlights that these estimates are completely unreliable. While we believe Markov Chain Monte Carlo methods are a promising avenue towards more accurately approximating these probabilities, we leave such explorations for future work.
+
+**==> picture [198 x 157] intentionally omitted <==**
+
+Figure 7: The trend of the average estimated log P _θ_ ( **x** _∈ BR_ ( **x** 0)) for MNIST and FMNIST on an FMNIST-trained NF.
+
+15
+
+**==> picture [179 x 108] intentionally omitted <==**
+
+**==> picture [179 x 108] intentionally omitted <==**
+
+**==> picture [396 x 138] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Convolution of the first mode (b) Convolution of the second mode (c) Convolution of the third mode (d) Convolution of the fourth mode **----- End of picture text -----**
+
+Figure 8: The estimated convolution log _ρr_ ( **x** _i_ ) for different modes of a mixture of Gaussians.
+
+## C ON THE QUALITY OF THE LINEAR APPROXIMATION
+
+In this section, we assess the accuracy of the approximation _ρ_ ˆ _r_ , as introduced in subsection 4.1.
+
+## C.1 EMPIRICAL RESULTS
+
+To empirically evaluate our approximation log ˆ _ρr_ , we experiment on a synthetic dataset. Our experiment shows that log ˆ _ρr_ accurately represents log _ρr_ , the logarithm of a Gaussian convolved with the model’s density, on this dataset.
+
+First, we generated an 800-dimensional dataset from a mixture of four Gaussians with different means and covariances. After training an RQ-NSF on 70,000 samples of this distribution, we obtain a model _pθ_ that fits this mixture of Gaussians well. The modes of the distribution are set far apart and their componentwise covariance matrices are set so that there is minimal overlap between them; this setting allows us to derive an analytical expression to accurately approximate the density around each mode as follows. If _ci_ is the probability of a sample belonging to the _i_ th component with[�] _i[c][i]_[= 1][,] and **x** _i_ and **A** _i_ represent the mean and covariance matrix of the _i_ th component, respectively, then the density at each mode can be approximated by ignoring the other components:
+
+**==> picture [362 x 25] intentionally omitted <==**
+
+Therefore, comparing our estimator inspired by the Taylor expansion with the value obtained above provides us with a way to validate the quality of our estimator for log _ρr_ . Figure 8 (a-d) shows the estimated log ˆ _ρr_ for every mode vis-`a-vis the accurate value obtained analytically from the above equation as _r_ increases. This comparison confirms that these estimators can be accurate approximations, even for high dimensional data.
+
+## C.2 THEORETICAL BOUNDS
+
+In addition to the empirical analysis, we mathematically evaluate the accuracy of our approximation by establishing error bounds. To advance our discussion, we first introduce two key mathematical operators essential for deriving these bounds.
+
+16
+
+**Definition C.1.** For positive scalars _σ_ and _δ_ , the _constrained Gaussian convolution operator ϕ[δ] σ_[:] _F →F_ on the family of smooth functions _F_ mapping from R _[d]_ to R[+] takes in an arbitrary function _h_ and outputs _g_ as follows:
+
+**==> picture [327 x 26] intentionally omitted <==**
+
+Here, the integral is on the _ℓ_ 2 ball of radius _σ · δ_ . The _unconstrained Gaussian convolution operator_ is also defined similarly with the exception that the integration is over the complement of the ball:
+
+**==> picture [334 x 25] intentionally omitted <==**
+
+Note that _ϕ[δ] σ_[+] _[ϕ]_[¯] _[δ] σ_[results in the normal convolution operator, and when the input of the operator is] the density function _pθ_ , we have that _ρr_ ( **x** 0) = _ϕ[δ] σ_[(] _[p][θ]_[)(] **[x]**[0][) +] _[ϕ]_[¯] _[δ] σ_[(] _[p][θ]_[)(] **[x]**[0][)][for] _[σ]_[=] _[e][r]_[and][any] _[δ]_[.] Now we will provide an upper bound for the unconstrained convolution operator which will help us provide a global error margin for _ρ_ ˆ _r_ ( **x** 0):
+
+**Lemma C.1.** _Given a bounded function h_ : R _[d] →_ R[+] _where M_ := sup **x** _∈_ R _d_ ( _h_ ( **x** )) _, we have that_
+
+**==> picture [277 x 22] intentionally omitted <==**
+
+_when δ > d._
+
+_Proof._
+
+**==> picture [366 x 79] intentionally omitted <==**
+
+where _χ_[2] _d_[denotes a Chi-squared random variable with] _[ d]_[ degrees of freedom.][The last inequality is] a well-known Chernoff bound on the survival function of the Chi-squared distribution.
+
+Given an NF with a diffeomorphic mapping _fθ_ , a high-quality local approximation to _fθ_ around **x** 0 would result in a high-quality approximation of _pθ_ via the change of variables formula. Now we will present error bounds for our core estimator _ρ_ ˆ _r_ ( **x** 0).
+
+**Theorem C.2.** _Assume R specifies a region in which an approximation p_ ˆ _θ is accurate up to a small error margin: ∀_ **x** _∈ BR_ ( **x** 0) : _|p_ ˆ _θ_ ( **x** ) _− pθ_ ( **x** ) _| ≤ e_ ( _R_ ) _. If M[′]_ := sup **x** _∈supp_ ( _pθ_ )( _|pθ_ ( **x** ) _− p_ ˆ _θ_ ( **x** ) _|_ ) ˆ _is finite and e[r]_ = _σ < R/d, then the total error between ρr_ ( **x** 0) _and ρr_ ( **x** 0) _is bounded as follows:_
+
+**==> picture [300 x 28] intentionally omitted <==**
+
+_Proof._
+
+**==> picture [377 x 67] intentionally omitted <==**
+
+Therefore, for a sufficiently small _σ_ (translating to a sufficiently negative _r_ ) the total error bound of _ρ_ ˆ _r_ is as small as the bound _e_ ( _R_ ) obtained from the linearization. This analysis demonstrates that even though _ρr_ ( **x** 0) concerns taking a convolution over the entire support of _pθ_ , a high-quality local approximation of the density directly yields a high-quality approximation _ρ_ ˆ _r_ ( **x** 0).
+
+17
+
+## D EXPERIMENTAL DETAILS AND ADDITIONAL EXPERIMENTS
+
+## D.1 DETAILS OF LID ESTIMATION
+
+As mentioned in Section 4, our dual threshold method requires setting hyperparmeters. Here we describe how to set _r_ . Na¨ıvely, we could pick an arbitrary, negative enough value, but we found this does not work well across datasets as the results can be sensitive to the choice of _r_ . Figure 9 shows the issue: setting the parame(a) Fixed scale _r_ = _−_ 20 (b) Fixed scale _r_ = _−_ 7 ter this way will not properly detect the lower LID of SVHN with respect Figure 9: LID estimates, _∂r∂_[log ˆ] _[ρ][r]_[(] **[x]**[0][)][for][in-distribution][(CI-] to a model _pθ_ trained on CIFAR10. FAR10) and OOD data (SVHN): (a) at very negative value, LID A way to intuitively understand why estimates for both datasets overlap and are close to _d_ ; (b) at a larger the choice of _r_ matters is that it corvalue, OOD datapoints exhibit notably smaller LID estimates. responds to the scale at which intrinsic dimension is assessed. Viewed at a small enough scale, a density will appear to imply a large intrinsic dimension, whereas, from a large enough scale, the entire local peak will appear to be a point. The goal here is to choose the best scale from which to differentiate OOD from in-distribution points. We note that this explanation is also why Tempczyk et al. (2022) use several noise scales.
+
+One sensible way of setting _r_ is to calibrate it based on another model-free estimator of LID using the training data. In particular, we perform local principal component analysis (LPCA) which is a model-free method for LID estimation. LPCA is similar to our estimator in that it uses the concept of local linearizations. We use the scikit-dimension (Bac et al., 2021) implementation and use the algorithm introduced by Fukunaga & Olsen (1971) with alphaFO set to 0 _._ 001 to estimate the average LID of our training data. Then _r_ is set so that LID _θ_ estimates of the training dataset match the LPCA average.
+
+To increase efficiency, we select a random set of 80 data points from our training set as representative samples. We then employ a binary search to fine-tune _r_ . During each iteration of the binary search, we compare the average LID _θ_ of our subsamples with the intrinsic dimension determined by LPCA. If the average LID _θ_ is lower, we increase _r_ ; otherwise, we decrease it. We initially set _r_ ’s binary search range between _−_ 20 and 20, representing a wide range of plausible scales. Binary search is then executed in 20 steps to accurately ascertain a value of _r_ . Table 2 represents three distinct scenarios to assess how to set _r_ optimally. In the first two rows, _r_ is held constant, while in the third, _r_ is dynamically adjusted based on the above approach. Although there is a minor performance drop in the FMNIST (vs) MNIST comparison, this is offset by a notable enhancement in the CIFAR10 (vs) SVHN case. This significant improvement justifies our preference for the adaptive method.
+
+Table 2: Ablation study for the choice of _r_ evaluating on ROC-AUC (higher is better).
+
+||FMNIST (vs) MNIST MNIST (vs) FMNIST CIFAR10 (vs) SVHN SVHN (vs) CIFAR10|
+|---|---|
+|||
+|_r_ =_−_20 _r_ =_−_10 Adaptive scaling|**0**_._ 1_._000 0_._730 **0**_._ 0_._957 1_._000 0_._737 0_._991 0_._953 1_._000 **0**_._ 0_._986|
+
+18
+
+Table 3: Essential hyperparameter settings for the normalizing flow models.
+
+|Property|Model Confguration|
+|---|---|
+|Learning rate|1_×_10_−_3|
+|Gradient Clipping|Value based (max =1_._0)|
+|Scheduler|ExponentialLR(with a factor of0_._99)|
+|Optimizer|AdamW|
+|Weight decay|5_×_10_−_5|
+|Batch size|128|
+|Epochs|400|
+|Transform blocks|Actnorm_→_(1_×_1)Convolution_→_Coupling|
+|Number of multiscale levels|7levels|
+|Coupling layer backbone|ResNet (channel size= 64, # blocks =2, dropout =0_._2)|
+|Masking scheme|Checkerboard|
+|Latent Space|Standard isotropic Gaussian|
+|Data pre-processing|Dequantization & Logit scaling|
+|Data shape|28_×_28_×_1for grayscale and32_×_32_×_3for RGB|
+
+## D.2 HYPERPARAMETER SETTING FOR NORMALIZING FLOWS
+
+We trained both Glow (Kingma & Dhariwal, 2018) and RQ-NSFs (Durkan et al., 2019) on our datasets, with the hyperparameters detailed in Table 3. Specifically, while Glow utilized an affine coupling layer, we adopted RQ-NSF’s piecewise rational quadratic coupling with two bins and linear tails capped at 1. In Figure 11 and Figure 12, we highlight the Glow architecture’s failure cases. The artifacts, particularly in CelebA, Tiny ImageNet, and Omniglot samples, stem from the affine coupling layers’ unfavourable numerical properties. In contrast, the RQ-NSF architectures showed no such issues, leading us to adopt them for subsequent experiments.
+
+In the context of OOD detection, expressive architectures sometimes face issues of numerical noninvertibility and exploding inverses, particularly with OOD samples. Behrmann et al. (2021) argue that while expressive NFs adeptly fit data manifolds, their mapping from a full-dimensional space to a lower-dimensional one can cause non-invertibility, especially in OOD datapoints. They specifically identified non-invertibility examples in Glow models on OOD data. Contrarily, the RQ-NSFs we trained according to the hyperparameter setup in Table 3 demonstrated full reconstruction on OOD data, as depicted in Figure 10. This is another reason why we chose RQ-NSFs.
+
+We used an NVIDIA Tesla V100 SXM2 with 7 hours of GPU time to train each of the models.
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [396 x 16] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Original samples from the test (b) Reconstructed samples from (c) Original samples from the (d) Reconstructed samples from split. the test split. OOD dataset. the OOD dataset. **----- End of picture text -----**
+
+Figure 10: Numerical invertibility: (a-b) A random batch of samples and their reconstructions from the test split of an RQ-NSF model trained on CelebA. (c-d) A random batch of samples and their reconstructions from the OOD dataset, SVHN.
+
+19
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [97 x 96] intentionally omitted <==**
+
+**==> picture [396 x 15] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Glow model trained on (b) Glow model trained on FM- (c) Glow model trained on Om- (d) Glow model trained on EM- MNIST. NIST. niglot. NIST. **----- End of picture text -----**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [97 x 96] intentionally omitted <==**
+
+**==> picture [396 x 15] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(e) RQ-NSF model trained on (f) RQ-NSF model trained on FM- (g) RQ-NSF model trained on (h) RQ-NSF model trained on MNIST. NIST. Omniglot. EMNIST. **----- End of picture text -----**
+
+Figure 11: Samples generated from models trained on the grayscale collection: due to numerical properties of affine coupling layers, Glow models tend to produce artifacts in their generated data.
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [396 x 15] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Glow model trained on (b) Glow model trained on CI- (c) Glow model trained on (d) Glow model trained on Tiny SVHN. FAR10. CelebA. ImageNet. **----- End of picture text -----**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [396 x 15] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(e) RQ-NSF model trained on (f) RQ-NSF model trained on CI- (g) RQ-NSF model trained on (h) RQ-NSF model trained on SVHN. FAR10. CelebA. Tiny ImageNet. **----- End of picture text -----**
+
+Figure 12: Samples generated from models trained on the RGB collection: the artifacts in Glow models are apparent.
+
+20
+
+## D.3 INTRINSIC DIMENSION VS LIKELIHOOD SCATTERPLOTS
+
+In this section, we introduce scatterplots analogous to those in Figure 4 that illustrate results for various tasks. As emphasized previously, we consistently observe that LID estimates for pathological OOD data points are generally lower than the in-distribution data. This confirms our hypothesis suggesting that these points are situated on a lower dimensional submanifold that is assigned minimal probability mass. This behaviour is evident across all figures in this section that exhibit pathological likelihoods. Examples include MNIST-gen (vs) FMNIST and Omniglot-gen (vs) EMNIST on the right, and all the figures on the left. Conversely, in non-pathological scenarios (shown on the right), OOD data points are generally assigned lower likelihoods. Our dual thresholding approach effectively identifies both scenarios by simultaneously setting thresholds on both log _pθ_ ( **x** 0) and LID _θ_ ( **x** 0). Results are shown in Figure 13, Figure 14, Figure 15, and Figure 16.
+
+**==> picture [185 x 185] intentionally omitted <==**
+
+**==> picture [185 x 185] intentionally omitted <==**
+
+Figure 13: Visualization of LID estimates using adaptive scaling and likelihoods per datum where the _x_ - axis represents LID _θ_ ( **x** 0) and the _y_ -axis represents log _pθ_ ( **x** 0). **Left:** Scatterplots for the pathological OOD detection tasks “FMNIST (vs) MNIST” and “FMNIST-gen (vs) MNIST”. **Right:** Scatterplots for the nonpathological OOD detection tasks “MNIST (vs) FMNIST” and “MNIST-gen (vs) FMNIST”.
+
+**==> picture [185 x 185] intentionally omitted <==**
+
+**==> picture [184 x 185] intentionally omitted <==**
+
+Figure 14: Visualization of LID estimates using adaptive scaling and likelihoods per datum where the _x_ - axis represents LID _θ_ ( **x** 0) and the _y_ -axis represents log _pθ_ ( **x** 0). **Left:** Scatterplots for the pathological OOD detection tasks “EMNIST (vs) Omniglot” and “EMNIST-gen (vs) Omniglot”. **Right:** Scatterplots for the nonpathological OOD detection tasks “Omniglot (vs) EMNIST” and “Omniglot-gen (vs) EMNIST”.
+
+21
+
+**==> picture [185 x 185] intentionally omitted <==**
+
+**==> picture [185 x 186] intentionally omitted <==**
+
+Figure 15: Visualization of LID estimates using adaptive scaling and likelihoods per datum where the _x_ - axis represents LID _θ_ ( **x** 0) and the _y_ -axis represents log _pθ_ ( **x** 0). **Left:** Scatterplots for the pathological OOD detection tasks “CIFAR10 (vs) SVHN” and “CIFAR10-gen (vs) SVHN”. **Right:** Scatterplots for the nonpathological OOD detection tasks “SVHN (vs) CIFAR10” and “SVHN-gen (vs) CIFAR10”
+
+**==> picture [185 x 186] intentionally omitted <==**
+
+**==> picture [185 x 186] intentionally omitted <==**
+
+Figure 16: Visualization of LID estimates using adaptive scaling and likelihoods per datum where the _x_ - axis represents LID _θ_ ( **x** 0) and the _y_ -axis represents log _pθ_ ( **x** 0). **Left:** Scatterplots for the pathological OOD detection tasks “CIFAR10 (vs) CelebA” and “CIFAR10-gen (vs) CelebA”. **Right:** Scatterplots for the nonpathological OOD detection tasks “CelebA (vs) CIFAR10” and “CelebA-gen (vs) CIFAR10”.
+
+22
+
+Table 4: ROC-AUC (higher is better) at A-gen (vs) B tasks. **Notation** : _[∗]_ tasks where likelihoods alone do not exhibit pathological behaviour, _‡_ methods that employ external information or auxiliary models. For each task, we bold the best performing model.
+
+|Trained on OOD Dataset|MNIST _∗_ FMNIST Omniglot|FMNIST MNIST Omniglot|CIFAR10 SVHN CelebA|SVHN _∗_|
+|---|---|---|---|---|
+|||||CIFAR10 CelebA|
+|Na¨ıve Likelihoodlog_pθ_(**x**0) _∥∂_ _∂_**x** log_pθ_(**x**0)_∥_2 Complexity Correction_‡_ Likelihood Ratios_‡_ Dual Threshold (Ours)|0_._004 0_._000 0_._997 0_._997 0_._026 0_._000 0_._998 **1**_._ **0**_._ **1**_._|0_._040 0_._000 0_._993 0_._993 0_._044 0_._001 **1**_._ **1**_._ **1**_._ 0_._996|0_._025 0_._240 0_._712 0_._379 0_._678 0_._243 0_._299 0_._396 **0**_._ **0**_._|0_._971 **0**_._ 0_._195 0_._077 0_._714 0_._451 0_._302 0_._099 **0**_._ **0**_._|
+
+## D.4 ADDITIONAL AUC RESULTS
+
+Table 4 compares methods by seeing how well they can differentiate between generated samples from _pθ_ and OOD data. Overall, our dual threshold method performs consistently well across tasks.
+
+Table 5 compares na¨ıve likelihoods against our dual threshold method across all tasks. We can see an extremely consistent improvement, highlighting the relevance of dual thresholding.
+
+## D.5 EXTRA ABLATIONS
+
+Throughout our paper, we have argued in favour of our dual threshold method, which combines likelihoods and LID estimates. To highlight that our strong performance is not just based on dual thresholding itself, we carry out an ablation where we use dual thresholding, but on likelihood and gradient norm _∥ ∂[∂]_ **x**[log] _[ p][θ]_[(] **[x]**[0][)] _[∥]_[2][pairs.][Table][6][shows][the][results,][highlighting][that][LID][estimates] are much more useful. The table also shows that using single thresholds with LID estimates is also not enough to reliably detect OOD points.
+
+23
+
+Table 5: ROC-AUC (higher is better) using likelihoods only, compared to dual thresholds. The top part of the table contains greyscale tasks, and the bottom contains RGB tasks. Values are bolded when there is at least a 20% improvement from dual thresholding over likelihoods alone.
+
+|OOD Task Type Dataset Pair _A_(and)_B_|_A_-gen (vs)_B_ _§_ (AUC-ROC) Na¨ıve Likelihood (AUC-ROC) Dual Threshold|_A_(vs)_B_ _†_ (AUC-ROC) Na¨ıve Likelihood (AUC-ROC) Dual Threshold|
+|---|---|---|
+|EMNIST (and) MNIST EMNIST (and) Omniglot EMNIST (and) FMNIST Omniglot (and) MNIST Omniglot (and) EMNIST Omniglot (and) FMNIST FMNIST (and) MNIST FMNIST (and) EMNIST FMNIST (and) Omniglot MNIST (and) EMNIST MNIST (and) Omniglot MNIST (and) FMNIST|**0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **1**_._ **0**_._ **1**_._ **0**_._ **0**_._|**0**_._ **0**_._ **0**_._ **0**_._ 0_._998 0_._998 1_._000 1_._000 0_._983 0_._983 1_._000 1_._000 **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ 0_._985 0_._985 **0**_._ **0**_._ 1_._000 1_._000|
+|CelebA (and) Tiny CelebA (and) SVHN CelebA (and) CIFAR100 CelebA (and) CIFAR10 Tiny (and) CelebA Tiny (and) SVHN Tiny (and) CIFAR100 Tiny (and) CIFAR10 SVHN (and) CelebA SVHN (and) Tiny SVHN (and) CIFAR100 SVHN (and) CIFAR10 CIFAR100 (and) CelebA CIFAR100 (and) Tiny CIFAR100 (and) SVHN CIFAR100 (and) CIFAR10 CIFAR10 (and) CelebA CIFAR10 (and) Tiny CIFAR10 (and) SVHN CIFAR10 (and) CIFAR100|0_._933 0_._965 **0**_._ **0**_._ 0_._946 0_._967 0_._944 0_._965 0_._640 0_._646 **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ 0_._984 0_._984 0_._971 0_._971 0_._970 0_._970 0_._970 0_._970 **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._ **0**_._|0_._905 0_._936 **0**_._ **0**_._ 0_._919 0_._941 0_._915 0_._935 0_._812 0_._812 **0**_._ **0**_._ 0_._796 0_._822 0_._802 0_._825 0_._995 0_._995 0_._987 0_._987 0_._987 0_._987 0_._986 0_._986 **0**_._ **0**_._ 0_._485 0_._493 **0**_._ **0**_._ 0_._492 0_._502 **0**_._ **0**_._ 0_._543 0_._548 **0**_._ **0**_._ 0_._518 0_._561|
+
+Table 6: Ablation study for the dual thresholding method on ROC-AUC (higher is better).
+
+|Method|FMNIST (vs) MNIST MNIST (vs) FMNIST CIFAR10 (vs) SVHN SVHN (vs) CIFAR10|
+|---|---|
+|||
+|LID_θ_(**x**0) _∥∂_ _∂_**x** log_pθ_(**x**0)_∥_2+ log_pθ_(**x**) LID_θ_(**x**0) + log_pθ_(**x**)(Ours)|0_._947 0_._002 0_._949 0_._009 0_._509 0_._983 0_._716 0_._962 **0**_._ **1**_._ **0**_._ **0**_._|
+
+24
+
+## E CRITICAL ANALYSIS OF OOD BASELINES
+
+As we outlined in Section 5, when benchmarking against the complexity correction and likelihood ratio methods, we observed notable underperformance in non-pathological directions. Both methods aim to correct inflated likelihoods encountered in pathological OOD scenarios by assigning a score to each datapoint which is obtained by adding a complexity term to the likelihood (Serr`a et al., 2020), or subtracting a reference likelihood obtained from a model trained on augmented data (Ren et al., 2019). This score then becomes the foundation for their OOD detection through single thresholding. However, as we will demonstrate in this section, these techniques often necessitate an artificial hyperparameter setup to combine these metrics together, making it less than ideal.
+
+Formally, both of these studies aim to find a score _S_ ( **x** 0) to correct the inflated likelihood term log _pθ_ ( **x** 0), by adding a metric to _m_ ( **x** 0) as follows:
+
+**==> picture [267 x 11] intentionally omitted <==**
+
+In Serr`a et al. (2020), _λ_ = 1 and _m_ ( **x** 0) is the bit count derived by compressing **x** 0 using three distinct image compression algorithms and selecting the least bit count from the trio (an ensemble approach as they describe). The algorithms include standard cv2, PNG, JPEG2000, and FLIF (Sneyers & Wuille, 2016). Moreover, we did not find any official implementation for the complexity correction method; however, since their algorithm was fairly straightforward, we re-implemented it according to their paper and it is readily reproducible in our experiments. On the other hand, Ren et al. (2019) propose training a reference likelihood model with the same architecture as the original model; however, on perturbed data. We employ another RQ-NSF, samples of which are depicted in the bottom row of Figure 17. Ren et al. (2019) claim that their reference model only learns background statistics that are unimportant to the semantics we care for in OOD detection; hence, subtracting the reference likelihood _m_ ( **x** 0) can effectively correct for these confounding statistics that potentially inflate our original likelihoods. That being said, they employ a complicated hyperparameter tuning process on _λ_ to ensure best model performance.
+
+As illustrated in Figure 18, we sweep values of _λ_ and compare our method against all these models. While certain _λ_ values enhance OOD detection in pathological scenarios, they falter in nonpathological contexts. In contrast, our dual thresholding remains robust irrespective of the scenario’s nature. This observation underscores a significant gap in the OOD detection literature. While several methods address the OOD detection pathologies, many are overly specialized, performing well predominantly in the pathological direction. We note that the results we report in Table 1 correspond to the best values of _λ_ .
+
+25
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+(a) Samples from RQ-NSF model trained on CIFAR10.
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 14] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(b) Samples from RQ-NSF model trained on SVHN. **----- End of picture text -----**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [97 x 96] intentionally omitted <==**
+
+(c) Samples from RQ-NSF model (d) Samples from RQ-NSF model trained on FMNIST. trained on MNIST.
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [96 x 96] intentionally omitted <==**
+
+**==> picture [97 x 96] intentionally omitted <==**
+
+(e) Samples from background (f) Samples from background (g) Samples from background (h) Samples from background model trained on CIFAR10. model trained on SVHN. model trained on FMNIST. model trained on MNIST.
+
+Figure 17: Samples generated from normal and background models that are trained using the RQ-NSF hyperparameters provided in Table 3. The background models are trained on perturbed data, using the scheme presented by Ren et al. (2019).
+
+**==> picture [195 x 113] intentionally omitted <==**
+
+(a) Performance comparison of different methods on two pathological and non-pathological OOD detection tasks obtained from the FMNIST and MNIST pair.
+
+**==> picture [196 x 113] intentionally omitted <==**
+
+(b) Performance comparison of different methods on two pathological and non-pathological OOD detection tasks obtained from the CIFAR10 and SVHN pair.
+
+Figure 18: Comparing our dual thresholding approach of combining metrics to all the different single score thresholding baselines by sweeping over different values of _λ_ in Equation 12. The tasks that are considered are either: (i) pathological such as “FMNIST (vs) MNIST” (left) or “CIFAR10 (vs) SVHN” (right); or (ii) non-pathological such as “MNIST (vs) FMNIST” (left) or “SVHN (vs) CIFAR10” (right).
+
+26
+
diff --git a/open_review/iclr2024_8544.json b/open_review/iclr2024_8544.json
new file mode 100644
index 0000000000000000000000000000000000000000..9a918709d3d8c8ca14fdad6839f91725f8e21d41
--- /dev/null
+++ b/open_review/iclr2024_8544.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8544",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Finite-Time Analysis of On-Policy Heterogeneous Federated Reinforcement Learning",
+ "abstract": "Federated reinforcement learning (FRL) has emerged as a promising paradigm for reducing the sample complexity of reinforcement learning tasks by exploiting information from different agents. However, when each agent interacts with a potentially different environment, little to nothing is known theoretically about the non-asymptotic performance of FRL algorithms. The lack of such results can be attributed to various technical challenges and their intricate interplay: Markovian sampling, linear function approximation, multiple local updates to save communication, heterogeneity in the reward functions and transition kernels of the agents' MDPs, and continuous state-action spaces. Moreover, in the on-policy setting, the behavior policies vary with time, further complicating the analysis. In response, we introduce FedSARSA, a novel federated on-policy reinforcement learning scheme, equipped with linear function approximation, to address these challenges and provide a comprehensive finite-time error analysis. Notably, we establish that FedSARSA converges to a policy that is near-optimal for all agents, with the extent of near-optimality proportional to the level of heterogeneity. Furthermore, we prove that FedSARSA leverages agent collaboration to enable linear speedups as the number of agents increases, which holds for both fixed and adaptive step-size configurations.",
+ "rebuttal": "### Following-up\nWe kindly ask the reviewer if any of their concerns remain, and if so, what in particular?\n\n### General Response\nWe would like to thank the reviewers for their valuable and insightful comments on our work. \nWe are happy with the overall positive feedback regarding clarity of presentation, novel contribution, and intuitive explanations of the attained speedup versus heterogeneity trade-off.\n\nIn what follows, we summarize our responses to each of the main comments. We also point out the changes we have made to our paper in response to these comments.\n\n- **Reviewer rA2b**: We have explained the source of the linear speedup. Furthermore, in the revised paper, we have now added a new sect [...]\n\n### Reconsider Score?\nDear Reviewer qewk,\n\nWe are glad to know that our responses have helped provide more insights. We were wondering if we have managed to address all your concerns. If so, would you be willing to reconsider your score?\n\nShould there be any remaining concerns, we are more than happy to discuss further. We thank you again for your constructive comments and suggestions.\n\n### Response to Reviewer pmTu\nDear Reviewer pmTu,\n\nWe thank your for the detailed review and positive feedback. Below we provide the responses clarifying the questions:\n\n> **W1. What does MSE in the numerical experiments stand for? Does it mean the averaged MSE of current parameter to optimal parameters in different environments?**\n\nWe deferred the detailed simulation setup to Appendix C.\nIn the second paragraph of Appendix C.1 (ADDITIONAL SIMULATIONS FOR FEDSARSA), we defined our MSE: the mean squared error of the current *averaged* parameter $\\bar{\\theta}\\_t$ to the *reference* parameter $\\t [...]\n\n### Response to Reviewer pmTu [Continued]\n> **W3. The convergence MSE of FedSARSA with different number of agents are different from each other. What makes that difference?**\n\nThe fact that the MSE of FedSARSA is different with a different number of agents is, in fact, to be expected. The reason for this is as follows. Our simulations are run with a constant step-size. As Corollary 2.1 reveals, in this case, the effect of the linear speedup shows up in tightening the size of the ball (roughly by a factor of $1/N$) to which the iterates converge. Thus, with a larger number of agents, we expect [...]\n\n### Response to Reviewer pmTu [Continued]\n> **W2. The explanation of numerical experiments is not enough. For example, why the MSE of FedSARSA with a large number of $N$ ($N=40$) increase along the training process when $\\epsilon _{p}>0,\\epsilon _{r}>0$? And where is the confidence bound for the numerical experiments?**\n\nWe thank the Reviewer for their constructive suggestions. In the revised paper, we have now re-plotted all the graphs with 95\\% confidence regions.\nRegarding the non-monotonic behavior of the MSE, we have the following explanation.\nOur theoretical analysis considers the expect [...]\n\n### Response to Reviewer qewk\nDear Reviewer qewk,\n\nThank you for your review and constructive suggestions. Regarding the weaknesses and questions, we provide the following detailed responses:\n\n> **W1. & W2. The theoretical results do not have the impact of periodic updating. The authors do not specify the communication cost and how it trades off with the convergence.**\n\nThank you for raising the points about the effects of periodic synchronization, and the trade-offs between convergence and communication cost. In what follows, we explain that the effect of periodic synchronization—as captured [...]\n\n### Response to Reviewer qewk [Continued]\n> **Q2. I don't see the linear speedup in the simulation results?**\n\nOur simulations are run with a constant-step size. As Corollary 2.1 reveals, in this case, the effect of the linear speedup shows up in tightening the size of the ball (roughly by a factor of $1/N$) to which the iterates converge. **Figure 1 does in fact show that increasing the number of agents causes the error-floor (i.e., the height of the flat line) to decrease.** The decrease is only approximately linear since the error-floor is also affected by heterogeneity.\n\n### Response to Reviewer qewk [Continued]\n> **Q1. The motivation is unclear to me -- why do we want to learn a single universal policy? Each agent may interact with his/her own environment and learn a personalized policy for that environment. Isn't that better to be deployed on that environment than the single averaged policy across all environments?**\n\nWe note that the Reviewer's question also applies to federated supervised learning: why learn a common model if the agents' data distributions are very different? The rationale here - as in our work - is that if the agents' distributions (MDPs [...]\n\n### Response to Reviewer qewk [Continued]\n> **W5. Paper writing needs some work. It is strange to not have a Conclusion section.**\n\nThanks for the suggestion! We have added a conclusion. We would greatly appreciate any additional input concerning our manuscript's writing issues that we can improve.\n\n### Response to Reviewer qewk [Continued]\n> **W4. The authors talked about how heterogeneity is captured in the convergence, but this relationship is not well articulated. In FL, one would first need to define the heterogeneity metric and then express the convergence bound as a function of this metric. Furthermore, such heterogeneity should be defined on the data, not the underlying distribution.**\n\nFirst, we define the heterogeneity metrics in Definitions 1 and 2, and their impact on the convergence bound is indeed expressed as a function of these metrics: $\\Lambda(\\epsilon _{p},\\epsilon _{r} [...]\n\n### Response to Reviewer qewk [Continued]\n> **W3. The FedSARSA is a straightforward of single-agent SARSA -- the only difference is to aggregate the parameter estimation from all agents, which is a straightforward average.**\n\nWe thank the Reviewer for pointing out the straightforwardness of our method, which, in fact, also highlights the practicality of our m\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 5,
+ 8,
+ 6
+ ],
+ "score_mean": 6.25,
+ "score_variance": 1.58,
+ "score_spread": 3,
+ "score_min": 5,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper considers a form of federated SARSA and shows linear speedup under appropriate assumptions in terms of the number of nodes. This is a new result for policy iteration methods of this type and I agree with the majority opinion of the reviewers that it should be accepted.",
+ "forum_id": "D2eOVqPX9g",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_rA2b",
+ "review_id": "4c2NRfAAHA",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1174,
+ "edit_detected": true,
+ "edit_delta_seconds": 265029,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_qewk",
+ "review_id": "oVEQlnaJ6N",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1567,
+ "edit_detected": true,
+ "edit_delta_seconds": 824031,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_uJdU",
+ "review_id": "iVQFRSC94m",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1627,
+ "edit_detected": true,
+ "edit_delta_seconds": 871157,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_pmTu",
+ "review_id": "LvZaY3SfuP",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1708,
+ "edit_detected": true,
+ "edit_delta_seconds": 967942,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8544.md b/open_review/iclr2024_8544.md
new file mode 100644
index 0000000000000000000000000000000000000000..90403f0e65ea3b36dc278c19b36385cdf0d236f3
--- /dev/null
+++ b/open_review/iclr2024_8544.md
@@ -0,0 +1,1529 @@
+
+
+## - FINITE-TIME ANALYSIS OF ON-POLICY HETEROGE NEOUS FEDERATED REINFORCEMENT LEARNING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Federated reinforcement learning (FRL) has emerged as a promising paradigm for reducing the sample complexity of reinforcement learning tasks by exploiting information from different agents. However, when each agent interacts with a potentially different environment, little to nothing is known theoretically about the non-asymptotic performance of FRL algorithms. The lack of such results can be attributed to various technical challenges and their intricate interplay: Markovian sampling, linear function approximation, multiple local updates to save communication, heterogeneity in the reward functions and transition kernels of the agents’ MDPs, and continuous state-action spaces. Moreover, in the on-policy setting, the behavior policies vary with time, further complicating the analysis. In response, we introduce FedSARSA, a novel federated on-policy reinforcement learning scheme, equipped with linear function approximation, to address these challenges and provide a comprehensive finite-time error analysis. Notably, we establish that FedSARSA converges to a policy that is near-optimal for all agents, with the extent of near-optimality proportional to the level of heterogeneity. Furthermore, we prove that FedSARSA leverages agent collaboration to enable linear speedups as the number of agents increases, which holds for both fixed and adaptive step-size configurations.
+
+## 1 INTRODUCTION
+
+Federated reinforcement learning (FRL) (Qi et al., 2021; Nadiger et al., 2019; Zhuo et al., 2019), a distributed learning framework that unites the principles of reinforcement learning (RL) (Sutton & Barto, 2018) and federated learning (FL) (McMahan et al., 2017), is rapidly gaining prominence for its wide range of real-world applications, spanning areas such as edge computing (Wang et al., 2019), robot autonomous navigation (Liu et al., 2019), and Internet of Things (Lim et al., 2020). This paper poses an FRL problem, where multiple agents independently explore their own environments and collaborate to find a near-optimal universal policy accounting for their differing environmental models. FRL leverages the collaborative nature of FL to address the data efficiency and exploration challenges of RL. Specifically, we expect _linear speedups_ in the convergence rate and increased overall exploration ability due to federated collaboration. We use FRL in autonomous driving (Liang et al., 2022) as a simple example to demonstrate our motivations and associated theoretical challenges. In this scenario, the objective is to determine a strategy (policy) that minimizes collision probability. In contrast to the single-agent setting, where a policy is found by letting one vehicle interact with its environment, the federating setting coordinates multiple vehicles to interact with their distinct environments—comprising different cities and traffic patterns. Despite their
+
+1
+
+aligned objectives, the environmental heterogeneity will produce distinct optimal strategies for each vehicle. Our goal is to find a universal robust strategy that performs well across all environments.
+
+Tailored for such tasks, we propose a novel algorithm, FedSARSA, integrating SARSA, a classic on-policy temporal difference (TD) control algorithm (Rummery & Niranjan, 1994; Singh & Sutton, 1996), into a federated learning framework. On one hand, we want to leverage the power of federated collaboration to collect more comprehensive information and expedite the learning process. On the other hand, we want to utilize the robustness and adaptability of on-policy methods. To elaborate, within off-policy methods, such as Q-learning, agents select their actions according to a fixed _behavior_ policy while seeking the optimal policy. In contrast, on-policy methods, such as SARSA, employ learned policies as behavior policies and constantly update them. By doing so, onpolicy methods tend to learn safer policies, as they collect feedback through interaction following learned policies, and are more robust to environmental changes compared to off-policy methods (see Sutton & Barto (2018, Chapter 6)). Additionally, when equipped with different _policy improvement operators_ , on-policy SARSA is more versatile and can learn a broader range of goals than off-policy Q-learning (see Section 4 and Appendix C). Formally analyzing our federated learning algorithm poses several multi-faceted challenges. We outline the most significant below.
+
+- _Time-varying behavior policies._ In off-policy FRL with Markovian sampling (Woo et al., 2023; Khodadadian et al., 2022; Wang et al., 2023a), agents’ observations are not i.i.d.; they are generated from a _time-homogeneous_ ergodic Markov chain as agents follow a _fixed_ behavior policy. Such an ergodic Markov chain converges rapidly to a steady-state distribution, enabling off-policy methods to inherit the theoretical guarantees for i.i.d. and mean-path cases (Bhandari et al., 2018; Wang et al., 2023a). In contrast, on-policy methods update agents’ behavior policies dynamically, rendering their trajectories _nonstationary_ . Therefore, previous analyses for off-policy methods, whether involving Markovian sampling or not, do not apply to our setting. Specifically, it remains unknown if the trajectories generated by on-policy FRL methods converge, and if they do, how this nonstationarity affects the convergence performance.
+
+- _Environmental heterogeneity in on-policy planning._ In an FRL instance, it is impractical to assume that all agents share the same environment (Khodadadian et al., 2022; Woo et al., 2023). In a planning task, this heterogeneity results in agents having distinct optimal policies. Thus, to affirm the advantages of federated collaboration, it is crucial to precisely characterize the disparities in optimality. Only two FRL papers have considered heterogeneity: Jin et al. (2022) explored heterogeneity in transition dynamics without linear speedup, and Wang et al. (2023a) considered heterogeneity in a prediction task (policy evaluation). Beyond these studies, other research has addressed heterogeneity primarily within the domains of control design (Wang et al., 2023c) and system identification (Wang et al., 2023b). Unfortunately, neither the characterizations nor analyses of heterogeneity from the previous work apply to on-policy FRL. Specifically, heterogeneity in agents’ optimal policies implies heterogeneity in the behavior policies, which could lead to drastically different local updates across agents, negating the benefits of collaboration.
+
+- _Multiple local updates and client drift._ In the federated learning framework, agents communicate with a central server periodically to reduce communication cost, and conduct local updates between communication rounds. However, these local updates push agents to local solutions at the expense of the overall _federated_ performance, a phenomenon known as _client drift_ (Karimireddy et al., 2020). Uniquely within our setting, client drift and nonstationarity amplify each other.
+
+- _Continuous state-action spaces and linear function approximation._ To better model real-world scenarios, we consider continuous state-action spaces and employ a linear approximation for the value function. Unfortunately, RL methods with linear function approximation (LFA) are known to exhibit less stable convergence when compared to tabular methods (Sutton & Barto, 2018; Gordon, 1996). Besides, the parameters associated with value function approximation no longer maintain an implicit magnitude bound. This concern is particularly relevant in on-policy FRL, where the client drift and the bias from nonstationarity both scale with the parameter magnitude.
+
+Given these motivations and challenges, we ask
+
+_Can an agent expedite the process of learning its own near-optimal policy by leveraging information from other agents with potentially different environments?_
+
+> 1 Considered i.i.d. and Markovian sampling, but only established linear speedup result for the i.i.d. case.
+
+2
+
+Table 1: Comparison of finite-time analysis for value-based FRL methods. LSP and LFA represent linear speedup and linear function approximation under the Markovian sampling setting; Pred and Plan represent prediction (policy evaluation) and planning (policy optimization) tasks, respectively.
+
+|**Work**|**Hetero-** **geneity**|**LSP**|**LFA**|**Markovian** **Sampling**|**Task**|**Behavior** **Policy**|
+|---|---|---|---|---|---|---|
+|Doan et al.(2019)|�|�|�|�|Pred|Fixed|
+|Jin et al.(2022)|�|�|�|�|Plan|Fixed|
+|Khodadadian et al.(2022)|�|�|�|�|Pred & Plan|Fixed|
+|Shen et al.(2023)|�|�1|�|�|Plan|Adaptive|
+|Wang et al.(2023a)|�|�|�|�|Pred|Fixed|
+|Woo et al.(2023)|�|�|�|�|Plan|Fixed|
+|**Our work**|�|�|�|�|Pred & Plan|Adaptive|
+
+We provide a complete non-asymptotic analysis of FedSARSA, resulting in the first positive answer to the above question. We situate our work with respect to prior work in Table 1. A summary of our contributions is provided below:
+
+- _Heterogeneity in FRL optimal policies._ We formulate a practical FRL planning problem in which agents operate in heterogeneous environments, leading to heterogeneity in their optimal policies as agents pursue different goals. We provide an explicit bound on this heterogeneity in optimality, validating the benefits of collaboration (Theorem 1).
+
+- _Federated SARSA and its finite-sample complexity._ We introduce the FedSARSA algorithm for the proposed FRL planning problem and establish a finite-time error bound achieving a state-ofthe-art sample complexity (Theorem 2). At the time of writing, FedSARSA is the first provably sample-efficient on-policy algorithm for FRL problems.
+
+- _Convergence region characterization and linear speedups via collaboration._ We demonstrate that when a constant step-size is used, federated learning enables FedSARSA to exponentially converge to a small region containing agents’ optimal policies, whose radius tightens as the number of agents grows (Corollary 2.1). For a linearly decaying step-size, the learning process enjoys linear speedups through federated collaboration: the finite-time error reduces as the number of agents increases (Corollary 2.2). We validate these findings via numerical simulations.
+
+## 2 RELATED WORK
+
+**Federated reinforcement learning.** A comprehensive review of FRL techniques and open problems was recently provided by Qi et al. (2021). FRL planning algorithms can be broadly categorized into two groups: policy- and value-based methods. In the first category, Jin et al. (2022); Xie & Song (2023) considered tabular methods but did not demonstrate any linear speedup. Fan et al. (2021) considered homogeneous environments and showed a _sublinear_ speedup property. In the second category, Khodadadian et al. (2022); Woo et al. (2023) investigated federated Q-learning and demonstrated linear speedup under Markovian sampling. However, these studies did not examine the impact of environmental heterogeneity, a pivotal aspect in FRL. To bridge this gap, Wang et al. (2023a) presented a finite time analysis of federated TD(0) that can handle environmental heterogeneity. To take advantage of both policy- and value-based methods, Shen et al. (2023) analyzed distributed actor-critic algorithms, but only established the linear speedup result under i.i.d. sampling. Table 1 summarizes the key features of these value-based methods, including our work. There are also some works developed for studying the distributed version of RL algorithms: Doan et al. (2019) and Liu & Olshevsky (2023) provided a finite-time analysis of distributed variants of TD(0); however, their analysis is limited to the i.i.d sampling model.
+
+**SARSA with linear function approximation.** Single-agent SARSA is an on-policy TD control algorithm proposed by Rummery & Niranjan (1994) and Singh & Sutton (1996). To accommodate large or even continuous state-action spaces, Rummery & Niranjan (1994) proposed function
+
+3
+
+approximation. We refer to SARSA with and without LFA as linear SARSA and tabular SARSA respectively The asymptotic convergence result of tabular SARSA was first demonstrated by Singh et al. (2000). However, linear SARSA may suffer from chattering behavior within a region (Gordon, 1996; 2000; Bertsekas & Tsitsiklis, 1996). With a _smooth_ policy improvement strategy, Perkins & Precup (2002) and Melo et al. (2008) established the asymptotic convergence guarantee for linear SARSA. Recently, the finite-time analysis for linear SARSA was provided by Zou et al. (2019).
+
+## 3 PRELIMINARIES
+
+## 3.1 FEDERATED LEARNING
+
+Federated Learning (FL) is a distributed machine learning framework designed to train models using data from multiple clients while preserving privacy, reducing communication costs, and accommodating data heterogeneity. We adopt the server-client model with periodic aggregation, akin to wellknown algorithms like FedAvg (McMahan et al., 2017) and FedProx (Sahu et al., 2018). Agents (clients) perform multiple _local updates_ (iterations of a learning algorithm) between communication rounds with the central server. During a communication round, agents synchronize their local parameters with those aggregated by the server. However, this procedure introduces _client-drift_ issues (Karimireddy et al., 2020; Charles & Koneˇcn`y, 2021), which can hinder the efficacy of federated training. This problem is particularly pronounced in our on-policy FRL setting, where client drift is amplified due to the interplay with other factors.
+
+## 3.2 MARKOV DECISION PROCESS AND ENVIRONMENTAL HETEROGENEITY
+
+We consider _N_ agents that explore within the same state-action space but with potentially different environment models. Specifically, agent _i_ ’s environment model is characterized by a Markov decision process (MDP) denoted by _M_[(] _[i]_[)] = � _S, A, r_[(] _[i]_[)] _, P_[(] _[i]_[)] _, γ_ �. Here, _S_ denotes the state space, _A_ is the action space, _r_[(] _[i]_[)] : _S × A →_ [0 _, R_ ] is a bounded reward function, _γ ∈_ (0 _,_ 1) is the discount factor, and _P_[(] _[i]_[)] is the Markov transition kernel such that _Pa_[(] _[i]_[)][(] _[s, s][′]_[)][is][the][probability][of][agent] _[i]_[’s] transition from state _s_ to _s[′]_ following action _a_ . While all agents share the same state-action space, their reward functions and state transition kernels can differ. Agents select actions based on their _policies_ . A policy _π_ maps a state to a distribution over actions, _π_ ( _a|s_ ) denotes the probability of an agent taking action _a_ at state _s_ .
+
+**Assumption 1** (Uniform ergodicity) **.** For each _i ∈_ [ _N_ ], the Markov chain induced by any policy _π_ and state transition kernel _P_[(] _[i]_[)] is ergodic with a uniform mixing rate. In other words, for any MDP _M_[(] _[i]_[)] and candidate policy _π_ , there exists a steady-state distribution _ηπ_[(] _[i]_[)][, as well as constants] _mi ≥_ 1 and _ρi ∈_ (0 _,_ 1), such that
+
+**==> picture [224 x 22] intentionally omitted <==**
+
+where _∥· ∥_ TV is the total variation distance.[2]
+
+Assumption 1 is a standard assumption in the RL literature needed to provide finite-time bounds under Markovian sampling (Bhandari et al., 2018; Zou et al., 2019; Srikant & Ying, 2019).
+
+Agents operate in their own environments and may have their own goals. We collectively refer to the differences in the transition kernels and rewards as environmental heterogeneity. Intuitively, collaboration among agents is advantageous when the heterogeneity is small, but can become counterproductive when the heterogeneity is large. We now provide two natural definitions for measuring environmental heterogeneity.
+
+**Definition 1** (Transition kernel heterogeneity) **.** We capture the transition kernel heterogeneity using the total variation induced norm:
+
+**==> picture [124 x 19] intentionally omitted <==**
+
+> 2We use the functional-analytic definition of the total variation, which is twice the quantity sup _A∈F |p_ ( _A_ ) _|_ for any signed measure _p_ on _F_ .
+
+4
+
+where with a slight abuse of notation, we define
+
+**==> picture [310 x 34] intentionally omitted <==**
+
+where _P_ ( _S × A_ ) is the set of probability measures on _S × A_ . By the triangle inequality and the uniform bound on rewards, _R_ , we have _ϵp ≤_ 2.
+
+**Definition 2** (Reward heterogeneity) **.** We capture the reward heterogeneity using the infinity norm:
+
+**==> picture [118 x 26] intentionally omitted <==**
+
+where _∥r∥∞_ = sup _s,a∈S×A |r_ ( _s, a_ ) _|_ . By the triangle inequality, we have _ϵr ≤_ 2.
+
+3.3 VALUE FUNCTION AND SARSA
+
+An RL planning task aims to maximize the expected _return_ , defined as the accumulated reward of a trajectory. For a given policy _π_ , the expected return of a state-action pair ( _s, a_ ) is captured by the Q-value function:
+
+**==> picture [388 x 36] intentionally omitted <==**
+
+(1)
+
+where the expectation is taken with respect to a transition kernel that follows the policy _π_ (except for the initial action, which is fixed to _a_ ). For any MDP, there exists an optimal policy _π∗_ such that _qπ∗_ ( _s, a_ ) _≥ qπ_ ( _s, a_ ) for any other policy _π_ and state-action pair ( _s, a_ ). _This paper focuses on an FRL problem where all agents aim to find a universal policy that is near-optimal for all MDPs under a low-heterogeneity regime._
+
+To find such an optimal policy for a single agent, SARSA updates the estimated Q-value function based on (1) by sampling and bootstrapping. With the updated estimation of the value function, SARSA improves the policy via a policy improvement operator. By alternating policy evaluation and policy improvement, SARSA finds the optimal policy within the policy space. The tabular SARSA for a single agent can be described by the following update rules:
+
+**==> picture [359 x 25] intentionally omitted <==**
+
+where _Q_ is the estimated Q-value function, _α_ is the learning step-size, and Γ is the policy improvement operator. We provide further discussion on the policy improvement operator in Section 4.
+
+- 3.4 LINEAR FUNCTION APPROXIMATION AND NONLINEAR PROJECTED BELLMAN EQUATION
+
+When the state-action space is large or continuous, tabular methods are intractable. Therefore, we employ a linear approximation for the Q-value function (Rummery & Niranjan, 1994). For a given feature extractor _ϕ_ : _S × A →_ R _[d]_ , we approximate the Q-value function as _Qθ_ ( _s, a_ ) = _ϕ_ ( _s, a_ ) _[T] θ_ , where _θ ∈_ Θ _⊆_ R _[d]_ is a parameter vector to be learned. Without loss of generality, we assume that _∥ϕ_ ( _s, a_ ) _∥_ 2 _≤_ 1 for every state-action pair ( _s, a_ ). Linear function approximation translate the task of finding the optimal policy to that of identifying the optimal parameter _θ_ that solves the nonlinear projected Bellman equation:
+
+_Qθ_ = Π _πTπQθ,_ (3)
+
+where _Tπ_ is the Bellman operator defined by the right-hand side of (1), and Π _π_ is the orthogonal projection onto the linear subspace spanned by the range of the _ϕ_ using the inner product _⟨x, y⟩π_ = E _S∼ηπ,A∼π_ ( _S_ )[ _x_ ( _S, A_ ) _[T] y_ ( _S, A_ )]. Equation (3) reduces to the linear Bellman equation used in policy evaluation when the policy _π_ is fixed (Tsitsiklis & Van Roy, 1996; Bhandari et al., 2018), and to the Bellman optimality equation used in Q-learning when the policy improvement operator is the greedy selector (Watkins & Dayan, 1992; Melo et al., 2008).
+
+5
+
+## 4 ALGORITHM
+
+We now develop FedSARSA; a federated version of linear SARSA. In FedSARSA, each agent explores its own environment and improves its policy using its observations, which we refer to as local updating. Periodically, agents send the parameter progress to the central server, where the parameters get aggregated and sent back to each agent. We present FedSARSA in Algorithm 1.
+
+**Local update.** Locally, agent _i_ updates its parameter using the SARSA update rule. With linear function approximation, the Q-value function update in (2) becomes
+
+**==> picture [154 x 19] intentionally omitted <==**
+
+where _αt_ is the step-size[3] and _gt_[(] _[i]_[)] is defined as
+
+**==> picture [397 x 27] intentionally omitted <==**
+
+We refer to _gt_ as a _semi-gradient_ as it resembles a stochastic gradient but does not represent the true gradient of any static loss function (Barnard, 1993). Also, we introduce a subscript _t_ to the semi-gradient to indicate that it depends on the policy _πθt_ ( _i_ ) at time step _t_ .
+
+**Policy improvement.** We assume that all agents use the same policy improvement operator Γ, which returns a policy _π_ for any Q-value function. Since we consider linearly approximated Q- value functions, we can view the policy improvement operator as acting on the parameter space: Γ : _θ �→ π_ . We denote the policy resulting from the parameter _θ_ as _πθ_ = Γ( _θ_ ). To ensure the convergence of the algorithm, we need the following assumption on the policy improvement operator’s smoothness.
+
+**Assumption 2** (Lipschitz continuous policy improvement operator) **.** The policy improvement operator is Lipschitz continuous in TV distance with constant _L_ :
+
+**==> picture [258 x 12] intentionally omitted <==**
+
+Furthermore, _L ≤ w/_ ( _Hσ_ ), where _H_ , _σ_ , and _w_ are problem constants to be defined in Appendix.
+
+When the action space is of finite measure, Assumption 2 is equivalent to that in Zou et al. (2019). This assumption is standard for linear SARSA (Zou et al., 2019; Perkins & Precup, 2002; Melo et al., 2008). As shown in (De Farias & Van Roy, 2000; Perkins & Pendrith, 2002; Zhang et al., 2022), linear SARSA with noncontinuous policy improvement may diverge.
+
+An example policy improvement operator satisfying Assumption 2 is the softmax function with suitable temperature parameter (Gao & Pavel, 2017). In contrast, the deterministic greedy policy improvement employed in Q-learning is an illustrative case where Assumption 2 does not hold. Additionally, when the policy improvement operator maps to a fixed point _π_ , SARSA reduces to TD learning, which evaluates the policy _π_ . Generally, SARSA searches the _optimal_ policy within the policy space Γ(Θ) determined by the policy improvement operator and the parameter space.
+
+**Server side aggregation.** FedSARSA adds an additional aggregation step to parallelize linear SARSA. During this step, agents communicate with a central server by sending their parameters or parameter progress over a given period. The central server then aggregates these local parameters and returns the updated parameters to the agents. Intuitively, if the agents’ MDPs are similar, i.e., the level of heterogeneity is low, then exchanging information via the server should benefit each agent. This is precisely the rationale behind the server-aggregation step. In general, _K_ is selected to strike a balance between the communication cost and the accuracy in FL.
+
+Besides averaging, we add a projection step to ensure stability of the parameter sequence. This technique is commonly used in the literature on stochastic approximation and RL (Zou et al., 2019; Bhandari et al., 2018; Qiu et al., 2021; Wang et al., 2023a). In practice, it is anticipated that an _implicit_ bound on the parameters exists without requiring explicit projection.
+
+> 3For ease of presentation, we assume all agents share the same step-size. Our analysis handles agents using their own step-size schedule, as long as each agent’s step-size falls within the specified range.
+
+6
+
+## **Algorithm 1:** FedSARSA
+
+**input** _Initial parameter θ_ 0[(] _[i]_[)] = _θ_[¯] 0 **for** _t_ = 0 _, . . . , T −_ 1 **do for** _each agent i_ = 1 _, . . . , N_ **do in parallel** _πt_[(] _[i]_[)] = Γ( _θt_[(] _[i]_[)][)] // policy improvement Sample observation ( _st_[(] _[i]_[)] _[, a]_[(] _t[i]_[)] _[, r] t_[(] _[i]_[)] _[, s]_[(] _t_ +1 _[i]_[)] _[, a] t_[(] +1 _[i]_[)][)][ following policy] _[ π] t_[(] _[i]_[)] _θt_[(] +1 _[i]_[)][=] _[ θ] t_[(] _[i]_[)] + _αtgt_[(] _[i]_[)][, where] _[ g] t_[(] _[i]_[)] is defined in (4) // local update **if** _t_ + 1 _≡_ 0 (mod _K_ ) **then** // every _K_ iterations _θ_ ¯ _t_ +1 = Π _G_ ¯ � _N_ 1 � _Ni_ =1 _[θ] t_[(] +1 _[i]_[)] � // federated aggregation Set _θt_[(] +1 _[i]_[)][=] _[θ]_[¯] _[t]_[+1][ for each agent] _[ i][ ∈]_[[] _[N]_[]]
+
+## 5 ANALYSIS
+
+We begin our analysis of FedSARSA by establishing a perturbation bound on the solution to (3), which captures the near-optimality of the solution under reward and transition heterogeneity. We then provide a finite-time error bound of FedSARSA, which enjoys the linear speedup achieved by the federated collaboration. Building on this, we discuss the parameter selection of our algorithm.
+
+## 5.1 NEAR OPTIMALITY UNDER HETEROGENEITY
+
+We consider an FRL task where all agents collaborate to find a universal policy. However, due to environmental heterogeneity, each agent has a potentially different optimal policy. Therefore, it is essential to determine the convergence region of our algorithm, and how it relates to the optimal parameters of the agents. To show that we find a near-optimal parameter for all agents, we need to characterize the difference between the optimal parameters of agents. Given the operator Γ, we denote by _θ∗_[(] _[i]_[)] the unique solution to (3) for MDP _M_[(] _[i]_[)] . The next theorem bounds the distance between agents’ optimal parameters as a function of reward- and transition kernel heterogeneity.
+
+**Theorem 1** (Perturbation bounds on SARSA fixed points) **.** _There exist positive problem dependent constants w, H, and σ such that_
+
+**==> picture [224 x 24] intentionally omitted <==**
+
+_where ϵp and ϵr are the perturbation bounds on environmental models defined in Definitions 1 and 2._
+
+We explicitly define the constants in Theorem 1 and show that _w_ = _O_ (1 _−γ_ ) in Appendix I. In the next subsection, we demonstrate that there exists a parameter _θ∗_ such that _∥θ∗_[(] _[i]_[)] _[−][θ] ∗[∥≤]_[Λ(] _[ϵ] p[, ϵ] r_[)] _[/w]_[, and] Algorithm 1 converges to a neighborhood of _θ∗_ whose radius is also of _O_ (Λ( _ϵp, ϵr_ ) _/_ (1 _−γ_ )). Since Λ( _ϵp, ϵr_ ) = _O_ ( _ϵp_ + _ϵr_ ), when the environmental heterogeneity is small, these results guarantee that _θ∗_ is near-optimal for all agents.
+
+Theorem 1 is the first perturbation bound on nonlinear projected Bellman fixed points. Wang et al. (2023a) established similar perturbation bounds for linear projected Bellman fixed points using the perturbation theory of linear equations. However, it is crucial to note that their approach does not extend to our setting where (3) is nonlinear.
+
+## 5.2 FINITE-TIME ERROR AND LINEAR SPEEDUP
+
+We now provide the main theorem of the paper, which bounds the mean squared error of Algorithm 1 recursively, and directly gives several finite-time error bounds.
+
+**Theorem 2** (One-step progress) **.** _Let {θt_[(] _[i]_[)] _[}][be][the][parameters][returned][by][Algorithm][1][and]_ ¯ _N θt_ = _N_[1] � _i_ =1 _[θ] t_[(] _[i]_[)] _[.][Then, there exist positive problem dependent constants][ w, C]_[1] _[, C]_[2] _[, C]_[3] _[, C]_[4] _[, and a] parameter θ∗ such that_ max _i∈_ [ _N_ ] _∥θ∗_[(] _[i]_[)] _[−][θ] ∗[∥≤]_[Λ(] _[ϵ] p,[ϵ] r_[)] _[/w][, and for any][ t][ ∈]_[N] _[, it holds that]_ E �� _θ_ ¯ _t_ +1 _− θ∗_ ��2 _≤_ (1 _− αtw_ )E �� _θ_ ¯ _t − θ∗_ ��2 + _αtC_ 1Λ2( _ϵp, ϵr_ ) + _αt_ 2 _[C]_[2] _[/N]_[+] _[ α] t_[3] _[C]_[3][+] _[ α] t_[4] _[C]_[4] _[.]_ (5)
+
+7
+
+## _Explicit definitions of the constants are provided in Appendix J._
+
+On the right-hand side of (5), the first term is a contractive term that inherits its contractivity from the projected Bellman operator; the second term accounts for heterogeneity; the third term captures the effect of noise where the variance gets scaled down by a factor of _N_ (linear speedup) due to collaboration among agents; the last two terms represent higher-order terms, which are negligible, compared to other terms. In the following two corollaries, we study the effects of using constant and decaying step-sizes in the above bound.
+
+**Corollary 2.1** (Finite-time error bound for constant step-size) **.** _With a constant step-size αt ≡ α_ 0 _≤ w/_ (2120(2 _K_ + 8 + ln( _m/_ ( _ρw_ )))) _, for any T ∈_ N _, we have_
+
+**==> picture [401 x 24] intentionally omitted <==**
+
+**Corollary 2.2** (Finite-time error bound for decaying step-size) **.** _With a linearly decaying step-size αt_ = 4 _/_ ( _w_ (1 + _t_ + _a_ )) _, where a >_ 0 _is to guarantee that α_ 0 _≤_ min _{_ 1 _/_ (8 _K_ ) _, w/_ 64 _}, there exists a convex combination θ_[�] _T of {θ_[¯] _t}[T] t_ =0 _[such that]_
+
+**==> picture [397 x 24] intentionally omitted <==**
+
+We now discuss the implications of the above theoretical guarantees.
+
+**Convergence region.** From Corollary 2.1, with a constant step-size _α_ , FedSARSA exponentially converges to a ball around the optimal parameter _θi[∗]_[of each agent. The radius of this ball is governed] by two objects: (i) the level of environmental heterogeneity; (ii) the inherent noise in our model. In the absence of heterogeneity, the above guarantee is precisely what one obtains for stochastic approximation algorithms with a constant step-size (Zou et al., 2019; Srikant & Ying, 2019; Bhandari et al., 2018). The presence of heterogeneity manifests itself in the _O_ (Λ( _ϵp, ϵr_ ) _/_ (1 _−γ_ )) = _O_ ( _ϵp_ + _ϵr_ ) term in the convergence region radius. Since the optimal parameters of the agents may not be identical (under heterogeneity), such a term is generally unavoidable.
+
+**Linear speedup.** Turning our attention to Corollary 2.2 (where we use a decaying step-size), let us first consider the homogeneous case where _ϵp_ = _ϵr_ = 0. When _T ≥ N_ , the _O_ (1 _/_ ( _NT_ )) rate we obtain in this case is the best one can hope for statistically: with _T_ data samples per agent and _N_ agents, one can reduce the variance of our noise model by at most _NT_ . Thus, for a homogeneous setting, our rate is optimal, and clearly demonstrates an _N_ -fold linear speedup over the single-agent sample-complexity of _O_ (1 _/T_ ) in Zou et al. (2019). In this context, _our work provides the first such bound for a federated on-policy RL algorithm_ , and complements results of a similar flavor for the off-policy setting in Khodadadian et al. (2022). When the agents’ MDPs differ, via collaboration, each agent is still able to converge at the _expedited_ rate of _O_ (1 _/NT_ ) to a ball of radius _O_ ( _ϵp_ + _ϵr_ ) around the optimal parameter of each agent. The implication of this result is simple: by participating in federation, each agent can _quickly_ (i.e., with an _N_ -fold speedup) find an _O_ ( _ϵp_ + _ϵr_ )-approximate solution of its optimal parameter; using such an approximate solution as an initial condition, the agent can then fine-tune (personalize) - based on its own data - to converge to its own optimal parameter _exactly_ (in mean-squared sense). _This is the first result of its kind for federated planning, and complements the plethora of analogous results in federated optimization_ (Sahu et al., 2018; Khaled et al., 2019; Li et al., 2019; Koloskova et al., 2020; Woodworth et al., 2020; Pathak & Wainwright, 2020; Wang et al., 2020; Mitra et al., 2021; Mishchenko et al., 2022). Arriving at the above result, however, poses significant challenges relative to prior art. We now provide insights into these challenges and our strategies to overcome them.
+
+## 5.3 PROOF SKETCH: ERROR DECOMPOSITION
+
+Our main approach of proving Theorem 2 is to leverage the contraction property of the Bellman equation (3) to identify a primary “descent direction.” Algorithm 1 then updates the parameters along this direction with multi-sourced stochastic bias. We provide an informal mean squared error decomposition (formalized in Appendix I.1 ) to illustrate this idea:
+
+**==> picture [350 x 16] intentionally omitted <==**
+
+**==> picture [268 x 10] intentionally omitted <==**
+
+8
+
+Some of these terms commonly appears in an FRL analysis: the descent direction is given by the contraction property of the Bellman equation (3) when the policy improvement operator is sufficiently smooth (Appendix I.2); the client drift represents the deviation of agents’ local parameters from the central parameter, which is controlled by the step-size and synchronization period (Appendix I.4); the mixing property (Assumption 1) allows a stationary trajectory to rapidly reach to a steady distribution (Appendix I.6). We highlight some unique terms in our analysis.
+
+_Gradient heterogeneity._ This term accounts for the local update heterogeneity, which scales with the environmental heterogeneity. The effect of time-varying policies coupled with multiple local updates accentuates the effect of such heterogeneity. Thus, particular care is needed to ensure that the bias introduced by heterogeneity does not compound over iterations (Appendix I.3).
+
+_Backtracking._ FedSARSA possesses nonstationary transition kernels. To deal with this challenge and use the mixing property of stationary MDPs, we _virtually backtrack_ a period _τ_ : starting at time step _t−τ_ , we fix the policy Γ( _θt_[(] _−[i]_[)] _τ_[)][ for agent] _[ i]_[, and consider a subsequent virtual trajectory following] this fixed policy. The divergence between the updates computed on real and virtual observations is controlled by the step-size _αt_ and backtracking period _τ_ (Appendix I.7).
+
+_Gradient progress._ Note that the steady distribution in the mixing term corresponds to an _old_ policy. Since the backtracking period is small, the discrepancy (progress) between this old policy and the current one is small (Appendix I.5).
+
+_Gradient variance._ While one can directly use the projection radius to bound the semi-gradient variance, such an approach would fall short of establishing the desired linear speedup effect. To achieve the latter, we need a more refined argument that shows how one can obtain a “variance-reduction” effect by combining data generated from non-identical time-varying Markov chains (Appendix I.8).
+
+## 6 SIMULATIONS
+
+We create a finite state space of size _|S|_ = 100, an action space of _|A|_ = 100, a feature space of dimension _d_ = 25, and set _γ_ = 0 _._ 2 and _R_ = 10. The actions determine the transition matrices by shifting the columns of a reference matrix. The synchronization period is set to _K_ = 10, and the step-size of _α_ 0 = 0 _._ 01. For the full experiment setup, please refer to Appendix C. In Figure 1, we plot the mean squared error averaged over ten runs for different heterogeneity levels and numbers of agents. The simulation results are consistent with Corollary 2.1 and demonstrate the robustness of our method towards environmental heterogeneity. Additional simulations, including federated TD(0) and on-policy federated Q-learning covered by our algorithm, can be found in Appendix C.
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [130 x 96] intentionally omitted <==**
+
+**==> picture [129 x 97] intentionally omitted <==**
+
+**==> picture [326 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) ϵp = ϵr = 0 (b) ϵp = ϵr = 1 (c) ϵp = ϵr = 2 **----- End of picture text -----**
+
+Figure 1: Performance of FedSARSA under Markovian sampling.
+
+## 7 CONCLUSION
+
+We proposed a straightforward yet powerful on-policy federated reinforcement learning method: FedSARSA. Our finite-time analysis of FedSARSA provides the first theoretically conformation of the statement: an agent can expedite the process of learning its own near-optimal policy by leveraging information from other agents with potentially different environments.
+
+9
+
+## REFERENCES
+
+Etienne Barnard. Temporal-difference methods and Markov models. _IEEE Transactions on Systems, Man, and Cybernetics_ , 23(2):357–365, 1993.
+
+Dimitri Bertsekas and John N. Tsitsiklis. _Neuro-Dynamic Programming_ . Athena Scientific, 1996.
+
+- Jalaj Bhandari, Daniel Russo, and Raghav Singal. A finite time analysis of temporal difference learning with linear function approximation. In _Conference on Learning Theory_ , pp. 1691–1692. PMLR, 2018.
+
+- L´eon Bottou, Frank E. Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning. _SIAM review_ , 60(2):223–311, 2018.
+
+- Zachary Charles and Jakub Koneˇcn`y. Convergence and accuracy trade-offs in federated learning and meta-learning. In _International Conference on Artificial Intelligence and Statistics_ , pp. 2575– 2583. PMLR, 2021.
+
+- Daniela Pucci De Farias and Benjamin Van Roy. On the existence of fixed points for approximate value iteration and temporal-difference learning. _Journal of Optimization theory and Applications_ , 105:589–608, 2000.
+
+- Thinh Doan, Siva Maguluri, and Justin Romberg. Finite-time analysis of distributed TD(0) with linear function approximation on multi-agent reinforcement learning. In _International Conference on Machine Learning_ , pp. 1626–1635. PMLR, 2019.
+
+- Xiaofeng Fan, Yining Ma, Zhongxiang Dai, Wei Jing, Cheston Tan, and Bryan Kian Hsiang Low. Fault-tolerant federated reinforcement learning with theoretical guarantee. _Advances in Neural Information Processing Systems_ , 34:1007–1021, 2021.
+
+- Bolin Gao and Lacra Pavel. On the properties of the softmax function with application in game theory and reinforcement learning. _arXiv preprint arXiv:1704.00805_ , 2017.
+
+Geoffrey J. Gordon. Chattering in SARSA( _λ_ ). _CMU Learning Lab Technical Report_ , 1996.
+
+- Geoffrey J. Gordon. Reinforcement learning with function approximation converges to a region. _Advances in neural information processing systems_ , 13, 2000.
+
+- Hao Jin, Yang Peng, Wenhao Yang, Shusen Wang, and Zhihua Zhang. Federated reinforcement learning with environment heterogeneity. In _International Conference on Artificial Intelligence and Statistics_ , pp. 18–37. PMLR, 2022.
+
+- Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for federated learning. In _International Conference on Machine Learning_ , pp. 5132–5143. PMLR, 2020.
+
+- Ahmed Khaled, Konstantin Mishchenko, and Peter Richt´arik. First analysis of local GD on heterogeneous data. _arXiv preprint arXiv:1909.04715_ , 2019.
+
+- Sajad Khodadadian, Pranay Sharma, Gauri Joshi, and Siva Theja Maguluri. Federated reinforcement learning: Linear speedup under Markovian sampling. In _International Conference on Machine Learning_ , pp. 10997–11057. PMLR, 2022.
+
+- Anastasia Koloskova, Nicolas Loizou, Sadra Boreiri, Martin Jaggi, and Sebastian Stich. A unified theory of decentralized SGD with changing topology and local updates. In _International Conference on Machine Learning_ , pp. 5381–5393. PMLR, 2020.
+
+- Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of FedAvg on non-iid data. _arXiv preprint arXiv:1907.02189_ , 2019.
+
+10
+
+- Xinle Liang, Yang Liu, Tianjian Chen, Ming Liu, and Qiang Yang. Federated transfer reinforcement learning for autonomous driving. In _Federated and Transfer Learning_ , pp. 357–371. Springer, 2022.
+
+- Hyun-Kyo Lim, Ju-Bong Kim, Joo-Seong Heo, and Youn-Hee Han. Federated reinforcement learning for training control policies on multiple IoT devices. _Sensors_ , 20(5):1359, 2020.
+
+- Boyi Liu, Lujia Wang, and Ming Liu. Lifelong federated reinforcement learning: A learning architecture for navigation in cloud robotic systems. _IEEE Robotics and Automation Letters_ , 4(4): 4555–4562, 2019.
+
+- Rui Liu and Alex Olshevsky. Distributed TD(0) with almost no communication. _IEEE Control Systems Letters_ , 2023.
+
+- Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In _Artificial intelligence and statistics_ , pp. 1273–1282. PMLR, 2017.
+
+- Francisco S Melo, Sean P Meyn, and M Isabel Ribeiro. An analysis of reinforcement learning with function approximation. In _Proceedings of the 25th international conference on Machine learning_ , pp. 664–671, 2008.
+
+- Sean P Meyn and Richard L Tweedie. _Markov chains and stochastic stability_ . Springer Science & Business Media, 2012.
+
+- Konstantin Mishchenko, Grigory Malinovsky, Sebastian Stich, and Peter Richt´arik. Proxskip: Yes! local gradient steps provably lead to communication acceleration! finally! In _International Conference on Machine Learning_ , pp. 15750–15769. PMLR, 2022.
+
+- Aritra Mitra, Rayana Jaafar, George J Pappas, and Hamed Hassani. Linear convergence in federated learning: Tackling client heterogeneity and sparse gradients. _Advances in Neural Information Processing Systems_ , 34:14606–14619, 2021.
+
+- A Yu Mitrophanov. Sensitivity and convergence of uniformly ergodic markov chains. _Journal of Applied Probability_ , 42(4):1003–1014, 2005.
+
+- Chetan Nadiger, Anil Kumar, and Sherine Abdelhak. Federated reinforcement learning for fast personalization. In _2019 IEEE Second International Conference on Artificial Intelligence and Knowledge Engineering (AIKE)_ , pp. 123–127. IEEE, 2019.
+
+- Reese Pathak and Martin J Wainwright. FedSplit: An algorithmic framework for fast federated optimization. _arXiv preprint arXiv:2005.05238_ , 2020.
+
+- Theodore Perkins and Doina Precup. A convergent form of approximate policy iteration. _Advances in neural information processing systems_ , 15, 2002.
+
+- Theodore J Perkins and Mark D Pendrith. On the existence of fixed points for Q-learning and SARSA in partially observable domains. In _ICML_ , pp. 490–497, 2002.
+
+- Jiaju Qi, Qihao Zhou, Lei Lei, and Kan Zheng. Federated reinforcement learning: Techniques, applications, and open challenges. _arXiv preprint arXiv:2108.11887_ , 2021.
+
+- Shuang Qiu, Zhuoran Yang, Jieping Ye, and Zhaoran Wang. On finite-time convergence of actorcritic algorithm. _IEEE Journal on Selected Areas in Information Theory_ , 2(2):652–664, 2021.
+
+- Guannan Qu and Adam Wierman. Finite-time analysis of asynchronous stochastic approximation and Q-learning. In _Conference on Learning Theory_ , pp. 3185–3205. PMLR, 2020.
+
+- Gavin A Rummery and Mahesan Niranjan. _On-line Q-learning using connectionist systems_ , volume 37. University of Cambridge, Department of Engineering Cambridge, UK, 1994.
+
+- Anit Kumar Sahu, Tian Li, Maziar Sanjabi, Manzil Zaheer, Ameet Talwalkar, and Virginia Smith. On the convergence of federated optimization in heterogeneous networks. _arXiv preprint arXiv:1812.06127_ , 3, 2018.
+
+11
+
+- Han Shen, Kaiqing Zhang, Mingyi Hong, and Tianyi Chen. Towards understanding asynchronous advantage actor-critic: Convergence and linear speedup. _IEEE Transactions on Signal Processing_ , 2023.
+
+- Satinder Singh, Tommi Jaakkola, Michael L Littman, and Csaba Szepesv´ari. Convergence results for single-step on-policy reinforcement-learning algorithms. _Machine learning_ , 38:287–308, 2000.
+
+- Satinder P Singh and Richard S Sutton. Reinforcement learning with replacing eligibility traces. _Machine learning_ , 22(1):123–158, 1996.
+
+- Rayadurgam Srikant and Lei Ying. Finite-time error bounds for linear stochastic approximation andtd learning. In _Conference on Learning Theory_ , pp. 2803–2830. PMLR, 2019.
+
+Richard S Sutton and Andrew G Barto. _Reinforcement learning: An introduction_ . MIT press, 2018.
+
+John Tsitsiklis and Benjamin Van Roy. Analysis of temporal-diffference learning with function approximation. _Advances in neural information processing systems_ , 9, 1996.
+
+- Han Wang, Aritra Mitra, Hamed Hassani, George J Pappas, and James Anderson. Federated temporal difference learning with linear function approximation under environmental heterogeneity. _arXiv preprint arXiv:2302.02212_ , 2023a.
+
+- Han Wang, Leonardo F Toso, and James Anderson. FedSysID: A federated approach to sampleefficient system identification. In _Learning for Dynamics and Control Conference_ , pp. 1308– 1320. PMLR, 2023b.
+
+- Han Wang, Leonardo F Toso, Aritra Mitra, and James Anderson. Model-free learning with heterogeneous dynamical systems: A federated LQR approach. _arXiv preprint arXiv:2308.11743_ , 2023c.
+
+- Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. _Advances in Neural Information Processing Systems_ , 33, 2020.
+
+- Xiaofei Wang, Yiwen Han, Chenyang Wang, Qiyang Zhao, Xu Chen, and Min Chen. In-edge AI: Intelligentizing mobile edge computing, caching and communication by federated learning. _Ieee Network_ , 33(5):156–165, 2019.
+
+Christopher JCH Watkins and Peter Dayan. Q-learning. _Machine learning_ , 8:279–292, 1992.
+
+- Jiin Woo, Gauri Joshi, and Yuejie Chi. The blessing of heterogeneity in federated q-learning: Linear speedup and beyond. In _International Conference on Machine Learning_ , pp. 37157–37216. PMLR, 2023.
+
+- Blake E Woodworth, Kumar Kshitij Patel, and Nati Srebro. Minibatch vs local SGD for heterogeneous distributed learning. _Advances in Neural Information Processing Systems_ , 33:6281–6292, 2020.
+
+- Zhijie Xie and Shenghui Song. FedKL: Tackling data heterogeneity in federated reinforcement learning by penalizing KL divergence. _IEEE Journal on Selected Areas in Communications_ , 41 (4):1227–1242, 2023.
+
+Fuzhen Zhang. _Matrix Theory: Basic Results and Techniques_ . Springer, 2011.
+
+- Shangtong Zhang, Remi Tachet, and Romain Laroche. On the chattering of SARSA with linear function approximation. _arXiv preprint arXiv:2202.06828_ , 2022.
+
+- Hankz Hankui Zhuo, Wenfeng Feng, Yufeng Lin, Qian Xu, and Qiang Yang. Federated deep reinforcement learning. _arXiv preprint arXiv:1901.08277_ , 2019.
+
+- Shaofeng Zou, Tengyu Xu, and Yingbin Liang. Finite-sample analysis for sarsa with linear function approximation. _Advances in neural information processing systems_ , 32, 2019.
+
+12
+
+## **Appendix**
+
+## **Table of Contents**
+
+|**le**|**of Contents**|||
+|---|---|---|---|
+|**A **|**Organization of Appendix**||**14**|
+|**B**|**Finite-Time Results Comparison**||**14**|
+|**C **|**Additional Simulations**||**14**|
+||C.1 Additional Simulations|forFedSARSA. . . . . . . . . . . . . . . . . . . . . .|14|
+||C.2 Simulations for Federated TD(0) . . . . . . . . . . . . . . . . . . . . . . . . .||15|
+||C.3 Simulations for On-Policy Federated Q-Learning . . . . . . . . . . . . . . . . .||16|
+|**D **|**Central MDP**||**17**|
+|**E**|**Notation**||**19**|
+|**F**|**Constants**||**20**|
+|**G **|**Preliminary Lemmas**||**21**|
+|**H **|**Proof of Theorem 1**||**24**|
+|**I**|**Key Lemmas**||**26**|
+||I.1 Error Decomposition|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|26|
+||I.2 Descent Direction . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|26|
+||I.3 Gradient Heterogeneity|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|27|
+||I.4 Client Drift . . . . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|28|
+||I.5 Gradient Progress . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|29|
+||I.6 Mixing . . . . . . . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|32|
+||I.7 Backtracking. . . . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|33|
+||I.8 Gradient Variance . .|. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .|35|
+|**J**|**Proof of Theorem 2**||**38**|
+|**K **|**Proof of Corrolaries 2.1 and 2.2**||**41**|
+|**L**|**Constant Dependencies**||**42**|
+|**M **|**Tabular FedSARSA**||**44**|
+
+13
+
+## A ORGANIZATION OF APPENDIX
+
+The appendix is organized as follows. First, we present an additional comparison of our results with other finite-time results in Appendix B, and additional simulation results in Appendix C. In Appendices D and E, we introduce the concept of central MDP and some notation that will assist our analysis. In Appendix F, to aid readability, we list all the constants that appear in the paper for readers’ convenience. In Appendix G, we provide several preliminary lemmas that will be used throughout the analysis. Before presenting lemmas for Theorem 2, we first prove Theorem 1 in Appendix H, for it will be used by later lemmas. In Appendix I, we first decompose the mean squared error and then present seven lemmas, each bounding one term in the decomposition. Then, we provide the proof of Theorem 2 and Corollaries 2.1 and 2.2 in Appendix J and Appendix K, respectively. To provide insights into our results, we discuss the dependencies of constants in Appendix L. Finally, we reduce FedSARSA to the tabular case in Appendix M, demonstrating the flexibility and efficiency of our algorithm.
+
+## B FINITE-TIME RESULTS COMPARISON
+
+A comparison of finite-time results on temporal difference methods is provided in Table 2.
+
+Table 2: Comparison of finite-time results. Results with green background are first provided by our work; results with blue background are covered by our work. “Linear” indicates the usage of linear function approximation, and “Hetero” indicates the presence of environmental heterogeneity. All constants are defined in Section 5 and Appendix I. We show the squared _ℓ_ 2 error for linear settings and squared _ℓ∞_ error for tabular settings. Asymptotic notations are omitted for simplicity.
+
+||||Federated|Federated|Federated|Federated||Single-Agent|Single-Agent|Single-Agent|
+|---|---|---|---|---|---|---|---|---|---|---|
+||Linear|||Tabular||||Linear|Tabular||
+||Hetero||Homog|Hetero|||Homog||||
+|TD Learning|_H_2 (1_−γ_)2_NT_ +|Λ2 (1_−γ_) †|_H_2 (1_−γ_)2_NT_ ‡ |_SA_ _λ_2(1_−γ_)4_NT_ +||Λ2 _λ_2(1_−γ_)2 ** |_S_2 _λ_5(1_−γ_)9_NT_ ‡ |_H_2 (1_−γ_)2_T_ ¶ |_SA_ _λ_2(1_−γ_)4_T_ **||
+|Q-Learning|–||_H_2 (1_−γ_)2_NT_ ‡||1 (1_−γ_)6_T_ 2 +|Λ2 (1_−γ_)4 §|_S_2 _λ_5(1_−γ_)9_NT_ ‡|_H_2 (1_−γ_)2_T_ ¶||_SA_ _λ_(1_−γ_)5_T_ |||
+|SARSA|_H_2 (1_−γ_)2_NT_ +|Λ2 (1_−γ_)2 *|_H_2 (1_−γ_)2_NT_ *|||Λ2 _λ_2(1_−γ_)2 **|_SA_ _λ_2(1_−γ_)4_NT_ **|_H_2 (1_−γ_)2_T_ #|_SA_ _λ_2(1_−γ_)4_T_ **||
+|†(Wang et al., 2023a) ‡(Khodadadian ||(Qu & Wierman, 2020) #(Zou||||et al., 2022) § et al., 2019)||(Jin et al., 2022) ¶(Bhandari et al., 2018) *Corollary 2.2 **Appendix M|||||
+
+## C ADDITIONAL SIMULATIONS
+
+## C.1 ADDITIONAL SIMULATIONS FOR FEDSARSA
+
+We first restate the simulation setup in more detail. We index a finite state space by _S_ = [100] and an action space by _A_ = [100], where the actions determine the transition matrices by shifting the columns of a reference matrix _P_ 0:
+
+_Pa_ = circ ~~s~~ hift( _P_ 0 _,_ columns = _a_ ) _,_
+
+where circ ~~s~~ hift denotes a circular shift operator. We construct the feature extractor as
+
+**==> picture [180 x 13] intentionally omitted <==**
+
+where _ei_ is the indicator vector with the _i_ -th entry being 1 and the rest being 0. We set _d_ 1 = 5 and _d_ 2 = 5. For the policy improvement operator, we employ the softmax function with a temperature of 100:
+
+**==> picture [166 x 26] intentionally omitted <==**
+
+Other parameters are set as follows: the reward cap _R_ = 10, the discount factor _γ_ = 0 _._ 2, the synchronization period _K_ = 10, and the step-size _α_ 0 = 0 _._ 01.
+
+14
+
+To construct heterogeneous MDPs, we first generate a nominal MDP _M_ 1 and obtain the remaining MDPs by adding the perturbations to _M_ 1. Unlike in FedTD (Wang et al., 2023a), where the optimal parameters can be obtained by solving the linear projected Bellman equation directly, here we get a _reference_ parameter _θ_ ref[(1)][by][running][a][single-agent][linear][SARSA][on] _[M]_[1][with][decaying][step-] size. As suggested in Corollary 2.2, the reference parameter converges to the optimal parameter corresponding to _M_ 1. Then, we calculate the mean squared error with respect to the reference ¯ (1) 2 parameter: _θt − θ_ ref ��� ���2[. All of our simulations are averaged over ten runs and all graphs are plotted] with 95% confidence region.
+
+In Figure 1, both kernel heterogeneity and reward heterogeneity are set at the same level. In Figure 2, we fix the kernel heterogeneity as 1 _._ 0 and vary the reward heterogeneity. In contrast, we fix the reward heterogeneity as zero and vary the kernel heterogeneity in Figure 3. Again, these results affirm the robustness of our method towards environmental heterogeneity. Furthermore, they seemingly suggest that the algorithm is more sensitive to reward heterogeneity than kernel heterogeneity. However, it is important to note that _ϵp_ and _ϵr_ represent upper bounds and may be much larger than the actual heterogeneity level.
+
+Further exploring the effect of heterogeneity on federated collaboration, Figures 4 and 5 illustrate the effect of different reward and kernel heterogeneity levels on the performance of FedSARSA respectively. Generally, higher levels of heterogeneity result in larger mean squared error, which aligns with our theoretical results in Section 5.
+
+**==> picture [129 x 97] intentionally omitted <==**
+
+**==> picture [130 x 97] intentionally omitted <==**
+
+**==> picture [129 x 97] intentionally omitted <==**
+
+**==> picture [396 x 117] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) ϵr = 0 (b) ϵr = 0 . 1 (c) ϵr = 0 . 2 (d) ϵr = 0 . 5 (e) ϵr = 1 (f) ϵr = 2 **----- End of picture text -----**
+
+Figure 2: Performance of FedSARSA under Markovian sampling for varying reward heterogeneity and numbers of agents with fixed kernel heterogeneity ( _ϵp_ = 1).
+
+## C.2 SIMULATIONS FOR FEDERATED TD(0)
+
+As discussed in Section 4, FedSARSA reduces to federated TD(0) (Wang et al., 2023a) when the policy improvement operator maps any parameter to a fixed policy _π_ . This corresponds to a fixed transition kernel. Therefore, we conduct simulations for federated TD(0) to demonstrate the adaptability of FedSARSA. We inherit the simulation setup from the previous subsection (Appendix C.1), which matches the setup in Wang et al. (2023a). We fix the behavior policy by fix the transition matrix as the reference matrix _P_ 0. The results are presented in Figure 6, which are similar to the results in Section 6, again validating our theoretical results.
+
+15
+
+**==> picture [129 x 97] intentionally omitted <==**
+
+**==> picture [130 x 97] intentionally omitted <==**
+
+**==> picture [129 x 97] intentionally omitted <==**
+
+**==> picture [396 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) ϵp = 0 (b) ϵp = 0 . 1 (c) ϵp = 0 . 2 (d) ϵp = 0 . 5 (e) ϵp = 1 (f) ϵp = 2 **----- End of picture text -----**
+
+Figure 3: Performance of FedSARSA under Markovian sampling for varying kernel heterogeneity and numbers of agents with fixed reward heterogeneity ( _ϵr_ = 1).
+
+**==> picture [129 x 95] intentionally omitted <==**
+
+**==> picture [130 x 95] intentionally omitted <==**
+
+**==> picture [129 x 95] intentionally omitted <==**
+
+**==> picture [396 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) N = 5 , ϵp = 1 . 0 (b) N = 10 , ϵp = 1 . 0 (c) N = 20 , ϵp = 1 . 0 (d) N = 5 , ϵp = 2 . 0 (e) N = 10 , ϵp = 2 . 0 (f) N = 20 , ϵp = 2 . 0 **----- End of picture text -----**
+
+Figure 4: Effect of the reward heterogeneity on the performance of FedSARSA.
+
+- C.3 SIMULATIONS FOR ON-POLICY FEDERATED Q-LEARNING
+
+When equipped with a greedy policy improvement operator, FedSARSA reduces to on-policy federated Q-Learning. Specifically, we employ the greedy policy improvement operator:
+
+**==> picture [158 x 19] intentionally omitted <==**
+
+where 1 is the indicator function. For the other part of the simulation setup, we inherit the setup from the previous subsection (Appendix C.1). The results are presented in Figure 7, which resemble the results in Section 6 and Appendix C.2.
+
+16
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [130 x 96] intentionally omitted <==**
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [396 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) N = 5 , ϵr = 1 . 0 (b) N = 10 , ϵp = 1 . 0 (c) ϵp = 0 . 2 (d) N = 20 , ϵr = 1 . 0 (e) N = 5 , ϵr = 2 . 0 (f) N = 10 , ϵr = 2 . 0 **----- End of picture text -----**
+
+Figure 5: Effect of the kernel heterogeneity on the performance of FedSARSA.
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [130 x 96] intentionally omitted <==**
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [396 x 118] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) ϵp = ϵr = 0 (b) ϵp = ϵr = 0 . 1 (c) ϵp = ϵr = 0 . 2 (d) ϵp = ϵr = 0 . 5 (e) ϵp = ϵr = 1 (f) ϵp = ϵr = 2 **----- End of picture text -----**
+
+Figure 6: Performance of FedSARSA with a fixed-point policy improvement operator, covering federated TD(0).
+
+## D CENTRAL MDP
+
+To facilitate our analysis, we introduce a virtual MDP: _M_ ¯ := _N_ 1 � _Ni_ =1 _[M]_[(] _[i]_[)][.][Specifically,] _M_ ¯ = ( _S, A,_ ¯ _r, P, γ_[¯] ), where _r_ ¯ = _N_ 1 � _Ni_ =1 _[r]_[(] _[i]_[)][,] _[P]_[¯][=] _N_ 1 � _Ni_ =1 _[P]_[ (] _[i]_[)][.][We][refer][to][this][virtual][MDP][as][the] _central MDP_ . The following proposition shows that _M_[¯] is indistinguishable from the collection of actual MDPs and also satisfies Assumption 1.
+
+**Proposition 1.** _If MDPs {M_[(] _[i]_[)] _} are ergodic (aperiodic and irreducible) under a fixed policy π, the central MDP M_[¯] _is also ergodic under π._
+
+17
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [130 x 96] intentionally omitted <==**
+
+**==> picture [129 x 96] intentionally omitted <==**
+
+**==> picture [396 x 115] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) ϵp = ϵr = 0 (b) ϵp = ϵr = 0 . 1 (c) ϵp = ϵr = 0 . 2 (d) ϵp = ϵr = 0 . 5 (e) ϵp = ϵr = 1 (f) ϵp = ϵr = 2 **----- End of picture text -----**
+
+Figure 7: Performance of FedSARSA with a greedy policy improvement operator, covering onpolicy federated Q-learning.
+
+_Proof._ Suppose _π_ is given. We first show that _M_ is also aperiodic. If not, by the definition of aperiodicity (Meyn & Tweedie, 2012, Page 121), there exists _s ∈S_ such that
+
+**==> picture [148 x 12] intentionally omitted <==**
+
+where gcd returns the greatest common divisor and we omit the subscript _π_ of _P_[¯] _π_ since we consider a fixed policy. The above inequality indicates that, for any _n ∈_ N _\ {kd_[¯] ( _s_ ) _}k∈_ N, it holds that
+
+**==> picture [349 x 32] intentionally omitted <==**
+
+Now since _M_[(] _[i]_[)] is aperiodic, _d_[(] _[i]_[)] ( _s_ ) := gcd _{n_ : ( _P_[(] _[i]_[)] ) _[n]_ ( _s, s_ ) _>_ 0 _}_ = 1. Thus there exists _n ∈_ N _\ {kd_[¯] ( _s_ ) _}k∈_ N such that ( _P_[(] _[i]_[)] ) _[n]_ ( _s, s_ ) _>_ 0 (otherwise _d_[(] _[i]_[)] ( _s_ ) _≥ d_ ¯[¯] ( _s_ )), which contradicts toshow(6).thatTherefore, _M_ ¯ is irreduciblewe concludegiventhat _{Md_[¯] ([(] _s[i]_[)] ) _}_ =are1irreduciblefor any _s ∈S_ (Meyn, and& thusTweedie _M_ is, 2012aperiodic., Page 93).We nowFor any _A ⊂B_ ( _S_ ) with positive measure, where _B_ ( _S_ ) is the Borel _σ_ -field on _S_ , we have min _{n_ : ( _P_[(] _[i]_[)] ) _[n]_ ( _s, A_ ) _>_ 0 _} <_ + _∞_ for any _s ∈S_ and _i ∈_ [ _N_ ]. Then again by (6), we get
+
+**==> picture [312 x 25] intentionally omitted <==**
+
+Therefore, _M_[¯] is irreducible.
+
+When the state-action space is finite, Proposition 1 covers Wang et al. (2023a, Proposition 1).
+
+By Proposition 1, we can confidently regard _M_ ¯ as the MDP of a virtual agent, which does not exhibit any distinctive properties in comparison to the actual agents.¯ Therefore, we denote _M_[(0)] := superscript _M_ and define( _i_ ),theit shouldextendedbe clearnumberfromsetthe[ _N_[¯] context] := [ _N_ if] _∪{_ we 0are _}_ =talking _{_ 0 _,_ 1 _, . . . , N_ about the _}_ . centralWhen weMDPdrop _M_ ¯ theor ¯ an arbitrary MDP _M_[(] _[i]_[)] . Clearly, the extended MDP set _{M_[(] _[i]_[)] _}i∈_ [ _N_ ][still][satisfies][Assumption][1] andTheoremDefinitions2: it is1 theandunique2, and solutionthus Theoremto (3) 1for. Now _M_ ¯ . Inweothercan specifywords, theTheoremspecial2parameterasserts that _θ∗_ thein algorithm converges to the central optimal parameter.
+
+18
+
+## E NOTATION
+
+Before presenting lemmas and proofs of our main theorems, we introduce some notation that will aid in our analysis. We introduce a notation for the unprojected central parameter:
+
+**==> picture [256 x 30] intentionally omitted <==**
+
+Then, _θt_[(] +1 _[i]_[)][=] _[θ]_[¯] _[t]_[+1][= Π] _G_[ ¯][(˘] _[θ][t]_[+1][)][ when] _[ t]_[+1] _[ ≡]_[0][(mod] _[K]_[)][. It’s easy to verify that for any] _[ ∥][θ][∥≤][G]_[¯][,] we have
+
+**==> picture [243 x 13] intentionally omitted <==**
+
+Then we define some notations on the MDPs. Note that all these definitions apply to the extended ¯ MDP set _{M_[(] _[i]_[)] _}i∈_ [ _N_ ][that includes the central MDP.]
+
+**Definition 3** (Steady distributions) **.** Assumption 1 guarantees the existence of a steady state distribution for any MDP and policy _π_ . We denote _ηθ_[(] _[i]_[)] as the steady state distribution with respect to MDP _M_[(] _[i]_[)] and policy _πθ_ , i.e.,
+
+**==> picture [156 x 18] intentionally omitted <==**
+
+Additionally, given a policy _πθ_ , the steady state-action distribution is defined as
+
+**==> picture [122 x 14] intentionally omitted <==**
+
+Then, the two-step steady distribution is defined as
+
+**==> picture [198 x 14] intentionally omitted <==**
+
+For a local parameter _θt_[(] _[i]_[)][, we simplify the above notations as follows:]
+
+**==> picture [182 x 19] intentionally omitted <==**
+
+We are now ready to provide the precise definitions of the semi-gradients discussed in Section 5.
+
+**Definition 4** (Semi-gradients) **.** As indicated by (4), a semi-gradient is a function of both the parameter _θ_ and the observation tuple _O_ = ( _s, a, s[′] , a[′]_ ), while the observation tuple is dependent on the local Markovian trajectory. Therefore, the general form of a semi-gradient is
+
+**==> picture [378 x 19] intentionally omitted <==**
+
+where _Ot_[(] _[i]_[)] = � _st_[(] _[i]_[)] _[, a]_[(] _t[i]_[)] _[, s]_[(] _t_ +1 _[i]_[)] _[, a] t_[(] +1 _[i]_[)] � is the observation of agent _i_ at time step _t_ , and the subscript _t−τ_ indicates that the trajectory after time step _t−τ_ follows a fixed policy _πθt_ ( _−i_ ) _τ_[, i.e.,]
+
+**==> picture [134 x 17] intentionally omitted <==**
+
+When _τ_ = 0, the semi-gradient corresponds to an actual SARSA trajectory, and we omit the subscript and the observation argument, i.e.,
+
+**==> picture [104 x 19] intentionally omitted <==**
+
+When _τ >_ 0, the semi-gradient corresponds a virtual trajectory, and we use _O_[˜] _t_ in place of _Ot_ to indicate it is a virtual observation at the current time step.
+
+We add a bar to denote the mean-path semi-gradients, i.e.,
+
+**==> picture [370 x 19] intentionally omitted <==**
+
+where the expectation is taken over the two-step observation steady distribution:
+
+**==> picture [144 x 20] intentionally omitted <==**
+
+19
+
+For mean-path semi-gradients, the randomness of the observation is eliminated, and the parameter _θ_ is the only argument, and we can substitute the subscript _t−τ_ with a general parameter _θ[′]_ ; then we define
+
+**==> picture [266 x 20] intentionally omitted <==**
+
+We omit the superscript ( _i_ ) when referring to the central MDP _M_[¯] . For instance,
+
+¯ _gt−τ_ ( _θ_ ) := E _φt−τ_ � _ϕ_ ( _s, a_ )(¯ _r_ ( _s, a_ ) + _γϕ[T]_ ( _s[′] , a[′]_ ) _θ − ϕ[T]_ ( _s, a_ ) _θ_ )� _._
+
+Finally, for notational simplicity, we use bold symbols to denote the average semi-gradients, e.g.,
+
+**==> picture [132 x 30] intentionally omitted <==**
+
+The above notations will be used in combination, e.g.,
+
+**==> picture [198 x 30] intentionally omitted <==**
+
+We can further decompose semi-gradients into TD operators.
+
+**==> picture [397 x 48] intentionally omitted <==**
+
+where
+
+**==> picture [390 x 43] intentionally omitted <==**
+
+Similar to Definition 4, we can define other TD operators for each semi-gradient, e.g., the mean-path TD operators:
+
+**==> picture [113 x 37] intentionally omitted <==**
+
+We summarize the notations defined in this section and other notations used in our analysis in Table 3.
+
+## F CONSTANTS
+
+We first introduce two important constants that serve as base constants throughout the paper. The first one is the upper bound of the norm of the central parameter, denoted by _G ≥∥θ_[¯] _∥_ . For this bound to hold, we require the projection radius _G_[¯] to be large enough such that _θ∗_ ( _i_ ) _≤ G_ ¯ for ��� ��� _i ∈_ [ _N_[¯] ]. The explicit expression for _G_ will be given in Corollary I.5.3. Then, we define
+
+**==> picture [241 x 11] intentionally omitted <==**
+
+The constant _H_ can be viewed as the scale of the problem, analogous to _|S||A|_ for the tabular setting that will be discussed in Appendix M. For local parameters, we define a similar function _h_ ( _θ_ ) := _R_ + (1 + _γ_ ) _∥θ∥_ .
+
+We summarized the constants that appear in our analysis in Table 4. Notice that _τ, α_ 0, and _αt_ in Table 4 refer to the constants in the case with a linearly decaying step-size. For the case with a constant size, these constants are fixed and specified in Corollary 2.1.
+
+20
+
+Table 3: Notation
+
+|Notation||Defnition|
+|---|---|---|
+|[_N_]_,_[¯_N_]||The set of_N_ numbers and the set of_N_ + 1numbers including0|
+|_M_(_i_)_,_ ¯ _M_||Markov decision processes|
+|_S, A,_Θ||State space, action space, and parameter space|
+|_r_(_i_)_,_¯_r, P_ (_i_)_,_|¯_P_|Reward functions and transition kernels|
+|_S_(_i_) _t , U_(_i_) _t , O_(_i_) _t_||Agent_i_’s state, action, and observation random variable at time step_t_|
+|_s, a, o_||Instances of the state, action, and observation|
+|_π,_Γ||A policy and the policy improvement operator|
+|_∥· ∥_TV||Total variation distance and its induced norm for transition kernels|
+|_q, Q_||True Q-value function and estimated Q-value function|
+|_ϕ, θ_||Feature map and feature weight (parameter)|
+|Π_π,_Π¯ _G_||Orthogonal projection operator|
+|_Tπ_||Bellman operator|
+|_π_(_i_) _∗, θ_(_i_) _∗_||Optimal policies and optimal parameters|
+|_η_(_i_) _θ , µ_(_i_) _θ , φ_(_i_) _θ_||Steady distributions|
+|_g_||Semi-gradient|
+|_A, b, Z_||Temporal difference operators|
+|_h_||_h_(_θ_) :=_R_+ (1 +_γ_)_∥θ∥_|
+|Ω_t, ωt_||Client drift|
+|_Ft_||Filtration containing all randomness prior to time step_t_|
+
+## G PRELIMINARY LEMMAS
+
+In this section, we present two preliminary lemmas that will be used throughout the analysis.
+
+**Lemma G.1** (Steady distribution differences) **.** _For the same MDP, the TV distance between the steady distributions with regard to two different policies is bounded as follows:_
+
+**==> picture [170 x 41] intentionally omitted <==**
+
+_where L is the Lipschitz constant of the policy improvement operator specified in Assumption 2 and σ[′] is a constant determined by m and ρ specified in Assumption 1. Letting σ_ := _σ[′]_ + 2 _, all three TV distances above are bounded by Lσ∥θ_ 1 _− θ_ 2 _∥_ 2 _. Next, for a fixed parameter θ, the TV distance between the steady distributions with regard to two MDPs is bounded as follows:_
+
+**==> picture [128 x 65] intentionally omitted <==**
+
+_By the above inequalities, for different MDPs and different parameters, we have_
+
+**==> picture [190 x 20] intentionally omitted <==**
+
+_Proof._ For the same MDP, by (Mitrophanov, 2005, Corollary 3.1), we get
+
+**==> picture [150 x 12] intentionally omitted <==**
+
+21
+
+Table 4: Constants
+
+|Notation|Meaning|Reference|Range or Order|
+|---|---|---|---|
+|_N_|Number of agents|Section3.2|N|
+|_R_|Reward cap|Section3.2|(0_,_+_∞_)|
+|_S, A_|Measures of the state space|Section3.2|(0_,_+_∞_]|
+||and action space|||
+|_γ_|Discount factor|Section3.2|(0_,_1)|
+|_mi, m_|Markov chain mixing constant|Assumption1|[1_,_+_∞_)|
+|||and LemmaG.1||
+|_ρi, ρ_|Markov chain mixing rate|Assumption1|(0_,_1)|
+|||and LemmaG.1||
+|_σ, σ′_|Steady distribution perturba-|LemmaG.1|_O_(log_m/_(1_−ρ_))|
+||tion constant|||
+|¯_G_|Algorithm projection radius|Algorithm1|(0_,_+_∞_)|
+|_G_|Parameter norm upper bound|CorollaryI.5.3|_O_(¯_G_+_R_)|
+|_H_|Problem scale|Equation (8)|_O_(¯_G_+_R_)|
+|_L_|Lipschitz constant for the pol-|Assumption2|[0_, w/_(_Hσ_)]|
+||icy improvement operator|||
+|_K_|Local update period|Section4|N|
+|_ϵp, ϵr_|Environmental heterogeneity|Defnitions1and2|[0_,_2]|
+||ratio|||
+|Λ|Environmental heterogeneity|Theorem1|_O_(_H_(_ϵp_+_ϵr_))|
+|_λ_(_i_)_, λ_|Exploration constant|Equation (18)|(0_,_1)|
+|_wi, w_|Convergence constant|Equation (19)|[(1_−γ_)_λ/_2_,_1_/_2)|
+|_τ_|Backtracking period|LemmaI.1|_O_(log_T_)|
+|_α_0|Initial step-size|Section4|(0_,_min_{_1_/_8_K, w/_64_}_]|
+|_αt_|General step-size|Section4|_O_(1_/t_)|
+|_C_drift|Client drift constant|LemmaI.4|_O_(_KH_)|
+|_C_prog|Parameter progress constant|LemmaI.5|_O_(_Hτ_)|
+|_C_back|Backtracking constant|LemmaI.7|_O_(_τ_ 2_w_)|
+|_C_var|Gradient variance constant|LemmaI.8|_O_(_H_2_w_2_τ_ 4))|
+|_β_|Young’s inequality constant|AppendixJ|(0_, w/_7)|
+|_H_drift|Another drift constant|AppendixJ|_O_(_H_)|
+|_Cα_|Step-size constant|AppendixJ|_O_(1)|
+|_C_1|First-order constant|Equation (50)|_O_((1_−γ_)_−_1)|
+|_C_2|Second-order constant|Equation (50)|_O_(_H_2_τ_)|
+|_C_3|Third-order constant|Equation (50)|_O_(_H_2_wτ_ 4)|
+|_C_4|Fourth-order constant|Equation (50)|_O_(_H_2_w_2_τ_ 5)|
+|_B_|Square of the convergence re-|Corollary2.1|see Corollary2.1|
+||gion radius for constant step-|||
+||size|||
+
+where _Pθ_ ( _s, s[′]_ ) = � _A[P][a]_[(] _[s, s][′]_[)] _[π][θ]_[(] _[a][|][s]_[)d] _[a]_[, and]
+
+**==> picture [332 x 80] intentionally omitted <==**
+
+And the constant _σ[′]_ is defined by
+
+ˆ where _n_ = �log _ρ m[−]_[1][�] , _m_ := max _i∈_ [ _N_ ] _mi_ , and _ρ_ := max _i∈_ [ _N_ ] _ρi_ with _mi, ρi_ specified in Assumption 1. Note that in the above inequalities, we actually should use _σi[′]_[defined by] _[ m][i]_[ and] _[ ρ][i]_[; but] _σi[′]_[is bounded by] _[ σ][′]_[for all] _[ i][∈]_[[] _[N]_[]][, so we use this possibly looser bound for notational simplicity.]
+
+22
+
+Then, by Assumption 2, we have
+
+**==> picture [370 x 188] intentionally omitted <==**
+
+Therefore, we get
+
+**==> picture [138 x 12] intentionally omitted <==**
+
+Next, for the state-action distribution, we have
+
+**==> picture [402 x 81] intentionally omitted <==**
+
+Similarly, we have
+
+**==> picture [166 x 12] intentionally omitted <==**
+
+Also by (Mitrophanov, 2005, Corollary 3.1), we get
+
+**==> picture [416 x 215] intentionally omitted <==**
+
+Finally, by the triangle inequality, we get
+
+**==> picture [190 x 20] intentionally omitted <==**
+
+23
+
+Similarly, we can bound the differences between TD operators defined in Definition 5. **Lemma G.2** (TD operator differences) **.** _For the same MDP, the difference between the mean-path TD operators with regard to different parameters is bounded as follows:_
+
+**==> picture [181 x 31] intentionally omitted <==**
+
+_Next, for a fixed parameter θ, the difference between the mean-path TD operators with regard to different MDPs is bounded as follows:_
+
+**==> picture [144 x 43] intentionally omitted <==**
+
+_Then, by the triangle inequality, we get_
+
+**==> picture [245 x 43] intentionally omitted <==**
+
+_Proof._ For the same MDP, by Definition 5, we have
+
+**==> picture [394 x 54] intentionally omitted <==**
+
+where the last inequality comes from Lemma G.1. Similarly, we have
+
+**==> picture [256 x 54] intentionally omitted <==**
+
+Then for the same parameter _θ_ , we have
+
+**==> picture [411 x 150] intentionally omitted <==**
+
+where the last inequality comes from Definition 2 and Lemma G.1.
+
+H PROOF OF THEOREM 1
+
+**Theorem 1.** _For any i, j ∈_ [ _N_[¯] ] _, we have_
+
+**==> picture [202 x 25] intentionally omitted <==**
+
+¯ _where w_ := min _i∈_ [ _N_ ] _[w][i][;][ w][i][is defined in Lemma][ I.2][ and]_[ Λ(] _[ϵ][p][, ϵ][r]_[)] _[ is defined in Lemma][ I.3][.]_
+
+24
+
+_Proof._ First, we formulate the Bellman optimal equation in terms of TD operators defined in Definition 5:
+
+**==> picture [80 x 13] intentionally omitted <==**
+
+for any _i ∈_ [ _N_[¯] ], where
+
+**==> picture [118 x 18] intentionally omitted <==**
+
+Then for any _i, j ∈_ [ _N_[¯] ], we have
+
+**==> picture [218 x 19] intentionally omitted <==**
+
+By Tsitsiklis & Van Roy (1996, Theorem 2), _A_[¯][(] _∗[j]_[)] is negative definite Therefore, _A_[¯][(] _∗[j]_[)] is non-singular, and we get
+
+And we have
+
+**==> picture [341 x 201] intentionally omitted <==**
+
+where (10) uses the spectrum norm equality and _σ_ min returns the smallest singular value of a matrix; (11) and (12) use the fact that _A_[¯][(] _∗[j]_[)] is negative definite; (13) is by (Zhang, 2011, Theorem 10.28); and lastly, (14) is the definition of _wj_ (see Lemma I.2).
+
+Therefore, letting _G_ be large enough to contain _{θ∗_[(] _[i]_[)] _[}] i∈_ [ _N_[¯] ][, we get]
+
+**==> picture [240 x 24] intentionally omitted <==**
+
+By Lemma G.2, we get
+
+**==> picture [401 x 51] intentionally omitted <==**
+
+We require that _LHσ ≤ wj_ (the same restriction (20) in Lemma I.2); then we get
+
+which gives
+
+**==> picture [246 x 67] intentionally omitted <==**
+
+¯ where _w_ := min _i∈_ [ _N_ ] _[w][i]_[and][ Λ(] _[ϵ][p][, ϵ][r]_[) :=] _[ Rϵ][r]_[+] _[ Hσϵ][p]_[(the same definition in Lemma][ I.3][).]
+
+25
+
+## I KEY LEMMAS
+
+In this section, we first decompose the mean squared error and then present seven lemmas, each bounding one term in the decomposition.
+
+## I.1 ERROR DECOMPOSITION
+
+**Lemma I.1** (Error decomposition) **.** _The one-step mean squared error can be decomposed recursively as follows:_
+
+**==> picture [364 x 248] intentionally omitted <==**
+
+One can verify the above decomposition given ¯ _g_ ( _θ∗_ ) = 0.
+
+## I.2 DESCENT DIRECTION
+
+**Lemma I.2** (Descent direction) **.** _There exist positive constants {wi}i∈_ [ _N_ ¯ ] _[such that for any][ ∥][θ][∥≤][G][,] we have_
+
+**==> picture [260 x 21] intentionally omitted <==**
+
+_Proof._ We drop the subscript ( _i_ ) in this lemma since the following derivation holds for all MDPs. We first denote ∆ _θ_ = _θ − θ∗_ . Then, we have
+
+**==> picture [368 x 111] intentionally omitted <==**
+
+where (15) uses Lemma G.2, and (16) uses the fact that _∥θ∥≤ G_ and _H_ := _R_ + (1 + _γ_ ) _G_ . By (Tsitsiklis & Van Roy, 1996, Theorem 2), _A_[¯] _θ∗_ is negative definite in the sense that _x[∗] Ax <_ 0
+
+26
+
+for any vector _x ∈_ R _[d]_ . Specifically, for any nonzero _x ∈_ R _[d]_ , we denote _u_ = _x[T] ϕ_ ( _S, A_ ) and _u[′]_ = _x[T] ϕ_ ( _S[′] , A[′]_ ). Then, for any _x ̸_ = 0, by Definition 5, we have
+
+_x[T] A_[¯] _θx_ = E _φθ_ � _γuu[′] − u_[2][�] = _γ_ E[ _uu[′]_ ] _−_ E[ _u_[2] ] _≤[γ]_ �E[ _u_[2] ] + E[ _u[′]_[2] ]� _−_ E[ _u_[2] ] = ( _γ −_ 1)E[ _u_[2] ] _<_ 0 _,_ 2 (17) where we use the fact that E[ _u_[2] ] = E[ _u[′]_[2] ] under a steady distribution. Let Φ[(] _θ[i]_[)] := E ( _i_ )[We define] _µθ_[[] _[ϕ]_[(] _[S, A]_[)] _[ϕ][T]_[ (] _[S, A]_[)]] _[ ≻]_[0][.]
+
+**==> picture [279 x 22] intentionally omitted <==**
+
+By (17), we have
+
+**==> picture [343 x 21] intentionally omitted <==**
+
+where sym( _A_ ) :=[1] 2[(] _[A]_[ +] _[ A][∗]_[)][maps][general][matrices][to][Hermitian][matrices.][Due][to][the][positive] definiteness of Φ[(] _[i]_[)] _[>]_[0][ for any] _[ i][∈]_[[ ¯] _[N]_[]][.][By][ Zhang][ (][2011][, Theorem 10.21) and the] _θ∗_[(] _[i]_[)][, We know] _[ w][i]_ linearity of the sym function, we know
+
+� ¯ _λ_ max sym _A_[(] _[i]_[)] _≤ λ_ max sym _A_[(] _[i]_[)] + _λ_ max(sym( _LσH · I_ )) = _−_ 2 _wi_ + _LσH._ � � _θ∗_[(] _[i]_[)] �� � � _θ∗_[(] _[i]_[)] �� ¯ Let _w_ = min _i∈_ [ _N_ ] _[{][w][i][}]_[.][Then, we can choose] _[ L]_[ to be small enough such that]
+
+**==> picture [219 x 19] intentionally omitted <==**
+
+which gives
+
+**==> picture [124 x 19] intentionally omitted <==**
+
+Therefore, for any _i ∈_ [ _N_[¯] ], we have
+
+**==> picture [391 x 21] intentionally omitted <==**
+
+_Remark_ 1 (Convergence constant) _._ Equation (21) mirrors the result of stochastic gradient descent (SGD) (Bottou et al., 2018), with _w_ being analogous to the Lipschitz constant of a function’s gradient. Therefore, similar to SGD, _w_ controls the convergence rate of our algorithm.
+
+_Remark_ 2 (Exploration constant) _._ The value of _w_ depends on _λ_ , a constant that reflects the _exploration difficulty_ of the environment. We can see this by considering a simple tabular setting, where the feature map _ϕ_ is simply the indicator function (see Appendix M for detailed definitions). Then E _µ_ [ _ϕ_ ( _S, A_ ) _ϕ[T]_ ( _S, A_ )] reduces to diag _{µ_ ( _s, a_ ) _}_ ( _s,a_ ) _∈S×A_ . In this case, the minimal eigenvalue of Φ is min( _s,a_ ) _∈S×A µ_ ( _s, a_ ), i.e., the probability of visiting the least probable state-action pair under the steady distribution.
+
+We say an environment is _hard to explore_ if some state-action pairs have a very small probability of being visited under the steady distribution, then _λ_ is small. Conversely, _λ_ is large when the environment is easy to explore. Intuitively, an environment that is hard to explore requires more samples to learn an optimal policy.
+
+In the context of LFA, the value of _λ_ , and consequently _w_ , is determined by the conditions of both the MDPs and the feature map _ϕ_ . If the environments in the feature space are easy to explore under the MDPs, _λ_ and _w_ will take on larger values, and the algorithm converges faster.
+
+## I.3 GRADIENT HETEROGENEITY
+
+**Lemma I.3** (Gradient heterogeneity) **.** _For ∥θ∥≤ G, we have_
+
+**==> picture [216 x 31] intentionally omitted <==**
+
+27
+
+_Proof._ Directly applying the decomposition in Definition 5 and Lemma G.2 gives
+
+**==> picture [274 x 81] intentionally omitted <==**
+
+## I.4 CLIENT DRIFT
+
+Before bounding the gradient progress, we first bound the client drift. **Lemma I.4** (Client drift) **.** _If ∥θ_[¯] _t∥≤ G holds for all t ∈_ N _, then_
+
+**==> picture [257 x 30] intentionally omitted <==**
+
+_where k is the smallest integer such that t − k ≡_ 0 (mod _K_ ) _, and_
+
+**==> picture [72 x 13] intentionally omitted <==**
+
+_Proof._ Similar to (15) in the proof of Lemma I.2, we have
+
+**==> picture [342 x 20] intentionally omitted <==**
+
+Then, since _∥θ_[¯] _t∥≤ G_ , we have
+
+**==> picture [347 x 30] intentionally omitted <==**
+
+2 Let Ω _t_ := _N_ 1 � _Ni_ =1 _θt_ ( _i_ ) _− θ_[¯] _t_ . We then need to bound Ω _t_ . First, if _t ≡_ 0 (mod _K_ ), we have ��� ��� Ω _t_ = 0. Now suppose _t ̸≡_ 0 (mod _K_ ). Let _k_ be the smallest integer such that _t − k ≡_ 0 (mod _K_ ). Then we know that there is no aggregation step between time step _t − k_ and _t_ , and ¯ _θt−l_ = 1 _/N_[�] _[N] i_ =1 _[θ] t_[(] _−[i]_[)] _l_[for][ 0] _[ ≤][l][ ≤][k]_[.][Therefore, we have]
+
+**==> picture [287 x 69] intentionally omitted <==**
+
+where _**g** t_ ( _**θ** t_ ) = _N_ 1 � _Ni_ =1 _[g] t_[(] _[i]_[)][(] _[θ] t_[(] _[i]_[)][)][,][and][we][choose] _[α]_[to][be][non-increasing.][Since][for][a][random] vector _X_ , Var( _X_ ) _≤_ E _∥X∥_[2] , we have
+
+**==> picture [300 x 100] intentionally omitted <==**
+
+28
+
+where we also used Jensen’s inequality. By the definition of the Markovian semi-gradients (see Definition 4), they are linear and Lipschitz continuous with the Lipschitz constant bounded by _∥A_[(] _t−[i]_[)] _l[∥≤]_[1+] _[γ]_[.][However, it is worth emphasizing that the mean-path semi-gradients are non-linear] and non-Lipschitz continuous (unless _∥θ_[¯] _t∥_ is bounded; see (22)). Given the Lipschitz continuity, we have
+
+**==> picture [319 x 66] intentionally omitted <==**
+
+Recursively applying (24) gives
+
+**==> picture [444 x 121] intentionally omitted <==**
+
+where we use the fact that Ω _t−k_ = 0. To continue, we impose a constraint on the initial step-size by requiring 4 _Kα_ 0 _≤_ 1, which gives 16 _k_[2] _αt_[2] _−k[≤]_[1][.][Then, we have]
+
+**==> picture [374 x 30] intentionally omitted <==**
+
+Therefore, we get
+
+**==> picture [329 x 13] intentionally omitted <==**
+
+Plugging (26) back into (23) gives the final result.
+
+**Corollary I.4.1.** _For future reference, we extract two bounds on the client drift from the proof of Lemma I.4:_
+
+**==> picture [274 x 32] intentionally omitted <==**
+
+I.5 GRADIENT PROGRESS
+
+To bound the gradient progress, we first need to bound the parameter progress. Instead of directly bounding the client parameter progress, we bound the central parameter progress, which then gives the client parameter progress combining Lemma I.4.
+
+**Lemma I.5** (Central parameter progress) **.** _If_ �� _θ_ ¯ _l_ �� _≤ G for any l ≤ t, then we have_
+
+**==> picture [122 x 13] intentionally omitted <==**
+
+_where s is the largest integer such that sK ≤ t − τ and_
+
+**==> picture [200 x 12] intentionally omitted <==**
+
+_Proof._ Bounding the central parameter progress is harder than bounding the client parameter progress since
+
+**==> picture [172 x 12] intentionally omitted <==**
+
+29
+
+Therefore we need to introduce the client drift, and then bound the parameter progress using Lemma I.4. First, for any _t_ , we have
+
+**==> picture [416 x 81] intentionally omitted <==**
+
+where _ωt−_ 1 is defined in Corollary I.4.1. Let _k_ be the smallest positive integer such that _t − k ≡_ 0 (mod _K_ ) (if _t ≡_ 0 (mod _K_ ), then _k_ = _K_ ). Recursively applying (27) gives
+
+**==> picture [348 x 91] intentionally omitted <==**
+
+where (28) uses Corollary I.4.1 and we require _α_ to be non-increasing; and in (29) and (30), we require that 4 _α_ 0 _K ≤_ 1, which gives (1+2 _αt−k_ ) _[k] ≤_ 1+4 _kαt−k_ with the similar reasoning in (25).
+
+Now we are ready to bound any central parameter progress between two aggregation steps. Since _t − k ≡_ 0 (mod _K_ ), we have _∥θ_[¯] _t−k∥≤ G_[¯] . Then by (7), we get
+
+**==> picture [377 x 106] intentionally omitted <==**
+
+where we use the fact that _γ <_ 1 and 4 _kαt−k ≤_ 1.
+
+Finally, we need to bound the central parameter progress for general time period _τ_ . For any _t > τ >_ 1, let _s_ be the largest integer such that _sK ≤ t − τ_ . And let _s[′]_ be the largest integer such that _s[′] K ≤ t_ . Then we have
+
+**==> picture [399 x 138] intentionally omitted <==**
+
+**==> picture [229 x 11] intentionally omitted <==**
+
+30
+
+**==> picture [361 x 37] intentionally omitted <==**
+
+_where s is the largest integer such that sK ≤ t − τ ._
+
+_Proof._ If _t ≡_ 0 (mod _K_ ) and _t − τ ≡_ 0 (mod _K_ ), then _θt_[(] _[i]_[)] = _θ_[¯] _t_ and _θt_[(] _−[i]_[)] _τ_[=] _[θ]_[¯] _[t][−][τ]_[, and the result] directly follows Lemma I.5. Without loss of generality, we assume _t ̸≡_ 0 (mod _K_ ) and _t − τ ̸≡_ 0 (mod _K_ ). Let _s_ be the largest integer such that _sK < t − τ_ . And let _s[′]_ be the largest integer such that _s[′] K < t_ . Similar to (32), we have
+
+**==> picture [268 x 20] intentionally omitted <==**
+
+**==> picture [294 x 28] intentionally omitted <==**
+
+where we subtract 2 _K_ to offset the addition of 2 _K_ in Lemma I.5 for general _t_ and _τ_ .
+
+Then to bound the client parameter progress after a synchronization, we first notice that when _t ̸≡_ 0 (mod _K_ ), we have
+
+**==> picture [251 x 107] intentionally omitted <==**
+
+Similar to (27)-(30), we have
+
+where _k_ is the smallest integer such that _t − k ≡_ 0 (mod _K_ ). Then, we get
+
+**==> picture [246 x 100] intentionally omitted <==**
+
+where we use the fact that 4 _kαt−k ≤_ 1. Therefore, we have
+
+**==> picture [216 x 42] intentionally omitted <==**
+
+Putting all together gives
+
+**==> picture [302 x 20] intentionally omitted <==**
+
+With the above corollary, we are ready to bound the gradient progress. **Corollary I.5.2** (Graident progress) **.** _If_ �� _θ_ ¯ _l_ �� _≤ G holds for all l ≤ t, then for any θ, we have_ ¯( _i_ ) _gt−τ_[(] _[θ]_[)] _[ −][g]_[¯] _t_[(] _[i]_[)][(] _[θ]_[)] _≤ Lσh_ ( _θ_ ) _αsKC_ prog( _τ_ ) _,_ ��� ���
+
+_where s is the largest integer such that sK ≤ t − τ ._
+
+31
+
+_Proof._
+
+_g_ ¯ _t_ ( _−i_ ) _τ_[(] _[θ]_[)] _[ −][g]_[¯] _t_[(] _[i]_[)][(] _[θ]_[)] = _A_ ¯[(] _t−[i]_[)] _τ[−][A]_[¯][(] _t[i]_[)] _θ_ +[¯] _b_[(] _t−[i]_[)] _τ[−]_[¯] _[b]_[(] _t[i]_[)] _≤ Lσ_ ( _R_ + (1 + _γ_ ) _∥θ∥_ ) _θt_ ( _−i_ ) _τ[−][θ] t_[(] _[i]_[)] _,_ ��� ��� ���� � ��� ��� ��� where the inequality uses Lemma G.2. Then we get the desired result by plugging in Corollary I.5.1.
+
+The third corollary of Lemma I.5 is the expression of _G_ , which was stated as an assumption in previous lemmas.
+
+**==> picture [373 x 38] intentionally omitted <==**
+
+_Proof._ For any _t ∈_ N, by (30) in Lemma I.5, we have
+
+�� _θ_ ¯ _t_ �� _≤_ 2 � _G_ ¯ + _Kα_ 0( _R_ + 2 _α_ 0 _C_ drift)� _._
+
+Plugging the expression of _C_ drift in Lemma I.4 into the above inequality gives the recursive definition:
+
+_G_ = 2( _G_[¯] + _α_ 0 _K_ ( _R_ + 2 _α_ 0 _·_ 2 _K_ ( _R_ + (1 + _γ_ ) _G_ ))) _._
+
+Note that we require 4 _Kα_ 0 _≤_ 1 in Lemma I.5. Thus, we have
+
+_G ≤_ 2 _G_[¯] + _R_ + 8 _α_ 0[2] _[K]_[2][(1 +] _[ γ]_[)] _[G,]_
+
+which gives
+
+**==> picture [287 x 55] intentionally omitted <==**
+
+## I.6 MIXING
+
+Unlike stationary MDPs in TD(0) and off-policy Q-learning, the mixing process in our algorithm is a virtual process. After backtracking, we fixed the policy as Γ( _θt_[(] _−[i]_[)] _τ_[)][, which then introduces a virtual] stationary MDP. We denote _O_[˜] _t_[(] _[i]_[)] = ( _S_[˜] _t_[(] _[i]_[)] _[,][U]_[˜] _t_[ (] _[i]_[)] _[,][S]_[˜] _t_[(] +1 _[i]_[)] _[,][U]_[˜] _t_[ (] +1 _[i]_[)][)][ the observation of this virtual MDP at] time step _t_ . **Lemma I.6** (Mixing) **.** _Let Ft−τ denote the filtration containing all preceding randomness up to time step t − τ . For any deterministic θ conditioned on Ft−τ —such as a constant parameter or a parameter determined by Ft−τ —we have_
+
+**==> picture [210 x 19] intentionally omitted <==**
+
+_Proof._ We define a new TD operator:
+
+**==> picture [425 x 154] intentionally omitted <==**
+
+32
+
+## I.7 BACKTRACKING
+
+**Lemma I.7** (Backtracking) **.** _If ∥θ_[¯] _l∥≤ G for all l ≤ t, then for any deterministic θ conditioned on Ft−τ , we have_
+
+**==> picture [266 x 19] intentionally omitted <==**
+
+_where_
+
+**==> picture [142 x 13] intentionally omitted <==**
+
+_Proof._ First, we have
+
+**==> picture [312 x 48] intentionally omitted <==**
+
+For a specific client, for notation simplicity, we omit the superscript ( _i_ ) and denote _Pθt_ by _Pt_ . Let _O_ = ( _s, a, s[′] , a[′]_ ); then we have
+
+**==> picture [408 x 152] intentionally omitted <==**
+
+where we use that fact that _Ut_ is dependent on _θt−_ 1 instead of _θt_ ; and when _θt−_ 1 is determined, _θt_ is not dependent on _St_ +1. Notice that for any ( _s, s[′] , a_ ) _∈S_[2] _× A_ , we have
+
+**==> picture [358 x 24] intentionally omitted <==**
+
+Thus, for _Pt−τ_ ( _O_[˜] _|Ft−τ_ ), we have a similar expression:
+
+**==> picture [467 x 80] intentionally omitted <==**
+
+Therefore, we decompose the observation distribution discrepancy as follows:
+
+**==> picture [471 x 35] intentionally omitted <==**
+
+where
+
+**==> picture [410 x 39] intentionally omitted <==**
+
+33
+
+For _S_ 1, we have
+
+**==> picture [398 x 112] intentionally omitted <==**
+
+By the Lipschitzness of the policy improvement operator (see Assumption 2), we know
+
+**==> picture [208 x 18] intentionally omitted <==**
+
+Then for any _θ[′] ∈_ Θ for which _Pt_ ( _θt_ = _·|Ft−τ_ ) has non-zero density, meaning that _θ[′]_ is reachable at time step _t_ , Corollary I.5.1 implies
+
+**==> picture [122 x 20] intentionally omitted <==**
+
+where _s_ is the largest integer such that _sK ≤ t − τ_ .
+
+Therefore, we have
+
+**==> picture [258 x 24] intentionally omitted <==**
+
+For _S_ 2, we have
+
+**==> picture [467 x 243] intentionally omitted <==**
+
+Substituting _S_ 1 and _S_ 2 with the above bounds gives
+
+**==> picture [444 x 40] intentionally omitted <==**
+
+34
+
+Applying a similar decomposition as _S_ 1 and _S_ 2, we can obtain an analogous bound to (33) for the state distribution discrepancy:
+
+**==> picture [312 x 76] intentionally omitted <==**
+
+**==> picture [103 x 11] intentionally omitted <==**
+
+Putting this bound back into (33) gives
+
+**==> picture [232 x 20] intentionally omitted <==**
+
+Finally, we get
+
+**==> picture [330 x 19] intentionally omitted <==**
+
+I.8 GRADIENT VARIANCE
+
+**Lemma I.8** (Gradient variance) **.**
+
+**==> picture [358 x 56] intentionally omitted <==**
+
+_where_
+
+_Proof._ Similar to Lemma I.1, we first decompose the gradient variance and establish the linear speedups for the backtracking and mixing terms.
+
+**==> picture [371 x 142] intentionally omitted <==**
+
+where (34) uses the fact that _**g**_ ¯( _**θ** ∗_ ) = _N_ 1 � _Ni_ =1 _[g]_[¯][(] _[i]_[)][ �] _θ∗_[(] _[i]_[)] = 0; and in (35), we denote � _N_ _**g** t−τ_ ( _**θ** ∗,_ _**O**_[˜] _t_ ) = _N_[1] � _i_ =1 _[g] t_[(] _−[i]_[)] _τ θ∗_[(] _[i]_[)] _[,][O]_[˜] _t_[(] _[i]_[)] , and the same notation applies to other semi-gradients. � � By the Lipschitzness of semi-gradient _gt_[(] _[i]_[)][,] _[ G]_[1][is bounded by]
+
+**==> picture [326 x 49] intentionally omitted <==**
+
+35
+
+By Lemma G.1, _G_ 2 is bounded by
+
+**==> picture [433 x 74] intentionally omitted <==**
+
+Now we are left with _G_ 3 and _G_ 4. However, we only have the bound of their first moment by Lemma I.7 and I.6. We first note that for a set of functions _{gi}[N] i_ =1[such that] _[ ∥][g][i][∥][∞][≤][a]_[ and independent] random variables _{xi}[N] i_ =1[such that] _[ ∥]_[E] _[g][i]_[(] _[x][i]_[)] _[∥≤][b]_[, we have]
+
+**==> picture [325 x 130] intentionally omitted <==**
+
+By (36) and Lemma I.7, the expectation of _G_ 3 is bounded by
+
+**==> picture [340 x 26] intentionally omitted <==**
+
+By (36) and Lemma I.6, the expectation of _G_ 4 is bounded by
+
+**==> picture [395 x 41] intentionally omitted <==**
+
+**==> picture [410 x 82] intentionally omitted <==**
+
+where we use the fact that _LHσ ≤ w ≤_ 1 required by (20), and
+
+_C_ var = 4 �4(3 + _H_[2] _L_[2] _σ_[2] ) _C_ drift[2][+ 4] _[H]_[2] _[L]_[2] _[σ]_[2] _[C]_ prog[2][+] _[ H]_[2] _[C]_ back[2] � _._
+
+Finally, we get
+
+**==> picture [442 x 26] intentionally omitted <==**
+
+Recall that Lemma I.5 bounds the central parameter progress, which gives a _naive_ bound of the mean square central parameter progress E _∥θ_[¯] _t − θ_[¯] _t−τ ∥_[2] _≤ αsK_[2] _[C]_ prog[2][(] _[τ]_[)][for][any] _[τ][≤][t]_[,][where] _s_ is the largest integer such that _sK ≤ t − τ_ . However, with the help of Lemma I.8, we can derive a tighter bound of the mean square central parameter progress, which is essential for proving Theorem 2 later.
+
+36
+
+**Corollary I.8.1** (Mean square central parameter progress) **.** _For any τ ≤ t, we have_
+
+**==> picture [298 x 19] intentionally omitted <==**
+
+_where s is the largest integer such that sK ≤ t − τ and_
+
+**==> picture [247 x 23] intentionally omitted <==**
+
+_is part of the gradient variance bound in Lemma I.8._
+
+_Proof._ Recall in Lemma I.5, we utilize a _naive_ bound of _∥_ _**g** t_ ( _**θ** t_ ) _∥_ by ( _R_ + (1 + _γ_ ) _∥θ_[¯] _t∥_ + 2 _ωl_ ); the key difference in this proof is that we will bound E _∥_ _**g** t_ ( _**θ** t_ ) _∥_[2] using Lemma I.8. Therefore, similar to (32), let _s_ and _s[′]_ be the largest integer such that _sK ≤ t − τ_ and _s[′] K ≤ t_ respectively. Then we have
+
+**==> picture [419 x 146] intentionally omitted <==**
+
+By Lemma I.8, we get
+
+**==> picture [343 x 30] intentionally omitted <==**
+
+Then, similar to (30), we want to bound E _∥θ_[¯] _l − θ∗∥_[2] by E _∥θ_[¯] _sK − θ∗∥_[2] for _sK < l ≤ t −_ 1. We have
+
+**==> picture [391 x 86] intentionally omitted <==**
+
+where (39) uses Young’s inequality and (40) uses Lemma I.8. We require 64 _αsK ≤_ 1, which gives (1 + _αl−_ 1)(1 + 64 _αl−_ 1) _≤_ (1 + 66 _αl−_ 1). Recursively applying (40) gives
+
+**==> picture [390 x 32] intentionally omitted <==**
+
+where we use the fact that _V_ is monotonically increasing. We further requires that 132( _τ_ + _K_ ) _αsK ≤_ 1. Then, similar to (25), we get
+
+**==> picture [333 x 16] intentionally omitted <==**
+
+37
+
+Combining (38) and (41) gives
+
+**==> picture [420 x 97] intentionally omitted <==**
+
+J PROOF OF THEOREM 2
+
+**==> picture [376 x 53] intentionally omitted <==**
+
+_Proof._ We need to pre-process the results from Lemmas I.3 to I.7 before plugging them back into Lemma I.1. Throughout this proof, let _s_ and _s[′]_ be the largest integers such that _sK ≤ t − τ_ and _s[′] K ≤ t_ . First, for Lemma I.3, by Young’s inequality _ab ≤_ 2[1] � _βa_[2] + _β_[1] _[b]_[2][�] , for any positive _β_ , we have
+
+**==> picture [345 x 31] intentionally omitted <==**
+
+Similarly, for Lemma I.4 and I.5.2, we have
+
+**==> picture [394 x 77] intentionally omitted <==**
+
+**==> picture [17 x 9] intentionally omitted <==**
+
+where _h_[2] ( _**θ** t_ ) = _N_[1] � _Ni_ =1 _[h]_[2][ �] _θt_[(] _[i]_[)] , and � E _h_[2] ( _**θ** t_ ) = 2 _H_[2] + 2(1 + _γ_ )[2] E [Ω _t_ ] _≤_ 2 _H_[2] + 8 _αs_[2] _[′] K[C]_ drift[2] _[≤][H]_ drift[2] _[,]_ where we define _H_ drift := ~~�~~ 2 _H_[2] + 8 _α_ 0[2] _[C]_ drift[2][.] Then, for Lemma I.6, we have
+
+**==> picture [421 x 164] intentionally omitted <==**
+
+38
+
+For _H_ 1, since both _gt_[(] _−[i]_[)] _τ_[and] _[g]_[¯] _t_[(] _−[i]_[)] _τ_[are independent of] _[ θ] t_[(] _[i]_[)] conditioned on _Ft−τ_ , Lemma I.5 and I.6 give
+
+**==> picture [450 x 268] intentionally omitted <==**
+
+For Lemma I.7, the trick we applied in (46) is no longer valid because _gt_[(] _[i]_[)] and _θt_[(] _[i]_[)] are correlated. Notice that _θt_[(] _−[i]_[)] _τ_[is deterministic given] _[ F][t][−][τ]_[, we first apply the following decomposition:]
+
+**==> picture [411 x 179] intentionally omitted <==**
+
+By the Lipschitzness of semi-gradient _gt_[(] _[i]_[)] and _gt_[(] _−[i]_[)] _τ_[and Corollary][ I.5.1][, we have]
+
+**==> picture [338 x 109] intentionally omitted <==**
+
+By Lemma I.7, we have
+
+39
+
+Finally, for _H_ 5, by Young’s inequality, we have
+
+**==> picture [385 x 113] intentionally omitted <==**
+
+Since _**θ** t−τ_ is deterministic given _Ft−τ_ , we can apply a similar argument to (37) here, which gives
+
+**==> picture [404 x 101] intentionally omitted <==**
+
+We further require that 132 _αsK_ ( _τ_ + 2 _K_ ) _≤ β_ . Then, plugging _H_ 3 _, H_ 4 _, H_ 5, and _V_ ( _τ_ ) back gives
+
+**==> picture [391 x 98] intentionally omitted <==**
+
+Putting Equations (43) to (45), (47) and (48) and Lemmas I.2 and I.8 back into Lemma I.1, we get
+
+**==> picture [421 x 152] intentionally omitted <==**
+
+Note that _τ_ is a virtual time range that we backtrack, and we have not determined it yet. Now we require it to be large enough such that _mρ[τ] ≤ αt_ . We also do not want _τ_ to be too large. Thus, we fix
+
+_τ_ = _⌈_ (log _αt −_ log _m_ ) _/_ log _ρ⌉≍_ log _αt[−]_[1] _[.]_ (49)
+
+We also require that the decay rate of _αt_ is non-increasing and[�] _[∞] t_ =0 _[α][t]_[= +] _[∞]_[.][Then, there exists] _T_ 1 _>_ 0 such that for any _t ≥ T_ 1, it holds that
+
+**==> picture [218 x 25] intentionally omitted <==**
+
+40
+
+The requirement on the step-size also gives lim sup _t→∞ αt/_ 2 _/αt <_ + _∞_ . Then, there exists _Cα[′][, C][α][>]_[ 0][ such that for any] _[ t][ ≥]_[0][, we have]
+
+**==> picture [135 x 22] intentionally omitted <==**
+
+Thus, after some rearrangement, we get
+
+**==> picture [64 x 15] intentionally omitted <==**
+
+**==> picture [477 x 101] intentionally omitted <==**
+
+Now we let _β_ and _α_ 0 small enough such that
+
+**==> picture [68 x 10] intentionally omitted <==**
+
+Then we get the final form
+
+**==> picture [391 x 132] intentionally omitted <==**
+
+where
+
+K PROOF OF CORROLARIES 2.1 AND 2.2
+
+In this section, we provide the proofs of Corollaries 2.1 and 2.2. Combining with the constant dependencies discussed in Appendix L, we get the final results presented in Section 5.
+
+**Corollary 2.1.** _With a constant step-size αt ≡ α_ 0 _≤ w/_ (2120(2 _K_ + 8 + ln( _m/_ ( _ρw_ )))) _, for any T ∈_ N _, we have_
+
+**==> picture [252 x 62] intentionally omitted <==**
+
+_where B is the squared convergence region radius defined by_
+
+_Proof._ Let _θ∗_ be the central optimal parameter. By Theorem 2, for any _T ∈_ N, we have
+
+**==> picture [428 x 56] intentionally omitted <==**
+
+**==> picture [340 x 23] intentionally omitted <==**
+
+41
+
+**Corollary 2.2.** _With a linearly decaying step-size αt_ = 4 _/_ ( _w_ (1 + _t_ + _a_ )) _, where a >_ 0 _is to guarantee that α_ 0 _≤_ min _{_ 1 _/_ (8 _K_ ) _, w/_ 64 _}, there exists a convex combination θ_[�] _T of {θ_[¯] _t}[T] t_ =0 _[such] that_
+
+**==> picture [290 x 25] intentionally omitted <==**
+
+_Proof._ Let _ct_ = _a_ + _t_ and _C_ =[�] _[T] t_ =0 _[c][t][≥]_[(] _[T]_[+ 1)][2] _[/]_[2][.][We define]
+
+**==> picture [72 x 30] intentionally omitted <==**
+
+¯ _T_ which is a convex combination of � _θt_ � _t_ =0[.][Then, by Jensen’s inequality, we have]
+
+**==> picture [280 x 30] intentionally omitted <==**
+
+Let _θ∗_ be the central optimal parameter. By Theorem 2, we have
+
+**==> picture [319 x 24] intentionally omitted <==**
+
+where _B_ ( _α_ ) = ( _C_ 1Λ[2] + _αC_ 2 _/N_ + _α_[2] _C_ 3 + _α_[3] _C_ 4) _/w_ . Recall our choice of the step-size _αt_ = 4 _/_ ( _w_ ( _a_ + _t_ + 1)); then we have 1 _/_ ( _αtw_ ) = ( _a_ + _t_ + 1) _/_ 4. Plugging this back into (51) gives
+
+**==> picture [426 x 219] intentionally omitted <==**
+
+Then by Theorem 1 and the fact that 1 _/w_ ≲ _C_ 1 (see Appendix L) and _a_ ≲ _K/w_[2] , we get
+
+**==> picture [374 x 25] intentionally omitted <==**
+
+## L CONSTANT DEPENDENCIES
+
+In this section, we establish explicit dependencies between the constants. We begin by introducing problem constants that are independent of other parameters: the reward cap _R >_ 0, discount factor _γ ∈_ (0 _,_ 1), projection radius _G_[¯] _>_ 0,[1] local update period _K_ , and kernel-related constants, _m ≥_ 1 _, ρ ∈_ (0 _,_ 1), and _λ_ := min _i∈_ [ _N_ ¯ ] _[λ]_[(] _[i]_[)] _[∈]_[(0] _[,]_[ 1]][.][Throughout this paper,][we use asymptotic notation]
+
+42
+
+as _R, G, K, m_[¯] _→∞_ and _γ, ρ →_ 1. We also use the nonasymptotic notation _a_ ≲ _b_ and _b_ ≳ _a_ to indicate that there exists _C ≥_ 0 such that _a ≤ Cb_ , and _a ≍ b_ to indicate that both _a_ ≲ _b_ and _b_ ≳ _a_ hold.
+
+We first give the dependencies of _σ[′]_ defined in (9). By its definition, we have _σ[′] ≥_ 0, and
+
+**==> picture [216 x 25] intentionally omitted <==**
+
+where the asymptotic notation holds as _ρ →_ 1 and _m →∞_ . We also get _σ_ = _σ[′]_ +2 = _O_ (log _m/_ (1 _− ρ_ )). We will now use _σ_ as a base constant.
+
+_w_ is an important MDP constant and plays a critical role in the convergence rate. By its definition (19), we get _w ≤_ 1 _/_ 2 and
+
+**==> picture [178 x 24] intentionally omitted <==**
+
+which gives
+
+**==> picture [92 x 12] intentionally omitted <==**
+
+We then consider _G_ and _H_ . By Corollary I.5.3, we get
+
+**==> picture [154 x 26] intentionally omitted <==**
+
+When _γ_ is near 1, the above bound is undesirable. Thus, when _γ_ is large, we can further require 4 _α_ 0 _K < √_ 0 _._ 5, which gives _G ≤_ 4(2 _G_[¯] + _R_ ). Without loss of generality, we have
+
+**==> picture [50 x 10] intentionally omitted <==**
+
+And by the definition of _H_ , we get
+
+**==> picture [126 x 12] intentionally omitted <==**
+
+We now use _H_ as a base constant and replace _G_[¯] + _R_ with _H_ for simplicity. _H_ can be viewed as the scale of the problem. If we choose _G_[¯] according to (Zou et al., 2019), then _H_ = _O_ ( _R/_ (1 _− γ_ )).
+
+By (20), we get the dependencies of the policy improvement operator’s Lipschitz constant _L_ :
+
+**==> picture [42 x 19] intentionally omitted <==**
+
+We now address the constants in Appendix I. By Lemma I.4, we directly have
+
+**==> picture [78 x 11] intentionally omitted <==**
+
+We now consider _α_ 0. There are two requirements on _α_ 0 throughout the proof: 4 _Kα_ 0 _<_ 1 in Lemmas I.4 and I.5, and 64 _α_ 0 _≤ w_ in Appendix J. Combining these conditions gives
+
+**==> picture [170 x 25] intentionally omitted <==**
+
+Therefore, _C_ prog in Lemma I.5 has the following dependencies:
+
+**==> picture [238 x 12] intentionally omitted <==**
+
+And _C_ back in Lemma I.7 has the following dependencies:
+
+**==> picture [128 x 12] intentionally omitted <==**
+
+Then, _C_ var in Lemma I.8 is controlled by
+
+**==> picture [268 x 13] intentionally omitted <==**
+
+> 1One can choose _G_ ¯ = _R/w_ as suggested in Zou et al. (2019). Here, we make it a pre-defined algorithm constant.
+
+43
+
+Next, we give the dependencies of constants in Appendix J. By definition, we have
+
+**==> picture [150 x 11] intentionally omitted <==**
+
+By the requirement of _β_ , we have
+
+**==> picture [30 x 10] intentionally omitted <==**
+
+And we have _Cα_ = _O_ (1). Therefore, we get
+
+**==> picture [170 x 60] intentionally omitted <==**
+
+Finally, we give the dependencies of constants in Corollaries 2.1 and 2.2. In Corollary 2.1, we choose a constant step-size _αt_ = _α_ 0. There are two requirements on _αt_ throughout the proof: 132( _τ_ + _K_ ) _αsK ≤_ 1 in Corollary I.8.1 and 132 _αsK_ ( _τ_ + 2 _K_ ) _≤ β_ in Appendix J. A concrete condition satisfying these requirements is _α_ 0 _≤ w/_ (2120 (2 _K_ + ln(2120 _m_ ) _/_ ( _ρw_ ))) _._ Furthermore, if we choose a small enough initial step size such that _α_ 0 _[−]_[1] _≍ τ_ ≳ max � _K, w[−]_[1][�] , then _C_ 2 _, C_ 3, and _C_ 4 becomes
+
+_C_ 2 = _O_ ( _H_[2] _τ_ ) = _O_[�] ( _H_[2] ) _, C_ 3 = _O_ ( _H_[2] _wτ_[4] ) = _O_[�] ( _H_[2] _w_ ) _, C_ 4 = _O_ ( _H_[2] _w_[2] _τ_[5] ) = _O_[�] ( _H_[2] _w_[2] ) _,_ (52)
+
+where _O_[�] omits the logarithmic dependencies on _τ_ . Then the convergence region radius in Corollary 2.1 becomes
+
+**==> picture [350 x 25] intentionally omitted <==**
+
+With the linearly decaying step-size in Corollary 2.2, (49) gives
+
+**==> picture [40 x 10] intentionally omitted <==**
+
+as the total number of iterations _T →∞_ . And the requirements on _αt_ in previous discussion automatically hold for large enough _t_ . Omitting the logarithmic dependencies on _T_ , _C_ 2 _, C_ 3, and _C_ 4 in this case are the same as (52). Therefore, the finite-time error bound in Corollary 2.2 becomes
+
+**==> picture [396 x 26] intentionally omitted <==**
+
+**==> picture [142 x 10] intentionally omitted <==**
+
+In this section, we reduce our algorithm and analysis to the tabular setting. Recall that _S_ and _A_ are the measures of the state space _S_ and action space _A_ , respectively. For the tabular setting, _S_ and _A_ are the numbers of states and actions. Then, we choose the feature map to be an indicator vector function, i.e.,
+
+**==> picture [244 x 14] intentionally omitted <==**
+
+where we treat _ϕ_ ( _s, a_ ) as a vector and use a two-dimensional index such that [ _ϕ_ ( _s, a_ )]( _s′,a′_ ) is the ( _s[′] , a[′]_ )-th element of _ϕ_ ( _s, a_ ); 1 is the indicator function. Using this feature map, the parameter _θ_ is indeed the estimated value function table:
+
+**==> picture [129 x 14] intentionally omitted <==**
+
+Therefore, the local update rule in Algorithm 1 reduces to the tabular SARSA update rule (2).
+
+We now show a natural bound _G_ for _∥θ∥_ 2 without an explicit projection. First, the true value function (1) is bounded by
+
+**==> picture [158 x 28] intentionally omitted <==**
+
+44
+
+Suppose current estimated value function satisfies that _|Qt_ ( _s, a_ ) _| ≤ G∞_ for any state-action pair, then we have
+
+**==> picture [240 x 12] intentionally omitted <==**
+
+**==> picture [188 x 79] intentionally omitted <==**
+
+Therefore, if the bound holds for the initial estimated value function, it holds for all sequential, local or central, estimated value functions. However, _G∞_ is a upper bound for _∥θ∥∞_ . For 2-norm, we have
+
+**==> picture [152 x 25] intentionally omitted <==**
+
+which further gives
+
+**==> picture [86 x 31] intentionally omitted <==**
+
+Also, for tabular FedSARSA, Remark 2 tells us that
+
+**==> picture [100 x 24] intentionally omitted <==**
+
+_λ_ is the probability of visiting the least probable state-action pair under the steady distribution of the optimal policy across all agents. Then, Corollary 2.2 can be translated into the following corollary.
+
+**Corollary 2.3** (Finite-time error bound for tabular FedSARSA with decaying step-size) **.** _With a linearly decaying step-size αt_ = 4 _/_ ( _w_ (1 + _t_ + _a_ )) _, where a >_ 0 _is to guarantee that α_ 0 _≤_ min _{_ 1 _/_ (8 _K_ ) _, w/_ 64 _}, there exists a convex combination θ_[�] _T of {θ_[¯] _t}[T] t_ =0 _[such that]_
+
+**==> picture [338 x 25] intentionally omitted <==**
+
+_where the asymptotic notation suppresses the logarithmic factors. Since ∥θ∥∞ ≤∥θ∥_ 2 _, we also get the finite-time error bound under the infinity norm._
+
+45
+
diff --git a/open_review/iclr2024_8547.json b/open_review/iclr2024_8547.json
new file mode 100644
index 0000000000000000000000000000000000000000..bc031284037f348ff1ccdc06ace8617e998f5260
--- /dev/null
+++ b/open_review/iclr2024_8547.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8547",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "DIRECTIONALITY IN GRAPH TRANSFORMERS",
+ "abstract": "We study how one can capture directionality in graph transformers, for learning over directed graphs. Most existing graph transformers do not take edge direction into account. We therefore introduce a novel graph transformer architecture that explicitly takes into account the edge directionality. To achieve this, we make use of dual encodings to represent both potential roles, i.e., source or target, of each pair of vertices linked by a directed edge. These dual encodings are learned by leveraging the latent adjacency information extracted from a novel directional attention module, localized with $k$-hop neighborhood information. We also study alternative approaches to incorporating directionality into other graph transformers to enhance their performance on directed graph learning tasks. To evaluate the importance of edge direction, we empirically characterize via randomization whether direction really matters for the downstream task. We propose two new directional graph datasets where direction is intrinsically related to learning. Via experiments on directional graph datasets, we show that our approach yields state-of-the-art results.",
+ "rebuttal": "Thank you for your feedback. Below are our responses to the issues you've highlighted:\n\nW1. We provide the answer to this question in our general response. As noted, our model does not use more parameters, since we adjust the choices to keep it aligned with the competitive baselines.\n\nW2. The complexity of graph transformers typically depends on their structural design. Standard graph transformers, such as Vanilla Graph Transformer and DiGT, assume that all nodes are interconnected, resulting in a complexity that is quadratic relative to the number of nodes. In contrast, graph transformers employing sparse attention focus only on neighboring nodes and ignore non-existent edges. This approach reduces both computational time and memory requirements and works like graph neural networks. We will explore sparse attention techniques in the future. \n\nW3. There are no definitive measures to characterize the importance of directionality. One option is to use various directed graph metrics like distribution of in and out-degrees, directed cycles, etc. Another option is to use some spectral measures. We used the SCC entropy that combines some aspects of the directed metrics, and we also study the empirical effect of random edge flipping. We believe this is an interesting open question for the graph learning community.\n\nW4. Thank you for suggesting the Dir-GNN work, which is a directed graph neural network that focuses on incoming and outgoing edges. However, DiGT assumes that all the nodes are connected since our model is a graph-level transformer model. Dir-GNN was first published on May 17, 2023, making it concurrent to our research. We will thoroughly explore it in our future studies.\n\nWe want to thank you for your thoughtful ideas. Here is our response to the concerns you raised regarding potential weaknesses:\n\nW1. We choose to retain the k-hop constraint, since it helps somewhat, as shown in Table 11 in the appendix. We replicate the last two rows of that table here:\n\n| Model | Flow2 | Flow3 | Flow6 | Twitter3 | Twitter5 |\n|--------------------|-------|-------|-------|----------|----------|\n|DiGT-DA (no k-hops) | 96.52 | 74.33 | 46.22 | 91.31 | 85.46 |\n|DiGT | 97.42 | 74.55 | 46.80 | 91.67 | 85.94 |\n\nAs we can see the use of k-hops c [...]\n\nWe appreciate your positive feedback. Here are our answers to the points raised:\n\nW1. Visualizing the attention scores would be interesting, something we can explore for the future.\n\nW2. We used SVD-based positional encodings (PEs) since the left and right singular values/vectors can be used very naturally for directed graphs, unlike the Graph Laplacian, which is symmetric. For a comparison with Magnetic Laplacian PEs, see Q2 below.\n\nW3. We have included the number of parameters used by our model and others in the general response above. Thus, our method is no more and no less scalable than ot [...]\n\nWe want to thank you for your thoughtful comments. Below are our responses:\n\nW1. Our DiGT model is inspired by the well known HITS approach for directed graphs using notion of authority and hub scores (which, are eigenvectors of the $A^T A$ and $A A^T$ matrices). Our key innovation is the use of source/target vectors (embeddings) with a learnable adjacency matrix in the HITS approach, and thus it has a solid theoretical foundation.\n\nW2. We not only suggest a novel learnable formulation for the directed embeddings, but we also study alternative formulations for incorporating directionality, whi [...]\n\nSince several reviewers had questions about the number of parameters for our DiGT model versus the other baseline methods, we show in the table below that our model has a comparable number of parameters:\n\n\n|Models | DiGT | EGT | Exphormer |\n|------------|-------|--------|-----------|\n|#Parameters | 91446 | 115410 | 102246 |\n|#Layers | 4 | 4 | 4 |\n|#Heads | 8 | 8 | 4 |\n|Hidden dim | 32 | 48 | 32 |\n\n\nThe numbers are shown for the Flow2 dataset, with similar values for other datasets and models. For all experiments, we consiste [...]",
+ "initial_scores": [
+ 3,
+ 5,
+ 3,
+ 6
+ ],
+ "score_mean": 4.25,
+ "score_variance": 2.25,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "This paper proposes Directed Graph Transformer (DiGT), a new graph transformer architecture for analyzing directed graphs. DiGT incorporates edge direction and graph connectivity as integral elements in Transformer, enabling to dynamically learn dual node encodings that capture the directionality of edges. Experimental results show that DiGT improves over graph neural networks and graph transformers in directed graph classification tasks. As pointed out by reviewers, the paper needs to compare with necessary baselines; some of the modeling designs are not well justified by either theoretical or empirical evidenc; and the computational cost (e.g., due to dual encoder) of the proposed model seems high.",
+ "forum_id": "Yp01vcQSNl",
+ "primary_area": "learning on graphs and other geometries & topologies",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_1Uzt",
+ "review_id": "uzEm6onQYn",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2053,
+ "edit_detected": true,
+ "edit_delta_seconds": 905970,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_r1B3",
+ "review_id": "9FG47UFvrd",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2775,
+ "edit_detected": true,
+ "edit_delta_seconds": 989043,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_yoox",
+ "review_id": "sMDMt3Tm2z",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3985,
+ "edit_detected": true,
+ "edit_delta_seconds": 1049741,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_A6eP",
+ "review_id": "Ml1w96kC9r",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2054,
+ "edit_detected": true,
+ "edit_delta_seconds": 1164355,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8547.md b/open_review/iclr2024_8547.md
new file mode 100644
index 0000000000000000000000000000000000000000..9454f9f2965314a21987da345bb6ed84901fe9ff
--- /dev/null
+++ b/open_review/iclr2024_8547.md
@@ -0,0 +1,315 @@
+
+
+## DIRECTIONALITY IN GRAPH TRANSFORMERS
+
+Authors withheld for review
+
+## ABSTRACT
+
+We study how one can capture directionality in graph transformers, for learning over directed graphs. Most existing graph transformers do not take edge direction into account. We therefore introduce a novel graph transformer architecture that explicitly takes into account the edge directionality. To achieve this, we make use of dual encodings to represent both potential roles, i.e., source or target, of each pair of vertices linked by a directed edge. These dual encodings are learned by leveraging the latent adjacency information extracted from a novel directional attention module, localized with _k_ -hop neighborhood information. We also study alternative approaches to incorporating directionality into other graph transformers to enhance their performance on directed graph learning tasks. To evaluate the importance of edge direction, we empirically characterize via randomization whether direction really matters for the downstream task. We propose two new directional graph datasets where direction is intrinsically related to learning. Via experiments on directional graph datasets, we show that our approach yields stateof-the-art results.
+
+## 1 INTRODUCTION
+
+Graphs are one of the most general and versatile data structures that are encountered in diverse application domains, ranging from biology and social networks to transportation and finance. Analyzing the graphs that arise from such applications and discovering patterns in them is of paramount importance in the associated domains. An important property of a graph is whether its edges are directed or not. Directed graphs are natural representations of relations including social connections, human communications, paper citations, financial transactions, web links, and causes and effects. The state-of-the-art methods for analyzing directed graphs use Graph Neural Networks (GNNs) to learn node and directed edge encodings for tasks like link prediction (Kollias et al., 2022; Salha et al., 2019), node classification (Zhang et al., 2021) and graph-level tasks (Beaini et al., 2021).
+
+In this paper, we address the relatively unexplored problem of analyzing _directed_ graphs using graph transformers (GTs). Transformers hold the promise of enhanced performance over GNNs due to their ability to represent entities without enforcing the inductive adjacency bias (Vaswani et al., 2017), and due to their _dynamic_ multi-head attention mechanism, in contrast to GNNs where the attention is hardwired in _static_ edge weights. This flexibility of GTs comes, however, with the challenge of modeling directed graph structures. Most existing GT works focus on integrating only the graph connectivity structure into the Transformer. They do not prioritize how to reflect the directionality of graph edges in their proposed architecture. This is either due to the fact that one of their key techniques is not applicable to directed graphs (e.g., Laplacian eigenvectors (Dwivedi & Bresson, 2021)) or the edge-direction information is encoded as static, fixed scalars (either local in/out degrees in (Ying et al., 2021) or pairwise shortest path distances in (Hussain et al., 2022; Ying et al., 2021)).
+
+We introduce _Directed Graph Transformer_ (DiGT), a novel GT architecture that explicitly takes into account graph directionality. The crux of this architecture is that it incorporates both edge direction and graph connectivity structure into the standard Transformer architecture (Vaswani et al., 2017) as first-class citizens. Edge direction is represented by dual encodings for each graph node capturing its potential role as either a source or target of a directed edge. A node encoding in DiGT thus consists of a pair of source and target vectors. Edge direction information is preserved in node representations: the attention between a query node _i_ and a key node _j_ will yield different values depending on whether _i_ points to _j_ , or _j_ points to _i_ . Thus, the node encodings produced by DiGT
+
+1
+
+embed edge direction semantics in them. These source and target encodings are then learned using a multi-head _directional attention_ module that incorporates edge channels as bias. By interpreting attention matrices as latent adjacency matrices, our technique updates a node’s source vector by aggregating the target vectors of the neighbors it points to, after incorporating suitable learnable parameters; similarly, a node’s target vector update is the aggregation of the source vectors of those neighbors pointing to it. It is important to note that in DiGT dual node encodings are _dynamically_ learned without using the explicit directed graph structure, whereas previous approaches exploited the static connectivity information only.
+
+Our main contributions are as follows: i) We propose a new directed graph Transformer architecture (DiGT) that uses dual node encoding approach with source and target encodings, and a novel directional attention mechanism, ii) We propose several alternative strategies for incorporating direction into graph transformers, in terms of exploiting single or dual attention matrices, and we show that these approaches can be incorporated into different GT architectures like (vanilla) Transformers (Vaswani et al., 2017), EGT (Hussain et al., 2022), and Exphormer (Shirzad et al., 2023), to improve their performance on directed graphs, iii) We characterize the “directionality” of a graph dataset, showing that some of the popular directed graph benchmarks like MNIST/CIFAR10 (Dwivedi et al., 2020), Ogbg-Code2 (Hu et al., 2020) are not truly directional. Therefore, we introduce the FlowGraph and Twitter family of directed graph datasets that explicitly relate the edge direction pattern in graphs to their classification labels. iv) We compare our proposed DiGT model against other GNN and GT variants for directed graph classification tasks. Our experiments reveal that when edge directionality is an inherent, rather than derivative, characteristic of the instances to be classified, DiGT can beat the best state-of-the-art (SOTA) GT and GNN alternatives by a large margin.
+
+## 2 RELATED WORK
+
+**Methods for Directed Graph Learning.** Earlier works on analyzing directed graphs are based on matrix factorization techniques to learn node encodings, such as Singular Value Decomposition (SVD) of higher-order adjacency matrices exploring the directed _k_ -hop neighborhood of a node (Ou et al., 2016), or Non-negative Matrix Factorization (NMF) (Sun et al., 2019). Another line of work focuses on analyzing special matrix forms of adjacency information such as the Hermitian adjacency matrix of the directed graph (Cucuringu et al., 2020) or learning linear combinations of powers of the directed graph adjacency matrix and its transpose (He et al., 2021). APP (Zhou et al., 2017) uses random walks with restart as a tool to scale to large graphs and harvests asymmetric and high-order similarities between node pairs. More recently, GNNs have been used (Kollias et al., 2022; Tong et al., 2020a;b; Zhang et al., 2021). Compared to the above techniques, GNNs operate based on a message-passing architecture and provide higher learning flexibility due to the usage of learnable weight matrices that multiply the node encodings. Graph Attention Network (GAT) (Veliˇckovi´c et al., 2017) is a GNN that incorporates local self-attention resembling a transformer.
+
+A limitation of all the aforementioned approaches is that they critically rely on the explicit directed graph structure (adjacency matrix): (a) The _k_ -hop neighborhood learning techniques (He et al., 2021; Ou et al., 2016; Sun et al., 2019; Zhou et al., 2017) involve matrix factorization or composition of powers of known adjacency matrices, or random walks over the graph structure. (b) Special matrix forms of adjacency information used in (Cucuringu et al., 2020; Tong et al., 2020a) require the directed graph as input. (c) GNNs in (Kollias et al., 2022; Salha et al., 2019; Tong et al., 2020b; Veliˇckovi´c et al., 2017; Zhang et al., 2021) are message-passing models, and single or dual-node encoding messages can flow only through existing edges. Reliance on the directed graph structure introduces inductive bias during learning: latent edges that could positively contribute to the learning problem at hand can be missed as a result. In contrast, DiGT does not rely on the directed graph structure (in effect it assumes full graph connectivity) and learns the edge weights by exchanging the dual node encodings between the nodes.
+
+We note here that the general idea of dual node encodings has also been used in several of the above works. However, such encodings are typically computed by exploiting the directed graph structure. Applying this idea in GTs is challenging because there are no assumptions on graph structure (i.e. assuming full connectivity) and they need to be learned in a dynamic manner.
+
+2
+
+**Graph Transformers** GTs were introduced in (Dwivedi & Bresson, 2021), which proposed two inspiring GT architecture variants. The first variant produces only node encodings, while the second variant is augmented to also produce edge encodings. Node encodings follow the standard Transformer architecture (Vaswani et al., 2017), while edge encodings are updated by scaling the attention matrix. They attend only to existing neighbors (local self-attention), so a strong inductive bias is enforced. SAN (Kreuzer et al., 2021) uses learned positional encodings (LPE) to enhance the learning of graph structure. SAT Chen et al. (2022) enhances the learning by extracting k-hop subgraphs. In Graphormer (Ying et al., 2021), the attention aperture critically expands to all nodes (global selfattention). They propose adding and learning node encodings that are functions of input and output degree centralities (centrality encoding), and arbitrary node pairs are represented by two bias terms to the attention matrix (spatial and edge encodings). In Edge-Augmented Transformer (EGT) (Hussain et al., 2022), they combine ideas from (Dwivedi & Bresson, 2021) (separate channels for nodes and edges, scaling and gating the attention matrix) and from (Ying et al., 2021) (global self-attention, bias terms from spatial encoding, however, learned from the edge channels) to yield an effective GT approach. Recently, the models that combine graph neural networks with graph transformers, such as GraphGPS (Ramp´aˇsek et al., 2022) and Exphormer (Shirzad et al., 2023), attained competitive performance results, while aiming at scalability. GraphGPS is a framework for combining pluggable encoding, local message passing, and global attention modules; Exphormer introduces a sparse attention mechanism based on global virtual nodes and expander graphs. In (Geisler et al., 2023), they learn directed graphs using Transformers which leverage special positional encodings based on Magnetic Laplacian eigenvectors and random walks.
+
+Our DiGT approach is a global self-attention transformer, learning both dual node encodings and edge encodings (dual-channel architecture). A node encoding in DiGT consists of a pair of source and target vectors that capture the edge direction semantics. Therefore, in downstream tasks that require directionality and take node encodings as input, DiGT provides embeddings of high discriminative power. In comparison, Graphormer (Ying et al., 2021), EGT (Hussain et al., 2022), and the other graph transformers (Dwivedi & Bresson, 2021; Zhang et al., 2020) produce only singlevector node embeddings that cannot differentiate the direction of an edge; and, as already mentioned, directed GNNs (Kollias et al., 2022; Salha et al., 2019; Tong et al., 2020b; Veliˇckovi´c et al., 2017; Zhang et al., 2021) produce dual node embeddings that suffer from convolutional inductive bias, that is restricted to only the given neighborhood structure.
+
+## 3 DIGT: DIRECTED GRAPH TRANSFORMER
+
+We now describe our DiGT directed graph transformer that uses three main ideas: dual node embeddings for source and target representations; which are combined with learnable implicit adjacency information via directed attention; as well as using _k_ -hop neighborhood information. We will detail these ideas below. Our model typically contains multiple DiGT layers, as well as multiple heads for the attention. However, in the description below, we omit the layer and head notations for ease of presentation.
+
+## 3.1 INPUT LAYER
+
+We represent a directed _graph_ as _G_ ( _V, E_ ); _V_ is the set of _n_ = _|V |_ graph nodes, _E_ = _{_ ( _i, j_ ) _∈ V × V_ : _i �→ j}_ is the set of its _m_ = _|E|_ directed edges. Each node _i_ is equipped with a pair of vectors in R _[d]_ , 1 _≤ i ≤ n_ : (i) vector **s** _i_ encodes _i_ ’s role as a source, which is the same for any of the directed edges it participates in as a source, and (ii) vector **t** _i_ encodes _i_ ’s role as a target.
+
+Given the _n × n_ adjacency matrix **A** of the input (directed) graph _G_ , consider its truncated SVD, 1 **A** _∼_ **U** _r_ **Σ** _r_ **V** _[⊤] r_[,][where][we][keep][the] _[r]_[largest][singular][value][triplets,][and][let][us][set] **[S]** _[r]_[=] **[U]** _[r]_ **[Σ]** _r_ 2 1 and **T** _r_ = **V** _r_ **Σ** _r_ 2 for the source and target positional encodings. When input node features **X** _f_ are available (set **X** _f_ = 0 otherwise), the input/initial _node_ embeddings for the DiGT model are given as
+
+**==> picture [330 x 11] intentionally omitted <==**
+
+where _Ls_ , _Lt_ and _Lf_ are learnable linear transformations (subscripted as _s_ for the sources, _t_ for targets, and _f_ for input features), and **S** _,_ **T** _∈_ R _[n][×][d]_ .
+
+3
+
+For encoding the edges, if input edge features **E** _f_ are available (set **E** _f_ = 0 otherwise) the input/initial _edge_ embeddings for the DiGT model are given as
+
+**==> picture [275 x 11] intentionally omitted <==**
+
+where _Le_ is an embedding layer, _Lef_ is a learnable linear transformation, and _δst_ is the shortest directed path distance from source _s_ to target _t_ , clipped at maximum _k_ -hops (if _t_ is not reachable from _s_ we set _δst_ = _k_ + 1). The result, _EST ∈_ R _[n][×][n][×][d][e]_ , is the matrix of _de_ dimensional edge embeddings, and we set **E** _T S_ as the transpose of **E** _ST_ along the first two dimensions.
+
+## 3.2 DIGT ATTENTION LAYER
+
+Given the dual node encodings, we need to determine the relationship between the source and target encoding vectors of different nodes, which will be used for updates in our GT architecture. For this, we draw high-level inspiration from the HITS centrality algorithm (Kleinberg, 1999) that computes two scalar-valued _hub_ and _authority_ scores for each node in a directed graph – a source node with a high hub score refers to (or points to) target nodes that contribute relevant information (in our case, for learning), and thus gain elevated authority scores. Consider for the moment one-dimensional or scalar source and target node embeddings, _si_ and _ti_ , which serve as the hub and authority score, respectively; we can express their relationship as _si_ =[�] _i�→j[t][j]_[(i.e.,][good][hubs][point][to][good] authorities) and _ti_ =[�] _j�→i[s][j]_[(i.e., good authorities are pointed to by good hubs).]
+
+Generalizing to our _d_ -dimensional source and target encoding _vectors_ **s** _i_ and **t** _i_ , we could analogously write:
+
+**==> picture [276 x 24] intentionally omitted <==**
+
+We can write the above equations more compactly as **S** = **AT** and **T** = **A** _[⊤]_ **S** . Conceptually, **s** _i_ and **t** _i_ play the role of multi-dimensional hub and authority scores.
+
+**Implicit and Directed Adjacency via Attention:** The key insight in DiGT is that we should not rely on the fixed adjacency matrix **A** ; rather, we should construct an _implicit_ adjacency matrix, denoted **A**[¯] , by exploiting the attention mechanism. A straightforward approach to compute **A**[¯] could be **A**[¯] = **ST** _[⊤]_ . However, we need to make this learnable. To allow the flexibility of learning weight matrices for computing the implicit adjacency we use dual attention mechanisms. For the source nodes **S** , let
+
+**==> picture [343 x 41] intentionally omitted <==**
+
+and similarly for the target nodes **T** , let
+
+where all **W** _∈_ R _[d][×][d][p]_ are learnable weight matrices, and _dp_ is the projection dimensionality (suitably scaled down, based on the number of heads). We obtain a pair of attention matrices
+
+**==> picture [333 x 14] intentionally omitted <==**
+
+That is, the attention matrix **A**[¯] _ST_ treats the source nodes as queries and the target as keys to compute their similarity, and vice-versa for **A**[¯] _T S_ .
+
+**Edge Bias and Neighborhood Attention:** We now allow for the edge channels to directly influence the attention by introducing a per head _bias_ matrix, **B** _ST ∈_ R _[n][×][n]_ , and _gate_ matrix, **G** _ST ∈_ R _[n][×][n]_ , both of which are linear transformations from the edge encodings **E** _ST_ (with added layer norms). Further, **B** _T S_ and **G** _T S_ are their transpose matrices, respectively.
+
+Next, we _localize_ the attention from node channels to the _k_ -hop neighborhood around each node. This is implemented by masking the attention matrix along with the edge bias via an element-wise product with the binary _k_ -hop matrix **D**[(] _[k]_[)] which is defined by setting **D**[(] _i,j[k]_[)][=][1] _[iff][δ][ij][≤][k]_[for] the shortest path distance from node _i_ to node _j_ , and zero otherwise. Thus, the attention matrices, denoted **A**[˜] , for this layer are given as:
+
+**==> picture [345 x 15] intentionally omitted <==**
+
+This way the attention considers all node pairs within _k_ -hops.
+
+4
+
+**Directional Attention:** Finally, unlike traditional transformers that compute node importance via a softmax along each _row_ of the attention matrix, we stack both **A**[˜] _ST_ and **A**[˜] _T S_ and compute the softmax along the stacking direction, given as
+
+**==> picture [272 x 13] intentionally omitted <==**
+
+By doing this, we weigh the importance of directionality for the attention/adjacency information.
+
+Lastly, we enable the flow of information between nodes by gating their value representations prior to aggregation; this is realized as multiplication by the sigmoid function, _σ_ (), of the entries in _gate_ matrices, **G** _ST_ and **G** _T S_ , resulting in
+
+**==> picture [318 x 19] intentionally omitted <==**
+
+where **Y** _∈_ R _[n][×][d][p]_ is the value representation for one head. So, when we have _h_ = _d/dp_ heads, we concatenate all of them (and add layer norm) to obtain the final value representation **Y** _∈_ R _[n][×][d]_ , for the next step. Also, the different DiGT layers do not share edge embeddings and this is also true for bias and gate matrices.
+
+## 3.3 OUTPUT LAYERS AND PREDICTION
+
+One point to note is that, after each DiGT layer, we take the combined value encoding **Y** , and we use layer normalization and feed-forward network modules with residual connections, to produce the node and edge encoding outputs for a DiGT layer. These outputs become inputs for the next layer. Thus, the updated dual encodings **S** , **T** for the next layer are given as:
+
+**==> picture [309 x 11] intentionally omitted <==**
+
+where, _LV S_ and _LV T_ are two linear transformations followed by a non-linear activation _f_ (with layer norms and residual connections). To obtain the updated edge embeddings **E** _ST ∈_ R _[n][×][n][×][d][e]_ for the next layer, we add together **A**[¯] _ST_ and **B** _ST_ from all the _h_ heads, and apply a learnable linear transformation and non-linearity, as follows: **E** _ST_ = _f_ ( _LE_ ( **A**[¯] _ST_ + **B** _ST_ )).
+
+Lastly, to obtain the final output node embeddings, we concatenate both the source and target embeddings, as follows: **X** = concat( **S** _,_ **T** ). After the last DiGT layer is processed, the encodings **X** are driven through some final learning task-specific modules. These are typically multilayer perceptron layers (MLP) for tasks related to _node_ and _edge_ learning (node classification, link prediction), or pooling layers for _graph-level_ learning (graph classification, graph regression). For the directed graph classification task, we use _global average pooling_ as our main method for producing a representation/encoding of the whole graph; this is essentially the average of the final node encodings. We also experiment with the method of _virtual nodes_ based pooling (Hussain et al., 2022): a clique of artificial nodes (virtual nodes) are added to each graph and connected to all its nodes. We add bidirectional edges between each virtual node and all the rest of the graph nodes. After training, we average the concatenated source and target node embeddings of the virtual nodes and leverage the same final MLP layers for the downstream task.
+
+## 3.4 ALTERNATIVE APPROACHES FOR DIRECTIONALITY
+
+We now propose some other alternatives to model directionality directly in Transformer architectures.
+
+**Exploiting Asymmetric Attention Matrix** One simple approach to incorporating direction into the Transformer architecture is to leverage the inherent asymmetric nature of the attention matrix. Given node features **X** _∈_ R _[n][×][d]_ , the key, query, and value matrices are given as
+
+**==> picture [333 x 11] intentionally omitted <==**
+
+Consider the attention matrix before the softmax, given as
+
+**==> picture [80 x 13] intentionally omitted <==**
+
+5
+
+This matrix is inherently asymmetric; we can thus exploit the attention that queries pay to keys and that keys pay to queries, to obtain the attention matrices by taking the softmax along the rows (same as regular attention) or softmax along the columns, as follows
+
+**==> picture [351 x 13] intentionally omitted <==**
+
+where we use the subscript `cols` to denote that softmax is applied along the columns.
+
+To obtain the new value matrix several different strategies can be used to aggregate the two attention matrices together, which we discuss in the ablation studies. An effective approach is to do a weighted (learnable) sum of the two value representations:
+
+**==> picture [268 x 11] intentionally omitted <==**
+
+where **W** _ST ,_ **W** _T S ∈_ R _[d][×][d]_ are learnable weight matrices. Note that we can also leverage directional attention (see Eq. (8)) in the equation above.
+
+**Exploiting Dual Attention Matrices** Another strategy to incorporate direction is by leveraging two key, query and value representations for each node, given as:
+
+**==> picture [342 x 25] intentionally omitted <==**
+
+We can then obtain dual attention matrices:
+
+**==> picture [375 x 19] intentionally omitted <==**
+
+which can then be aggregated to obtain the new value representation via the weighted sum approach in Eq. (13).
+
+This is similar to DiGT, but the key difference is that the dual representations are used only within the attention layer, whereas DiGT uses dual node embeddings in all layers.
+
+- 4 EXPERIMENTS
+
+We conduct our experiments mainly on NVIDIA V100 GPUs, with 32GB memory, using PyTorch. An anonymous link to our implementation is provided in the Appendix, which also contains additional experimental details and ablation studies.
+
+## 4.1 DIRECTED GRAPH DATASETS
+
+There are several well-known directed datasets to assess the performance of graph models, such as MNIST (Achanta et al., 2012)and CIFAR10 (Krizhevsky et al., 2009), Ogbg-Code2 (Hu et al., 2020), and Malnet-tiny (Freitas et al., 2020). To evaluate the directionality in these datasets, we design a random flip test. In essence, for a given edge flip probability, say _θ_ (e.g., _θ ∈{_ 0 _._ 25 _,_ 0 _._ 5 _}_ ), given edge ( _u, v_ ) we flip it with probability _θ_ during each training, validation and testing step. If a model consistently achieves accuracy comparable to the original dataset, it suggests that directionality is not a crucial factor. Table 1 shows the results with _θ_ = 0 _._ 5 (i.e, 50% of the edges are flipped); see Appendix for full results. We use EGT (Hussain et al., 2022) on the MNIST and CIFAR10 graphs, Exphormer (Shirzad et al., 2023), which is the SOTA on Malnet-tiny, and DAGformer (Luo, 2022), which is the top-performer on the Ogbg-Code2 leaderboard (Hu et al., 2020). We observe that despite altering the direction of edges on MNIST, CIFAR10 and Ogbg-Code2, the results remain largely unaffected, which indicates that directionality is not important. On the other hand, there is a performance loss on Malnet-tiny.
+
+**FlowGraph datasets.** Given the limitations of existing benchmarks, we introduce a family of directed graph datasets that explicitly relate the edge direction pattern in graphs to their classification labels. In particular, we generate graphs with their nodes organized in successive layers and then we leverage the notion of a flow between the layers through directed edges: for a predefined subset of layers, graphs with different aggregate flow between successive layers in the subset are assigned different labels. Our FlowGraph generator is modeled after the _Directed Stochastic Block Model_
+
+6
+
+Table 1: Randomized directionality via edge flips: Model performance
+
+|Model MNIST CIFAR10|Model Ogbg-Code2|Model Malnet-tiny|
+|---|---|---|
+|EGT 98.41 +/- 0.04 68.70 +/- 0.41 EGT-Flip50 97.99 +/- 0.09 67.28 +/- 0.38|DAG 20.2 +/- 0.2 DAG-Flip50 19.0 +/- 0.1|Exphormer 94.02 +/- 0.21 Exphormer-Flip50 87.90 +/- 1.65|
+||||
+|Model FlowGraph2 FlowGraph3 FlowGraph6 Twitter3 Twitter5|||
+|DiGT 97.42 +/- 0.82 74.55 +/- 0.69 46.80 +/- 0.97 91.67 +/- 0.79 85.94 +/- 0.25 DiGT-Flip50 49.67 +/- 1.39 32.33 +/- 1.66 16.78 +/- 0.04 82.96 +/- 1.13 65.44 +/- 0.38|||
+
+_(DSBM)_ (Malliaros & Vazirgiannis, 2013). Following the notation in (He et al., 2021), we organize _N_ graph nodes into _K_ clusters and define cluster adjacencies in a meta-graph adjacency matrix **F** , with its entries **F** _kl_ marking the allowance of directed edges from nodes in cluster _k_ to those of cluster _l_ . More specifically, we assume that the node clusters are arranged sequentially, _l_ = 0 _,_ 1 _, . . . , K −_ 1 (say from left to right) and a subset of its first _lS < K_ consecutive clusters define a subgraph _S_ . In FlowGraph we allow directed edges between nodes belonging to all clusters with the probability being a small noise parameter _η_ (typically _η_ = 0 _._ 01). Then for directed edges between nodes in successive clusters, with the source node _l_ being in a cluster in subgraph _S_ , we set _Fl,l_ +1 to a percentage _f_ %. These percentages are different for different classes and depend on the number of classes _nc_ . In our experiments, for all generated graphs we set _N_ = 150, _K_ = 10, _lS_ = 4. We generate 3 graph datasets: one dataset for each of the _nc_ = 2 _,_ 3 _,_ 6-class cases. We depict three graph instances from each of the 3 classes of FlowGraph3 in the Appendix.
+
+**Twitter datasets.** We use 973 directed ego-networks from Twitter[1] , each corresponding to some user _u_ ( _ego_ ): the ego-network is between _u_ ’s friends also referred to as _alters_ (Leskovec & Mcauley, 2012). If nodes _vi_ , _vj_ are in _u_ ’s ego-network then _u_ follows them and if _vi_ follows _vj_ then there is a directed edge _vi �→ vj_ in the ego-network. We introduce perturbations to each of these real ego-networks where a perturbation can be either (i) _rewiring_ of an existing edge (an ( _a, b_ ) _∈ E_ ( _ego_ ( _u_ )), where it is deleted and replaced by an edge ( _c, d_ ) where nodes _c, d_ are randomly selected from _V_ ( _ego_ ( _u_ ))), or (ii) _reversing_ of the direction of an existing edge ( _a, b_ ) _∈ E_ ( _ego_ ( _u_ )), where it is replaced by ( _b, a_ ). The percentage of the perturbed edges in an ego-network can be [0 _,_ 25 _,_ 50 _,_ 75 _,_ 100]%. Rewiring and reversing the direction of edges takes place with equal probabilities. So, for each of the percentages, 973 new perturbed ego-networks are generated, each labeled with the corresponding perturbation percentage. We refer to the collection of the 5 _×_ 973 perturbed Twitter datasets as Twitter5 (5 labels/classes). Similarly, if we get 3 _×_ 973 of them corresponding to perturbation percentages [0% _,_ 50% _,_ 100%], then we have the Twitter3 dataset (3 labels/classes).
+
+As we can see from Table 1, there is a significant drop in performance when we randomly flip the edges for both Flowgraph and Twitter datasets, thus direction is important.
+
+**Degree of Directionality** To characterize the directionality of a dataset, we defined another measure, called the _degree of directionality_ for a graph. Let SCC denote a strongly connected component in a directed graph (a maximal subset of mutually reachable nodes). Further, given the set of _m_ SCCs of a directed graph, _S_ = _{S_ 1 _, S_ 2 _, ..., Sm}_ , define the _SCC entropy_ of the graph as follows: _E_ ( _S_ ) = _−_[�] _[m] i_ =1 _[p][i]_[ log] _[ p][i]_[, where] _[ p][i]_[=] _[|][S][i][|][/n]_[.][A low entropy means that most nodes are mutually] reachable, and thus directionality is not expected to play a big role. On the other hand, if the SCC entropy is log _n_ , like for a directed acyclic graph, then directionality is clearly important.
+
+Figure 1 plots the SCC entropy for the different benchmark datasets; for each class, we plot the average and standard deviation. We can see a very clear trend. FlowGraph classes are inherently directed, with larger entropies, and Twitter captures the inherent directionality of the “follow” relationship between entities, exhibiting lower entropy values. As we increase perturbation levels, entropy decreases as expected due to the random modification of the original directed graph structures. More importantly, the derived MNIST and CIFAR10 have no inherent directedness, and their
+
+> 1[URL removed]
+
+7
+
+entropy values are extremely low. These results justify our choice to restrict the directed graphs benchmarks to only those where direction matters. Furthermore, we will show that DiGT performs even better when direction matters more.
+
+**==> picture [388 x 189] intentionally omitted <==**
+
+**----- Start of picture text -----**
+12 Flow2 Flow3 Flow6 10 Twitter3 Twitter5 8 MNIST CIFAR10 6 Malnet-tiny 4 2 0 Flow2-0Flow2-1Flow3-0Flow3-1Flow3-2Flow6-0Flow6-1Flow6-2Flow6-3Flow6-4Flow6-5Twitter3-0Twitter3-50Twitter3-100Twitter5-0Twitter5-25Twitter5-50Twitter5-75Twitter5-100MNIST-0MNIST-1MNIST-2MNIST-3MNIST-4MNIST-5MNIST-6MNIST-7MNIST-8MNIST-9CIFAR10-0CIFAR10-1CIFAR10-2CIFAR10-3CIFAR10-4CIFAR10-5CIFAR10-6CIFAR10-7CIFAR10-8CIFAR10-9Malnet-tiny-0Malnet-tiny-1Malnet-tiny-2Malnet-tiny-3Malnet-tiny-4 )( G SCC M S **----- End of picture text -----**
+
+Figure 1: SCC Entropy Plot: The entropy for each class (by increasing perturbation or class label) for each dataset is shown. For Flowgraph the perturbation refers to % of right to left edges, for Twitter its random edge rewirings.
+
+Table 2: Accuracy for GNN and GT models. Blank denotes no previous reported results.
+
+|Model|FlowGraph2|FlowGraph3|FlowGraph6|Twitter3|Twitter5|Malnet-tiny|
+|---|---|---|---|---|---|---|
+|GCN (Kipf & Welling, 2016) GAT (Veliˇckovi´c et al., 2017) DiGCN (Tong et al., 2020a) PNA (Corso et al., 2020)|87.50 +/- 1.27 84.92 +/- 1.90 95.67 +/- 0.51 96.17 +/- 0.31|58.28 +/- 0.88 58.83 +/- 1.47 71.22 +/- 1.03 72.94 +/- 0.64|30.36 +/- 0.55 30.31 +/- 0.28 36.78 +/- 0.85 41.42 +/- 1.32|76.24 +/- 0.56 74.59 +/- 1.59 73.51 +/- 0.61 88.26 +/- 1.16|61.23 +/- 1.67 56.79 +/- 0.05 52.85 +/- 1.94 70.94 +/- 2.01|92.1 +/- 0.24|
+|Graph Transformer (Dwivedi & Bresson, 2021) SAN (Kreuzer et al., 2021) EGT (Hussain et al., 2022) Exphormer (Shirzad et al., 2023)|93.17 +/- 0.82 91.73 +/- 1.84 95.00 +/- 1.67 96.72 +/- 0.44|66.17 +/- 0.60 63.87 +/- 0.66 72.06 +/- 1.16 72.81 +/- 0.38|36.20 +/- 1.12 34.57 +/- 0.45 42.87 +/- 0.62 41.70 +/- 0.39|90.66 +/- 0.35 85.33 +/- 0.78 86.49 +/- 0.73 89.76 +/- 0.30|79.55 +/- 0.68 63.13 +/- 1.65 73.94 +/- 1.47 72.72 +/- 1.40|94.02 +/- 0.21|
+|DiGT|**97.42 +/- 0.82**|**74.55 +/- 0.69**|**46.80 +/- 0.97**|**91.67 +/- 0.79**|**85.94 +/- 0.25**||
+
+## 4.2 EXPERIMENTAL COMPARISON
+
+## 4.2.1 DIGT VS. GNNS AND GTS
+
+We now show experimental results on the directed graph datasets where directionality is important. We select GCN (Kipf & Welling, 2016), GAT (Veliˇckovi´c et al., 2017), DiGCN (Tong et al., 2020a), and PNA (Corso et al., 2020), for our comparisons with graph neural networks, and Graph Transformer (Dwivedi & Bresson, 2021), SAN (Kreuzer et al., 2021), EGT (Hussain et al., 2022), and Exphormer (Shirzad et al., 2023) for our comparisons with graph transformers. We take the results GAT and Exphormer with the Malnet-tiny dataset from (Shirzad et al., 2023). We choose EGT (Hussain et al., 2022) as the representative of graph transformers with global dense attention, and Exphormer (Shirzad et al., 2023) as the representative of graph transformers with local sparse attention. We compare these approaches with our DiGT approach.
+
+The accuracy results are listed in Table 2. The methods are grouped by GNNs, GTs, and finally DiGT. We can see that our DiGT model clearly outperforms all other GNN and GT models, by significant margins, especially as the directionality becomes more important, i.e., DiGT has better margins for FlowGraph6, Twitter3 and Twitter5. DiGT employs global dense attention (like EGT), making it adept at capturing more complex graph structures, but the explicit directional attention makes it shine on all the datasets. On the contrary, Exphormer utilizes local attention
+
+8
+
+by leveraging message passing to nearby neighbors. Like some of the GNNs, one advantage of Exphormer is that its use of expander graphs allows it to run on the larger Malnet-tiny dataset (which has some graphs over 2000 nodes), where other GT methods, including DiGT cannot be applied (incorporating sparse graph connectivity into DiGT is part of our future work). As such, these results clearly demonstrate the effectiveness of the directional strategies employed in DiGT, especially the inherent dual source and target encodings, with directional attention and restricted _k_ -hop neighborhood.
+
+Table 3: Incorporating directionality into graph transformers. Bold denotes best results, italics the second best.
+
+|Model|FlowGraph2|FlowGraph3|FlowGraph6|Twitter3|Twitter5|Malnet-tiny|
+|---|---|---|---|---|---|---|
+|Vanilla Transformer Vanilla-asym|95.58 +/- 0.66 95.50 +/- 0.20|68.22 +/- 0.55 69.28 +/- 0.75|39.56 +/- 1.61 41.42 +/- 0.78|89.12 +/- 0.43 _91.28 +/- 0.78_|77.03 +/- 1.40 79.42 +/- 0.48||
+|EGT (Hussain et al., 2022) EGT-asym|95.00 +/- 1.67 96.50 +/- 0.89|72.06 +/- 1.16 72.39 +/- 0.55|42.87 +/- 0.62 _42.88 +/- 0.20_|86.49 +/- 0.73 90.37 +/- 0.29|73.94 +/- 1.47 _82.60 +/- 0.35_||
+|Exphormer (Shirzad et al., 2023) Exphormer-asym Exphormer-dual|96.72 +/- 0.44 **98.41 +/- 1.18** 97.42 +/- 0.31|72.81 +/- 0.38 **74.72 +/- 2.24** 73.39 +/- 0.90|41.70 +/- 0.39 42.67 +/- 0.80 42.28 +/- 0.17|89.76 +/- 0.30 90.83 +/- 1.14 90.78 +/- 0.81|72.72 +/- 1.40 80.07 +/- 1.18 79.59 +/- 0.69|94.02 +/- 0.21 93.85 +/- 0.15 **94.23 +/- 0.20**|
+|DiGT|_97.42 +/- 0.82_|_74.55 +/- 0.69_|**46.80 +/- 0.97**|**91.67 +/- 0.79**|**85.94 +/- 0.25**||
+
+## 4.2.2 INCORPORATING DIRECTION INTO GTS
+
+To show the effectiveness of directionality-based strategies outlined in Section 3, we modify the vanilla Transformer (Vaswani et al., 2017), EGT, and Exphormer models and convert these “undirected” graph transformer models into directed ones. Using the asymmetric attention matrix (Eq. (12)) is denoted with the suffix ‘-asym’, and using the dual attention matrices (Eq. (16)) is denoted by suffix ‘-dual’. Table 3 shows the baseline model, and the modification using the best performing directionality approach.
+
+Interestingly, the directed version _always_ outperforms its corresponding baseline graph transformer model. This shows the power of incorporating direction on those datasets where it really matters. In fact, the Exphormer-dual outperforms the baseline Exphormer model, and results in new SOTA result. When we compate DiGT with these models, we again find that DiGT outperforms all models (see bold results) on the datasets with more directionality, like FlowGraph6, Twitter3 and Twitter5. Even on FlowGraph2 and FlowGraph3, DiGT is the second best model, only slightly behind Exphormer-asym, which is also one of our own direction-based strategies.
+
+## 5 CONCLUSIONS AND FUTURE WORK
+
+In this paper, we present DiGT, a novel architecture for capturing graph directionality using transformers. We empirically evaluate its classification accuracy on directional graph datasets and demonstrate its superior performance against state-of-the-art Graph Transformers and Graph Neural Networks. We also propose other strategies that can be used to add “direction” to other graph transformer models. Doing so yields a new SOTA result on the Malnet-tiny dataset. In fact, our directed extensions always outpeform their undirected baselines. To our knowledge, we are the first to point out the limitations of some of the directed graph benchmarks, in that direction does not seem to matter for the classification task. We therefore propose new directed benchmark datasets, and show the superior performace on DiGT on those graphs.
+
+One limitation of our DiGT model is that due to the quadratic complexity of attention, like most Transformers, it does not scale to larger graphs. To scale up the attention mechanism, we plan to explore techniques like expander graphs used in Exphormer (Shirzad et al., 2023), and other approaches to expand the context (Bertsch et al., 2023; Tay et al., 2022), and study their effectiveness for (directed) graph datasets.
+
+9
+
+## REFERENCES
+
+- Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine S¨usstrunk. Slic superpixels compared to state-of-the-art superpixel methods. _IEEE transactions on pattern analysis and machine intelligence_ , 34(11):2274–2282, 2012.
+
+- Dominique Beaini, Saro Passaro, Vincent L´etourneau, Will Hamilton, Gabriele Corso, and Pietro Li`o. Directional graph networks. In _International Conference on Machine Learning_ , pp. 748– 758. PMLR, 2021.
+
+- Amanda Bertsch, Uri Alon, Graham Neubig, and Matthew R Gormley. Unlimiformer: Long-range transformers with unlimited length input. _arXiv preprint arXiv:2305.01625_ , 2023.
+
+- Dexiong Chen, Leslie O’Bray, and Karsten Borgwardt. Structure-aware transformer for graph representation learning. In _International Conference on Machine Learning_ , pp. 3469–3489. PMLR, 2022.
+
+- Gabriele Corso, Luca Cavalleri, Dominique Beaini, Pietro Li`o, and Petar Veliˇckovi´c. Principal neighbourhood aggregation for graph nets. _Advances in Neural Information Processing Systems_ , 33:13260–13271, 2020.
+
+- Mihai Cucuringu, Huan Li, He Sun, and Luca Zanetti. Hermitian matrices for clustering directed graphs: insights and applications. In _International Conference on Artificial Intelligence and Statistics_ , pp. 983–992. PMLR, 2020.
+
+Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. _AAAI Workshop on Deep Learning on Graphs: Methods and Applications_ , 2021.
+
+- Vijay Prakash Dwivedi, Chaitanya K Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. _arXiv preprint arXiv:2003.00982_ , 2020.
+
+- Scott Freitas, Yuxiao Dong, Joshua Neil, and Duen Horng Chau. A large-scale database for graph representation learning. _arXiv preprint arXiv:2011.07682_ , 2020.
+
+- Simon Geisler, Yujia Li, Daniel J Mankowitz, Ali Taylan Cemgil, Stephan G¨unnemann, and Cosmin Paduraru. Transformers meet directed graphs. In _International Conference on Machine Learning_ , pp. 11144–11172. PMLR, 2023.
+
+Yixuan He, Gesine Reinert, and Mihai Cucuringu. Digrac: Digraph clustering based on flow imbalance. _arXiv preprint arXiv:2106.05194_ , 2021.
+
+- Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. _Advances in neural information processing systems_ , 33:22118–22133, 2020.
+
+- Md Shamim Hussain, Mohammed J Zaki, and Dharmashankar Subramanian. Global self-attention as a replacement for graph convolution. In _28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining_ , 2022.
+
+- Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. _arXiv preprint arXiv:1609.02907_ , 2016.
+
+- Jon M Kleinberg. Authoritative sources in a hyperlinked environment. _Journal of the ACM (JACM)_ , 46(5):604–632, 1999.
+
+- Georgios Kollias, Vasileios Kalantzis, Tsuyoshi Id´e, Aur´elie Lozano, and Naoki Abe. Directed graph auto-encoders. In _Proceedings of the 36th AAAI Conference on Artificial Intelligence (AAAI 2022)_ , February 2022.
+
+- Devin Kreuzer, Dominique Beaini, Will Hamilton, Vincent L´etourneau, and Prudencio Tossou. Rethinking graph transformers with spectral attention. _Advances in Neural Information Processing Systems_ , 34:21618–21629, 2021.
+
+Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
+
+10
+
+- Jure Leskovec and Julian Mcauley. Learning to discover social circles in ego networks. _Advances in neural information processing systems_ , 25, 2012.
+
+- Yuankai Luo. Dagformer: Directed acyclic graph transformer. _arXiv preprint arXiv:2210.13148_ , 2022.
+
+- Fragkiskos D Malliaros and Michalis Vazirgiannis. Clustering and community detection in directed networks: A survey. _Physics reports_ , 533(4):95–142, 2013.
+
+- Mingdong Ou, Peng Cui, Jian Pei, Ziwei Zhang, and Wenwu Zhu. Asymmetric transitivity preserving graph embedding. In _Proceedings of the 22nd ACM SIGKDD international conference on Knowledge discovery and data mining_ , pp. 1105–1114, 2016.
+
+- Ladislav Ramp´aˇsek, Mikhail Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. Recipe for a General, Powerful, Scalable Graph Transformer. _Advances in Neural Information Processing Systems_ , 35, 2022.
+
+- Guillaume Salha, Stratis Limnios, Romain Hennequin, Viet-Anh Tran, and Michalis Vazirgiannis. Gravity-inspired graph autoencoders for directed link prediction. In _Proceedings of the 28th ACM International Conference on Information and Knowledge Management_ , pp. 589–598, 2019.
+
+- Hamed Shirzad, Ameya Velingker, Balaji Venkatachalam, Danica J Sutherland, and Ali Kemal Sinop. Exphormer: Sparse transformers for graphs. In _International Conference on Machine Learning_ , 2023.
+
+- Jiankai Sun, Bortik Bandyopadhyay, Armin Bashizade, Jiongqian Liang, P Sadayappan, and Srinivasan Parthasarathy. Atp: Directed graph embedding with asymmetric transitivity preservation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , pp. 265–272, 2019.
+
+- Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. _ACM Computing Surveys_ , 55(6):1–28, 2022.
+
+- Zekun Tong, Yuxuan Liang, Changsheng Sun, Xinke Li, David Rosenblum, and Andrew Lim. Digraph inception convolutional networks. _Advances in Neural Information Processing Systems_ , 33, 2020a.
+
+- Zekun Tong, Yuxuan Liang, Changsheng Sun, David S Rosenblum, and Andrew Lim. Directed graph convolutional network. _arXiv preprint arXiv:2004.13970_ , 2020b.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. _arXiv preprint arXiv:1710.10903_ , 2017.
+
+- Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform badly for graph representation? _Advances in Neural Information Processing Systems_ , 34:28877–28888, 2021.
+
+- Jiawei Zhang, Haopeng Zhang, Congying Xia, and Li Sun. Graph-bert: Only attention is needed for learning graph representations. _arXiv preprint arXiv:2001.05140_ , 2020.
+
+- Xitong Zhang, Yixuan He, Nathan Brugnone, Michael Perlmutter, and Matthew Hirn. Magnet: A neural network for directed graphs. _Advances in Neural Information Processing Systems_ , 34: 27003–27015, 2021.
+
+- Chang Zhou, Yuqiong Liu, Xiaofei Liu, Zhongyi Liu, and Jun Gao. Scalable graph embedding for asymmetric proximity. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , 2017.
+
+11
+
diff --git a/open_review/iclr2024_8548.json b/open_review/iclr2024_8548.json
new file mode 100644
index 0000000000000000000000000000000000000000..ee9394a8aeed368d71cf8b4b52d70c4eb183c523
--- /dev/null
+++ b/open_review/iclr2024_8548.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8548",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Training Diffusion Models with Reinforcement Learning",
+ "abstract": "Diffusion models are a class of flexible generative models trained with an approximation to the log-likelihood objective. However, most use cases of diffusion models are not concerned with likelihoods, but instead with downstream objectives such as human-perceived image quality or drug effectiveness. In this paper, we investigate reinforcement learning methods for directly optimizing diffusion models for such objectives. We describe how posing denoising as a multi-step decision-making problem enables a class of policy gradient algorithms, which we refer to as denoising diffusion policy optimization ( DDPO), that are more effective than alternative reward-weighted likelihood approaches. Empirically, DDPO can adapt text-to-image diffusion models to objectives that are difficult to express via prompting, such as image compressibility, and those derived from human feedback, such as aesthetic quality. Finally, we show that DDPO can improve prompt-image alignment using feedback from a vision-language model without the need for additional data collection or human annotation. The project’s website can be found at http://rl-diffusion.github.io.",
+ "rebuttal": "Hi reviewer EgHv, unfortunately we haven't been able to get the results. For now, we'll remove the statement from the paper that hypothesizes why the images become cartoon-like, instead saying we don't know why. We'll run some more experiments to include in the appendix for the camera-ready, and update the main paper if we're able to answer the question conclusively.\n\nSorry, yes we regret that we couldn't get to your question sooner. It's a good suggestion that would definitely provide some good insights. Unfortunately we had to prioritize and were busy running quite a few other experiments for this rebuttal. We actually did start the aforementioned run yesterday, and it seems that the load on our machine is a bit less today, so it may finish in time after all. We'll post an update tonight if it has progressed enough to get some interesting results.\n\nThanks for the follow-up! We have not had a chance to run more experiments with the VLM reward function, but the additional experiment we added in Appendix C is potentially related to your question. In that experiment, we use ImageReward --- another prompt-image alignment objective --- on a different set of prompts, such as \"a green colored rabbit\" and \"a dog on the moon\". Based on the qualitative results ([screenshot](https://ibb.co/z4shhBd)), the model is able to produce well-aligned photorealistic images for these prompts. While we think this is likely due to the difference in prompts, the [...]\n\nThank you for the follow-up. While we do appreciate your perspective and would like to improve the paper to address any potential issues that you see, we disagree with a number of the points that you raised.\n\nRegarding shortcut fine-tuning (Fan et. al., 2023): as we wrote in our related work and methods sections, this work was the first to propose a policy gradient objective for training diffusion models. We believe we are quite up-front about this, but if this point is unclear, please let us know and we can revise it. That said, shortcut fine-tuning was aimed at a very different problem (impr [...]\n\nHi reviewer rYFt,\n\nWe hope we have addressed all of your stated weaknesses, as well as answered your questions about the paper. Most notably, we have clarified that DPOK is concurrent work and thus the DDPO algorithm should be considered an original intellectual contribution. We have also fixed the issue with the aesthetic predictor, which was one of your major concerns.\n\nAs such, we would greatly appreciate it if you could take a look at our rebuttal and let us know if you still think our paper is below the acceptance threshold for ICLR.\n\nRegards,\nThe Authors\n\nHi reviewer EgHv,\n\nWe hope we have addressed most of your weaknesses, as well as answered your questions about our paper. To be specific, we have added the requested quantitative evaluation of overoptimization and a new classifier guidance baseline, as well as provided some clarification about overoptimization, which seemed to be your main concern. As such, we would greatly appreciate it if you could take a look at our rebuttal and let us know if you still think our paper is below the acceptance threshold for ICLR.\n\nThanks,\nThe Authors\n\nHi reviewer sWSo,\n\nWe hope we have addressed both of your stated weaknesses, as well as answered all of your questions. As such, we would greatly appreciate it if you could take a look at our rebuttal, letting us know if you find the responses adequate, and if so, if you would consider raising your score.\n\nThanks,\nThe Authors\n\nHi reviewer qqX7,\n\nTo clarify, we believe that our rebuttal has thoroughly mitigated all of your stated weaknesses. Weaknesses (1) and (2) were about DPOK, which we have clarified is concurrent work, meaning that the DDPO algorithm should be considered an original intellectual contribution. Weakness (4) was about code, which we have provided. Weakness (3) was about out-of-domain reward evaluation, for which we have provided an additional experiment based on your recommendation.\n\nAs such, if you still think this work is below the acceptance threshold for ICLR, we would greatly appreciate it if [...]\n\nHi reviewer qqX7,\n\nThank you for the prompt response! Could you elaborate on what remaining concerns you have that bring the paper below the ICLR acceptance standards?\n\n### Rebuttal + new experiments\nThank you for your thoughtful review. It seems that your primary concerns are the saturation of images during finetuning and the lack of discussion of VLM reward functions. Regarding the first point, we would like to point out that this is a well-known phenomenon that also affects RL finetuning of language models ([Kirk et. al., 2023](https://arxiv.org/abs/2310.06452)), yet it has certainly not prevented RLHF from having a huge impact in that domain. Regarding the second point, we would like to emphasize that the primary intellectual contribution of this paper is [...]\n\n### Rebuttal + new experiments\nThank you for your thorough review. It seems that your primary concerns are novelty with respect to DPOK and the subtle bug affecting the aesthetic score. Regarding the bug, we have re-run the primary quantitative comparison with the fixed reward function. Regarding DPOK, as we explain in the top-level rebuttal, our paper was posted to arXiv 3 days before DPOK, and as such the work should be considered concurrent.\n\nThat said, we have added an experiment directly comparing our method to DPOK in Appendix C of the updated PDF ([screenshot of quantitative results;](h [...]\n\n### Rebuttal + new experiments\nThank you for your thorough review. It seems that your primary concern is about overoptimization. It’s worth noting that we found it reasonably straightforward to run our method for a fixed number of iterations (e.g., 15k reward queries) and recover good generations; we also did not observe completely degenerated images in the VLM or aesthetic quality experiments, only in compressibility and incompressibility (when run for long enough). We have added an\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 8,
+ 6,
+ 6
+ ],
+ "score_mean": 6.25,
+ "score_variance": 1.58,
+ "score_spread": 3,
+ "score_min": 5,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "The paper proposes an RL-based method for fine-tuning large-scale diffusion models to match potentially nondifferentiable reward functions. the theoretical formulation and empirical evaluation are sufficient according to the reviewers and my judgment.\n\nMost of the reviewers initially thought the paper was similar to DPOK and worried about the novelty. As claimed by the authors, this paper is a concurrent work as DPOK and was presented on Arxiv earlier. Given this information as well as the rebuttal, most of the reviewers changed their minds and raised the scores. \n\nHowever, Reviewer qqX7 still maintains reservations regarding the A+B contribution style and harbor concerns about the potential overoptimization risk. Yet, qqX7 also said, \"*I would not be opposed to accepting the paper*\".\n\nConsidering all the information, I tend to accept this paper as a poster.",
+ "forum_id": "YCWjhGrJFD",
+ "primary_area": "generative models",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_qqX7",
+ "review_id": "7QT1jjqoGe",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 4
+ },
+ "review_text_chars": 3855,
+ "edit_detected": true,
+ "edit_delta_seconds": 1330994,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_sWSo",
+ "review_id": "BEujamuBbq",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3001,
+ "edit_detected": true,
+ "edit_delta_seconds": 1757922,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_EgHv",
+ "review_id": "wlw0IfLk6E",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2432,
+ "edit_detected": true,
+ "edit_delta_seconds": 1823987,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_rYFt",
+ "review_id": "tXmkJsrWRj",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 2318,
+ "edit_detected": true,
+ "edit_delta_seconds": 1882819,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8548.md b/open_review/iclr2024_8548.md
new file mode 100644
index 0000000000000000000000000000000000000000..6f4030f6b2be25f179ba04c54a4f0290642e4b5e
--- /dev/null
+++ b/open_review/iclr2024_8548.md
@@ -0,0 +1,748 @@
+## TRAINING DIFFUSION MODELS WITH REINFORCEMENT LEARNING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Diffusion models are a class of flexible generative models trained with an approximation to the log-likelihood objective. However, most use cases of diffusion models are not concerned with likelihoods, but instead with downstream objectives such as human-perceived image quality or drug effectiveness. In this paper, we investigate reinforcement learning methods for directly optimizing diffusion models for such objectives. We describe how posing denoising as a multi-step decisionmaking problem enables a class of policy gradient algorithms, which we refer to as denoising diffusion policy optimization (DDPO), that are more effective than alternative reward-weighted likelihood approaches. Empirically, DDPO can adapt text-to-image diffusion models to objectives that are difficult to express via prompting, such as image compressibility, and those derived from human feedback, such as aesthetic quality. Finally, we show that DDPO can improve prompt-image alignment using feedback from a vision-language model without the need for additional data collection or human annotation. The project’s website can be found at `[URL removed] .
+
+## 1 INTRODUCTION
+
+Diffusion probabilistic models (Sohl-Dickstein et al., 2015) have recently emerged as the de facto standard for generative modeling in continuous domains. Their flexibility in representing complex, high-dimensional distributions has led to the adoption of diffusion models in applications including image and video synthesis (Ramesh et al., 2021; Saharia et al., 2022; Ho et al., 2022), drug and material design (Xu et al., 2021; Xie et al., 2021; Schneuing et al., 2022), and continuous control (Janner et al., 2022; Wang et al., 2022; Hansen-Estruch et al., 2023). The key idea behind diffusion models is to iteratively transform a simple prior distribution into a target distribution by applying a sequential denoising process. This procedure is conventionally motivated as a maximum likelihood estimation problem, with the objective derived as a variational lower bound on the log-likelihood of the training data.
+
+However, most use cases of diffusion models are not directly concerned with likelihoods, but instead with downstream objective such as human-perceived image quality or drug effectiveness. In this paper, we consider the problem of training diffusion models to satisfy such objectives directly, as opposed to matching a data distribution. This problem is challenging because exact likelihood computation with diffusion models is intractable, making it difficult to apply many conventional reinforcement learning (RL) algorithms. We instead propose to frame denoising as a multi-step decision-making task, using the exact likelihoods at each denoising step in place of the approximate likelihoods induced by a full denoising process. We present a policy gradient algorithm, which we refer to as denoising diffusion policy optimization (DDPO), that can optimize a diffusion model for downstream tasks using only a black-box reward function.
+
+We apply our algorithm to the finetuning of large text-to-image diffusion models. Our initial evaluation focuses on tasks that are difficult to specify via prompting, such as image compressibility, and those derived from human feedback, such as aesthetic quality. However, because many reward functions of interest are difficult to specify programmatically, finetuning procedures often rely on large-scale human labeling efforts to obtain a reward signal (Ouyang et al., 2022). In the case of text-to-image diffusion, we propose a method for replacing such labeling with feedback from a vision-language model (VLM). Similar to RLAIF finetuning for language models (Bai et al., 2022b), the resulting procedure allows for diffusion models to be adapted to reward functions that would otherwise require
+
+1
+
+**==> picture [395 x 187] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Compressibility: llama Aesthetic Quality: rabbit Prompt-Image Alignment: a raccoon washing dishes **----- End of picture text -----**
+
+**==> picture [68 x 67] intentionally omitted <==**
+
+**==> picture [68 x 67] intentionally omitted <==**
+
+**==> picture [67 x 67] intentionally omitted <==**
+
+**==> picture [68 x 67] intentionally omitted <==**
+
+**==> picture [68 x 67] intentionally omitted <==**
+
+**==> picture [68 x 67] intentionally omitted <==**
+
+**Figure 1 (Reinforcement learning for diffusion models)** We propose a reinforcement learning algorithm, DDPO, for optimizing diffusion models on downstream objectives such as compressibility, aesthetic quality, and prompt-image alignment as determined by vision-language models. Each row shows a progression of samples for the same prompt and random seed over the course of training.
+
+additional human annotations. We use this procedure to improve prompt-image alignment for unusual subject-setting compositions.
+
+Our contributions are as follows. We first present the derivation and conceptual motivation of DDPO. We then document the design of various reward functions for text-to-image generation, ranging from simple computations to workflows involving large VLMs, and demonstrate the effectiveness of DDPO compared to alternative reward-weighted likelihood methods in these settings. Finally, we demonstrate the generalization ability of our finetuning procedure to unseen prompts.
+
+## 2 RELATED WORK
+
+**Diffusion probabilistic models.** Denoising diffusion models (Sohl-Dickstein et al., 2015; Ho et al., 2020) have emerged as an effective class of generative models for modalities including images (Ramesh et al., 2021; Saharia et al., 2022), videos (Ho et al., 2022; Singer et al., 2022), 3D shapes (Zhou et al., 2021; Zeng et al., 2022), and robotic trajectories (Janner et al., 2022; Ajay et al., 2022; Chi et al., 2023). While the denoising objective is conventionally derived as an approximation to likelihood, the training of diffusion models typically departs from maximum likelihood in several ways (Ho et al., 2020). Modifying the objective to more strictly optimize likelihood (Nichol & Dhariwal, 2021; Kingma et al., 2021) often leads to worsened image quality, as likelihood is not a faithful proxy for visual quality. In this paper, we show how diffusion models can be optimized directly for downstream objectives.
+
+**Controllable generation with diffusion models.** Recent progress in text-to-image diffusion models (Ramesh et al., 2021; Saharia et al., 2022) has enabled fine-grained high-resolution image synthesis. To further improve the controllability and quality of diffusion models, recent approaches have investigated finetuning on limited user-provided data (Ruiz et al., 2022), optimizing text embeddings for new concepts (Gal et al., 2022), composing models (Du et al., 2023; Liu et al., 2022), adapters for additional input constraints (Zhang & Agrawala, 2023), and inference-time techniques such as classifier (Dhariwal & Nichol, 2021) and classifier-free (Ho & Salimans, 2021) guidance.
+
+2
+
+**Reinforcement learning from human feedback.** A number of works have studied using human feedback to optimize models in settings such as simulated robotic control (Christiano et al., 2017), game-playing (Knox & Stone, 2008), machine translation (Nguyen et al., 2017), citation retrieval (Menick et al., 2022), browsing-based question-answering (Nakano et al., 2021), summarization (Stiennon et al., 2020; Ziegler et al., 2019), instruction-following (Ouyang et al., 2022), and alignment with specifications (Bai et al., 2022a). Recently, Lee et al. (2023) studied the alignment of text-toimage diffusion models to human preferences using a method based on reward-weighted likelihood maximization. In our comparisons, their method corresponds to one iteration of the reward-weighted regresion (RWR) method. Our results demonstrate that DDPO significantly outperforms even multiple iterations of weighted likelihood maximization (RWR-style) optimization.
+
+**Diffusion models as sequential decision-making processes.** Although predating diffusion models, Bachman & Precup (2015) similarly posed data generation as a sequential decision-making problem and used the resulting framework to apply reinforcement learning methods to image generation. More recently, Fan & Lee (2023) introduced a policy gradient method for training diffusion models. However, this paper aimed to improve data distribution matching rather than optimizing downstream objectives, and therefore the only reward function considered was a GAN-like discriminator. In concurrent work to ours, DPOK (Fan et al., 2023) built upon Fan & Lee (2023) and Lee et al. (2023) to better align text-to-image diffusion models to human preferences using a policy gradient algorithm. Like Lee et al. (2023), DPOK only considers a single preference-based reward function (Xu et al., 2023); additionally, their work studies KL-regularization and primarily focuses on training a different diffusion model for each prompt. In contrast, we train on many prompts at once (up to 398) and demonstrate generalization to many more prompts outside of the training set. Furthermore, we study how DDPO can be applied to multiple reward functions beyond those based on human feedback, including how rewards derived automatically from VLMs can improve prompt-image alignment. We provide a direct comparison to DPOK in Appendix C.
+
+## 3 PRELIMINARIES
+
+In this section, we provide a brief background on diffusion models and the RL problem formulation.
+
+## 3.1 DIFFUSION MODELS
+
+In this work, we consider conditional diffusion probabilistic models (Sohl-Dickstein et al., 2015; Ho et al., 2020), which represent a distribution _p_ ( **x** 0 _|_ **c** ) over a dataset of samples **x** 0 and corresponding contexts **c** . The distribution is modeled as the reverse of a Markovian forward process _q_ ( **x** _t |_ **x** _t−_ 1), which iteratively adds noise to the data. Reversing the forward process can be accomplished by training a neural network _**µ** θ_ ( **x** _t,_ **c** _, t_ ) with the following objective:
+
+**==> picture [358 x 13] intentionally omitted <==**
+
+where _**µ**_ ˜ is the posterior mean of the forward process, a weighted average of **x** 0 and **x** _t_ . This objective is justified as maximizing a variational lower bound on the log-likelihood of the data (Ho et al., 2020).
+
+Sampling from a diffusion model begins with drawing a random **x** _T ∼N_ ( **0** _,_ **I** ) and following the reverse process _pθ_ ( **x** _t−_ 1 _|_ **x** _t,_ **c** ) to produce a trajectory _{_ **x** _T ,_ **x** _T −_ 1 _, . . . ,_ **x** 0 _}_ ending with a sample **x** 0. The sampling process depends not only on the predictor _**µ** θ_ but also the choice of sampler. Most popular samplers (Ho et al., 2020; Song et al., 2021) use an isotropic Gaussian reverse process with a fixed timestep-dependent variance:
+
+**==> picture [297 x 12] intentionally omitted <==**
+
+## 3.2 MARKOV DECISION PROCESSES AND REINFORCEMENT LEARNING
+
+A Markov decision process (MDP) is a formalization of sequential decision-making problems. An MDP is defined by a tuple ( _S, A, ρ_ 0 _, P, R_ ), in which _S_ is the state space, _A_ is the action space, _ρ_ 0 is the distribution of initial states, _P_ is the transition kernel, and _R_ is the reward function. At each timestep _t_ , the agent observes a state **s** _t ∈S_ , takes an action **a** _t ∈A_ , receives a reward _R_ ( **s** _t,_ **a** _t_ ), and transitions to a new state **s** _t_ +1 _∼ P_ ( **s** _t_ +1 _|_ **s** _t,_ **a** _t_ ). An agent acts according to a policy _π_ ( **a** _|_ **s** ).
+
+3
+
+As the agent acts in the MDP, it produces trajectories, which are sequences of states and actions _τ_ = ( **s** 0 _,_ **a** 0 _,_ **s** 1 _,_ **a** 1 _, . . . ,_ **s** _T ,_ **a** _T_ ). The reinforcement learning (RL) objective is for the agent to maximize _J_ RL( _π_ ), the expected cumulative reward over trajectories sampled from its policy:
+
+**==> picture [170 x 19] intentionally omitted <==**
+
+- 4 REINFORCEMENT LEARNING TRAINING OF DIFFUSION MODELS
+
+We now describe how RL algorithms can be used to train diffusion models. We present two classes of methods and show that each corresponds to a different mapping of the denoising process to the MDP framework.
+
+## 4.1 PROBLEM STATEMENT
+
+We assume a pre-existing diffusion model, which may be pretrained or randomly initialized. Assuming a fixed sampler, the diffusion model induces a sample distribution _pθ_ ( **x** 0 _|_ **c** ). The denoising diffusion RL objective is to maximize a reward signal _r_ defined on the samples and contexts:
+
+**==> picture [176 x 12] intentionally omitted <==**
+
+for some context distribution _p_ ( **c** ) of our choosing.
+
+## 4.2 REWARD-WEIGHTED REGRESSION
+
+To optimize _J_ DDRL with minimal changes to standard diffusion model training, we can use the denoising loss _L_ DDPM (Equation 1), but with training data **x** 0 _∼ pθ_ ( **x** 0 _|_ **c** ) and an added weighting that depends on the reward _r_ ( **x** 0 _,_ **c** ). Lee et al. (2023) describe a single-round version of this procedure for diffusion models, but in general this approach can be performed for multiple rounds of alternating sampling and training, leading to an online RL method. We refer to this general class of algorithms as reward-weighted regression (RWR) (Peters & Schaal, 2007).
+
+A standard weighting scheme uses exponentiated rewards to ensure nonnegativity,
+
+**==> picture [144 x 21] intentionally omitted <==**
+
+where _β_ is an inverse temperature and _Z_ is a normalization constant. We also consider a simplified weighting scheme that uses binary weights,
+
+**==> picture [138 x 13] intentionally omitted <==**
+
+where _C_ is a reward threshold determining which samples are used for training. In supervised learning terms, this is equivalent to repeated filtered finetuning on training data coming from the model.
+
+Within the RL formalism, the RWR procedure corresponds to the following one-step MDP:
+
+**==> picture [348 x 12] intentionally omitted <==**
+
+with a transition kernel _P_ that immediately leads to an absorbing termination state. Therefore, maximizing _J_ DDRL( _θ_ ) is equivalent to maximizing the RL objective _J_ RL( _π_ ) in this MDP.
+
+From RL literature, weighting a log-likelihood objective by _w_ RWR is known to approximately maximize _J_ RL( _π_ ) subject to a KL divergence constraint on _π_ (Nair et al., 2020). However, _L_ DDPM (Equation 1) does not involve an exact log-likelihood — it is instead derived as a variational bound on log _pθ_ ( **x** 0 _|_ **c** ). Therefore, the RWR procedure applied to diffusion model training is not theoretically justified and only optimizes _J_ DDRL very approximately.
+
+## 4.3 DENOISING DIFFUSION POLICY OPTIMIZATION
+
+RWR relies on an approximate log-likelihood because it ignores the sequential nature of the denoising process, only using the final samples **x** 0. In this section, we show how the denoising process can be reframed as a _multi-step_ MDP, allowing us to directly optimize _J_ DDRL using policy gradient
+
+4
+
+estimators. This follows the derivation in Fan & Lee (2023), who prove an equivalence between their method and a policy gradient algorithm where the reward is a GAN-like discriminator. We present a general framework with an arbitrary reward function, motivated by our desire to optimize arbitrary downstream objectives (Section 5). We refer to this class of algorithms as denoising diffusion policy optimization (DDPO) and present two variants based on specific gradient estimators.
+
+**Denoising as a multi-step MDP.** We map the iterative denoising procedure to the following MDP:
+
+**==> picture [375 x 43] intentionally omitted <==**
+
+in which _δy_ is the Dirac delta distribution with nonzero density only at _y_ . Trajectories consist of _T_ timesteps, after which _P_ leads to a termination state. The cumulative reward of each trajectory is equal to _r_ ( **x** 0 _,_ **c** ), so maximizing _J_ DDRL( _θ_ ) is equivalent to maximizing _J_ RL( _π_ ) in this MDP.
+
+The benefit of this formulation is that if we use a standard sampler with _pθ_ ( **x** _t−_ 1 _|_ **x** _t,_ **c** ) parameterized as in Equation 2, the policy _π_ becomes an isotropic Gaussian as opposed to the arbitrarily complicated distribution _pθ_ ( **x** 0 _|_ **c** ) as it is in the RWR formulation. This simplification allows for the evaluation of exact log-likelihoods and their gradients with respect to the diffusion model parameters.
+
+**Policy gradient estimation.** With access to likelihoods and likelihood gradients, we can make direct Monte Carlo estimates of _∇θJ_ DDRL. Like RWR, DDPO alternates collecting denoising trajectories _{_ **x** _T ,_ **x** _T −_ 1 _, . . . ,_ **x** 0 _}_ via sampling and updating parameters via gradient descent.
+
+The first variant of DDPO, which we call DDPOSF, uses the score function policy gradient estimator, also known as the likelihood ratio method or REINFORCE (Williams, 1992; Mohamed et al., 2020):
+
+**==> picture [310 x 31] intentionally omitted <==**
+
+where the expectation is taken over denoising trajectories generated by the current parameters _θ_ .
+
+However, this estimator only allows for one step of optimization per round of data collection, as the gradient must be computed using data generated by the current parameters. To perform multiple steps of optimization, we may use an importance sampling estimator (Kakade & Langford, 2002):
+
+**==> picture [367 x 31] intentionally omitted <==**
+
+where the expectation is taken over denoising trajectories generated by the parameters _θ_ old. This estimator becomes inaccurate if _pθ_ deviates too far from _pθ_ old, which can be addressed using trust regions (Schulman et al., 2015) to constrain the size of the update. In practice, we implement the trust region via clipping, as in proximal policy optimization (Schulman et al., 2017).
+
+## 5 REWARD FUNCTIONS FOR TEXT-TO-IMAGE DIFFUSION
+
+In this work, we evaluate our methods on text-to-image diffusion. Text-to-image diffusion serves as a valuable test environment for reinforcement learning due to the availability of large pretrained models and the versatility of using diverse and visually interesting reward functions. In this section, we outline our selection of reward functions. We study a spectrum of reward functions of varying complexity, ranging from those that are straightforward to specify and evaluate to those that capture the depth of real-world downstream tasks.
+
+## 5.1 COMPRESSIBILITY AND INCOMPRESSIBILITY
+
+The capabilities of text-to-image diffusion models are limited by the co-occurrences of text and images in their training distribution. For instance, images are rarely captioned with their file size, making it impossible to specify a desired file size via prompting. This limitation makes reward functions based on file size a convenient case study: they are simple to compute, but not controllable through the conventional methods of likelihood maximization and prompt engineering.
+
+5
+
+**==> picture [336 x 90] intentionally omitted <==**
+
+**----- Start of picture text -----**
+“what is happening LLaVA BERTScore in this image?” similarity-based “a monkey is...” reward Diffusion “a monkey washing dishes...” Model **----- End of picture text -----**
+
+**Figure 2 (VLM reward function)** Illustration of the VLM-based reward function for prompt-image alignment. LLaVA (Liu et al., 2023) provides a short description of a generated image; the reward is the similarity between this description and the original prompt as measured by BERTScore (Zhang et al., 2020).
+
+We fix the resolution of diffusion model samples at 512x512, such that the file size is determined solely by the compressibility of the image. We define two tasks based on file size: compressibility, in which the file size of the image after JPEG compression is minimized, and incompressibility, in which the same measure is maximized.
+
+## 5.2 AESTHETIC QUALITY
+
+To capture a reward function that would be useful to a human user, we define a task based on perceived aesthetic quality. We use the LAION aesthetics predictor (Schuhmann, 2022), which is trained on 176,000 human image ratings. The predictor is implemented as a linear model on top of CLIP embeddings (Radford et al., 2021). Annotations range between 1 and 10, with the highest-rated images mostly containing artwork. Since the aesthetic quality predictor is trained on human judgments, this task constitutes reinforcement learning from human feedback (Ouyang et al., 2022; Christiano et al., 2017; Ziegler et al., 2019).
+
+## 5.3 AUTOMATED PROMPT ALIGNMENT WITH VISION-LANGUAGE MODELS
+
+A very general-purpose reward function for training a text-to-image model is prompt-image alignment. However, specifying a reward that captures generic prompt alignment is difficult, conventionally requiring large-scale human labeling efforts. We propose using an existing VLM to replace additional human annotation. This design is inspired by recent work on RLAIF (Bai et al., 2022b), in which language models are improved using feedback from themselves.
+
+We use LLaVA (Liu et al., 2023), a state-of-the-art VLM, to describe an image. The finetuning reward is the BERTScore (Zhang et al., 2020) recall metric, a measure of semantic similarity, using the prompt as the reference sentence and the VLM description as the candidate sentence. Samples that more faithfully include all of the details of the prompt receive higher rewards, to the extent that those visual details are legible to the VLM.
+
+In Figure 2, we show one simple question: “ _what is happening in this image?_ ”. While this captures the general task of prompt-image alignment, in principle any question could be used to specify complex or hard-to-define reward functions for a particular use case. One could even employ a language model to automatically generate candidate questions and evaluate responses based on the prompt. This framework provides a flexible interface where the complexity of the reward function is only limited by the capabilities of the vision and language models involved.
+
+## 6 EXPERIMENTAL EVALUATION
+
+The purpose of our experiments is to evaluate the effectiveness of RL algorithms for finetuning diffusion models to align with a variety of user-specified objectives. After examining the viability of the general approach, we focus on the following questions:
+
+1. How do variants of DDPO compare to RWR and to each other?
+
+2. Can VLMs allow for optimizing rewards that are difficult to specify manually?
+
+3. Do the effects of RL finetuning generalize to prompts not seen during finetuning?
+
+6
+
+**==> picture [397 x 417] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Pretrained Aesthetic Quality Compressibility Incompressibility Figure 3 (DDPO samples)DDPO samples) samples) Qualitative depiction of the effects of RL finetuning on different reward functions. DDPO transforms naturalistic images into stylized artwork to maximize aesthetic quality, transforms naturalistic images into stylized artwork to maximize aesthetic quality, removes background content and applies foreground smoothing to maximize compressibility, and adds high-frequency noise to maximize incompressibility. DDPOIS DDPOSF RWR RWRsparse **----- End of picture text -----**
+
+**Figure 3 (DDPO samples)DDPO samples) samples)** Qualitative depiction of the effects of RL finetuning on different reward functions. DDPO transforms naturalistic images into stylized artwork to maximize aesthetic quality, transforms naturalistic images into stylized artwork to maximize aesthetic quality, removes background content and applies foreground smoothing to maximize compressibility, and adds high-frequency noise to maximize incompressibility.
+
+**Figure 4 (Finetuning effectiveness)** The relative effectiveness of different RL algorithms on three reward functions. We find that the policy gradient variants, denoted DDPO, are more effective optimizers than both RWR variants.
+
+## 6.1 ALGORITHM COMPARISONS
+
+We begin by evaluating all methods on the compressibility, incompressibility, and aesthetic quality tasks, as these tasks isolate the effectiveness of the RL approach from considerations relating to the VLM reward function. We use Stable Diffusion v1.4 (Rombach et al., 2022) as the base model for all experiments. Compressibility and incompressibility prompts are sampled uniformly from all 398 animals in the ImageNet-1000 (Deng et al., 2009) categories. Aesthetic quality prompts are sampled uniformly from a smaller set of 45 common animals.
+
+As shown qualitatively in Figure 3, DDPO is able to effectively adapt a pretrained model with only the specification of a reward function and without any further data curation. The strategies found to optimize each reward are nontrivial; for example, to maximize LAION-predicted aesthetic quality, DDPO transforms a model that produces naturalistic images into one that produces artistic drawings. To maximize compressibility, DDPO removes backgrounds and applies smoothing to what remains. To maximize incompressibility, DDPO finds artifacts that are difficult for the JPEG compression algorithm to encode, such as high-frequency noise and sharp edges. Samples from RWR are provided in Appendix G for comparison.
+
+7
+
+**==> picture [390 x 224] intentionally omitted <==**
+
+**----- Start of picture text -----**
+a dolphin riding a bike Prompt Alignment 0 . 84 0 . 81 an ant playing chess 0 . 78 0 . 75 0 . 72 0 . 69 a bear washing dishes 10k 20k 30k 40k 50k Reward Queries . . . riding a bike . . . playing chess . . . washing dishes BERTScore **----- End of picture text -----**
+
+**Figure 5 (Prompt alignment) (L)** Progression of samples for the same prompt and random seed over the course of training. The images become significantly more faithful to the prompt. The samples also adopt a cartoon-like style, which we hypothesize is because the prompts are more likely depicted as illustrations than realistic photographs in the pretraining distribution. **(R)** Quantitative improvement of prompt alignment. Each thick line is the average score for an activity, while the faint lines show average scores for a few randomly selected individual prompts.
+
+We provide a quantitative comparison of all methods in Figure 4. We plot the attained reward as a function of the number of queries to the reward function, as reward evaluation becomes the limiting factor in many practical applications. DDPO shows a clear advantage over RWR on all tasks, demonstrating that formulating the denoising process as a multi-step MDP and estimating the policy gradient directly is more effective than optimizing a reward-weighted variational bound on log-likelihood. Within the DDPO class, the importance sampling estimator slightly outperforms the score function estimator, likely due to the increased number of optimization steps. Within the RWR class, the performance of weighting schemes is comparable, making the sparse weighting scheme preferable on these tasks due to its simplicity and reduced resource requirements.
+
+## 6.2 AUTOMATED PROMPT ALIGNMENT
+
+We next evaluate the ability of VLMs, in conjunction with DDPO, to automatically improve the image-prompt alignment of the pretrained model without additional human labels. We focus on DDPOIS for this experiment, as we found it to be the most effective algorithm in Section 6.1. The prompts for this task all have the form “ _a(n) [animal] [activity]_ ”, where the animal comes from the same list of 45 common animals used in Section 6.1 and the activity is chosen from a list of 3 activities: “ _riding a bike_ ”, “ _playing chess_ ”, and “ _washing dishes_ ”.
+
+The progression of finetuning is depicted in Figure 5. Qualitatively, the samples come to depict the prompts much more faithfully throughout the course of training. This trend is also reflected quantitatively, though is less salient as small changes in BERTScore can correspond to large differences in relevance (Zhang et al., 2020). It is important to note that some of the prompts in the finetuning set, such as “ _a dolphin riding a bike_ ”, had zero success rate from the pretrained model; if trained in isolation, this prompt would be unlikely to ever improve because there would be no reward signal. It was only via transferrable learning across prompts that these difficult prompts could improve.
+
+Nearly all of the samples become more cartoon-like or artistic during finetuning. This was not optimized for directly. We hypothesize that this may be a function of the pretraining distribution (one would expect depictions of animals doing everyday activities to be more commonly cartoon-like than photorealistic) or of the reward function (perhaps LLaVA has an easier time recognizing the content of simple cartoon-like images).
+
+8
+
+**==> picture [382 x 141] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Aesthetic Quality (New Animals) Aesthetic Quality (Non-Animals) Prompt Alignment (New Scenarios) Pretrained Finetuned **----- End of picture text -----**
+
+**Figure 6 (Generalization)** Finetuning on a limited set of animals generalizes to both new animals and non-animal everyday objects. The prompts for the rightmost two columns are “ _a capybara washing dishes_ ” and “ _a duck taking an exam_ ”. A quantitative analysis is provided in Appendix F, and more samples are provided in Appendix G.
+
+## 6.3 GENERALIZATION
+
+RL finetuning on large language models has been shown to produce interesting generalization properties; for example, instruction finetuning almost entirely in English has been shown to improve capabilities in other languages (Ouyang et al., 2022). It is difficult to reconcile this phenomenon with our current understanding of generalization; it would _a priori_ seem more likely for finetuning to have an effect only on the finetuning prompt set or distribution. In order to investigate the same phenomenon with diffusion models, Figure 6 shows a set of DDPO-finetuned model samples corresponding to prompts that were not seen during finetuning. In concordance with instructionfollowing transfer in language modeling, we find that the effects of finetuning do generalize, even with prompt distributions as narrow as 45 animals and 3 activities. We find evidence of generalization to animals outside of the training distribution, to non-animal everyday objects, and in the case of prompt-image alignment, even to novel activities such as “ _taking an exam_ ”.
+
+## 7 DISCUSSION AND LIMITATIONS
+
+We presented an RL-based framework for training denoising diffusion models to directly optimize a variety of reward functions. By posing the iterative denoising procedure as a multi-step decisionmaking problem, we were able to design a class of policy gradient algorithms that are highly effective at training diffusion models. We found that DDPO was an effective optimizer for tasks that are difficult to specify via prompts, such as image compressibility, and difficult to evaluate programmatically, such as semantic alignment with prompts. To provide an automated way to derive rewards, we also proposed a method for using VLMs to provide feedback on the quality of generated images. While our evaluation considers a variety of prompts, the full range of images in our experiments was constrained ( _e.g._ , animals performing activities). Future iterations could expand both the questions posed to the VLM, possibly using language models to propose relevant questions based on the prompt, as well as the diversity of the prompt distribution. We also chose not to study the problem of overoptimization, a common issue with RL finetuning in which the model diverges too far from the original distribution to be useful (see Appendix A); we highlight this as an important area for future work. We hope that this work will provide a step toward more targeted training of large generative models, where optimization via RL can produce models that are effective at achieving user-specified goals rather than simply matching an entire data distribution.
+
+**Broader Impacts.** Generative models can be valuable productivity aids, but may also pose harm when used for disinformation, impersonation, or phishing. Our work aims to make diffusion models more useful by enabling them to optimize user-specified objectives. This adaptation has beneficial applications, such as the generation of more understandable educational material, but may also be used maliciously, in ways that we do not outline here. Work on the reliable detection of synthetic content remains important to mitigate such harms from generative models.
+
+9
+
+## CODE REFERENCES
+
+We used the following open-source libraries for this work: NumPy (Harris et al., 2020), JAX (Bradbury et al., 2018), Flax (Heek et al., 2023), optax (Babuschkin et al., 2020), h5py (Collette, 2013), transformers (Wolf et al., 2020), and diffusers (von Platen et al., 2022).
+
+## REFERENCES
+
+- Anurag Ajay, Yilun Du, Abhi Gupta, Joshua Tenenbaum, Tommi Jaakkola, and Pulkit Agrawal. Is conditional generative modeling all you need for decision-making? _arXiv preprint arXiv:2211.15657_ , 2022.
+
+- Igor Babuschkin, Kate Baumli, Alison Bell, Surya Bhupatiraju, Jake Bruce, Peter Buchlovsky, David Budden, Trevor Cai, Aidan Clark, Ivo Danihelka, Antoine Dedieu, Claudio Fantacci, Jonathan Godwin, Chris Jones, Ross Hemsley, Tom Hennigan, Matteo Hessel, Shaobo Hou, Steven Kapturowski, Thomas Keck, Iurii Kemaev, Michael King, Markus Kunesch, Lena Martens, Hamza Merzic, Vladimir Mikulik, Tamara Norman, George Papamakarios, John Quan, Roman Ring, Francisco Ruiz, Alvaro Sanchez, Rosalia Schneider, Eren Sezener, Stephen Spencer, Srivatsan Srinivasan, Wojciech Stokowiec, Luyu Wang, Guangyao Zhou, and Fabio Viola. The DeepMind JAX Ecosystem, 2020. URL `[URL removed] .
+
+- Philip Bachman and Doina Precup. Data generation as sequential decision making. _Advances in Neural Information Processing Systems_ , 28, 2015.
+
+- Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, Nicholas Joseph, Saurav Kadavath, Jackson Kernion, Tom Conerly, Sheer El-Showk, Nelson Elhage, Zac Hatfield-Dodds, Danny Hernandez, Tristan Hume, Scott Johnston, Shauna Kravec, Liane Lovitt, Neel Nanda, Catherine Olsson, Dario Amodei, Tom Brown, Jack Clark, Sam McCandlish, Chris Olah, Ben Mann, and Jared Kaplan. Training a helpful and harmless assistant with reinforcement learning from human feedback. _arXiv preprint arXiv:2204.05862_ , 2022a.
+
+- Yuntao Bai, Saurav Kadavath, Sandipan Kundu, Amanda Askell, Jackson Kernion, Andy Jones, Anna Chen, Anna Goldie, Azalia Mirhoseini, Cameron McKinnon, Carol Chen, Catherine Olsson, Christopher Olah, Danny Hernandez, Dawn Drain, Deep Ganguli, Dustin Li, Eli Tran-Johnson, Ethan Perez, Jamie Kerr, Jared Mueller, Jeffrey Ladish, Joshua Landau, Kamal Ndousse, Kamile Lukosuite, Liane Lovitt, Michael Sellitto, Nelson Elhage, Nicholas Schiefer, Noemi Mercado, Nova DasSarma, Robert Lasenby, Robin Larson, Sam Ringer, Scott Johnston, Shauna Kravec, Sheer El Showk, Stanislav Fort, Tamera Lanham, Timothy Telleen-Lawton, Tom Conerly, Tom Henighan, Tristan Hume, Samuel R. Bowman, Zac Hatfield-Dodds, Ben Mann, Dario Amodei, Nicholas Joseph, Sam McCandlish, Tom Brown, and Jared Kaplan. Constitutional AI: Harmlessness from AI feedback. _arXiv preprint arXiv:2212.08073_ , 2022b.
+
+- Arpit Bansal, Hong-Min Chu, Avi Schwarzschild, Soumyadip Sengupta, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Universal guidance for diffusion models. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 843–852, 2023.
+
+- James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL `[URL removed] .
+
+10
+
+- Cheng Chi, Siyuan Feng, Yilun Du, Zhenjia Xu, Eric Cousineau, Benjamin Burchfiel, and Shuran Song. Diffusion Policy: Visuomotor Policy Learning via Action Diffusion. _arXiv preprint arXiv:2303.04137_ , 2023.
+
+- Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In _Neural Information Processing Systems_ , 2017.
+
+Andrew Collette. _Python and HDF5_ . O’Reilly, 2013.
+
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In _Conference on Computer Vision and Pattern Recognition_ , 2009.
+
+Prafulla Dhariwal and Alexander Quinn Nichol. Diffusion models beat GANs on image synthesis. In _Advances in Neural Information Processing Systems_ , 2021.
+
+- Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Grathwohl. Reduce, reuse, recycle: Compositional generation with energy-based diffusion models and mcmc. _arXiv preprint arXiv:2302.11552_ , 2023.
+
+- Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In _International conference on machine learning_ , pp. 1329–1338. PMLR, 2016.
+
+- Ying Fan and Kangwook Lee. Optimizing ddpm sampling with shortcut fine-tuning. _arXiv preprint arXiv:2301.13362_ , 2023.
+
+- Ying Fan, Olivia Watkins, Yuqing Du, Hao Liu, Moonkyung Ryu, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, Kangwook Lee, and Kimin Lee. Dpok: Reinforcement learning for fine-tuning text-to-image diffusion models. _arXiv preprint arXiv:2305.16381_ , 2023.
+
+- Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. An image is worth one word: Personalizing text-to-image generation using textual inversion. _arXiv preprint arXiv:2208.01618_ , 2022.
+
+- Leo Gao, John Schulman, and Jacob Hilton. Scaling laws for reward model overoptimization. _arXiv preprint arXiv:2210.10760_ , 2022.
+
+- Gabriel Goh, Nick Cammarata †, Chelsea Voss †, Shan Carter, Michael Petrov, Ludwig Schubert, Alec Radford, and Chris Olah. Multimodal neurons in artificial neural networks. _Distill_ , 2021. [URL removed]
+
+- Philippe Hansen-Estruch, Ilya Kostrikov, Michael Janner, Jakub Grudzien Kuba, and Sergey Levine. IDQL: Implicit q-learning as an actor-critic method with diffusion policies. _arXiv preprint arXiv:2304.10573_ , 2023.
+
+- Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, Robert Kern, Matti Picus, Stephan Hoyer, Marten H. van Kerkwijk, Matthew Brett, Allan Haldane, Jaime Fernández del Río, Mark Wiebe, Pearu Peterson, Pierre Gérard-Marchant, Kevin Sheppard, Tyler Reddy, Warren Weckesser, Hameer Abbasi, Christoph Gohlke, and Travis E. Oliphant. Array programming with NumPy. _Nature_ , 585(7825):357–362, 2020.
+
+- Jonathan Heek, Anselm Levskaya, Avital Oliver, Marvin Ritter, Bertrand Rondepierre, Andreas Steiner, and Marc van Zee. Flax: A neural network library and ecosystem for JAX, 2023. URL `[URL removed] .
+
+- Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. In _NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications_ , 2021.
+
+- Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In _Advances in Neural Information Processing Systems_ , 2020.
+
+- Jonathan Ho, William Chan, Chitwan Saharia, Jay Whang, Ruiqi Gao, Alexey Gritsenko, Diederik P. Kingma, Ben Poole, Mohammad Norouzi, David J. Fleet, and Tim Salimans. Imagen video: High definition video generation with diffusion models. _arXiv preprint arXiv:2210.02303_ , 2022.
+
+11
+
+Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. _arXiv preprint arXiv:2106.09685_ , 2021.
+
+Michael Janner, Yilun Du, Joshua Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. In _International Conference on Machine Learning_ , 2022.
+
+- Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In _Proceedings of the Nineteenth International Conference on Machine Learning_ , pp. 267–274, 2002.
+
+- Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. In _Neural Information Processing Systems_ , 2021.
+
+- W. Bradley Knox and Peter Stone. TAMER: Training an Agent Manually via Evaluative Reinforcement. In _International Conference on Development and Learning_ , 2008.
+
+- Kimin Lee, Hao Liu, Moonkyung Ryu, Olivia Watkins, Yuqing Du, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, and Shixiang Shane Gu. Aligning text-to-image models using human feedback. _arXiv preprint arXiv:2302.12192_ , 2023.
+
+Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. 2023.
+
+- Nan Liu, Shuang Li, Yilun Du, Antonio Torralba, and Joshua B Tenenbaum. Compositional visual generation with composable diffusion models. _arXiv preprint arXiv:2206.01714_ , 2022.
+
+- Jacob Menick, Maja Trebacz, Vladimir Mikulik, John Aslanides, Francis Song, Martin Chadwick, Mia Glaese, Susannah Young, Lucy Campbell-Gillingham, Geoffrey Irving, and Nat McAleese. Teaching language models to support answers with verified quotes. _arXiv preprint arXiv:2203.11147_ , 2022.
+
+- Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. _The Journal of Machine Learning Research_ , 21(1):5183–5244, 2020.
+
+- Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets. _arXiv preprint arXiv:2006.09359_ , 2020.
+
+- Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, Xu Jiang, Karl Cobbe, Tyna Eloundou, Gretchen Krueger, Kevin Button, Matthew Knight, Benjamin Chess, and John Schulman. Webgpt: Browser-assisted question-answering with human feedback. _arXiv preprint arXiv:2112.09332_ , 2021.
+
+- Khanh Nguyen, Hal Daumé III, and Jordan Boyd-Graber. Reinforcement learning for bandit neural machine translation with simulated human feedback. In _Empirical Methods in Natural Language Processing_ , 2017.
+
+- Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. In _International Conference on Machine Learning_ , 2021.
+
+- Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback. _arXiv preprint arXiv:2203.02155_ , 2022.
+
+- Xue Bin Peng, Aviral Kumar, Grace Zhang, and Sergey Levine. Advantage-weighted regression: Simple and scalable off-policy reinforcement learning. _CoRR_ , abs/1910.00177, 2019. URL `[URL removed] .
+
+- Jan Peters and Stefan Schaal. Reinforcement learning by reward-weighted regression for operational space control. In _International Conference on Machine learning_ , 2007.
+
+12
+
+- Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. _arXiv preprint arXiv:2103.00020_ , 2021.
+
+- Aditya Ramesh, Mikhail Pavlov, Scott Gray Gabriel Goh, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. _arXiv preprint arXiv:2102.12092_ , 2021.
+
+- Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. Highresolution image synthesis with latent diffusion models. In _IEEE Conference on Computer Vision and Pattern Recognition_ , 2022.
+
+- Nataniel Ruiz, Yuanzhen Li, Varun Jampani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. _arXiv preprint arXiv:2208.12242_ , 2022.
+
+- Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily Denton, Seyed Kamyar Seyed Ghasemipour, Burcu Karagol Ayan, S. Sara Mahdavi, Rapha Gontijo Lopes, Tim Salimans, Jonathan Ho, David J Fleet, and Mohammad Norouzi. Photorealistic text-to-image diffusion models with deep language understanding. _arXiv preprint arXiv:2205.11487_ , 2022.
+
+- Arne Schneuing, Yuanqi Du, Arian Jamasb Charles Harris, Ilia Igashov, Weitao Du, Tom Blundell, Pietro Lió, Carla Gomes, Michael Bronstein Max Welling, and Bruno Correia. Structure-based drug design with equivariant diffusion models. _arXiv preprint arXiv:2210.02303_ , 2022.
+
+- Chrisoph Schuhmann. Laion aesthetics, Aug 2022. URL `[URL removed] laion-aesthetics/` .
+
+- John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In _International Conference on Machine Learning_ , 2015.
+
+- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. _arXiv preprint arXiv:1707.06347_ , 2017.
+
+- Uriel Singer, Adam Polyak, Thomas Hayes, Xi Yin, Jie An, Songyang Zhang, Qiyuan Hu, Harry Yang, Oron Ashual, Oran Gafni, et al. Make-a-video: Text-to-video generation without text-video data. _arXiv preprint arXiv:2209.14792_ , 2022.
+
+- Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In _International Conference on Machine Learning_ , 2015.
+
+- Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In _International Conference on Learning Representations_ , 2021. URL `[URL removed] id=St1giarCHLP` .
+
+- Nisan Stiennon, Long Ouyang, Jeffrey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. Learning to summarize with human feedback. In _Neural Information Processing Systems_ , 2020.
+
+- Richard S Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In S. Solla, T. Leen, and K. Müller (eds.), _Advances in Neural Information Processing Systems_ , volume 12. MIT Press, 1999. URL `[URL removed]] files/paper/1999/file/ 464d828b85b0bed98e80ade0a5c43b0f-Paper.pdf` .
+
+- Patrick von Platen, Suraj Patil, Anton Lozhkov, Pedro Cuenca, Nathan Lambert, Kashif Rasul, Mishig Davaadorj, and Thomas Wolf. Diffusers: State-of-the-art diffusion models. `https: //[URL removed] , 2022.
+
+- Zhendong Wang, Jonathan J Hunt, and Mingyuan Zhou. Diffusion policies as an expressive policy class for offline reinforcement learning. _arXiv preprint arXiv:2208.06193_ , 2022.
+
+13
+
+Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. _Reinforcement learning_ , pp. 5–32, 1992.
+
+- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Transformers: State-of-the-art natural language processing. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pp. 38–45, Online, October 2020. Association for Computational Linguistics. URL `[URL removed] 6` .
+
+- Tian Xie, Xiang Fu, Octavian-Eugen Ganea, Regina Barzilay, and Tommi S Jaakkola. Crystal diffusion variational autoencoder for periodic material generation. In _International Conference on Learning Representations_ , 2021.
+
+- Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. Imagereward: Learning and evaluating human preferences for text-to-image generation. _arXiv preprint arXiv:2304.05977_ , 2023.
+
+- Minkai Xu, Lantao Yu, Yang Song, Chence Shi, Stefano Ermon, , and Jian Tang. GeoDiff: A geometric diffusion model for molecular conformation generation. In _International Conference on Learning Representations_ , 2021.
+
+- Xiaohui Zeng, Arash Vahdat, Francis Williams, Zan Gojcic, Or Litany, Sanja Fidler, and Karsten Kreis. Lion: Latent point diffusion models for 3d shape generation. _arXiv preprint arXiv:2210.06978_ , 2022.
+
+- Lvmin Zhang and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models, 2023.
+
+- Tianyi Zhang, Varsha Kishore*, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. BERTScore: Evaluating text generation with BERT. In _International Conference on Learning Representations_ , 2020.
+
+- Linqi Zhou, Yilun Du, and Jiajun Wu. 3d shape generation and completion through point-voxel diffusion. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 5826–5835, 2021.
+
+- Daniel M. Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B. Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. _arXiv preprint arXiv:1909.08593_ , 2019.
+
+14
+
+## APPENDIX A OVEROPTIMIZATION
+
+**==> picture [276 x 10] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Incompressibility Counting Animals **----- End of picture text -----**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**----- Start of picture text -----**
+DDPO **----- End of picture text -----**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 49] intentionally omitted <==**
+
+**----- Start of picture text -----**
+RWR **----- End of picture text -----**
+
+**==> picture [49 x 49] intentionally omitted <==**
+
+**==> picture [48 x 49] intentionally omitted <==**
+
+**==> picture [49 x 49] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 49] intentionally omitted <==**
+
+**==> picture [48 x 49] intentionally omitted <==**
+
+**==> picture [49 x 49] intentionally omitted <==**
+
+**==> picture [48 x 49] intentionally omitted <==**
+
+**Figure 7 (Reward model overoptimization)** Examples of RL overoptimizing reward functions. **(L)** The diffusion model eventually loses all recognizable semantic content and produces noise when optimizing for incompressibility. **(R)** When optimized for prompts of the form “ _n animals_ ”, the diffusion model exploits the VLM with a typographic attack (Goh et al., 2021), writing text that is interpreted as the specified number _n_ instead of generating the correct number of animals.
+
+Section 6.1 highlights the optimization problem: given a reward function, how well can an RL algorithm maximize that reward? However, finetuning on a reward function, especially a learned one, has been observed to lead to reward overoptimization or exploitation (Gao et al., 2022) in which the model achieves high reward while moving too far away from the pretraining distribution to be useful.
+
+Our setting is no exception, and we provide two examples of reward exploitation in Figure 7. When optimizing the incompressibility objective, the model eventually stops producing semantically meaningful content, degenerating into high-frequency noise. Similarly, we observed that LLaVA is susceptible to typographic attacks (Goh et al., 2021). When optimizing for alignment with respect to prompts of the form “ _n animals_ ”, DDPO exploited deficiencies in the VLM by instead generating text loosely resembling the specified number: for example, “ _sixx ttutttas_ ” above a picture of eight turtles.
+
+There is currently no general-purpose method for preventing overoptimization. One common strategy is to add a KL-regularization term to the reward (Ouyang et al., 2022; Stiennon et al., 2020); we refer the reader to the concurrent work of Fan et al. (2023) for a study of KL-regularization in the context of finetuning text-to-image diffusion models. However, Gao et al. (2022) suggest that existing solutions, including KL-regularization, may be empirically equivalent to early stopping. As a result, in this work, we manually identified the last checkpoint before a model began to deteriorate for each method and used that as the reference for qualitative results. We highlight this problem as an important area for future work.
+
+## APPENDIX B COMPARISON TO CLASSIFIER GUIDANCE
+
+Classifier guidance (Dhariwal & Nichol, 2021) was originally introduced as a way to improve sample quality for conditional generation using the gradients from an image classifier. For a differentiable reward function such as the LAION aesthetics predictor (Schuhmann, 2022), one could naturally imagine an extension to classifier guidance that uses gradients from such a predictor to improve aesthetic score. The issue is that classifier guidance uses gradients with respect to the noisy images in the intermediate stages of the denoising process, which requires retraining the guidance network on
+
+|Method|Aesthetic Score|
+|---|---|
+|Base model 5.95_±_0.03 Universal guidance 6.14_±_0.05 DDPOIS@ 20k reward queries 6.63_±_0.03||
+
+**Table 1** Comparison of DDPO with universal guidance using the LAION aesthetic predictor. We report the mean and one standard error over 50 samples for the prompt “wolf”.
+
+15
+
+noisy images. Universal guidance (Bansal et al., 2023) sidesteps this issue by applying the guidance network to the fully denoised image predicted by the diffusion model at each step.
+
+We compare DDPO with universal guidance in Table 1. We used the official implementation of universal guidance[1] with the recommended hyperparameters for style transfer, substituting the guidance network with the LAION aesthetics predictor. While universal guidance is able to produce a statistically significant improvement in aesthetic score, the change is small compared to DDPO. We only report results averaged over 50 samples for a single prompt, since universal guidance is very slow; on an NVIDIA A100 GPU, it takes almost 2 minutes to generate a single image, whereas standard generation (e.g., from a DDPO-finetuned model) takes 4 seconds.
+
+## APPENDIX C COMPARISON TO DPOK
+
+Here we directly compare our implementation of DDPO to the results reported in the DPOK paper (Fan et al., 2023), which was developed concurrently with this work. The key similarities and differences between our experimental setups are summarized below:
+
+- For this experiment only, we use Stable Diffusion v1-5 as the base model and train the UNet with low-rank adaptation (LoRA; Hu et al. (2021)) in order to match DPOK.
+
+- Rather than matching the hyperparameters in DPOK, we use the same hyperparameters as in our other experiments (Appendix D.5) except for the learning rate which we increase to 3e-4. We found that when using LoRA, a higher learning rate is necessary to get comparable performance to full finetuning.
+
+- Like DPOK, we train on four prompts: “a green colored rabbit” (color), “four wolves in the park” (count), “a dog and a cat” (composition), and “a dog on the moon” (location). Unlike DPOK, we train a single model for all four prompts.
+
+- Like DPOK, we train the model using ImageReward (Xu et al., 2023) as the reward function. We evaluate the model using ImageReward and the LAION aesthetics predictor (Schuhmann, 2022).
+
+- Unlike DPOK, we do not employ KL regularization.
+
+**==> picture [396 x 199] intentionally omitted <==**
+
+**----- Start of picture text -----**
+ImageReward Aesthetic Quality 2 . 0 6 . 2 1 . 5 6 . 0 1 . 0 5 . 8 0 . 5 5 . 6 5 . 4 0 . 0 5 . 2 0 5k 10k 15k 20k 25k 0 5k 10k 15k 20k 25k Reward Queries Reward Queries Color Composition DDPOIS Count Location DPOK Score Score Aesthetic ImageReward LAION **----- End of picture text -----**
+
+**Figure 8** Comparison of DDPOIS with DPOK. We take the DPOK numbers directly from the paper, which only reports scores at one point in training (after 20k reward queries). Like in DPOK, scores are averaged over 50 samples for each prompt.
+
+> 1 `[URL removed]
+
+16
+
+**==> picture [386 x 113] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Color Count Composition Location Pretrained Finetuned **----- End of picture text -----**
+
+**Figure 9** Qualtitative examples of the results of ImageReward training on the DPOK prompts: “a green colored rabbit” (color), “four wolves in the park” (count), “a dog and a cat” (composition), and “a dog on the moon” (location). The finetuned images are generated from a model trained for 20k reward queries.
+
+The results are presented in Figure 8. Our implementation of DDPOIS outperforms DPOK accross the board, without using KL regularization. Figure 8 also doubles as a quantitative study of overoptimization (Appendix A), since the model is trained with one reward function (ImageReward) and evaluated with another (LAION aesthetic score). We find that significant overoptimization does begin to happen within 25k reward queries for one of the prompts (count: “four wolves in the park”), which is reflected by a drop in LAION aesthetic score. However, the overoptimization is not severe or unreasonably fast. We provide qualitative samples in Figure 9 showing that the model is able to produce high-quality images at 20k reward queries.
+
+## APPENDIX D IMPLEMENTATION DETAILS
+
+For all experiments, we use Stable Diffusion v1.4 (Rombach et al., 2022) as the base model and finetune only the UNet weights while keeping the text encoder and autoencoder weights frozen.
+
+## D.1 DDPO IMPLEMENTATION
+
+We collect 256 samples per training iteration. For DDPOSF, we accumulate gradients across all 256 samples and perform one gradient update. For DDPOIS, we split the samples into 4 minibatches and perform 4 gradient updates. Gradients are always accumulated across all denoising timesteps for a single sample. For DDPOIS, we use the same clipped surrogate objective as in proximal policy optimization (Schulman et al., 2017), but find that we need to use a very small clip range compared to standard RL tasks. We use a clip range of 1e-4 for all experiments.
+
+## D.2 RWR IMPLEMENTATION
+
+We compute the weights for a training iteration using the entire dataset of samples collected for that training iteration. For _w_ RWR, the weights are computed using the softmax function. For _w_ sparse, we use a percentile-based threshold, meaning _C_ is dynamically selected such that the bottom _p_ % of a given pool of samples are discarded and the rest are used for training.
+
+## D.3 REWARD NORMALIZATION
+
+In practice, rewards are rarely used as-is, but instead are normalized to have zero mean and unit variance. Furthermore, this normalization can depend on the current state; in the policy gradient context, this is analogous to a value function baseline (Sutton et al., 1999), and in the RWR context, this is analogous to advantage-weighted regression (Peng et al., 2019). In our experiments, we normalize the rewards on a per-context basis. For DDPO, this is implemented as normalization by a running mean and standard deviation that is tracked for each prompt independently. For RWR, this is implemented by computing the softmax over rewards for each prompt independently. For RWRsparse, this is implemented by computing the percentile-based threshold _C_ for each prompt independently.
+
+17
+
+## D.4 RESOURCE DETAILS
+
+RWR experiments were conducted on a v3-128 TPU pod, and took approximately 4 hours to reach 50k samples. DDPO experiments were conducted on a v4-64 TPU pod, and took approximately 4 hours to reach 50k samples. For the VLM-based reward function, LLaVA inference was conducted on a DGX machine with 8 80Gb A100 GPUs.
+
+## D.5 FULL HYPERPARAMETERS
+
+|||DDPOIS|DDPOSF|RWR|RWRsparse|
+|---|---|---|---|---|---|
+|||||||
+|Diffusion|Denoising steps (_T_) Guidance weight (_w_)|50 5.0|50 5.0|50 5.0|50 5.0|
+|||||||
+|Optimization|Optimizer Learning rate Weight decay _β_1 _β_2 _ϵ_ Gradient clip norm|AdamW 1e-5 1e-4 0.9 0.999 1e-8 1.0|AdamW 1e-5 1e-4 0.9 0.999 1e-8 1.0|AdamW 1e-5 1e-4 0.9 0.999 1e-8 1.0|AdamW 1e-5 1e-4 0.9 0.999 1e-8 1.0|
+|||||||
+|RWR|Inverse temperature (_β_) Percentile Batch size Gradient updates per iteration Samples per iteration|- - - - -|- - - - -|0.2 - 128 400 10k|- 0.9 128 400 10k|
+|DDPO Batch size 64 256 - - Samples per iteration 256 256 - - Gradient updates per iteration 4 1 - - Clip range 1e-4 - - -||||||
+
+D.6 LIST OF 45 COMMON ANIMALS
+
+This list was used for experiments with the aesthetic quality reward function and the VLM-based reward function.
+
+|cat deer lizard mouse pig|dog cow beetle rat turkey|horse goat ant snake fy|monkey lion butterfy turtle llama|rabbit tiger fsh frog camel|zebra bear shark chicken bat|spider raccoon whale duck gorilla|bird fox dolphin goose hedgehog|sheep wolf squirrel bee kangaroo|
+|---|---|---|---|---|---|---|---|---|
+
+APPENDIX E ADDITIONAL DESIGN DECISIONS
+
+## E.1 CFG TRAINING
+
+Recent text-to-image diffusion models rely critically on _classifier-free guidance_ (CFG) (Ho & Salimans, 2021) to produce perceptually high-quality results. CFG involves jointly training the diffusion model on conditional and unconditional objectives by randomly masking out the context **c** during training. The conditional and unconditional predictions are then mixed at sampling time using a guidance weight _w_ :
+
+**==> picture [190 x 11] intentionally omitted <==**
+
+**==> picture [12 x 9] intentionally omitted <==**
+
+where _**ϵ** θ_ is the _**ϵ**_ -prediction parameterization of the diffusion model (Ho et al., 2020) and _**ϵ**_ ˜ _θ_ is the guided _**ϵ**_ -prediction that is used to compute the next denoised sample.
+
+For reinforcement learning, it does not make sense to train on the unconditional objective since the reward may depend on the context. However, we found that when only training on the conditional objective, performance rapidly deteriorated after the first round of finetuning. We hypothesized that
+
+18
+
+this is due to the guidance weight becoming miscalibrated each time the model is updated, leading to degraded samples, which in turn impair the next round of finetuning, and so on. Our solution was to choose a fixed guidance weight and use the guided _**ϵ**_ -prediction during training as well as sampling. We call this procedure _CFG training_ . Figure 10 shows the effect of CFG training on RWRsparse; it has no effect after a single round of finetuning, but becomes essential for subsequent rounds.
+
+**==> picture [252 x 219] intentionally omitted <==**
+
+**----- Start of picture text -----**
+JPEG Compressibility 0 − 50 − 100 − 150 − 200 0 10k 20k 30k 40k Reward Queries with CFG training without CFG training (kb) Filesize Negative **----- End of picture text -----**
+
+**Figure 10 (CFG training)** We run the RWRsparse algorithm while optimizing only the conditional _**ϵ**_ - prediction ( _without CFG training_ ), and while optimizing the guided _**ϵ**_ -prediction ( _with CFG training_ ). Each point denotes a diffusion model update. We find that CFG training is essential for methods that do more than one round of interleaved sampling and training.
+
+## E.2 INTERLEAVING
+
+There are two main differences between DDPO and RWR, as compared in Section 6.1: the objective (DDPO uses the policy gradient) and the data distribution (DDPO is significantly more on-policy, collecting 256 samples per iteration as opposed to 10,000 for RWR). This choice is motivated by standard RL practice, in which policy gradient methods specifically require on-policy data (Sutton et al., 1999), whereas RWR is designed to work in on off-policy data (Nair et al., 2020) and is known to underperform other algorithms in more online settings (Duan et al., 2016).
+
+However, we can isolate the effect of the data distribution by varying how interleaved the sampling and training are in RWR. At one extreme is a single-round algorithm (Lee et al., 2023), in which _N_ samples are collected from the pretrained model and used for finetuning. It is also possible to run _k_ rounds of finetuning each on _[N] k_[samples collected from the most up-to-date model.][In Figure][ 11][,] we evaluate this hyperparameter and find that increased interleaving does help up to a point, after which it causes performance degradation. However, RWR is still unable to match the asymptotic performance of DDPO at any level of interleaving.
+
+## APPENDIX F QUANTITATIVE RESULTS FOR GENERALIZATION
+
+In Section 6.3, we presented qualitative evidence of both the aesthetic quality model and the imageprompt alignment model generalizing to prompts that were unseen during finetuning. In Figure 12, we provide an additional quantitative analysis of generalization with the aesthetic quality model, where we measure the average reward throughout training for several prompt distributions. In accordance with the qualitative evidence, we see that the model generalizes very well to unseen animals, and everyday objects to a lesser degree.
+
+19
+
+**==> picture [396 x 127] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Aesthetic Quality JPEG Compressibility Samples per Iteration (RWR) 0 256 5 . 2 512 − 50 1,024 5 . 0 2,048 4,096 4 . 8 − 100 8,192 16,384 4 . 6 − 150 4 . 4 4 . 2 0 10k 20k 30k 0 10k 20k 30k Samples per Iteration (DDPOIS) Reward Queries Reward Queries 256 Score (kb) Aesthetic Filesize LAION Negative **----- End of picture text -----**
+
+**Figure 11 (RWR interleaving ablation)** Ablation over the number of samples collected per iteration for RWR. The number of gradient updates per iteration remains the same throughout. We find that more frequent interleaving is beneficial up to a point, after which it causes performance degradation. However, RWR is still unable to match the asymptotic performance of DDPO at any level of interleaving.
+
+**==> picture [278 x 225] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Aesthetic Quality Quantitative Generalization Finetuning Prompts (Animals Only) 5 . 2 Unseen Animals Ordinary Objects 5 . 0 4 . 8 4 . 6 4 . 4 4 . 2 0 10k 20k 30k 40k 50k Reward Queries Reward **----- End of picture text -----**
+
+**Figure 12 (Quantitative generalization)** Reward curves demonstrating the generalization of the aesthetic quality objective to prompts not seen during finetuning. The finetuning prompts are a list of 45 common animals, “unseen animals” is a list of 38 additional animals, and “ordinary objects” is a list of 50 objects (e.g. toaster, chair, coffee cup, etc.).
+
+20
+
+**==> picture [392 x 127] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Pretrained Aesthetic Quality Compressibility Incompressibility **----- End of picture text -----**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [48 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**==> picture [49 x 48] intentionally omitted <==**
+
+**Figure 13 (RWR samples)**
+
+**==> picture [364 x 184] intentionally omitted <==**
+
+**----- Start of picture text -----**
+a hedgehog riding a bike a dog riding a bike a lizard riding a bike a shark washing dishes a frog washing dishes a monkey washing dishes **----- End of picture text -----**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [61 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [61 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**Figure 14 (More image-prompt alignment samples)**
+
+## APPENDIX G MORE SAMPLES
+
+Figure 13 shows qualitative samples from the baseline RWR method. Figure 14 shows more samples on seen prompts from DDPO finetuning with the image-prompt alignment reward function. Figure 15 shows more examples of generalization to unseen animals and everyday objects with the aesthetic quality reward function. Figure 16 shows more examples of generalization to unseen subjects and activities with the image-prompt alignment reward function.
+
+21
+
+**==> picture [101 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Pretrained (New Animals) **----- End of picture text -----**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**Aesthetic Quality (New Animals)**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [63 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [63 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**==> picture [63 x 63] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**Pretrained (Non-Animals)**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**==> picture [64 x 63] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**Aesthetic Quality (Non-Animals)**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**==> picture [64 x 64] intentionally omitted <==**
+
+**Figure 15 (Aesthetic quality generalization)**
+
+22
+
+**==> picture [364 x 448] intentionally omitted <==**
+
+**----- Start of picture text -----**
+a capybara washing dishes a snail playing chess a dog doing laundry a giraffe playing basketball a parrot driving a car a duck taking an exam a robot fishing in a lake a horse typing on a keyboard a rabbit sewing clothes a tree riding a bike a car eating a sandwich an apple playing soccer **----- End of picture text -----**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [61 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**==> picture [61 x 60] intentionally omitted <==**
+
+**==> picture [60 x 60] intentionally omitted <==**
+
+**Figure 16 (Image-prompt alignment generalization)**
+
+23
+
diff --git a/open_review/iclr2024_8556.json b/open_review/iclr2024_8556.json
new file mode 100644
index 0000000000000000000000000000000000000000..78dc376c47ee1cbb9596006a05e9c2993e363e14
--- /dev/null
+++ b/open_review/iclr2024_8556.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8556",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Doubly Robust Instance-Reweighted Adversarial Training",
+ "abstract": "Assigning importance weights to adversarial data has achieved great success in training adversarially robust networks under limited model capacity. However, existing instance-reweighted adversarial training (AT) methods heavily depend on heuristics and/or geometric interpretations to determine those importance weights, making these algorithms lack rigorous theoretical justification/guarantee. Moreover, recent research has shown that adversarial training suffers from a severe non-uniform robust performance across the training distribution, e.g., data points belonging to some classes can be much more vulnerable to adversarial attacks than others. To address both issues, in this paper, we propose a novel doubly-robust instance reweighted AT framework, which allows to obtain the importance weights via exploring distributionally robust optimization (DRO) techniques, and at the same time boosts the robustness on the most vulnerable examples. In particular, our importance weights are obtained by optimizing the KL-divergence regularized loss function, which allows us to devise new algorithms with a theoretical convergence guarantee. \nExperiments on standard classification datasets demonstrate that our proposed approach outperforms related state-of-the-art baseline methods in terms of average robust performance, and at the same time improves the robustness against attacks on the weakest data points. Codes can be found in the Supplement.",
+ "rebuttal": "We thank the reviewer very much for checking our response and kindly increasing the rating. Many thanks for your effort into this review process.\n\nDear Reviewer,\n \nAs the author-reviewer discussion period will end soon, we will appreciate it if you could check our response to your review comments. This way, if you have further questions and comments, we can still reply before the author-reviewer discussion period ends. Thank you very much for your time and efforts!\n\nDear Reviewer,\n \nAs the author-reviewer discussion period will end soon, we will appreciate it if you could check our response to your review comments. This way, if you have further questions and comments, we can still reply before the author-reviewer discussion period ends. Thank you very much for your time and efforts!\n\nDear Reviewer,\n \nAs the author-reviewer discussion period will end soon, we will appreciate it if you could check our response to your review comments. This way, if you have further questions and comments, we can still reply before the author-reviewer discussion period ends. Thank you very much for your time and efforts!\n\n### Response to Reviewer 6nnk\nThank you for your thorough reviews and constructive comments. We provide our response to your comments below. \n\nQ1: Since the algorithm requires computing Jacobian inner products to perform parameter updates in the bi-level optimization, could the authors comment on the incurred time complexity? I am wondering if the algorithm runs much slower than vanilla AT (but only improves the robust accuracy moderately). \n\nA1: Many thanks for this useful question! We agree that Jacobian-vector product computation in bilevel optimization may cause additional compute burden. [...]\n\n### Response to Reviewer bEW4\nThank you for your thorough reviews and constructive comments. We provide our response to your comments below. \n\nQ1: The improvements on PGD and AutoAttack seem to be less significant. The more significant improvements are observed from RA-Tail-30. Therefore, it is necessary to provide more details of the evaluation protocol for RA-Tail-30. \n\nA1: Many thanks for this useful comment! As we discuss in the introduction, a critical limitation of the conventional AT method is that it suffers a severe non-uniform performance across the empirical distribution. For exampl [...]\n\n### Response to Reviewer u17N\nThank you for your thorough reviews and constructive comments. We provide our response to your comments below. \n\nQ1: In Eq. (7),is the constraint $\\delta \\in \\mathcal{C}_i$ correct? The author claimed that\n\"Note that now the constraint $\\delta \\in \\mathcal{C}_i is never binding in eq. (7), because the log-barrier penalty forces the minimizer of $\\ell_i^{bar}(\\theta, \\delta)$ to be strictly inside the constraint set\". Moreover, in Algorithm 1 line 5-7, why need the projected operator to keep $\\delta_{i,t}^k \\in \\mathcal{C}$. \n\nA1: Many thanks for this useful que [...]\n\n### Response to Reviewer u17N continued\nQ5: The empirical studies is not sufficient. Only small-scale datasets is adopted in the experiment. \n\nA5: Many thanks for the suggestions! We have conducted new experiments following the most recent SOTA in [1] published in ICML’23, which uses a larger CIFAR10 dataset augmented with 1 million synthetic images generated by a diffusion model. Note that this falls under a category of new models that boost the performance of adversarial defense using self-supervised learning on tens of millions of additional synthetic images. With this boosting strategy, [...]",
+ "initial_scores": [
+ 6,
+ 6,
+ 8
+ ],
+ "score_mean": 6.67,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper proposes a novel instance reweighting adversarial training (AT) framework that incorporates distributionally robust optimization (DRO) to stress the issue of adversarial robustness in the most vulnerable samples. The reviewers generally find the paper well-written, with a clear motivation and an elegant solution to the instance-reweighted bi-level optimization problem. The method's strength lies in its progressive approach to generating perturbed data and the convergence guarantee of the proposed CID method. Notably, the proposed method shows promising improvement over traditional adversarial training, particularly in the context of imbalanced datasets.\n\nHowever, reviewers point out the experimental studies are limited to small-scale datasets, and that the authors should include comparisons with more recent adversarial training methods and expand the experimental protocol for more diverse imbalance degrees. They also raised concerns about the potential increase in time complexity due to the computation of Jacobian inner products. The authors provided additional experimental results by comparing with Diffusion Defense (ICML 2023) on SVHN and CIFAR-10.\n\nOverall, while the reviewers appreciate the novelty and the theoretical grounding of the DRO approach, the relative small-scale empirical studies have limited the enthusiasm for endorsing the paper. The current consensus is still supportive of acceptance, provided that the authors can address the mentioned concerns an",
+ "forum_id": "OF5x1dzWSS",
+ "primary_area": "optimization",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_u17N",
+ "review_id": "Xe2xrHh8ov",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 2510,
+ "edit_detected": true,
+ "edit_delta_seconds": 805338,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_bEW4",
+ "review_id": "iz3ZbCusQK",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 1475,
+ "edit_detected": true,
+ "edit_delta_seconds": 805713,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_6nnk",
+ "review_id": "LsJCnj0NRj",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 2897,
+ "edit_detected": true,
+ "edit_delta_seconds": 2032127,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8556.md b/open_review/iclr2024_8556.md
new file mode 100644
index 0000000000000000000000000000000000000000..9a1b9510b1967ca5c2c9f9829da73e46466c2436
--- /dev/null
+++ b/open_review/iclr2024_8556.md
@@ -0,0 +1,722 @@
+
+
+## DOUBLY ROBUST INSTANCE-REWEIGHTED ADVERSARIAL TRAINING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Assigning importance weights to adversarial data has achieved great success in training adversarially robust networks under limited model capacity. However, existing instance-reweighted adversarial training (AT) methods heavily depend on heuristics and/or geometric interpretations to determine those importance weights, making these algorithms lack rigorous theoretical justification/guarantee. Moreover, recent research has shown that adversarial training suffers from a severe non-uniform robust performance across the training distribution, e.g., data points belonging to some classes can be much more vulnerable to adversarial attacks than others. To address both issues, in this paper, we propose a novel doubly-robust instance reweighted AT framework, which allows to obtain the importance weights via exploring distributionally robust optimization (DRO) techniques, and at the same time boosts the robustness on the most vulnerable examples. In particular, our importance weights are obtained by optimizing the KL-divergence regularized loss function, which allows us to devise new algorithms with a theoretical convergence guarantee. Experiments on standard classification datasets demonstrate that our proposed approach outperforms related state-of-the-art baseline methods in terms of average robust performance, and at the same time improves the robustness against attacks on the weakest data points.
+
+## 1 INTRODUCTION
+
+Deep learning models are known to be vulnerable to malicious adversarial attacks Nguyen et al. (2015), i.e., small perturbation added to natural input data can easily fool state-of-the-art networks. Given that these deep neural networks are being heavily deployed in real-life applications, even in safety-critical applications, adversarial training (AT) Madry et al. (2017); Athalye et al. (2018a); Carmon et al. (2019) has been proposed for training networks to be robust to adversarial attacks Athalye et al. (2018b); Szegedy et al. (2013); Goodfellow et al. (2014); Papernot et al. (2016); Nguyen et al. (2015); Zhang et al. (2021b; 2020a). In particular, most existing defense strategies are based on the recipes similar to AT Madry et al. (2017), where the goal is to minimize the average loss of the worst-case adversarial data for the training distribution via solving a minimax optimization problem.
+
+Despite its success, the traditional AT method Madry et al. (2017) has some major limitations. First, even though existing overparameterized neural networks seem to be good enough for natural data, highly adversarial data consumes much more model capacity compared to their clean counterpart, making the minimization of the **uniform** average adversarial loss a very pessimistic goal, as argued in Zhang et al. (2020b). To overcome this limitation, recent works Zhang et al. (2020b); Liu et al. (2021a); Zeng et al. (2021); Ding et al. (2018) assign an **importance weight** to each data point in the training distribution, in order to emphasize the ones that are critical to determining the model’s decision boundaries. By allowing more careful exploitation of the limited model capacity, such a simple **instance-reweighted** scheme combined with traditional adversarial training has yielded a
+
+1
+
+significant boost in the robust performance of current adversarially trained models. Yet, existing methods for instance-reweighted AT mostly adopt heuristic techniques and/or geometric intuitions in order to compute the instance weights, which makes these algorithms lack a principled and rigorous theoretical justification/guarantee. This hence motivates the following question we ask:
+
+_How to systematically determine the importance weights via a principled approach, rather than resorting to heuristics/interpretations which are often sub-optimal?_
+
+Moreover, as observed in Tian et al. (2021), another critical limitation of the transitional AT method is that it suffers a severe _non-uniform_ performance across the empirical distribution. For example, while the average robust performance of the AT method on the CIFAR10 dataset can be as high as 49%, the robust accuracy for the weakest class is as low as 14%, which depicts a huge disparity in robust performance across different classes. We note that such a non-uniform performance across classes is also slightly observed in the standard training with clean data, but its severity is much worsened in adversarial training (see Figure 1). Indeed, this is a critical limitation that requires special attention as, in a real-world situation, a more intelligent attacker can, in fact, decide which examples to attack so as to achieve a much higher success rate (e.g., 86% when attacking the most vulnerable class). This non-uniform robust performance is even worsened in the case of imbalanced training distributions Wu et al. (2021); Wang et al. (2022), where the robust performance for the most vulnerable class can be as low as 0%. This motivates our second question given below:
+
+_Can such an issue of non-uniform performance particularly over imbalanced datasets be addressed at the instance level simultaneously as we design the importance weights to address the first question?_
+
+In this paper, we propose a novel doubly robust instance reweighted optimization approach to address both of the above questions.
+
+## 1.1 OUR CONTRIBUTIONS
+
+**(A novel principled framework for instance reweighted AT)** In order to determine the instance weights for AT in a theoretically grounded way, we propose a novel doubly robust instance reweighted optimization framework, based on distributionally robust optimization (DRO) Rahimian & Mehrotra (2019); Qian et al. (2019) and bilevel optimization (Zhang et al., 2022; Pedregosa, 2016; Grazzi et al., 2020b). Through building a model that is robust not only to the adversarial attacks but also to the worst-case instance weight selections, our framework (a) enjoys better robust performance than existing instance-reweighted schemes based on heuristic/geometric techniques Zhang et al. (2020b); Liu et al. (2021a); Zeng et al. (2021) as well as tradtional AT baselines Madry et al. (2017); and (b) addresses the non-uniform issues Tian et al. (2021); Pethick et al. (2023) of traditional AT by carefully optimizing the instance weights so as to boost the robust performance of the most vulnerable examples. Moreover, the proposed framework can be reformulated into a new finite-sum compositional bilevel optimization problem (CBO), which can be of great interest to the optimization community on its own.
+
+**(A novel algorithm with theoretical guarantee)** Solving the proposed doubly robust optimization problem is technically challenging, including the non-differentiability of the optimizer for the constrained inner level problem and the biased hypergradient estimation for the compositional outer level problem. To tackle these challenges, we first propose a penalized reformulation based on the log-barrier penalty method, and then develop a novel algorithm which exploits the implicit function theorem and keeps track of a running average of the outer level composed function values. Our algorithm not only leads to a robust model for the proposed instance reweighted optimization problem but also provides a solution to the generic compositional bilevel optimization problem. Under widely adopted assumptions in the bilevel (Grazzi et al., 2020a; Ji et al., 2021; Rajeswaran et al., 2019; Ji & Liang, 2021) and compositional optimization Wang et al. (2017); Chen et al. (2021b); Lian et al. (2017); Blanchet et al. (2017); Devraj & Chen (2019) literature, we further establish the convergence guarantee for the proposed algorithm.
+
+**(Strong experimental performance)** Experiments on several balanced and imbalanced image recognition datasets demonstrate the effectiveness of our proposed approach. In particular, on CIFAR10 our approach yields +3.5% improvement in overall robustness against PGD attacks Madry et al. (2017) with most of it coming from boosting robustness on vulnerable data points.
+
+2
+
+## 1.2 RELATED WORK
+
+**Adversarial training for robust learning** Adversarial training (AT) Madry et al. (2017); Athalye et al. (2018a); Carmon et al. (2019) was proposed for training deep neural networks robust to malicious adversarial attacks Goodfellow et al. (2014); Tramèr et al. (2017). In particular, Madry et al. (2017) introduced a generic AT framework based on minimax optimization with the goal of minimizing the training loss of the worst-case adversarial data for the training distribution. However, despite AT method being still considered as one of the most powerful defense strategies, Rice et al. (2020) highlights a severe decrease in robust performance of traditional AT when training is not stopped early, a phenomenon they dubbed _robust overfitting_ . Several extensions of the standard AT method have been proposed to mitigate this intriguing problem, such as data augmentation-based techniques Rebuffi et al. (2021); Gowal et al. (2021), or smoothing-based methods Chen et al. (2021a); Yang et al. (2020a;b). Zhang et al. (2019) proposed a theoretically grounded objective for AT to strike a balance between robust and natural performance. However, those methods suffer a severe nonuniform performance across classification categories, as observed in Tian et al. (2021). Our proposed framework helps mitigate this drawback by carefully optimizing for the most vulnerable data points.
+
+**Instance reweighted adversarial training** Another line of works Zhang et al. (2020b); Liu et al. (2021a); Zeng et al. (2021); Ding et al. (2018) assign an importance weight to each data point in the empirical distribution and minimize the weighted adversarial losses. This has been shown to significantly boost the performance of AT due to more careful exploitation of the limited capacity of large deep neural networks to fit highly adversarial data, and helps overcome robust overfitting to some extent Zhang et al. (2020b). For example, in the geometry-aware adversarial instance reweighted adversarial training (GAIRAT) Zhang et al. (2020b) method, the instance weight is computed based on the minimum number of PGD Madry et al. (2017) steps required to generate a mis-classified adversarial example. Liu et al. (2021a) leverages probabilistic margins to compute weights. Existing approaches for instance reweighted AT are, however, all based on heuristics/geometric intuitions to determine the weights. In this paper, we propose a principled approach to instance-reweighted AT by exploiting robust optimization techniques Qian et al. (2019); Rahimian & Mehrotra (2019).
+
+Instance reweighting has also been used in the context of domain adaptation Jiang & Zhai (2007), data augmentation Yi et al. (2021), and imbalanced classification Ren et al. (2018). By determining the instance weights in a more principled way, our method also has the potential to be applied to these contexts, which we leave as future work.
+
+Due to space limitation, more discussions about related literature in Bilevel Optimization and Stochastic Compositional Optimization is deferred to Appendix A.
+
+## 2 PRELIMINARY ON AT
+
+**Traditional AT.** The traditional adversarial training (AT) Madry et al. (2017) framework is formulated as the following minimax optimization problem over the training dataset _D_ = _{_ ( _xi, yi_ ) _}[M] i_ =1
+
+_i_ =1
+
+**==> picture [261 x 27] intentionally omitted <==**
+
+where _ℓ_ ( _xi_ + _δ, yi_ ; _θ_ ) is the loss function on the adversarial input _xi_ + _δ_ , _C_ is the treat model that defines the constraint on the adversarial noise _δ_ , and _θ ∈_ R _[d]_ corresponds to the model parameters. Thus, the traditional AT builds robust models by optimizing the parameters _θ_ for the average worstcase adversarial loss _ℓ_ ( _xi_ + _δ, yi_ ; _θ_ ) over the training dataset _D_ . A natural solver for the problem in Equation (1) is the AT algorithm Madry et al. (2017), where 1) the projected gradient descent (PGD) Madry et al. (2017) method is first adopted to approximate the worst-case adversarial noise _δ_ and 2) an outer minimization step is performed on the parameters _θ_ using stochastic gradient descent (SGD) methods. However, the traditional AT is known to consume tremendous amount of model capacity due to its overwhelming smoothing effect of natural data neighborhoods Zhang et al. (2020b). In other words, the traditional AT robustifies models by making decision boundaries far away from natural data points so that their adversarial counterparts are still correctly classified (i.e., do not cross the decision boundary), and thus requires significantly more model capacity compared to the standard training on clean data.
+
+**Instance Reweighted AT.** The geometry-aware approach in Zhang et al. (2020b) introduces a new line of methods that **reweights** the adversarial loss on each individual data point in order to address
+
+3
+
+the drawback of traditional AT. The key motivation is that distinct data points are unequal by nature and should be treated differently based on how important they participate on the selection of decision boundaries. Hence, the learning objective of the geometry-aware instance-reweighted adversarial training (GAIRAT) method as well as its variants Zhang et al. (2020b); Liu et al. (2021a); Zeng et al. (2021) can be written as
+
+**==> picture [321 x 27] intentionally omitted <==**
+
+where the constraints on the weights vector _w_ = ( _w_ 1 _, ..., wM_ ) _[⊤]_ are imposed in order to make Equation (2) consistent with the original objective in Equation (1). This framework assumes that the weight vector _w_ = ( _w_ 1 _, ..., wM_ ) _[⊤]_ can be obtained separately and the goal is only to optimize for _θ_ once an off-the-shelf technique/heuristic can be used to compute _w_ . Intuitively, the key idea driving the weight assignments in instance reweighted methods is that larger weights should be assigned to the training examples closer to the decision boundaries, whereas the ones that are far away should have smaller weights because they are less important in determining the boundaries. The major difference among the existing instance reweighted AT methods lies in the heuristics used to design/compute the instance weights _wi, i_ = 1 _, ..., M_ . However, none of those methods adopt a scheme that is theoretically grounded, nor does the formulation in Equation (2) provide a way of determining those weights.
+
+**Bilevel Optimization Formulation for AT.** Along a different line, bilevel optimization has recently been leveraged to develop a more powerful framework for adversarial training Zhang et al. (2022):
+
+**==> picture [335 x 27] intentionally omitted <==**
+
+where for each data point ( _xi, yi_ ), _δi[∗]_[(] _[θ]_[)][ represents some worst-case/optimal adversarial noise under] the attack loss function _ℓ[′]_ ( _·_ ; _θ_ ). Such a bilevel optimization formulation of AT has key advantages over the traditional framework in Equation (1). First, the traditional AT can be recovered by setting the attack objective to be the negative of the training objective, i.e., _ℓ[′]_ ( _·_ ; _θ_ ) = _−ℓ_ ( _·_ ; _θ_ ). Second, the bilevel formulation gives one the flexibility to separately design the inner and outer level objectives, _ℓ[′]_ and _ℓ_ , respectively. These key advantages make the formulation in Equation (3) a more generic and powerful framework than the one in Equation (1). As we will see next, this enables us to independently construct a new outer level objective that also solves for the instance weights _w_ , and an inner level objective for regularized attack.
+
+## 3 PROPOSED FRAMEWORK FOR INSTANCE REWEIGHTED AT
+
+## 3.1 DONE: DOUBLY ROBUST INSTANCE REWEIGHTED AT
+
+Using the bilevel formulation for AT in Eq. equation 3, we can incorporate the instance reweighted idea as
+
+**==> picture [386 x 27] intentionally omitted <==**
+
+Based on bilevel optimization and distributionally robust optimization (DRO), we next propose a new framework for AT which determines the weights _w_ in a more principled way rather than using heuristic methods. Specifically, by letting _w_ maximize the weighted sum of the adversarial losses _ℓ_ ( _xi_ + _δi[∗]_[(] _[θ]_[)] _[, y][i]_[;] _[ θ]_[)] _[, i]_[ = 1] _[, ..., M]_[, we seek to build a model in the outer level problem that is robust] not only to the adversarial attacks but also to the worst-case attack distribution:
+
+**==> picture [387 x 27] intentionally omitted <==**
+
+where _P_ represents the probability simplex, i.e., _P_ = _{w ∈_ R _[M]_ :[�] _[M] i_ =1 _[w][i]_[= 1][ and] _[ w][i][≥]_[0] _[}]_[, and] the term _r_[�] _[M] i_ =1 _[w][i]_[ log(] _[Mw][i]_[)][ in the outer level objective captures the KL-divergence between] _[ w]_ and the uniform weight distribution, which is a widely adopted choice of regularizer in the DRO literature Rahimian & Mehrotra (2019). Note that the regularization parameter _r >_ 0 controls the tradeoff between two extreme cases: 1) _r_ = 0 leads to an un-regularized problem (as we comment
+
+4
+
+1 below), and 2) _r →∞_ yields _wi → M_[, and hence, we recover the average objective in Equation (1).] Such a regularizer is introduced to promote the balance between the uniform and worst-case weights _w_ ; otherwise the outer level objective in Equation (5) becomes linear in weights vector _w_ , which makes the solution of the ‘max’ problem to be trivially a one-hot vector _w_ (where the only ‘1’ is at index _i_ with the largest adversarial loss), and in practice, such a trivial one-hot vector _w_ makes the optimization routine unstable and usually hurts generalization to the training distribution Qian et al. (2019); Wang et al. (2021).
+
+Overall, the formulation in Equation (5) becomes a **doubly robust** bilevel optimization: (a) the inner level finds the worst-case noise _δ_ in order to make the model parameters _θ_ robust to such adversarial perturbation of data input; and (b) the outer level finds the worst-case reweighting first so that the optimization over the model _θ_ can focus on those data points with high loss values, i.e., the optimization over _θ_ is over the worst-case adversarial losses.
+
+## 3.2 AN EQUIVALENT COMPOSITIONAL BILEVEL OPTIMIZATION PROBLEM
+
+An important consequence of choosing the KL-divergence as the regularizer is that the max problem in the outer objective of Equation (5) admits a unique solution _w[∗]_ ( _θ_ ) (see Qi et al. (2021) for proof), which has its _i_ -the entry given by _wi[∗]_[(] _[θ]_[)][=][exp] � _ℓi_ ( _θ,δri[∗]_[(] _[θ]_[))] � _/_[�] _j_[exp] � _ℓj_ ( _θ,δrj∗_[(] _[θ]_[))] �. Here we denote _ℓi_ ( _θ, δi[∗]_[(] _[θ]_[)) =] _[ ℓ]_[(] _[x][i]_[ +] _[ δ] i[∗]_[(] _[θ]_[)] _[, y][i]_[;] _[ θ]_[)][.][Substituting this optimal weights vector] _[ w][∗]_[(] _[θ]_[)][ back] in Equation (5) yields the following equivalent optimization problem
+
+**==> picture [339 x 28] intentionally omitted <==**
+
+Problem (6) is, in fact to the best of our knowledge, a novel optimization framework, which we define as a compositional bilevel optimization problem. Without the inner level problem, stochastic algorithms with known convergence behaviors have been devised for the single-level compositional problem. Nevertheless, directly solving problem (6) suffers from several key technical challenges. In particular, the fact that the minimizer of the inner level constrained problem in Equation (6) may not be differentiable w.r.t. to the model parameter _θ_ prevents the usage of implicit differentiation for solving the bilevel optimization problem.
+
+To tackle this challenge, we propose a penalized reformulation based on the log-barrier penalty method. More specifically, we consider _ℓ∞_ -norm based attack constraint given by _C_ = _{δ ∈_ R _[p]_ : �� _δ_ �� _∞[≤][ϵ, x]_[ +] _[ δ][∈]_[[0] _[,]_[ 1]] _[p][}]_[for][radius] _[ϵ][>]_[0][and][input] _[x][∈]_[R] _[p]_[.][In][this][case,][the][constraint][set] _C_ can be written in the form of linear constraint _Aδ ≤ b_ with _A_ = � _Ip, −Ip_ � _⊤ ∈_ R2 _p×p_ and _b_ = � min( _ϵ_ **1** _p,_ **1** _p − x_ ) _,_ min( _ϵ_ **1** _p, x_ )� _⊤ ∈_ R2 _p_ . With this, we can reformulate the inner problem in Equation (6) as _δi[∗]_[(] _[θ]_[) = arg min] _{Aiδ≤bi}[ℓ][′] i_[(] _[θ, δ]_[)][, where] _[ A][i]_[ and] _[ b][i]_[ are realizations of aforementioned] _A_ and _b_ for input _xi_ . By using the log-barrier penalty method to penalize the linear constraint into the attack objective, the optimization problem (6) becomes
+
+**==> picture [353 x 28] intentionally omitted <==**
+
+where _ℓ[bar] i_ ( _θ, δ_ ) := _ℓ[′] i_[(] _[θ, δ]_[)] _[ −][c]_[ �][2] _k[p]_ =1[log(] _[b][k][ −][δ][⊤][a][k]_[)][,] _[ a][k]_[denotes the] _[ k]_[-th row of matrix] _[ A][i]_[and] _[ b][k]_ is the _k_ -th entry of vector _bi_ . Note that now the constraint _{δ ∈Ci}_ is never binding in Equation (7), because the log-barrier penalty forces the minimizer of _ℓ[bar] i_ ( _θ, δ_ ) to be strictly inside the constraint _i_[(] _[θ]_[)] set. Based on this, we show that the minimizer _δ_[ˆ] _i[∗]_[(] _[θ]_[)][ becomes differentiable, i.e.,] _[∂][δ]_[ˆ] _∂θ[∗]_ exists when _ℓ[′] i_[(] _[θ, δ]_[)][ is twice differentiable and under some mild conditions.][With the smoothness of][ ˆ] _[δ] i[∗]_[(] _[θ]_[)][, we] also provide the expression of the gradient _∇L_ ( _θ_ ) in the following proposition. **Proposition 1.** _Let ℓ[′] i_[(] _[θ, δ]_[)] _[ be twice differentiable.][Define][ γ][k]_[= 1] _[/]_[(] _[b][k][ −][a][⊤] k[δ]_[ˆ] _i[∗]_[(] _[θ]_[))][2] _[,][ k]_[= 1] _[, ...,]_[ 2] _[p] and diagonal matrix Ci_ ( _θ_ ) = _c_ diag � _γ_ 1 + _γp_ +1 _, γ_ 2 + _γp_ +2 _, ..., γp_ + _γ_ 2 _p_ � _. If ∇_[2] _δ[ℓ] i[′]_[(] _[θ,]_[ ˆ] _[δ] i[∗]_[(] _[θ]_[))+] _[C][i]_[(] _[θ]_[)] _i_[(] _[θ]_[)] _is invertible, then the implicit gradient[∂][δ]_[ˆ] _∂θ[∗] exists and we have_
+
+**==> picture [380 x 31] intentionally omitted <==**
+
+**==> picture [159 x 19] intentionally omitted <==**
+
+5
+
+Proposition 1 provides the expression of the total gradient _∇L_ ( _θ_ ), which is useful for practical implementation of implicit differentiation based algorithms for problem (6). Moreover, as in Zhang et al. (2022), when _ℓ[′] i_[(] _[θ,][ ·]_[)][ is modeled by a ReLU-based deep neural network, the hessian] _[ ∇]_[2] _δ[ℓ] i[′]_[(] _[θ, δ]_[)] w.r.t. input _δ_ can be safely neglected due to the fact that ReLU network generally lead to piece-wise linear decision boundaries w.r.t. its inputs Moosavi-Dezfooli et al. (2019); Alfarra et al. (2022), i.e., _∇_[2] _δ[ℓ] i[′]_[(] _[θ, δ]_[)] _[ ≈]_[0][.][Further, the diagonal matrix] _[ C][i]_[(] _[θ]_[)][ can be efficiently inverted.][Hence, in order to] approximate _∇L_ ( _θ_ ), we only need Jacobian-vector product computations which can be efficiently computed using existing automatic differentiation packages.
+
+3.3 COMPOSITIONAL IMPLICIT DIFFERENTIATION (CID)
+
+To solve our reformulated problem (7) for AT, we consider the following generic compositional bilevel optimization problem, which can be of great interest to the optimization community:
+
+**==> picture [335 x 59] intentionally omitted <==**
+
+which can immediately recover problem (7) by setting _gi_ = exp � _ℓi_ ( _θ,δ_[ˆ] _ri[∗]_[(] _[θ]_[))] �, _hi_ = _ℓ[′] i_[(] _[θ, δ]_[)] _[ −] c_[�][2] _k[p]_ =1[log(] _[b][k][−][δ][⊤][a][k]_[)][, and the constraint set] _[ V][i]_[=] _[ C][i]_[. Here the outer functions] _[ g][i]_[(] _[θ, δ]_[) :][ R] _[d][×]_[R] _[p][→]_ R _[m]_ and _f_ ( _z_ ) : R _[m] →_ R are generic nonconvex and continuously differentiable functions. The inner function _hi_ ( _θ, δ_ ) : R _[d] × Vi →_ R is a twice differentiable and admits a unique minimizer in _δ_ , _Vi_ is a convex subset of R _[p]_ that is assumed to contain the minizers _δi[∗]_[(] _[θ]_[)][.][We collect all inner] loop minimizers into a single vector _δ[∗]_ ( _θ_ ). The goal is to minimize the total objective function _F_ ( _θ_ ) : R _[d] −→_ R, _which not only leads to a robust model for our instance reweighted optimization problem (7) but also provides a solution to the generic compositional bilevel optimization problem_ . As alluded earlier, solving the compositional bilevel optimization problem is nontrivial. More specifically, it can be shown that the gradient of the total objective is _∇F_ ( _θ_ ) = _[∂][g]_[(] _[θ] ∂θ[,][δ][∗]_[(] _[θ]_[))] _∇f_ ( _g_ ( _θ, δ[∗]_ ( _θ_ ))) by applying the chain rule. Due to the fact that _∇f_ ( _·_ ) needs to be evaluated at the full value _g_ ( _θ, δ[∗]_ ( _θ_ )), standard stochastic gradient descent methods cannot be naively applied here. The reason is that even if we can obtain the unbiased estimates _gi_ ( _θ, δi[∗]_[(] _[θ]_[))][,][the][product] _∂gi_ ( _θ∂θ,δi[∗]_[(] _[θ]_[))] _∇f_ ( _gi_ ( _θ, δi[∗]_[(] _[θ]_[)))][ would still be biased, unless] _[ f]_[(] _[·]_[)][ is a linear function.][This key differ-] ence makes problem (8) particularly challenging and sets it apart from the standard finite-sum bilevel optimization problem in which the total objective is linear w.r.t. the sampling probabilities _M_ 1[.] To design a theoretically grounded algorithm for problem (8), note that the stochastic compositional gradient descent (SCGD) Wang et al. (2017) algorithm for the single-level compositional optimization problem keeps track of a running average of the composed function evaluations during the algorithm running. Inspired by SCGD, we propose a novel algorithm (see Algorithm 1) that exploits the implicit differentiation technique to deal with the bilevel aspect of problem (8). Using the implicit function theorem, we can obtain
+
+**==> picture [307 x 20] intentionally omitted <==**
+
+with each _vi[∗]_[being the solution of the linear system] _[ ∇]_[2] _δ[h][i]_[ (] _[θ, δ] i[∗]_[(] _[θ]_[))] _[ v]_[=] _[ ∇][δ][g][i]_[ (] _[θ, δ] i[∗]_[(] _[θ]_[))][.]
+
+Specifically, at each step _t_ , the algorithm first samples a batch _B_ of cost functions _{_ ( _gi, hi_ ) _}_ and applies _K_ steps of projected gradient descent to obtain _δi[K]_[(] _[θ][t]_[)][as][an][estimate][of][the][minimizer] _δi[∗]_[(] _[θ][t]_[)][ of each] _[ h][i]_[(] _[θ][t][,][ ·]_[)][ in] _[ B]_[.][Then, the algorithm computes an approximation] _[∇]_[�] _[g][i]_[(] _[θ][t][, δ] i[K]_[(] _[θ][t]_[))][ of the] stochastic gradient sample _[∂][g][i]_[(] _[θ][t] ∂θ[,][δ][∗]_[(] _[θ][t]_[))] by replacing each _δi[∗]_[(] _[θ][t]_[)][ with] _[ δ] i[K]_[(] _[θ][t]_[)][ in Equation (9).][The] running estimate _ut_ of _[∂][g]_[(] _[θ] ∂θ[,][δ][∗]_[(] _[θ]_[))] and the parameters _θ_ will be next updated as follows
+
+**==> picture [387 x 28] intentionally omitted <==**
+
+Note that we will refer the instantiation of Algorithm 1 for solving the instance reweighted problem (7) as DONE (which stands for Doubly Robust Instance Reweighted AT).
+
+6
+
+## **Algorithm 1** Compositional Implicit Differentiation (CID)
+
+1: **Input:** stepsizes _α, {βt}, {ηt}_ , initializations _θ_ 0 _∈_ R _[d]_ , _δ_[0] _∈_ R _[p]_ , and _u_ 0 _∈_ R _[m]_ .
+
+2: **for** _k_ = 0 _,_ 1 _,_ 2 _, ..., T −_ 1 **do** 3: Draw a minibatch of cost functions _B_ = _{_ ( _gi, hi_ ) _}_ 4: **for** each ( _gi, hi_ ) _∈B_ (in parallel) **do** 5: **for** _k_ = 1 _, ..., K_ **do** 6: Update _δi,t[k]_[= Π] _[C]_ � _δi,t[k][−]_[1] _− α∇δhi_ ( _θt, δi,t[k][−]_[1][)] � 7: **end for** 8: Compute sample gradient estimate _∇_[�] _gi_ ( _θt, δi,t[K]_[)][ as in Equation (9) by replacing] _[ δ] i[∗]_[(] _[θ][t]_[)][ with] _[ δ] i,t[K]_ 9: **end for** 10: Compute _g_ ( _θt, δt[K]_[;] _[ B]_[) =] _|B|_ 1 � _|B|i_ =1 _[g][i]_[(] _[θ][t][, δ] i,t[K]_[)][ and] _[∇]_[�] _[g]_[(] _[θ][t][, δ] t[K]_[;] _[ B]_[) =] _|B|_ 1 � _|B|i_ =1 _[∇]_[�] _[g][i]_[(] _[θ][t][, δ] i,t[K]_[)] 11: Update _ut_ +1 = (1 _− ηt_ ) _ut_ + _ηtg_ ( _θt, δt[K]_[;] _[ B]_[)] 12: Update _θt_ +1 = _θt − βt∇_[�] _g_ ( _θt, δt[K]_[;] _[ B]_[)] _[∇][f]_[(] _[u] t_ +1[)] 13: **end for**
+
+## 3.4 CONVERGENCE ANALYSIS OF CID
+
+In the following, we establish the convergence rate of the proposed CID algorithm under widely adopted assumptions in bilevel and compositional optimization literatures (see Appendix E for the statement of assumptions and proof of Theorem 1).
+
+**Theorem 1.** _Suppose that Assumptions 1, 2, 3 (which are given in Appendix) hold. Select the stepsizes as βt_ = ~~_√_~~ 1 _T[and][ η][t][∈]_[[] 2[1] _[,]_[ 1)] _[, and batchsize as][ O]_[(] _[T]_[)] _[.][Then, the iterates][ θ][t][, t]_[=][0] _[, ..., T][−]_[1] _[ of the] CID algorithm satisfy_
+
+**==> picture [197 x 29] intentionally omitted <==**
+
+The proof can be found in the Appendix. Theorem 1 indicates that Algorithm 1 can achieve an _ϵ_ -accurate stationary point by selecting _T_ = _O_ ( _ϵ[−]_[2] ) and _K_ = _O_ (log[1] _ϵ_[)][.][The dependency on the] batchsize can be reduced to _O_ ( _ϵ[−]_[1] ) by selecting _ηt_ = _T[−]_[0] _[.]_[25] , which would also lead to a higher iteration complexity of _O_ ( _ϵ[−]_[4] ).
+
+## 4 EXPERIMENTS
+
+## 4.1 EXPERIMENTAL SETUP
+
+**Datasets and Baselines.** We consider image classification problems and compare the performance of our proposed DONE method with related baselines on four image recognition datasets CIFAR10 Krizhevsky & Hinton (2009), SVHN Netzer et al. (2011), STL10 Coates et al. (2011), and GTSRB Stallkamp et al. (2012). More details about the datasets can be found in the appendix. We compare against standard adversarial training methods AT Madry et al. (2017) and FAT Zhang et al. (2020a), and three other state-of-the-art instance re-weighted adversarial training methods GAIRAT Zhang et al. (2020b), WMMR Zeng et al. (2021), and MAIL Liu et al. (2021a). We use the official publicly available codes of the respective baselines and their recommended training configurations. For our algorithm DONE, we consider three implementations based on how we solve the inner loop optimization: (i) DONE-GD uses simple non-sign projected gradient descent steps; (ii) DONEADAM employs the Adam optimizer; and (iii) DONE-PGD adopts the projected gradient sign method. We run all baselines on a single NVIDIA Tesla V100 GPU.
+
+More details about the training and hyperparameters search can be found in Appendix B.
+
+**Evaluation.** For all baselines, we report their standard accuracy on clean data (SA), the robust accuracy against 20 steps PGD attacks (RA-PGD) Madry et al. (2017), the robust accuracy against AutoAttacks (RA-AA) Croce & Hein (2020), and the RA-PGD of the 30% most vulnerable classes (RA-Tail-30) as a measure of robustness against attacks on the most vulnerable data points.
+
+## 4.2 BETTER DISTRIBUTION OF ROBUST PERFORMANCE
+
+We first demonstrate that our proposed doubly robust formulation can indeed achieve robust performance in a more balanced way across the empirical distribution. Figure 1 shows the per class
+
+7
+
+**==> picture [186 x 112] intentionally omitted <==**
+
+**==> picture [186 x 112] intentionally omitted <==**
+
+Figure 1: Per-class robust accuracy comparisons between our method and traditional AT method on balanced and imbalanced (0.2 imbalance ratio) CIFAR10.
+
+Table 1: Performance evaluations on balanced and imbalanced (0.2 imbalance ratio) CIFAR10.
+
+|Method|Balanced CIFAR10|Unbalanced CIFAR10|
+|---|---|---|
+||SA RA-PGD RA-Tail-30 RA-AA SA RA-PGD RA-Tail-30 RA-AA||
+||||
+|AT FAT WMMR MAIL GAIRAT|82.1 49.29 28.35 45.22 **86.21** 46.59 27.12 43.71 81.6 49.53 31.24 40.9 83.47 55.12 37.30 44.08 83.22 54.81 37.45 41.10|69.74 42.37 6.25 39.55 - - - - - - - - 72.01 45.64 9.8 37.17 73.87 45.18 16.9 35.43|
+||||
+|DONE-GD DONE-PGD DONE-ADAM|83.41 57.46 40.11 **45.66** 82.62 **58.54** 40.18 44.49 82.25 58.51 **40.36** 44.20|74.22 **48.29** **17.19** **40.06** **74.58** 48.13 15.83 38.69 74.56 48.15 17.10 39.46|
+
+robust accuracy (RA-PGD) of the standard AT method and our doubly-robust approach (i.e., vanilla DONE-GD method) for both balanced and imbalanced (with an imbalance ratio of 0.2) CIFAR10 dataset. For the balanced case, our algorithm improves the robustness on all classes, meanwhile with a more significant boost on the weakest classes ( _cat_ , _deer_ , and _bird_ ). On the other hand, for the imbalanced data case, the classes with more examples (last five categories) heavily dominate the robust training dynamic. This consequently leads to very high robustness on those classes, but nearly zero robustness on the vulnerable classes (such as _cat_ ). However, our method can still boost the per class RA-PGD on the weak classes (+11% on average on the 3 most vulnerable classes) and at the same time maintain a superior average RA-PGD. Overall, the results for both balanced and imbalanced settings clearly demonstrate that our doubly-robust approach can, in fact, improve worst-case robustness and hence achieve superior average robust performance.
+
+## 4.3 MAIN RESULTS
+
+## **Comparisons under CIFAR10.** The overall
+
+performance of the compared baselines under both balanced and imbalanced CIFAR10 are reported in Table 1. We highlight the following important observations. **First,** overall our methods outperform all other baselines in terms of all three robustness metrics (RAPGD, RA-Tail-30, and RA-AA), meanwhile also maintaining a competitive standard acurracy (SA). In particular, our algorithms can
+
+Table 4: Comparisons with fast AT methods.
+
+|Method|SA|RA-PGD|RA-Tail-30|
+|---|---|---|---|
+|||||
+|Fast-AT Fast-AT-GA Fast-BAT|**82.44** 79.83 79.91|45.37 47.56 49.13|23.3 25.01 26.05|
+|DONE 79.17 **55.17** **37.13**||||
+
+improve the RA-PGD of the strongest baseline (MAIL) by over 3% with most of the gain coming from improvement on the weakest classes, as is depicted on the RA-Tail-30 column. This shows that our doubly robust approach can mitigate the weak robustness on the vulnerable data points while also keeping the robust performance on well guarded examples (i.e., easy data points) at the same level. **Second** , note that the instance reweighted baselines consistently outperform the methods without reweighting on the RA-Tail-30 metric, which indicates that reweighting in general boosts the robustness on weak examples. This advantage is even clearer on the imbalanced data case. Yet, our algorithms still outperform the other instance reweighted methods by around 3% in terms of RA-Tail-30 in the balanced data setup due to their doubly-robust nature, which clearly is helpful both for average and worst-case robust performance. **Third** , note that the other methods that employ
+
+8
+
+Table 2: Performance evaluations on balanced and imbalanced (0.2 imbalance ratio) SVHN.
+
+|Method|Balanced SVHN|Unbalanced SVHN (0.2)|
+|---|---|---|
+||||
+||SA RA-PGD RA-Tail-30 RA-AA|SA RA-PGD RA-Tail-30 RA-AA|
+||||
+|AT MAIL GAIRAT|**93.21** 57.82 47.21 46.27 93.11 65.56 52.23 41.38 91.56 64.74 52.15 39.41|88.46 51.08 33.67 41.13 86.62 48.48 31.91 34.46 86.73 53.79 36.46 33.25|
+||||
+|DONE-PGD DONE-ADAM|92.80 **66.20** **55.84** 48.32 92.58 65.72 53.79 **49.13**|88.05 54.85 39.91 41.44 **88.98** **55.90** **41.10** **42.38**|
+
+Table 3: Performance evaluations on STL10 and GTSRB (originally imbalanced) datasets.
+
+|Method|STL10|GTSRB|
+|---|---|---|
+||||
+||SA RA-PGD RA-Tail-30 RA-AA|SA RA-PGD RA-Tail-30 RA-AA|
+||||
+|AT MAIL GAIRAT|67.11 36.28 10.07 32.58 **68.06** 38.20 13.33 32.86 65.67 35.23 15.21 30.42|88.13 59.65 27.03 **57.83** 88.47 55.96 20.73 53.44 86.67 54.38 22.10 51.18|
+||||
+|DONE-PGD DONE-ADAM|66.98 **40.23** **17.87** 33.71 66.92 39.70 17.62 **34.59**|**89.34** **60.16** 27.41 57.25 88.76 60.05 **28.35** 57.70|
+
+heuristics to compute the instance weights achieve worst RA-AA performance compared to the standard AT method. In contrast, our algorithms, which also fall in the instance reweighted paradigm, can still attain competitive performance for RA-AA compared to the standard AT method. This highlights the suboptimality of using heuristics which could be geared towards improving one metric (such as the RA-PGD) but may not be necessarily beneficial to the overall robustness of the model.
+
+**Performance Comparisons on the other datasets.** Table 2 shows the evaluations of the compared baselines on the SVHN dataset. As depicted, our algorithms (DONE-PGD and DONE-ADAM) significantly outperform the standard AT method on the RA-PGD metric and at the same time achieve better robustness against AutoAttacks (RA-AA). Compared with the instance reweighted baselines (MAIL & GAIRAT), the advantage of our methods is even more important on the RA-AA metric (e.g., up to around +8% on RA-AA vs +1 _._ 5% on RA-PGD for the balanced data setting). We also note considerable improvements on the GTSRB and STL10 datasets in Table 3. Similarly to the CIFAR10 dataset, our approach yields an important boost on the RA-Tail-30 robustness metric compared to all other baselines and the advantage is more significant on the imbalanced data case. These results consistently demonstrate that our doubly-robust approach can indeed improve worst-case robust performance meanwhile also maintaining/improving the overall robustness.
+
+**Evaluations under Fast AT Setting.** We also compare our approach with fast adversarial training methods. For this setup, we generate the adversarial attacks during training with only 1 GD step after initialization with 1 PGD warm-up step Zhang et al. (2022) and train all baselines for 25 epochs. We compare our method with Fast-BAT Zhang et al. (2022), Fast-AT Wong et al. (2020), and Fast-AT-GA Andriushchenko & Flammarion (2020) on CIFAR10. The evaluations of the compared methods are reported in Table 4. Our algorithm achieves a much better robust performance and at the same time keeps a competitive SA. In particular, we note a significant boost (+11%) in RA-Tail-30, which is mainly the cause of the improvement in the overall RA-PGD.
+
+## 5 CONCLUSIONS
+
+In this paper, we proposed a novel doubly robust instance reweighted adversarial training framework based on DRO and bilevel optimization, which not only determines the instance weights for AT in a theoretically grounded way but also addresses the non-uniform issues of traditional AT by boosting the robust performance of the most vulnerable examples. To address the technical challenges in solving the doubly robust optimization problem, we proposed a penalized reformulation using the log-barrier penalty method, and developed a novel algorithm based on implicit function theorem and tracking a running average of the outer level function values. Our proposed framework also leads to a new finite-sum compositional bilevel optimization problem, which can be of great interest to the optimization community and solved by our developed algorithm with theoretical guarantee. In the experiments on standard benchmarks, our doubly-robust approach (DONE) outperforms related state-of-the-art baseline approaches in average robust performance and also improves the robustness against attacks on the weakest data points.
+
+9
+
+## REFERENCES
+
+Motasem Alfarra, Adel Bibi, Hasan Hammoud, Mohamed Gaafar, and Bernard Ghanem. On the decision boundaries of neural networks: A tropical geometry perspective. _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 2022.
+
+- Maksym Andriushchenko and Nicolas Flammarion. Understanding and improving fast adversarial training. _Advances in Neural Information Processing Systems_ , 33:16048–16059, 2020.
+
+- Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In _International conference on machine learning_ , pp. 274–283. PMLR, 2018a.
+
+- Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In _International conference on machine learning_ , pp. 284–293. PMLR, 2018b.
+
+- Luca Bertinetto, Joao F Henriques, Philip Torr, and Andrea Vedaldi. Meta-learning with differentiable closed-form solvers. In _International Conference on Learning Representations (ICLR)_ , 2018.
+
+- Jose Blanchet, Donald Goldfarb, Garud Iyengar, Fengpei Li, and Chaoxu Zhou. Unbiased simulation for optimizing stochastic function compositions. _arXiv preprint arXiv:1711.07564_ , 2017.
+
+- Yair Carmon, Aditi Raghunathan, Ludwig Schmidt, John C Duchi, and Percy S Liang. Unlabeled data improves adversarial robustness. _Advances in neural information processing systems_ , 32, 2019.
+
+- Tianlong Chen, Zhenyu Zhang, Sijia Liu, Shiyu Chang, and Zhangyang Wang. Robust overfitting may be mitigated by properly learned smoothening. In _International Conference on Learning Representations_ , 2021a.
+
+- Tianyi Chen, Yuejiao Sun, and Wotao Yin. Solving stochastic compositional optimization is nearly as easy as solving stochastic optimization. _IEEE Transactions on Signal Processing_ , 69:4937–4948, 2021b.
+
+- Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Geoffrey Gordon, David Dunson, and Miroslav Dudík (eds.), _Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics_ , volume 15 of _Proceedings of Machine Learning Research_ , pp. 215–223, Fort Lauderdale, FL, USA, 11–13 Apr 2011. PMLR. URL [URL removed]
+
+- Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In _International conference on machine learning_ , pp. 2206–2216. PMLR, 2020.
+
+- Adithya M Devraj and Jianshu Chen. Stochastic variance reduced primal dual algorithms for empirical composition optimization. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Gavin Weiguang Ding, Yash Sharma, Kry Yik Chau Lui, and Ruitong Huang. Mma training: Direct input space margin maximization through adversarial training. _arXiv preprint arXiv:1812.02637_ , 2018.
+
+- Justin Domke. Generic methods for optimization-based modeling. _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pp. 318–326, 2012.
+
+- Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In _Proc. International Conference on Machine Learning (ICML)_ , pp. 1126–1135, 2017.
+
+10
+
+- Luca Franceschi, Michele Donini, Paolo Frasconi, and Massimiliano Pontil. Forward and reverse gradient-based hyperparameter optimization. In _International Conference on Machine Learning (ICML)_ , pp. 1165–1173, 2017.
+
+- Luca Franceschi, Paolo Frasconi, Saverio Salzo, Riccardo Grazzi, and Massimiliano Pontil. Bilevel programming for hyperparameter optimization and meta-learning. In _International Conference on Machine Learning (ICML)_ , pp. 1568–1577, 2018.
+
+- Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. _arXiv preprint arXiv:1412.6572_ , 2014.
+
+- Stephen Gould, Basura Fernando, Anoop Cherian, Peter Anderson, Rodrigo Santa Cruz, and Edison Guo. On differentiating parameterized argmin and argmax problems with application to bi-level optimization. _arXiv preprint arXiv:1607.05447_ , 2016.
+
+- Sven Gowal, Sylvestre-Alvise Rebuffi, Olivia Wiles, Florian Stimberg, Dan Andrei Calian, and Timothy A Mann. Improving robustness using generated data. _Advances in Neural Information Processing Systems_ , 34:4218–4233, 2021.
+
+- Riccardo Grazzi, Luca Franceschi, Massimiliano Pontil, and Saverio Salzo. On the iteration complexity of hypergradient computation. _International Conference on Machine Learning (ICML))_ , 2020a.
+
+- Riccardo Grazzi, Luca Franceschi, Massimiliano Pontil, and Saverio Salzo. On the iteration complexity of hypergradient computation. In _Proc. International Conference on Machine Learning (ICML)_ , 2020b.
+
+- Wenqing Hu, Chris Junchi Li, Xiangru Lian, Ji Liu, and Huizhuo Yuan. Efficient smooth non-convex stochastic compositional optimization via stochastic recursive gradient descent. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+Kaiyi Ji and Yingbin Liang. Lower bounds and accelerated algorithms for bilevel optimization. _arXiv preprint arXiv:2102.03926_ , 2021.
+
+- Kaiyi Ji, Jason D Lee, Yingbin Liang, and H Vincent Poor. Convergence of meta-learning with task-specific adaptation over partial parameter. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2020.
+
+- Kayi Ji, Junjie Yang, and Yingbin Liang. Bilevel optimization: Convergence analysis and enhanced design. _International Conference on Machine Learning (ICML))_ , 2021.
+
+Jing Jiang and ChengXiang Zhai. Instance weighting for domain adaptation in nlp. ACL, 2007.
+
+Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
+
+- Xiangru Lian, Mengdi Wang, and Ji Liu. Finite-sum composition optimization via variance reduced gradient descent. In _Artificial Intelligence and Statistics_ , pp. 1159–1167. PMLR, 2017.
+
+- Renjie Liao, Yuwen Xiong, Ethan Fetaya, Lisa Zhang, Xaq Yoon, KiJung Pitkow, Raquel Urtasun, and Richard Zemel. Reviving and improving recurrent back-propagation. _International Conference on Machine Learning (ICML))_ , 2018.
+
+- Tianyi Lin, Chengyou Fan, Mengdi Wang, and Michael I Jordan. Improved sample complexity for stochastic compositional variance reduced gradient. In _2020 American Control Conference (ACC)_ , pp. 126–131. IEEE, 2020.
+
+- Feng Liu, Bo Han, Tongliang Liu, Chen Gong, Gang Niu, Mingyuan Zhou, Masashi Sugiyama, et al. Probabilistic margins for instance reweighting in adversarial training. _Advances in Neural Information Processing Systems_ , 34:23258–23269, 2021a.
+
+- Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. _arXiv preprint arXiv:1806.09055_ , 2018.
+
+11
+
+- Risheng Liu, Pan Mu, Xiaoming Yuan, Shangzhi Zeng, and Jin Zhang. A generic first-order algorithmic framework for bi-level programming beyond lower-level singleton. In _International Conference on Machine Learning (ICML)_ , 2020.
+
+- Risheng Liu, Jiaxin Gao, Jin Zhang, Deyu Meng, and Zhouchen Lin. Investigating bi-level optimization for learning and vision from a unified perspective: A survey and beyond. _arXiv preprint arXiv:2101.11517_ , 2021b.
+
+- Risheng Liu, Yaohua Liu, Shangzhi Zeng, and Jin Zhang. Towards gradient-based bilevel optimization with non-convex followers and beyond. _Advances in Neural Information Processing Systems (NeurIPS)_ , 34, 2021c.
+
+- Jonathan Lorraine, Paul Vicol, and David Duvenaud. Optimizing millions of hyperparameters by implicit differentiation. _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pp. 1540–1552, 2020.
+
+- Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In _International Conference on Machine Learning (ICML)_ , pp. 2113– 2122, 2015.
+
+- Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. _arXiv preprint arXiv:1706.06083_ , 2017.
+
+- Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Jonathan Uesato, and Pascal Frossard. Robustness via curvature regularization, and vice versa. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 9078–9086, 2019.
+
+- Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
+
+- Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 427–436, 2015.
+
+- Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In _2016 IEEE European symposium on security and privacy (EuroS&P)_ , pp. 372–387. IEEE, 2016.
+
+- Fabian Pedregosa. Hyperparameter optimization with approximate gradient. In _International Conference on Machine Learning (ICML)_ , pp. 737–746, 2016.
+
+- Thomas Pethick, Grigorios G Chrysos, and Volkan Cevher. Revisiting adversarial training for the worst-performing class. _arXiv preprint arXiv:2302.08872_ , 2023.
+
+- Qi Qi, Zhishuai Guo, Yi Xu, Rong Jin, and Tianbao Yang. An online method for a class of distributionally robust optimization with non-convex objectives. _Advances in Neural Information Processing Systems_ , 34:10067–10080, 2021.
+
+- Qi Qian, Shenghuo Zhu, Jiasheng Tang, Rong Jin, Baigui Sun, and Hao Li. Robust optimization over multiple domains. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 33, pp. 4739–4746, 2019.
+
+- Hamed Rahimian and Sanjay Mehrotra. Distributionally robust optimization: A review. _arXiv preprint arXiv:1908.05659_ , 2019.
+
+- Aravind Rajeswaran, Chelsea Finn, Sham M Kakade, and Sergey Levine. Meta-learning with implicit gradients. In _Advances in Neural Information Processing Systems (NeurIPS)_ , pp. 113–124, 2019.
+
+- Sylvestre-Alvise Rebuffi, Sven Gowal, Dan Andrei Calian, Florian Stimberg, Olivia Wiles, and Timothy A Mann. Data augmentation can improve robustness. _Advances in Neural Information Processing Systems_ , 34:29935–29948, 2021.
+
+12
+
+Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In _International conference on machine learning_ , pp. 4334–4343. PMLR, 2018.
+
+- Leslie Rice, Eric Wong, and Zico Kolter. Overfitting in adversarially robust deep learning. In _International Conference on Machine Learning_ , pp. 8093–8104. PMLR, 2020.
+
+- Amirreza Shaban, Ching-An Cheng, Nathan Hatch, and Byron Boots. Truncated back-propagation for bilevel optimization. In _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pp. 1723–1732, 2019.
+
+- Johannes Stallkamp, Marc Schlipsing, Jan Salmen, and Christian Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. _Neural networks_ , 32:323–332, 2012.
+
+- Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. _arXiv preprint arXiv:1312.6199_ , 2013.
+
+- Qi Tian, Kun Kuang, Kelu Jiang, Fei Wu, and Yisen Wang. Analysis and applications of class-wise robustness in adversarial training. In _Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining_ , pp. 1561–1570, 2021.
+
+- Florian Tramèr, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. _arXiv preprint arXiv:1704.03453_ , 2017.
+
+- Rasul Tutunov, Minne Li, Alexander I Cowen-Rivers, Jun Wang, and Haitham Bou-Ammar. Compositional adam: An adaptive compositional solver. _arXiv preprint arXiv:2002.03755_ , 2020.
+
+- Jingkang Wang, Tianyun Zhang, Sijia Liu, Pin-Yu Chen, Jiacen Xu, Makan Fardad, and Bo Li. Adversarial attack generation empowered by min-max optimization. _Advances in Neural Information Processing Systems_ , 34:16020–16033, 2021.
+
+- Mengdi Wang, Ji Liu, and Ethan Fang. Accelerating stochastic composition optimization. _Advances in Neural Information Processing Systems_ , 29, 2016.
+
+- Mengdi Wang, Ethan X Fang, and Han Liu. Stochastic compositional gradient descent: algorithms for minimizing compositions of expected-value functions. _Mathematical Programming_ , 161:419–449, 2017.
+
+- Wentao Wang, Han Xu, Xiaorui Liu, Yaxin Li, Bhavani Thuraisingham, and Jiliang Tang. Imbalanced adversarial training with reweighting. In _2022 IEEE International Conference on Data Mining (ICDM)_ , pp. 1209–1214. IEEE, 2022.
+
+- Eric Wong, Leslie Rice, and J Zico Kolter. Fast is better than free: Revisiting adversarial training. _arXiv preprint arXiv:2001.03994_ , 2020.
+
+- Tong Wu, Ziwei Liu, Qingqiu Huang, Yu Wang, and Dahua Lin. Adversarial robustness under long-tailed distribution. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 8659–8668, 2021.
+
+- Yao-Yuan Yang, Cyrus Rashtchian, Hongyang Zhang, Ruslan Salakhutdinov, and Kamalika Chaudhuri. Adversarial robustness through local lipschitzness. _arXiv preprint arXiv:2003.02460_ , 20, 2020a.
+
+- Yao-Yuan Yang, Cyrus Rashtchian, Hongyang Zhang, Russ R Salakhutdinov, and Kamalika Chaudhuri. A closer look at accuracy vs. robustness. _Advances in neural information processing systems_ , 33:8588–8601, 2020b.
+
+- Mingyang Yi, Lu Hou, Lifeng Shang, Xin Jiang, Qun Liu, and Zhi-Ming Ma. Reweighting augmented samples by minimizing the maximal expected loss. _arXiv preprint arXiv:2103.08933_ , 2021.
+
+- Huimin Zeng, Chen Zhu, Tom Goldstein, and Furong Huang. Are adversarial examples created equal? a learnable weighted minimax risk for robustness under non-uniform attacks. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 10815–10823, 2021.
+
+13
+
+Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric Xing, Laurent El Ghaoui, and Michael Jordan. Theoretically principled trade-off between robustness and accuracy. In _International conference on machine learning_ , pp. 7472–7482. PMLR, 2019.
+
+- Jingfeng Zhang, Xilie Xu, Bo Han, Gang Niu, Lizhen Cui, Masashi Sugiyama, and Mohan Kankanhalli. Attacks which do not kill training make adversarial learning stronger. In _International conference on machine learning_ , pp. 11278–11287. PMLR, 2020a.
+
+- Jingfeng Zhang, Jianing Zhu, Gang Niu, Bo Han, Masashi Sugiyama, and Mohan Kankanhalli. Geometry-aware instance-reweighted adversarial training. _arXiv preprint arXiv:2010.01736_ , 2020b.
+
+- Miao Zhang, Steven Su, Shirui Pan, Xiaojun Chang, Ehsan Abbasnejad, and Reza Haffari. idarts: Differentiable architecture search with stochastic implicit gradients. _arXiv preprint arXiv:2106.10784_ , 2021a.
+
+- Yihua Zhang, Guanhua Zhang, Prashant Khanduri, Mingyi Hong, Shiyu Chang, and Sijia Liu. Revisiting and advancing fast adversarial training through the lens of bi-level optimization. In _International Conference on Machine Learning_ , pp. 26693–26712. PMLR, 2022.
+
+- Yonggang Zhang, Mingming Gong, Tongliang Liu, Gang Niu, Xinmei Tian, Bo Han, Bernhard Schölkopf, and Kun Zhang. Causaladv: Adversarial robustness through the lens of causality. _arXiv preprint arXiv:2106.06196_ , 2021b.
+
+14
+
+## SUPPLEMENTARY MATERIAL
+
+We provide the details omitted in the main paper. The sections are organized as fellows:
+
+_•_ Appendix A: We discuss related literature about bilevel optimization and stochastic compositional optimization.
+
+_•_ Appendix B: We provide more details about datasets, training setups, hyperparameters search, and implementations.
+
+_•_ Appendix C: We provide the distributions of the robustly learned instance weights and models’ confusion matrices for the considered datasets.
+
+_•_ Appendix D: We provide the proof of Proposition 1.
+
+_•_ Appendix E: We present the convergence analysis of our proposed CID algorithm including the statements of assumptions and the full proof of Theorem 1.
+
+## A MORE RELATED WORK DISCUSSIONS ABOUT BILEVEL OPTIMIZATION AND STOCHASTIC COMPOSITIONAL OPTIMIZATION
+
+**Bilevel optimization** Bilevel optimization is a powerful tool to study many machine learning applications such as hyperparameter optimization (Franceschi et al., 2018; Shaban et al., 2019), meta-learning (Bertinetto et al., 2018; Franceschi et al., 2018; Rajeswaran et al., 2019; Ji et al., 2020; Liu et al., 2021b), neural architecture search (Liu et al., 2018; Zhang et al., 2021a), etc. Existing approaches are usually approximate implicit differentiation (AID) based (Domke, 2012; Pedregosa, 2016; Gould et al., 2016; Liao et al., 2018; Lorraine et al., 2020), or iterative differentiation (ITD) based (Domke, 2012; Maclaurin et al., 2015; Franceschi et al., 2017; Finn et al., 2017; Shaban et al., 2019; Rajeswaran et al., 2019; Liu et al., 2020). The convergence rates of these methods have been widely established (Grazzi et al., 2020a; Ji et al., 2021; Rajeswaran et al., 2019; Ji & Liang, 2021). Bilevel optimization has been leveraged in adversarial training very recently, which provides a more generic framework by allowing independent designs of the inner and outer level objectives Zhang et al. (2022). However, none of these studies investigated bilevel optimization when the outer objective is in the form of compositions of functions. In this work, we introduce the compositional bilevel optimization problem as a novel pipeline for instance reweighted AT, and establish its first known convergence rate.
+
+**Stochastic compositional optimization** Stochastic compositional optimization (SCO) deals with the minimization of compositions of stochastic functions. Wang et al. (2017) proposed the compositional stochastic gradient descent (SCGD) algorithm as a pioneering method for SCO problems and established its convergence rate. Many extentions of SCGD have been proposed with improved rates, including accelerated and adaptive SCGD methods Wang et al. (2016); Tutunov et al. (2020), and variance reduced SCGD methods Lian et al. (2017); Blanchet et al. (2017); Lin et al. (2020); Devraj & Chen (2019); Hu et al. (2019). A SCO reformulation has also been used to solve nonconvex distributionally robust optimization (DRO) Rahimian & Mehrotra (2019); Qian et al. (2019) problems. The problem studied in this paper naturally falls into a new class of problems but with an additional inner loop compared to the existing single-level SCO problem, which we refer to as compositional bilevel optimization (CBO).
+
+## B MORE EMPIRICAL SPECIFICATIONS
+
+## B.1 MORE DETAILS ABOUT TRAINING AND HYPERPARAMETERS SEARCH
+
+Following the standard practice in adversarial training Madry et al. (2017); Liu et al. (2021a); Zhang et al. (2020b), we train our baselines using stochastic gradient descent with a minibtach size of 128 and a momentum of 0.9. We use ResNet-18 as the backbone network as in Madry et al. (2017) and train our baselines for 60 epochs with a cyclic learning rate schedule where the maximum learning rate is set to 0.2 Zhang et al. (2020b); Liu et al. (2021c) (please see fig. 2). We consider _ℓ∞_ -norm bounded adversarial perturbations with a maximum radius of _ϵ_ = 8 _/_ 255 both for training and testing.
+
+15
+
+For the KL-divergence regularization parameter _r_ in our algorithms, we use a decayed schedule where we initially set it to 10 and decay it to 1 and 0.1, respectively at epochs 40 and 50 (see fig. 2). This setting allows our methods to start with an instance-weight distribution close to uniform at the beginning of training where the weights are less informative, and progressively emphasize more on learning a weight distribution that boosts worst-case adversarial robustness. All hyperparameters were fixed by holding out 10% of the training data as a validation set and selecting the values that achieve the best performance on the validation set. For the reported results, we train on the full training dataset and report the performance on the testing set Zhang et al. (2020b); Liu et al. (2021a).
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+**==> picture [196 x 120] intentionally omitted <==**
+
+Figure 2: Learning process of our method DONE-ADAM for the balanced CIFAR10 experiment. The **SA** and **RA-PGD** in third row are evaluated on the test set. The plots are obtained by averaging three different runs.
+
+## B.2 FURTHER DESCRIPTIONS ABOUT DATASETS
+
+We consider image recognition problems and compare the performance of the baselines on four datasets: CIFAR10 Krizhevsky & Hinton (2009), SVHN Netzer et al. (2011), STL10 Coates et al. (2011), and GTSRB Stallkamp et al. (2012). For CIFAR10, SVHN, and STL10 we use the training and test splits provided by Torchvision. For GTSRB, we use the splits provided in Zhang et al. (2022). STL10 has 10 categories that are similar to those in CIFAR10 but with larger colour images (96 _×_ 96 resolution) and less samples (500 per class for training and 800 per class for testing). The German Traffic Sign Recognition Benchmark (GTSRB) contains 43 classes of traffic signs, split into 39,209
+
+16
+
+**==> picture [400 x 334] intentionally omitted <==**
+
+**----- Start of picture text -----**
+0 1000 104 65 73 44 37 57 44 28 48 1200 57 1231 41 52 54 12 8 32 4 9 0.8 1000 31 117 990 139 55 31 18 81 9 29 29 187 71 863 59 60 10 31 20 170 800 0.6 31 168 49 48 1096 28 28 19 6 27 20 600 38 90 42 112 78 942 89 25 29 55 0.4 123 79 51 74 123 78 840 32 78 22 400 25 254 94 108 14 20 5 959 5 16 111 126 66 75 112 61 155 9 647 138 200 0.2 135 105 99 69 107 55 24 34 46 826 40 0 1 2 3 4 5 6 7 8 9 0.0 Predicted 0 20 40 SVHN (divide by 1500 to obtain accuracies) GTSRB airplane 689 21 43 24 21 8 22 24 112 36 700 airplane 555 38 36 7 16 6 7 1 81 53 500 automobile 26 754 8 20 5 5 11 3 30 138 bird 58 243 15 67 182 58 47 108 15 7 600 bird 84 22 429 80 136 43 118 56 19 13 car 39 5 493 15 11 10 11 6 43 167 400 cat 53 31 74 344 115 114 138 49 31 51 500 cat 15 129 14 75 269 94 79 87 17 21 deer 56 16 99 70 437 36 148 83 35 20 400 deer 25 73 10 45 424 33 108 66 7 9 300 dog 42 14 63 156 66 443 94 81 15 26 dog 14 120 9 64 207 118 133 107 7 21 300 frog 29 11 51 70 104 28 651 26 11 19 horse 16 25 10 28 139 95 354 91 6 36 200 horse 40 2 36 44 63 44 47 685 10 29 200 monkey 10 84 9 71 220 106 89 196 3 12 ship 120 43 24 16 20 10 18 8 704 37 100 ship 143 12 38 11 23 10 5 3 436 119 100 truck 47 89 13 27 7 10 21 26 37 723 truck 66 8 218 18 10 8 10 13 95 354 airplaneautomobilebird cat deer dog frog horse ship truck airplane bird car cat deer dog horsemonkeyship truck 0 1 2 3 4 5 Ground Truth 6 7 8 9 **----- End of picture text -----**
+
+CIFAR10 (divide by 1000 to obtain accuracies)
+
+STL10 (divide by 800 to obtain accuracies)
+
+Figure 3: Confusion matrices of models robustly trained using our approach. The annotations correspond to the raw number of adversarial examples from class i that were classified as class j. Per-class robust performance are depicted in the diagonals. Axis labels are provided in first plot only.
+
+training images and 12,630 test images. The images are 32 _×_ 32 resolution colour. The dataset is highly class-imbalanced with some classes having over 2000 samples and others only 200 samples.
+
+## B.3 FURTHER IMPLEMENTATION SPECIFICATIONS
+
+We use the official publicly available codes of the respective baselines and their recommended training configurations. Pytorch codes for our method are provided in the supplementary material of our submission. Our implementation is built upon the codebase accompanying the paper Zhang et al. (2022). We thank the authors for making it publicly available. All codes are tested with Python 3.7 and Pytorch 1.8.
+
+For example, to run our DONE-ADAM algorithm on the balanced CIFAR10 dataset, please run the following command:
+
+python main . py −−mode ours ++ −−d a t a s e t CIFAR10 −−i r 1. −−kl_ coef 10 −−epochs 60 −−c y c l i c _ m i l e s t o n e 25 −−k l c _ m i l e s t o n e 1 40 −−k l c _ m i l e s t o n e 2 50 −−a t t a c k _ r s _ t e s t 1 −−a t t a c k _ s t e p _ t e s t 20
+
+For example the argument ‘ir’ can be used to control the imbalance ratio. The argument ‘mode’ can be set to ‘ours’ or ‘ours++’, and selects among different implementations of our same approach.
+
+17
+
+**==> picture [380 x 195] intentionally omitted <==**
+
+**----- Start of picture text -----**
+gt: airpl | pred: airpl gt: airpl | pred: airpl gt: airpl | pred: airpl gt: airpl | pred: airpl gt: horse | pred: horse gt: ship | pred: ship gt: truck | pred: truck gt: horse | pred: horse gt: truck | pred: truck gt: car | pred: car gt: airpl | pred: airpl gt: bird | pred: bird gt: autom | pred: autom gt: truck | pred: truck gt: airpl | pred: airpl gt: airpl | pred: airpl gt: truck | pred: truck gt: horse | pred: horse gt: ship | pred: ship gt: airpl | pred: airpl gt: horse | pred: horse gt: truck | pred: truck gt: truck | pred: truck gt: horse | pred: horse gt: monke | pred: monke gt: car | pred: car gt: cat | pred: cat gt: airpl | pred: airpl gt: horse | pred: horse gt: airpl | pred: airpl gt: truck | pred: truck gt: horse | pred: horse (a) STL10 dataset (b) CIFAR10 dataset **----- End of picture text -----**
+
+Figure 4: Samples with small weights from STL10 and CIFAR10 datasets. These are generally ‘easy’ images with the true objects well centered and clear/non-ambiguous backgrounds.
+
+Both implementations perform similarly. Please check the file ‘train.py’ for more details about the arguments and the possible options.
+
+We run all baselines on a single NVIDIA Tesla V100 GPU.
+
+## C DISTRIBUTIONS OF LEARNED WEIGHTS
+
+Figure 5 shows the distributions of the learned weights per-class for CIFAR10, SVHN, and STL10 datasets. The distributions are obtained on the testing sets using 20 PGD steps. Further per-class insights are also provided in Figure 3 as confusion matrices (where per-class robust accuracies are depicted in the diagonals). Comparing the two figures, we note a **negative correlation** between the magnitude of weights and the per-class robust performance, i.e., classes on which the model achieve high robustness are usually associated with weights that are closer to 0. For example, the class _automobile_ in CIFAR10 datset, in which the model achieves the highest adversarial robustness of 74.5% also has around 70% of its associated weights less than 0.001. As a comparison, the most vulnerable class (i.e., _cat_ , in which the model achieves a robustness of 34.4%) has more than 90% of its associated weights larger than 0.001. We note a similar correlation of the weights distributions and the robust performance in STL10 dataset. Interestingly, the robust performance is more uniformly distributed across classes in the SVHN dataset (as depicted in the corresponding confusion matrix in Figure 3) and our method was able to automatically discover very close weights distributions across classes for this dataset. This further demonstrates the generality/robustness of our approach, which can perform well no matter if instance re-weighting is advantageous or less important.
+
+Figures 4 and 6 provides examples of images from CIFAR10 and STL10 datasets with low/high associated weights. Examples with low weights are usually ‘easy’ images in which the objects are well centered with clear/non-ambiguous backgrounds. Our algorithm was able to correctly classify the adversarial examples crafted from these images. In contrast, examples with high weights are generally ‘hard’ samples with only parts of the objects appearing or/and backgrounds that can lead to ambiguity. For example, the true label of the second image in the first row of Figure 6 is _deer_ but the image also contains a car in its background, which may easily lead to confusion. Also note the first image in the third row of Figure 6, where only part of the tires of the car appears in the image.
+
+18
+
+**==> picture [390 x 465] intentionally omitted <==**
+
+**----- Start of picture text -----**
+airplane automobile bird cat deer 800 600 400 200 0 0.00 dog 0.01 0.00 frog 0.01 0.00 horse 0.01 0.00 ship 0.01 0.00 truck 0.01 800 600 400 200 0 0.00 0.01 0.00 0.01 0.00 0.01 0.00 0.01 0.00 0.01 CIFAR10 dataset airplane bird car cat deer 125 100 75 50 25 0 0.0 dog 0.1 0.0 horse 0.1 0.0 monkey 0.1 0.0 ship 0.1 0.0 truck 0.1 125 100 75 50 25 0 0.0 0.1 0.0 0.1 0.0 0.1 0.0 0.1 0.0 0.1 STL10 dataset 0 1 2 3 4 200 150 100 50 0 0.00 5 0.04 0.00 6 0.04 0.00 7 0.04 0.00 8 0.04 0.00 9 0.04 200 150 100 50 0 0.00 0.04 0.00 0.04 0.00 0.04 0.00 0.04 0.00 0.04 SVHN dataset Density Density Density Density Density Density **----- End of picture text -----**
+
+Figure 5: Distributions of the learned weights per class on the testing sets. Classes on which the model achieve high robustness are usually associated with weights that are closer to 0. For example, the class _automobile_ in CIFAR10 datset, in which the model achieves the highest adversarial robustness of 74.5% also has around 70% of its associated weights less than 0.001. As a comparison, the class _cat_ (in which the model achieves a robustness of 34.4%) has more than 90% of its associated weights larger than 0.001. We note a similar correlation of the weights distributions and the robust performance in STL10. The robust performance is better uniformly distributed across classes in the SVHN dataset (see fig. 3) and our method was able to obtain a similar weights distribution across classes for this dataset.
+
+19
+
+**==> picture [381 x 195] intentionally omitted <==**
+
+**----- Start of picture text -----**
+gt: airpl | pred: horse gt: deer | pred: car gt: bird | pred: airpl gt: deer | pred: monke gt: horse | pred: autom gt: bird | pred: autom gt: truck | pred: cat gt: airpl | pred: horse gt: car | pred: bird gt: car | pred: deer gt: truck | pred: deer gt: airpl | pred: deer gt: horse | pred: frog gt: deer | pred: cat gt: horse | pred: truck gt: airpl | pred: autom gt: car | pred: cat gt: car | pred: deer gt: truck | pred: deer gt: airpl | pred: bird gt: airpl | pred: frog gt: truck | pred: ship gt: ship | pred: airpl gt: truck | pred: frog gt: car | pred: airpl gt: ship | pred: airpl gt: monke | pred: truck gt: ship | pred: car gt: deer | pred: cat gt: ship | pred: dog gt: truck | pred: horse gt: ship | pred: airpl (a) STL10 dataset (b) CIFAR10 dataset **----- End of picture text -----**
+
+Figure 6: Samples with large weights from STL10 and CIFAR10 datasets. These are ‘hard’ examples with only parts of the objects appearing or/and complex backgrounds that easily lead to ambiguity. For example, the true label of the second image in the first row of figure (a) is _deer_ but the image also contains a car in its background, which leads to ambiguity. Also note the first image in the third row of figure (a), where only part of the tires of the car appears in the image.
+
+## D PROOF OF PROPOSITION 1
+
+Recall the reformulated problem (7), which we rewrite as
+
+**==> picture [272 x 66] intentionally omitted <==**
+
+_ℓi_ ( _θ,δ_[ˆ] _i[∗]_[(] _[θ]_[))] where _gi_ ( _θ, δ_[ˆ] _i[∗]_[(] _[θ]_[)) = exp] � _r_ �, and _f_ ( _z_ ) = _r_ log( _z_ ) for _z ≥_ 1. Applying the chain rule to the outer function, we have
+
+**==> picture [357 x 66] intentionally omitted <==**
+
+Also, note that _∇δℓ[bar] i_ ( _θ, δ_ ) = _∇δℓ[′] i_[(] _[θ, δ]_[) +] _[ c]_[ �][2] _k[p]_ =1 _bk−aδk[⊤] ak_[.][Using][the][implicit][differentiation] w.r.t. _θ_ of equation _∇δℓ[bar] i_ ( _θ, δ_[ˆ] _i[∗]_[(] _[θ]_[)) =] **[ 0]**[, i.e.,]
+
+**==> picture [182 x 30] intentionally omitted <==**
+
+we obtain
+
+**==> picture [330 x 37] intentionally omitted <==**
+
+20
+
+Therefore, we obtain
+
+**==> picture [398 x 56] intentionally omitted <==**
+
+_⊤_ Further, note that _A_ = � _Ip, −Ip_ � . Thus the first _p_ rows of _A_ (i.e., _ak, k_ = 1 _, ..., p_ ) correspond to the _p_ basis vectors of R _[p]_ , and hence _aka[⊤] k_[= diag(] _[e][k]_[)][, where] _[ e][k]_[is the] _[ k]_[-th basis vector of][ R] _[p]_[.][Thus,] considering the first _p_ rows we obtain[�] _[p] k_ =1 _[γ][k][a][k][a] k[⊤]_[=][diag(] _[γ]_[1] _[, ..., γ][p]_[)][.][Similarly, the bottom] _[ p]_ rows yields[�][2] _k[p]_ = _p_ +1 _[γ][k][a][k][a] k[⊤]_[= diag(] _[γ][p]_[+1] _[, ..., γ]_[2] _[p]_[)][.][Therefore, we have]
+
+**==> picture [317 x 30] intentionally omitted <==**
+
+Substituting eq. (13) in eq. (12) yields
+
+**==> picture [223 x 25] intentionally omitted <==**
+
+**==> picture [298 x 13] intentionally omitted <==**
+
+**==> picture [316 x 24] intentionally omitted <==**
+
+Now, combining eq. (14) and eq. (11) we obtain
+
+**==> picture [380 x 54] intentionally omitted <==**
+
+which completes the proof.
+
+## E CONVERGENCE ANALYSIS OF THE CID ALGORITHM
+
+We provide the convergence analysis of the CID algorithm for solving the generic compositional bilevel optimization problem (8), which we rewrite as follows:
+
+**==> picture [335 x 59] intentionally omitted <==**
+
+**Challenge and Novelty.** We note that although bilevel optimization and compositional optimization have been well studied in the optimization literature, to our best knowledge, there have not been any theoretical analysis of compositional bilevel optimization. The special challenge arising in such a problem is due to the fact that the bias error caused by the stochastic estimation of the compositional function in the outer-loop is further complicated by the approximation error from the inner loop. Our main novel development here lies in tracking such an error in the convergence analysis.
+
+To proceed the analysis, we let _w_ = ( _θ, δ_ ) denote all optimization parameters. We denote by �� _·_ �� the _ℓ_ 2 norm for vectors and the spectral norm for matrices.
+
+We adopt the following assumptions for our analysis, which are widely used in bilevel and compositional optimization literature (Grazzi et al., 2020a; Ji et al., 2021; Ji & Liang, 2021; Wang et al., 2017; Chen et al., 2021b).
+
+**Assumption 1.** _The objective functions f , gi, and hi for any i_ = 1 _, . . . , M satisfy_
+
+21
+
+- _f is Cf -Lipschitz continuous and Lf -smooth, i.e., for any z and z[′] ,_
+
+**==> picture [336 x 14] intentionally omitted <==**
+
+- _gi is Cg-Lipschitz continuous and Lg-smooth, i.e., for any w and w[′] ,_
+
+**==> picture [351 x 14] intentionally omitted <==**
+
+**==> picture [168 x 11] intentionally omitted <==**
+
+**==> picture [276 x 14] intentionally omitted <==**
+
+**Assumption 2.** _The function hi_ ( _θ, δ_ ) _for any i_ = 1 _, . . . , M is µ-strongly convex w.r.t. δ and its second-order derivatives ∇θ∇δhi_ ( _w_ ) _and ∇_[2] _δ[h][i]_[(] _[w]_[)] _[ are][ L][θδ][- and][ L][δδ][-Lipschitz, i.e., for any][ w][ and] w[′] ,_
+
+**==> picture [389 x 23] intentionally omitted <==**
+
+**Assumption 3.** _The stochastic sample gi for any i_ = 1 _, . . . , M has bounded variance, i.e.,_
+
+**==> picture [281 x 31] intentionally omitted <==**
+
+The following theorem (as restatement of Theorem 1) characterizes the convergence rate of our designed CID algorithm.
+
+**Theorem 2** (Re-statement of Theorem 1) **.** _Suppose that Assumptions 1, 2, 3 hold. Select the stepsizes as βt_ = ~~_√_~~ 1 _T[and][ η][t][∈]_[[][1] 2 _[,]_[ 1)] _[, and batchsize as][ |B|]_[ =] _[ O]_[(] _[T]_[)] _[.][Then, the iterates][ θ][t][, t]_[ = 0] _[, ..., T][−]_[1] _[ of] the CID algorithm satisfy_
+
+**==> picture [193 x 28] intentionally omitted <==**
+
+In the following two subsections, we first establish a number of useful supporting lemmas and then provide the proof of Theorem 2 (which is a restatement of Theorem 1).
+
+## E.1 SUPPORTING LEMMAS
+
+For notational convenience, we let _L_ = max _{Lf , Lg, Lh}_ , _C_ = max _{Cf , Cg}_ , and _τ_ = max _{Lθδ, Lδδ}_ .
+
+**Lemma 1.** _Suppose that Assumptions 1 and 2 hold. Then, the total objective F_ ( _θ_ ) _(defined at the outer level of problem (15) is LF -smooth, i.e., for any θ, θ[′] ,_
+
+**==> picture [397 x 41] intentionally omitted <==**
+
+_Proof._ Applying the chain rule, we have
+
+**==> picture [285 x 22] intentionally omitted <==**
+
+Therefore, using triangle inequality, we obtain
+
+**==> picture [378 x 75] intentionally omitted <==**
+
+22
+
+**==> picture [302 x 98] intentionally omitted <==**
+
+The chain rule yields
+
+**==> picture [369 x 40] intentionally omitted <==**
+
+where the last equality follows from the implicit differentiation result for bilevel optimization Pedregosa (2016); Ji et al. (2021).
+
+Thus, we obtain
+
+**==> picture [377 x 67] intentionally omitted <==**
+
+Therfore, _g_ ( _θ, δ[∗]_ ( _θ_ )) = _M_ 1 � _Mi_ =1 _[g][i]_[ (] _[θ, δ] i[∗]_[(] _[θ]_[)))][is][Lipschitz][with][constant] _[C][G]_[=] _[C][g]_ �1 + _[L] µ_ �. Further, following from Lemma 2 in Ji et al. (2021) we obtain that _[∂][g]_[(] _[θ] ∂θ[,][δ][∗]_[(] _[θ]_[))] is Lipschitz with the constant _LG_ . Thus, combining with eq. (23), we obtain _′_ 2 _′ ′_ �� _∇F_ ( _θ_ ) _−∇F_ ( _θ_ )�� _≤Lf CG_ �� _θ − θ_ �� + _Cf LG_ �� _θ − θ_ �� (25)
+
+Rearranging the above equation completes the proof.
+
+**Lemma 2.** _Suppose that Assumptions 1 and 3 hold. Then, we have_
+
+**==> picture [393 x 26] intentionally omitted <==**
+
+> _Proof._ We first show that _∂δ∂θi[K] ,t_[is] _[ κ]_[-Lipschitz.][To explicitly write the dependency of] _[ δ] i,t[k]_[on] _[ θ][t]_[, we] define _δi[k]_[(] _[θ][t]_[) :=] _[ δ] i,t[k]_[.][Then we have]
+
+**==> picture [376 x 123] intentionally omitted <==**
+
+where we upper-bound the term _T_ 1 using the fact that the operator _y → y − α∇h_ ( _y_ ) is a contraction mapping with the constant _[L] L[−]_ + _µ[µ]_[for an] _[ L]_[-smooth and] _[ µ]_[-stongly convex function] _[ h]_[ when the stepsize] _α_ is set to 2[Hence, telescoping the previous inequality over] _[ k]_[ from] _[ K][ −]_[1][ down to][ 0][ yields] _L_ + _µ_[.]
+
+**==> picture [339 x 30] intentionally omitted <==**
+
+23
+
+**==> picture [290 x 28] intentionally omitted <==**
+
+where the second inequality follows because _δi_[0][(] _[θ]_[)][=] _[δ] i_[0][(] _[θ][′]_[)][ as the same initial point, and the last] equality follows by setting the stepsize _α_ to _L_ +2 _µ_[.]
+
+**==> picture [399 x 148] intentionally omitted <==**
+
+**==> picture [397 x 141] intentionally omitted <==**
+
+**==> picture [399 x 144] intentionally omitted <==**
+
+Hence, the proof is complete.
+
+**Lemma 3.** _Suppose that Assumptions 1 and 2 hold. Then we have_
+
+**==> picture [398 x 50] intentionally omitted <==**
+
+_Proof._ The proof follows the steps similar to those in the proof of Lemma 3 in Ji et al. (2021). In the following, we define Λ = Ω(1 _− αµ_ ) _[K]_ ∆0.
+
+24
+
+**Lemma 4.** _Suppose that Assumptions 1, 2, 3 hold. Then, we have_
+
+**==> picture [397 x 72] intentionally omitted <==**
+
+_Proof._ Based on the Lipschitzness of _∇F_ ( _θ_ ) in Lemma 1, we have
+
+**==> picture [387 x 168] intentionally omitted <==**
+
+Next, we upper-bound the inner product terms _A_ 1 and _A_ 2, respectively. Using Young’s inequality, we obtain
+
+**==> picture [373 x 275] intentionally omitted <==**
+
+where Γ = _L_[2] _G[L]_[2] _[C]_[2][ +] _[ C]_[2][Ω][,][ ∆][0][= max] _[i,t]_ �� _δi∗_[(] _[θ][t]_[)] _[ −][δ]_[0] ��2, and Λ = Ω(1 _− αµ_ ) _K_ ∆0. Further, we have
+
+**==> picture [340 x 19] intentionally omitted <==**
+
+25
+
+**==> picture [342 x 97] intentionally omitted <==**
+
+where the last inequality uses the upper-bound ��� _∇gi_ ( _θt, δi,tK_[)] �� _≤ C_ + _Lµ[C]_[, which can be obtained] similarly to eq. (24).
+
+Therefore, taking the conditional expectation E _B_ in both sides of eq. (33), applying the bounds for _A_ 1 and E _BA_ 2 in eqs. (34) and (35), and noting that E _B_ ��� _∇g_ ( _θt, δtK_[;] _[ B]_[)] _[∇][f]_[(] _[u][t]_[+1][)] ��2 _≤ K_ 2 4[�] 2 _C_[2] E _B_ ��� _∇g_ ( _θt, δt_[;] _[ B]_[)] �� _≤ C_ 1 + _[L] µ_ � , we obtain
+
+**==> picture [368 x 116] intentionally omitted <==**
+
+Then, the proof is complete.
+
+E.2 PROOF OF THEOREM 2 (I.E., THEOREM 1)
+
+Denote _Vt_ = _F_ ( _θt_ ) + �� _g_ ( _θt−_ 1 _, δtK−_ 1[)] _[ −][u][t]_ ��2. Then, using eq. (32) we obtain
+
+**==> picture [376 x 120] intentionally omitted <==**
+
+where the last inequality follows from lemma 2. Further, following from the fact that (1 _−ηt_ )(1+ _ηt_ ) = 1 _− ηt_[2] _[<]_[ 1][, we obtain]
+
+**==> picture [358 x 54] intentionally omitted <==**
+
+Now, select _ηt ∈_ [[1] 2 _[,]_[ 1)][and] _[β][t]_[such][that] _[α][t][≥]_[1] 4[,][i.e.,] _[β][t][≤]_ 2 _L_[2] _F[C]_[2] 1[(][1+] _[L] µ_[)] 2[.][Hence,][taking][total] expectation of eq. (37) yields
+
+**==> picture [258 x 26] intentionally omitted <==**
+
+26
+
+**==> picture [288 x 56] intentionally omitted <==**
+
+where we define _Dκ_ = �4 _C_[2] (1 + _κ_[2] ) + 2[1] _[L][F]_ � (1 + _κ_ )[2] _C_[4] . Therefore, telescoping eq. (38) over _t_ from 0 to _T −_ 1 yields
+
+**==> picture [348 x 30] intentionally omitted <==**
+
+Thus, rearranging terms, we obtain
+
+**==> picture [392 x 30] intentionally omitted <==**
+
+Hence, the proof is complete by choosing the batchsize _|B|_ = _O_ ( _T_ ) and stepsize _βt_ =
+
+1 ~~_√_~~ _T_[.]
+
+27
+
diff --git a/open_review/iclr2024_8558.json b/open_review/iclr2024_8558.json
new file mode 100644
index 0000000000000000000000000000000000000000..f63f8c869ef899db603cbc54822562654ec2656e
--- /dev/null
+++ b/open_review/iclr2024_8558.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8558",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Abstractors and relational cross-attention: An inductive bias for explicit relational reasoning in Transformers",
+ "abstract": "An extension of Transformers is proposed that enables explicit relational reasoning through a novel module called the *Abstractor*. At the core of the Abstractor is a variant of attention called *relational cross-attention*. The approach is motivated by an architectural inductive bias for relational learning that disentangles relational information from object-level features. This enables explicit relational reasoning, supporting abstraction and generalization from limited data. The Abstractor is first evaluated on simple discriminative relational tasks and compared to existing relational architectures. Next, the Abstractor is evaluated on purely relational sequence-to-sequence tasks, where dramatic improvements are seen in sample efficiency compared to standard Transformers. Finally, Abstractors are evaluated on a collection of tasks based on mathematical problem solving, where consistent improvements in performance and sample efficiency are observed.",
+ "rebuttal": "> If the outputs of an abstractor layer are \"abstract states that represent purely relational information\" (section 2.3), then how are features associated with objects passed along/learned in models that use abstractor layers? In all the examples presented in Figure 2, abstractors are used in conjunction with regular encoders. How can you ensure that the abstractor is learning meaningful information and that all the \"information flow\" does not happen through the encoder layers in parlalle setups (architectures c, d, and e)?\n\nThanks for this question. A minor correction, architecture (a) of Figure 2 depicts a model without a standard Encoder. The \"Ability to generalize to similar tasks\" experiment of section 4.2 uses architecture (a). In the discriminative relational tasks of section 4.1, the Abstractor models also do not include an Encoder (this is an Abstractor-only model with no decoder either, since these are classification tasks).\n\nBut indeed, many architectures we consider do include an Encoder. The reason for this is that most real-world tasks rely on relational reasoning as well as more general-purpose sequence modeling which needs object-level features. In the architectures proposed in Section 3 and Figure 2 (e.g., architectures c, d, e), we think of the Abstractor as performing specialized relational processing in a branch of the model, while an Encoder performs more general-purpose processing in another branch. The Decoder then sequentially attends to the outputs of both.\n\n> then how are features associated with objects passed along/learned in models that use abstractor layers?\n\nThis is done by the (multi-attention) Decoder when it integrates the information from the Abstractor and the Encoder.\n\n> How can you ensure that the abstractor is learning meaningful information and that all the \"information flow\" does not happen through the encoder layers in parlalle setups\n\nThis is indicated by the performance difference compared to models which do not contain an Abstractor. For example, in the experiments of section 4.2, we compare to a standard Transformer of similar size as well as to an ablation model with matching architecture but with standard cross-attention rather than relational cross-attention. We observe a dramatic difference in performance. In the experiments of section 4.3, we compare to two Transformers of different size (one matching the hyperparameters of the Encoder/Decoder and a larger one to match parameter count). We observe a consistent difference in performance here as well.\n\nThrough comparison to these controlled baselines, we can attribute the performance difference to the addition of an Abstractor module. If the Encoder was doing all the work, the Abstractor-based models would not perform better.\n\n---------\n> Is there an ablation on model size? The baseline transformer is not very large, but it may be that a smaller transformer can learn with fewer training data points, or a larger transformer may converge faster.\n\nPlease see the answer to the previous question. We did include controls to test for the following question: given a certain budget of model size (as measured by parameter count), which would yield a greater performance, incorporating an Abstractor or simply enlarging a standard Transformer? We find that incorporating an Abstractor tends to yield greater performance benefits.\n\nThis was for a fixed model size, however. It would be interesting to see whether these performance benefits are persistent across model size and task complexity. We leave this to future work.\n\n---------\n> The experiments seem to be on simple problems with small models. Simple problems may not necessarily be an issue since they are relatively diverse problems, but it would be nice to see larger, more complicated problems. For example, the partial order task training set is small enough that one could consider using in context learning with a large LLM, which may offer comparable performance.\n\nWe agree that it would be interesting and important to evaluate Abstractors on larger, more complex problems. For now, this is outside the scope of this initial paper which aims to propose the idea and perform controlled evaluations.\n\n---\n\nWe hope this answers your questions and addresses some of your concerns. Please let us know if you have any further questions or comments.\n\n> It is not clear to me how S works. Section 2.2 says \"The symbols S can be either learned parameters of the model or nonparametric positional embeddings.\" How is S different from a positional embedding then? If S is unique per token, even if the token is a repeat of another token value-wise, then S is essentially a positional embedding. If S is unique per value of a token (ie all tokens of value v have the same s_i), then doesn't S implicity encode the value of the token?\n\nPlease see the updated paper for an expanded discussion which is relevant to this question. In particular, please see sec [...]\n\n> Scalability is one of the most significant advantages of Transformer architectures. The performance can increase with the model size and data size. Given that the Abstractor is a variant of the Transformer, it's essential to determine whether the scaling law still applies to the Abstractor. From the results provided, the performance can outperform the vanilla Transformer when the data size increases from the 1000 - 5000 range. But what about using more data and a larger model size? Will the Abstractor consistently improve and outperform the Transformer?\n\nIn terms of computational scalability [...]\n\n> The overly constrained setting limits the significance of the work. The authors conduct experiments under two settings: \"purely relational\" and \"partially relational\". As per the authors' definition, \"purely relational\" implies that object-level features are extraneous and that the statistics of relation/order are already sufficient for solving the task. This is an extremely restricted setting and may not fully represent th\n[rebuttal truncated]",
+ "initial_scores": [
+ 8,
+ 6,
+ 6,
+ 6
+ ],
+ "score_mean": 6.5,
+ "score_variance": 1,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This submission contributes an attentional mechanism suited to capture relation information across elements as opposed to specific values. The submission generated many solid discussions and was seen as an interesting addition to the literature. The reviewers appreciated the clear presentation and the fair and conclusive comparison with baselines, though more baselines would have been welcomed.",
+ "forum_id": "XNa6r6ZjoB",
+ "primary_area": "unsupervised, self-supervised, semi-supervised, and supervised representation learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_eiad",
+ "review_id": "M5iQ6geZzR",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4228,
+ "edit_detected": true,
+ "edit_delta_seconds": 904809,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_nkpJ",
+ "review_id": "3mwop6wpdd",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1284,
+ "edit_detected": true,
+ "edit_delta_seconds": 908653,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_4fms",
+ "review_id": "FKQwFuogXn",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3816,
+ "edit_detected": true,
+ "edit_delta_seconds": 957443,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_qTc8",
+ "review_id": "8OS7M2t7Es",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2771,
+ "edit_detected": true,
+ "edit_delta_seconds": 2660743,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8558.md b/open_review/iclr2024_8558.md
new file mode 100644
index 0000000000000000000000000000000000000000..de97f0d9df240b10a8034885e8e74dc4266476b4
--- /dev/null
+++ b/open_review/iclr2024_8558.md
@@ -0,0 +1,462 @@
+
+
+## - ABSTRACTORS AND RELATIONAL CROSS ATTENTION: AN INDUCTIVE BIAS FOR EXPLICIT RELATIONAL REASONING IN TRANSFORMERS
+
+Authors withheld for review
+
+## ABSTRACT
+
+An extension of Transformers is proposed that enables explicit relational reasoning through a novel module called the _Abstractor_ . At the core of the Abstractor is a variant of attention called _relational cross-attention_ . The approach is motivated by an architectural inductive bias for relational learning that disentangles relational information from object-level features. This enables explicit relational reasoning, supporting abstraction and generalization from limited data. The Abstractor is first evaluated on simple discriminative relational tasks and compared to existing relational architectures. Next, the Abstractor is evaluated on purely relational sequence-to-sequence tasks, where dramatic improvements are seen in sample efficiency compared to standard Transformers. Finally, Abstractors are evaluated on a collection of tasks based on mathematical problem solving, where consistent improvements in performance and sample efficiency are observed.
+
+## 1 INTRODUCTION
+
+The ability to infer and process relations and reason in terms of analogies lies at the heart of human abilities for abstraction and creative thinking (Snow et al., 1984; Holyoak, 2012). This capability is largely separate from our ability to acquire semantic and procedural knowledge through sensory tasks, such as image and audio processing. Modern deep learning systems can often capture this latter type of intelligence through efficient function approximation. However, deep learning has seen limited success with relational and abstract reasoning, which requires identifying novel associations from limited data and generalizing to new domains.
+
+Recognizing the importance of this capability, machine learning research has explored several novel frameworks for relational learning (Graves et al., 2014; Pritzel et al., 2017; Santoro et al., 2017; Battaglia et al., 2018; Barrett et al., 2018; Shanahan et al., 2020; Whittington et al., 2020; Webb et al., 2021; Mondal et al., 2023). In this paper, we propose a framework that casts relational learning in terms of Transformers. The success of Transformers lies in the use of attentional mechanisms to support richly context-sensitive processing (Vaswani et al., 2017; Wolf et al., 2020; Kerg et al., 2020). However, it is clear that Transformers are missing core capabilities required for modeling human thought (Mahowald et al., 2023), including an ability to support analogy and abstraction. While large language models show a surprising ability to complete some analogies (Webb et al., 2023), this ability emerges implicitly only after processing vast amounts of data.
+
+The Transformer architecture has the ability to model relations between objects implicitly through its attention mechanisms. However, we argue in this paper that standard attention produces entangled representations encoding a mixture of relational information and object-level features, resulting in suboptimal sample efficiency for learning relations. In this work, we propose an extension of Transformers that enables explicit relational reasoning through a novel module called the _Abstractor_ . At the core of the Abstractor is a variant of attention called _relational cross-attention_ . Our approach is motivated by an architectural inductive bias for relational learning we call the “relational bottleneck,” which separates relational information from extraneous object-level features (see Webb et al., 2024, for a cognitive science perspective on this idea).
+
+A growing body of literature has focused on developing machine learning architectures for relational representation learning. An early example is the Relation Network (Santoro et al., 2017), which
+
+1
+
+proposes modeling pairwise relations by applying an MLP to the concatenation of object representations. Shanahan et al. (2020) proposed the PrediNet architecture, which learns representations of relations in a manner inspired by predicate logic. Webb et al. (2021)’s ESBN is a memory-augmented LSTM network that aims to factor representations into ‘sensory’ and ‘relational’. Another related architecture is CoRelNet (Kerg et al., 2022), which reduces relational learning to modeling a similarity matrix. More recently, Altabaa and Lafferty (2023) tackled the problem of learning representations of hierarchical relations by formalizing a notion of “relational convolution”.
+
+The Transformer is a common baseline against which other approaches are compared in this literature. These works show that explicitly relational architectures outperform the Transformer on several synthetic discriminative relational tasks, sometimes by large margins (Shanahan et al., 2020; Webb et al., 2021; Kerg et al., 2022; Altabaa and Lafferty, 2023). We offer an explanation, arguing that while the Transformer architecture is versatile enough to learn such relational tasks given enough data, it does not support relational representation explicitly and thus can suffer in terms of sample-efficiency. The Abstractor extends the Transformer framework by introducing an inductive bias for learning representations of relations that are disentangled from extraneous object-level features.
+
+Our experiments first compare the Abstractor to other relational architectures on discriminative relational tasks, finding that the Abstractor is both more flexible and achieves superior sample efficiency. We then evaluate whether the Abstractor can augment a Transformer to improve relational reasoning by evaluating on synthetic _sequence-to-sequence_ relational tasks, which has so far been unexplored in the literature on explicitly relational architectures. Finally, we evaluate an Abstractorsupported architecture on a set of mathematical problem-solving tasks to evaluate the potential of the idea on tasks more representative of real-world applications. We observe consistent, sometimes dramatic, gains in sample efficiency.
+
+## 2 RELATIONAL CROSS-ATTENTION AND THE ABSTRACTOR MODULE
+
+At a high level, the primary function of an Abstractor is to compute abstract relational features of its inputs.[1] That is, given a sequence of input objects _x_ 1 _, . . . , xn_ , the Abstractor learns to model a relation _r_ ( _·, ·_ ) and computes a function on the set of pairwise relations between objects _{r_ ( _xi, xj_ ) _}ij_ . At the heart of the Abstractor module is an inductive bias we call the _relational bottleneck_ , that disentangles relational information from the features of individual objects.
+
+## 2.1 MODELING RELATIONS AS INNER PRODUCTS
+
+A “relation function” maps a pair of objects _x_ 1 _, x_ 2 _∈X_ to a vector representing the relation between the two objects. We model pairwise relations as inner products between appropriately encoded (or ‘filtered’) object representations. In particular, we model the pairwise relation function _r_ ( _·, ·_ ) _∈_ R _[d][r]_ in terms of _dr_ learnable ‘query’ encoders _ϕ_[1] _q[, . . . , ϕ][d] q[r]_[and ‘key’ encoders] _[ ϕ]_[1] _k[, . . . , ϕ][d] k[r]_[,]
+
+**==> picture [348 x 19] intentionally omitted <==**
+
+Modeling relations as inner products _⟨ϕq_ ( _x_ ) _, ϕk_ ( _y_ ) _⟩_ ensures that the result represents a comparison between the two objects’ features. More precisely, inner product relations induce a geometry on the object space _X_ , with notions of distance, angles, and orthogonality. Altabaa and Lafferty (2024) analyzes the approximation properties of inner products of neural networks for relation functions.
+
+Considering all pairwise relations yields a _relation tensor_ , _R_ = [ _r_ ( _xi, xj_ )] _i,j ∈_ R _[n][×][n][×][d][r]_ .
+
+## 2.2 RELATIONAL CROSS-ATTENTION
+
+The core operation in a Transformer is attention. For an input sequence _X_ = ( _x_ 1 _, . . . , xn_ ) _∈_ R _[n][×][d]_ , self-attention transforms the sequence via, _X[′] ←_ Softmax( _ϕq_ ( _X_ ) _ϕk_ ( _X_ ) _[⊤]_ ) _ϕv_ ( _X_ ), where _ϕq, ϕk, ϕv_ are functions applied independently to each object in the sequence. Note that _R_ :=
+
+1In this paper, we will use the name ‘Abstractor’ to refer to both the module and to model architectures which contain the Abstractor module as a main component.
+
+2
+
+_ϕq_ ( _X_ ) _ϕk_ ( _X_ ) _[⊤]_ is a relation matrix in the sense defined above. Self-attention admits an interpretation as a form of “neural message-passing” (Gilmer et al., 2017) as follows
+
+**==> picture [332 x 25] intentionally omitted <==**
+
+where _mj→i_ = ( _ϕv_ ( _xj_ ) _, Rij_ ) is the message from object _j_ to object _i_ , encoding the sender’s features _ϕv_ ( _xj_ ) and the relation between the two objects _Rij_ = _⟨ϕq_ ( _xi_ ) _, ϕk_ ( _xj_ ) _⟩_ . Here, _R_[¯] = Softmax ( _R_ ) is the softmax-normalized relation matrix. Hence, the processed representation obtained by selfattention is an entangled mixture of relational information and object-level features.
+
+Our goal is to learn relational representations that are abstracted away from object-level features in order to achieve more sample-efficient learning and improved generalization in relational reasoning. This is not naturally supported by the entangled representations produced by standard self-attention. We achieve this via a simple modification of attention—we replace the values _ϕv_ ( _xi_ ) with vectors that _identify_ objects, but do not encode their features. We call those vectors _symbols_ . Hence, the message sent from object _j_ to object _i_ is now _mj→i_ = ( _sj, Rij_ ), the relation between the two objects, together with the symbol identifying the sender object,
+
+**==> picture [314 x 26] intentionally omitted <==**
+
+Symbols act as abstract references to objects, akin to pointers in traditional symbolic architectures. They do not encode information about the contents or features of the objects, but rather _refer_ to objects. This results in improved sample efficiency and generalization by restricting the search space of computations, and allowing abstraction through shared symbols. We call the vectors _{si}_ ‘symbols’ in the same sense that we call ‘ _x_ ’ a symbol in an equation like _y_ = _x_[2] —they reference an object with an unspecified value. Suppose for now that each object _xi_ is assigned a symbol _si_ in a manner that satisfies this property. We will discuss symbol-assignment mechanisms in the next subsection.
+
+This modification yields a variant of attention that we call _relational cross-attention_ (RCA), given by
+
+**==> picture [262 x 19] intentionally omitted <==**
+
+where _S_ = ( _s_ 1 _, . . . , sn_ ) are the symbols, _σ_ rel is the relation activation function, and _ϕq, ϕk_ correspond to the query and key transformations. When the relation activation function _σ_ rel is softmax, this corresponds to Attention( _Q ← X, K ← X, V ← S_ ). In contrast, self-attention corresponds to Attention( _Q ← X, K ← X, V ← X_ ), mixing relational information with object-level features.
+
+We observe in our experiments that allowing _σ_ rel to be a configurable hyperparameter can lead to performance benefits in some tasks. Softmax has the effect of normalizing the relation between a pair of objects ( _i, j_ ) based on the strength of _i_ ’s relations with the other objects in the sequence. In some tasks this is useful. In other tasks, this may mask relevant information, and element-wise activations (e.g., tanh, sigmoid, or linear) may be more appropriate.
+
+Relational cross-attention implements a type of information bottleneck, that we call the “relational bottleneck”, wherein the resultant representation encodes only relational information about the object sequence (Figure 1) and does not encode information about the features of individual objects. This enables a branch of the model to focus purely on modeling the relations between objects, yielding greater sample efficiency in tasks that rely on relational reasoning.
+
+Multi-dimensional relations can be modeled through multi-head relational cross-attention. In our experiments, _ϕ[i] q[, ϕ] k[i]_[are linear maps] _[ W][ i] q[, W] k[ i]_[, and multi-head relational cross-attention is given by]
+
+**==> picture [339 x 35] intentionally omitted <==**
+
+## 2.3 SYMBOL ASSIGNMENT MECHANISMS
+
+Abstraction relies on the assignment of symbols to individual objects without directly encoding their features. We propose three different mechanisms for assigning symbols to objects.
+
+3
+
+**==> picture [398 x 130] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Encoder states Relational Abstract states Relation tensor Relation tensor Bottleneck 𝐸1 𝐸2 𝐸3 ⋯ 𝐸𝑛 𝑅𝑖𝑗 = ⟨𝜙𝑞 𝑥𝑖 , 𝜙𝑘(𝑥𝑗)⟩ 𝑅𝑖𝑗 = ⟨𝜙𝑞 𝑥𝑖 , 𝜙𝑘(𝑥𝑗)⟩ 𝐴1 𝐴2 𝐴3 ⋯ 𝐴𝑛 𝑥1 𝑥2 𝑥3 ⋯ 𝑥𝑛 𝑥1 𝑥2 𝑥3 ⋯ 𝑥𝑛 𝑠1 𝑠2 𝑠3 ⋯ 𝑠𝑛 Input sequence Input sequence Symbols (a) E ← SelfAttention( X ) (b) A ← RelationalCrossAttention(X , S) **----- End of picture text -----**
+
+Figure 1: Comparison of relational cross-attention with self-attention. Red represents object-level features, blue represents relational features, and purple represents mixed representations. Relational cross-attention computes relational information disentangled from the features of individual objects.
+
+**Positional symbols.** The simplest symbol assignment mechanism is to assign symbols to objects sequentially based on the order they appear in the sequence. That is, we maintain a library of symbols _S_ lib = ( _s_ 1 _, . . . , s_ `max` _ `len` ) _∈_ R `[max]`[_] `[len]` _[×][d]_[model] , and assign the symbol _si_ to the _i_ -th object. The symbol library _S_ lib can be either learned parameters of the model or fixed positional embeddings.
+
+**Position-relative symbols.** Similar to relative positional embeddings (Shaw et al., 2018; Kazemnejad et al., 2023), we can compute relational cross-attention with position-relative symbols via _Ai ←_ � _j[R][ij][s][j][−][i]_[, where the symbol library is] _[ S]_[lib][= (] _[. . . , s][−]_[1] _[, s]_[0] _[, s]_[1] _[, . . .]_[)][.]
+
+**Symbolic attention.** In this case we learn a library of symbols _S_ lib = ( _s_ 1 _, . . . , sns_ ) _∈_ R _[n][s][×][d]_[model] together with associated “binding vectors” _B_ lib = ( _b_ 1 _, . . . , bns_ ), where _ns_ is the number of symbols in the library. Through an attention mechanism, symbols are bound to objects _xi_ based on their relations to the symbol binding vectors. A multi-head variant of symbolic attention is naturally defined by concatenating the symbols retrieved for each head. Formally,
+
+**==> picture [317 x 41] intentionally omitted <==**
+
+In terms of representational capacity, this is similar to cross-attending to the symbol parameters _S_ lib. Note that symbolic attention weakens the relational bottleneck since object-level features are used to retrieve a symbol for each object. However, the symbols are shared across objects and sequences, and the dependence is only with respect to a low-dimensional projection of the object-level features, which we may think of as encoding the object’s “syntactic role.” Encoding such information in the symbols allows identifying objects by their role, rather than merely their position or relative position.
+
+The choice of symbol assignment mechanism determines the way in which relational information is encoded in the abstract states. For example, with positional symbols, _Ai_ encodes the relations between object _i_ and each object _j_ , identifying _j_ by its position (or relative position in the case of position-relative symbols). In contrast, with symbolic attention, each object _j_ is identified by its “syntactic role,” as determined by its relation to the binding vectors.
+
+## 2.4 THE ABSTRACTOR MODULE
+
+We now describe the Abstractor module. Like the Encoder in a Transformer, this is a module that processes an input sequence of objects _X_ = ( _x_ 1 _, . . . , xn_ ) producing a processed sequence of objects _A_ = ( _A_ 1 _, . . . , An_ ) that represents features of the input sequence. In an Encoder, the output objects represent a mix of object-level features and relational information. In an Abstractor, the output objects are abstract states that represent relational information, abstracted away from the features of individual objects. The core operation in an Abstractor module is relational crossattention. Mirroring an Encoder, an Abstractor module can comprise several layers, each composed of relational cross-attention followed by a feedforward network. Optionally, residual connections
+
+4
+
+and layer-normalization can be applied as suggested by Vaswani et al. (2017)[2] . The algorithmic description is presented in Algorithm 1. In Appendix B, we theoretically study the approximation properties of the Abstractor module, showing that it is a universal approximator of relation functions.
+
+## **Algorithm 1:** Abstractor module
+
+**Input :** object sequence: _**X**_ = ( _x_ 1 _, . . . , xn_ ) _∈_ R _[n][×][d]_
+
+_A_[(0)] _←_ SymbolicAttention(X) // or, _A_[(0)] _← S_ 1: _n_ , for positional symbols **for** _l ←_ 1 **to** _L_ **do** _A_[(] _[l]_[)] _←_ RelationalCrossAttention � _X, A_[(] _[l][−]_[1)][�] _A_[(] _[l]_[)] _← A_[(] _[l]_[)] + _A_[(] _[l][−]_[1)] // residual connection (optional) _A_[(] _[l]_[)] _←_ LayerNorm( _A_[(] _[l]_[)] ) // (optional; can also be done pre-RCA) _A_[(] _[l]_[)] _←_ FeedForward � _A_[(] _[l]_[)][�] **end Output:** _A_[(] _[L]_[)]
+
+The hyperparameters of an Abstractor module include the number of layers _L_ , the relation dimension _dr_ (i.e., number of heads), the projection dimension _dk_ (i.e., key dimension), the relation activation function _σ_ rel, and the model dimension _d_ model. The learnable parameters, at each layer, are the projection matrices _Wq[i][, W] k[ i][∈]_[R] _[d]_[model] _[×][d][k][,][i][∈]_[[] _[d][r]_[]][,][the symbol library] _[ S]_[lib][,][and the parameters] of the feedforward network. In our experiments, we use a 2-layer feedforward network with a hidden dimension _d_ ff and ReLU activation. The implementation in the publicly available code adds a few additional hyperparameters, including whether to restrict the learned relations to be symmetric (via _Wq[i]_[=] _[ W][ i] k_[), and whether to apply self-attention after relational cross-attention (which enables] exchange of relational information between abstract states).
+
+## 3 ABSTRACTOR ARCHITECTURES
+
+Whereas a Transformer Encoder performs “general-purpose” processing, extracting representations of both object-level and relational information, an Abstractor module is more specialized and produces more enriched relational representations. An Abstractor module can be integrated into a broader transformer-based architecture, for enhanced relational processing.
+
+To facilitate the discussion of different architectures, we distinguish between two types of tasks. In a _purely relational_ prediction task, there exists a sufficient statistic of the input which is purely relational and encodes all the information that is relevant for predicting the target. The experiments of (Webb et al., 2021; Kerg et al., 2022) are examples of purely relational discriminative tasks. We consider discriminative relational tasks in Section 4.1. An example of a purely relational _sequence-to-sequence_ task is the object-sorting task described in Section 4.2. Many real-world tasks, however, are not purely relational. In a _partially-relational_ prediction task, the relational information is important but is not sufficient for predicting the target. The math problem-solving experiments in Section 4.3 are partially-relational. Natural language understanding is also an example of a partially-relational task.
+
+The way that an Abstractor module is integrated into a broader model architecture should be informed by the underlying prediction task. Figure 2 depicts several Abstractor architectures each with different configurations. Architecture (a) depicts a configuration in which the Abstractor processes the relational features in the input, and the decoder attends to the abstract states _A_ . Architecture (b) depicts a configuration in which the input objects are first processed by an Encoder, followed by an Abstractor for relational processing, and the decoder again attends to the abstract states. These architectures would be appropriate for purely relational tasks since the decoder attends only to the relational representations in the abstract states. Architectures (c) and (d), in which information can also pass directly from the encoder to the decoder, would be more appropriate for more general tasks that are only partially relational. For example, in architecture (c), the model branches into two parallel processing streams in which an Encoder performs general-purpose processing and an Abstractor
+
+> 2Layer-normalization can also be applied _before_ relational cross-attention, as in the pre-LN Transformer (Xiong et al., 2020).
+
+5
+
+**==> picture [318 x 160] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) 𝑋 Abstractor Decoder ෝ𝒚 (b) 𝑋 Encoder Abstractor Decoder ෝ𝒚 Encoder (c) 𝑋 Decoder ෝ𝒚 Abstractor (d) 𝑋 Encoder Abstractor Decoder ෝ𝒚 (e) 𝑋 Encoder Abstractor Abstractor Decoder ෝ𝒚 **----- End of picture text -----**
+
+Figure 2: Examples of Abstractor-based model architectures.
+
+performs more specialized processing of relational information. The decoder attends to _both_ the encoder states and the abstract states. These architectures use the “multi-attention decoder” described in Appendix A. Finally, architecture (e) depicts a _composition_ of Abstractors, wherein the abstract states produced by one Abstractor module are used as input to another Abstractor. This results in computing “higher-order” relational information (i.e., relations on relations).
+
+## 4 EXPERIMENTS
+
+## 4.1 DISCRIMINATIVE RELATIONAL TASKS
+
+**Order relations: modeling asymmetric relations.** We generate _N_ = 64 “random objects” represented by iid Gaussian vectors, _oi ∼N_ (0 _, I_ ) _∈_ R[32] , and associate an order relation to them _o_ 1 _≺ o_ 2 _≺· · · ≺ oN_ . Note that _≺_ is _anti-symmetric_ . Of the _N_[2] = 4096 possible pairs ( _oi, oj_ ), 15% are held out as a validation set (for early stopping) and 35% as a test set. We evaluate learning curves by training on the remaining 50% and computing accuracy on the test set (10 trials for each training set size). Note that the models are evaluated on pairs they have never seen. Thus, the models will need to generalize based on the transitivity of the _≺_ relation.
+
+We compare five models: an Abstractor, standard (symmetric) CoRelNet, an asymmetric variant of CoRelNet, PrediNet, and an MLP. The MLP, which is a non-relational architecture, is completely unable to learn the task. Among the relational architectures, we observe that standard CoRelNet is also completely unable to learn the task, whereas the Abstractor and asymmetric CoRelNet learn the transitive _≺_ relation (Figure 4a). PrediNet has limited success in learning the task. This can be explained by the observation that symmetric inner products (e.g., in standard CoRelNet) don’t have the representational capacity to model asymmetric relations, whereas the asymmetric inner products with different learned left and right encoders do.
+
+_**SET**_ **: modeling multi-dimensional relations.** _SET_ is a cognitive task in which players are presented with a sequence of cards, each of which contains figures that vary along four dimensions (color, number, pattern, and shape) and they must find triplets of cards that obey a deceptively simple rule: along each dimension, cards in a “set” must either have the same value or three unique values (Figure 3). In this experiment, the task is to classify triplets of card images as “set” or not.
+
+**==> picture [100 x 83] intentionally omitted <==**
+
+Again, we compare an Abstractor, CoRelNet, PrediNet, and an MLP. The shared architecture is CNN _→{·} →_ Flatten _→_ Dense, where _{·}_ Figure 3: The _SET_ game is one of the aforementioned modules. The CNN embedder is obtained through a pre-training task. We report learning curves in Figure 4b (10
+
+trials per training set size). We find that the Abstractor model significantly outperforms the other baselines. We attribute this to its relational inductive biases and its ability to model multi-dimensional relations. In this task, there exist four different relations (one for each attribute) that are needed to
+
+6
+
+**==> picture [386 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Learning Asymmetric ≺ Relation SET Classification Comparison to symbolic baseline for SET task 0 . 9 AbstractorCoRelNet 1 . 0 AbstractorCoRelNet 100 0 . 8 CoRelNetPrediNetMLP (Asymmetric) 0 . 8 CoRelNetPrediNetMLP (No Softmax) 80 0 . 7 0 . 6 0 . 6 60 MLP with purely symbolic input 0 . 5 Abstractor on images, pre-learned relations 0 500 1000 1500 2000 1000 2000 3000 4000 5000 0 200 400 600 800 1000 Training Set Size Training Set Size Training Set Size (a) The ≺ relation can be learned (b) The Abstractor’s ability to (c) Comparison of Abstractor with asymmetric but not sym- model multi-dimensional rela- trained on card images and MLP metric inner products. tions enables it to solve SET . with hand-encoded relations. Accuracy Accuracy Accuracy Classification SET **----- End of picture text -----**
+
+Figure 4: Experiments on discriminative relational tasks and comparison to CoRelNet.
+
+determine whether a triple of cards forms a set. We hypothesize that the ability to model relations as multi-dimensional is also part of the reason that the Abstractor is more sample efficient in learning the order relation in the previous experiment—even though the underlying relation is “one-dimensional”, having a multi-dimensional representation enables greater robustness and multiple avenues towards a good solution during optimization.
+
+_**SET**_ **(continued): comparison to “neuro-symbolic” model.** In Figure 4c, to evaluate the quality of the _representations_ produced by Abstractors, we compare an Abstractor-based model to a “neurosymbolic” model which receives as input a binary representation of the four relevant relations. We train 1-head Abstractors separately for each of the four attributes to learn “same/different” relations, where the task is to decide if an input pair of cards is the same or different for that attribute. We then use the _Wq_ and _Wk_ parameters learned for these relations to initialize the relations in a multi-head Abstractor. The Abstractor is then trained on a dataset of triples of cards, half of which form a “set”.
+
+This is compared to a baseline neuro-symbolic model where, instead of images, the input is a vector with 12 bits, explicitly encoding the relations. A two-layer MLP is then trained to decide if the triple forms a “set”. The MLP using the symbolic representation represents an upper bound on the performance achievable by any neural network model. This comparison shows that the relational representations learned by an Abstractor result in sample efficiency that is not far from that obtained with pre-specified symbolic encodings of the relevant relations.
+
+## 4.2 OBJECT-SORTING: PURELY RELATIONAL SEQUENCE-TO-SEQUENCE TASKS
+
+In the following set of experiments, we consider sequence-to-sequence tasks which are purely relational, and compare an Abstractor-supported model to a standard Transformer. We consider the task of _sorting_ sequences of random objects. This task is “purely relational” in the sense that there exists a relation (order) which is a sufficient statistic for solving the task—the features of individual objects beyond this relation are extraneous. This is a more controlled setting that tests the hypothesis that the inductive biases of the Abstractor confer benefits in modeling relations. The experiments in the present section demonstrate that the Abstractor enables a dramatic improvement in sample-efficiency on sequence-to-sequence relational tasks.
+
+**==> picture [168 x 106] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Random Object Sorting 1 . 00 0 . 75 0 . 50 0 . 25 Abstractor Ablation Model 0 . 00 Transformer 0 500 1000 1500 2000 2500 3000 Training Set Size Accuracy Sorting **----- End of picture text -----**
+
+**==> picture [181 x 29] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Learning curves on sorting sequences of ran- dom objects. The abstractor is dramatically more sample-efficient. **----- End of picture text -----**
+
+**==> picture [179 x 147] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Random Object Sorting Generalization 1 . 0 0 . 5 Abstractor Pre-trained Transformer 0 . 0 Pre-trained 0 500 1000 1500 2000 2500 3000 Training Set Size (b) Learning curves with and without pre-training on a similar sorting task. The Abstractor benefits from pre-training. Accuracy Sorting **----- End of picture text -----**
+
+Figure 5: Experiments on object-sorting, a purely relational sequence-to-sequence task.
+
+7
+
+Task: polynomials__expand Task: algebra__linear_1d Question: Expand (2*x + 3)*(x - 1). Question: Solve for z: 5*z + 2 = 9. Answer: 2*x**2 + x - 3 Answer: 7/5
+
+Figure 6: Examples of input/target sequences from the math problem-solving dataset.
+
+**Superior sample-efficiency on relational seq2seq tasks.** We generate random objects in the following way. First, we generate two sets of random attributes _A_ = _{a_ 1 _, a_ 2 _, a_ 3 _, a_ 4 _}_ , _ai ∼N_ (0 _, I_ ) _∈_ R[4] and _B_ = _{b_ 1 _, . . . , b_ 12 _}_ , _bi ∼N_ (0 _, I_ ) _∈_ R[8] . To each set of attributes, we associate the strict ordering relation _a_ 1 _≺ a_ 2 _≺ a_ 3 _≺ a_ 4 and _b_ 1 _≺ b_ 2 _≺· · · ≺ b_ 12, respectively. Our random objects are formed by the Cartesian product of these two attributes _O_ = _A × B_ , yielding _N_ = 48 objects. We associate with _O_ the following strict ordering relation: ( _ai, bj_ ) _≺_ ( _ak, bl_ ) if _ai ≺ ak_ or if _ai_ = _ak_ and _bj ≺ bl_ . Given a set of objects in _O_ , the task is to sort it according to _≺_ . The input sequences are randomly permuted sequences of 10 objects in _O_ and the target sequences are the indices of the object sequences in sorted order (i.e., ‘argsort’). The training data are sampled uniformly from the set of length-10 sequences in _O_ . We also generate non-overlapping validation and testing datasets.
+
+We evaluate learning curves on an Abstractor, a standard Transformer, and an “Ablation” model (10 trials for each training set size). The Abstractor uses architecture (b) in Figure 2 with learned positional symbols. The Encoder-to-Abstractor interface uses relational cross-attention and the Abstractor-to-Decoder interface uses standard cross-attention. The Ablation Model tests the effects of relational cross-attention in the Abstractor model—it is architecturally identical to the Abstractor model with the crucial exception that the Encoder-to-Abstractor interface instead uses standard cross-attention. The hyperparameters of the models are chosen so that the parameter counts are similar (details in Appendix C). We find that the Abstractor is dramatically more sample-efficient than both the standard Transformer and the Ablation model (Figure 5a).
+
+**Ability to generalize to similar tasks.** We also used the object-sorting task and the dataset generated as described above to test the Abstractor’s ability to generalize from similar relational tasks through pre-training. The main task uses the same dataset described above. The pre-training task involves the same object set _O_ but with a modified order relation. The ordering in attribute _A_ is randomly permuted, while the ordering in attribute _B_ is kept the same. We pre-train an Abstractor and a Transformer on the pre-training task and then, using those learned weights for initialization, evaluate learning curves on the original task. Since the Transformer requires more training samples to learn the object-sorting task, we use a pre-training set size of 3 000, chosen to be large enough for the Transformer to learn the pre-training task.
+
+This experiment assesses the models’ ability to generalize relations learned on one task to a new task. Figure 5b shows the learning curves for each model with and without pre-training. We observe that when the Abstractor is pre-trained, its learning curve on the object-sorting task is significantly accelerated, whereas the Transformer does not benefit from pre-training. We attribute this to the fact that the Transformer’s learned representations are entangled with extraneous object-level features, which prevents generalization; by contrast, the Abstractor’s disentangled relational representations can be more easily mapped to the new task.
+
+## 4.3 MATH PROBLEM-SOLVING: PARTIALLY-RELATIONAL SEQUENCE-TO-SEQUENCE TASKS
+
+The object-sorting experiments in the previous section are “purely relational” in the sense that the set of pairwise _≺_ order relations is a sufficient statistic for solving the task. In a general sequence-tosequence task, however, there may not be a relation that is a sufficient statistic. Nonetheless, relational reasoning may still be crucial for solving the task, and the enhanced relational reasoning capabilities of the Abstractor may enable performance improvements. The “partially-relational” architectures described in Section 3 enable a branch of the model to focus on relational reasoning while another branch performs general processing involving object-level attributes. In this section, we evaluate such an Abstractor model (using architecture (d) of Figure 2) on a set of math problem-solving tasks based on the dataset proposed by Saxton et al. (2019).
+
+The dataset consists of several math problem-solving tasks, with each task having a set of questionanswer pairs. The tasks include solving equations, expanding products of polynomials, differentiating functions, predicting the next term in a sequence, etc. A sample of question-answer pairs is displayed in Figure 6. The overall dataset contains 2 _×_ 10[6] training examples and 10[4] validation examples per task. Questions have a maximum length of 160 characters and answers have a maximum length
+
+8
+
+**==> picture [397 x 184] intentionally omitted <==**
+
+**----- Start of picture text -----**
+calculus d ifferentiate algebra s equence n ext t erm algebra l inear 1 d 1 . 000 0 . 8 0 . 9 0 . 975 0 . 8 0 . 950 0 . 6 0 20 40 0 20 40 0 20 40 epoch epoch epoch polynomials e xpand polynomials a dd Model 0 . 80 0 . 85 Transformer Transformer+ 0 . 75 Abstractor (pos. symbols) 0 . 80 Abstractor (symbolic attn) 0 . 70 0 20 40 0 20 40 epoch epoch (val) (val) (val) Accuracy Accuracy Accuracy TF TF TF (val) (val) Accuracy Accuracy TF TF **----- End of picture text -----**
+
+Figure 7: Training curves comparing an Abstractor-based architecture to a standard Transformer on mathematics problem-solving tasks.
+
+of 30 characters. We use character-level encoding with a common alphabet of size 95 (including upper/lower case characters, digits, punctuation, and special start/end/pad tokens).
+
+We compare an Abstractor model using architecture (d) in Figure 2 to a standard Transformer. We evaluate an Abstractor with positional symbols and an Abstractor with symbolic attention (see Section 2.3). Since the Abstractor-based models with architecture (d) have an Abstractor module in addition to an Encoder and Decoder, we compare against two versions of the Transformer in order to control for parameter count. In the first, the Encoder and Decoder have identical hyperparameters to the Abstractor model. In the second, we increase the model dimension and hidden layer size of the feedforward network such that the overall parameter count is approximately the same as for the Abstractor model. We refer to the first model as “Transformer” and the second as “Transformer+” in the figures. The precise architectural details and hyperparameters are described in Appendix C.
+
+We evaluate the three models on five subtasks: differentiating functions (calculus); predicting the next term in a sequence (algebra); solving a linear equation (algebra); expanding polynomials; and adding polynomials. For each, we train on the training split and track the teacher-forcing accuracy (excluding null characters) on the validation split. For each combination of model and task, we repeat the experiment five times and report error bars as twice the standard error of the mean.
+
+Figure 7 shows the validation teacher-forcing accuracy during the course of training, which we use as a proxy for sample efficiency. We observe an improvement in accuracy compared to both ‘Transformer’ and ‘Transformer+’ across all tasks. The larger Transformer tends to perform better than the smaller Transformer, but the Abstractor-based model consistently outperforms both, with the symbolic attention mechanism showing the greatest improvement. This indicates that the performance improvement stems from the architectural modification and inductive bias. We conjecture that a “partially-relational” Abstractor architecture (e.g., architecture (d)) implements two branches of information processing. The Encoder performs more general-purpose processing of the input sequence, while the Abstractor performs more specialized relational processing. The Decoder then has access to both representations, enabling it to perform the task more effectively.
+
+## 5 CONCLUSION
+
+In this work, we propose a variant of attention that produces representations of relational information disentangled from object-level attributes. This leads to the development of the Abstractor module, which fits naturally into the powerful framework of Transformers. Through a series of experiments, we demonstrate the potential of this new framework to achieve gains in sample efficiency in both purely relational tasks and more general sequence modeling tasks. This work opens up several avenues for future research, including a better understanding of the strengths and weaknesses of different architectural variants, work towards a more streamlined scalable architecture, and exploring the framework’s use in increasingly complex real-world problems.
+
+9
+
+## CODE AND REPRODUCIBILITY
+
+Code, detailed experimental logs, and instructions for reproducing our experimental results are available at: [URL removed]
+
+## REFERENCES
+
+Altabaa, Awni and John Lafferty (2023). “Relational Convolutional Networks: A Framework for Learning Representations of Hierarchical Relations”. arXiv: 2310.03240 [cs].
+
+Altabaa, Awni and John Lafferty (2024). “Approximation of relation functions and attention mechanisms”. In: arXiv: 2402.08856 [cs.LG].
+
+Barrett, David, Felix Hill, Adam Santoro, Ari Morcos, and Timothy Lillicrap (2018). “Measuring abstract reasoning in neural networks”. In: _International conference on machine learning_ . PMLR. Battaglia, Peter W. et al. (2018). “Relational inductive biases, deep learning, and graph networks”. arXiv: 1806.01261 [cs.LG].
+
+Cybenko, George (1989). “Approximation by superpositions of a sigmoidal function”. In: _Mathematics of Control, Signals, and Systems_ .
+
+Gilmer, Justin, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl (2017). “Neural message passing for quantum chemistry”. In: _International conference on machine learning_ . PMLR.
+
+Graves, Alex, Greg Wayne, and Ivo Danihelka (2014). “Neural Turing Machines”. arXiv: 1410. 5401 [cs.NE].
+
+Holyoak, K. J. (2012). “Analogy and relational reasoning”. In: _The Oxford Handbook of Thinking and Reasoning_ . Ed. by K. J. Holyoak and R. G. Morrison. New York: Oxford University Press. Kazemnejad, Amirhossein, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das, and Siva Reddy (2023). “The Impact of Positional Encoding on Length Generalization in Transformers”. arXiv: 2305.19466 [cs].
+
+Kerg, Giancarlo, Bhargav Kanuparthi, Anirudh Goyal, Kyle Goyette, Yoshua Bengio, and Guillaume Lajoie (2020). “Untangling tradeoffs between recurrence and self-attention in artificial neural networks”. In: _Advances in Neural Information Processing Systems_ .
+
+Kerg, Giancarlo, Sarthak Mittal, David Rolnick, Yoshua Bengio, Blake Richards, and Guillaume Lajoie (2022). “On Neural Architecture Inductive Biases for Relational Tasks”. arXiv: 2206. 05056 [cs.NE].
+
+Mahowald, Kyle, Anna A. Ivanova, Idan A. Blank, Nancy Kanwisher, Joshua B. Tenenbaum, and Evelina Fedorenko (2023). “Dissociating language and thought in large language models”. arXiv: 2301.06627 [cs.CL].
+
+Mondal, Shanka Subhra, Taylor Whittington Webb, and Jonathan Cohen (2023). “Learning to reason over visual objects”. In: _International Conference on Learning Representations_ .
+
+Pritzel, Alexander, Benigno Uria, Sriram Srinivasan, Adria Puigdomenech Badia, Oriol Vinyals, Demis Hassabis, Daan Wierstra, and Charles Blundell (2017). “Neural episodic control”. In: _International conference on machine learning_ . PMLR.
+
+Santoro, Adam, David Raposo, David G Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Tim Lillicrap (2017). “A simple neural network module for relational reasoning”. In: _Advances in neural information processing systems_ .
+
+Saxton, David, Edward Grefenstette, Felix Hill, and Pushmeet Kohli (2019). “Analysing Mathematical Reasoning Abilities of Neural Models”. arXiv: 1904.01557 [cs.LG].
+
+Shanahan, Murray, Kyriacos Nikiforou, Antonia Creswell, Christos Kaplanis, David Barrett, and Marta Garnelo (2020). “An Explicitly Relational Neural Network Architecture”. In: _Proceedings of the 37th International Conference on Machine Learning_ .
+
+Shaw, Peter, Jakob Uszkoreit, and Ashish Vaswani (2018). “Self-Attention with Relative Position Representations”. arXiv: 1803.02155 [cs.CL].
+
+10
+
+Snow, R. E., P. C. Kyllonen, and B. Marshalek (1984). “The topography of ability and learning correlations”. In: _Advances in the psychology of human intelligence_ . Ed. by R. J. Sternberg. Vaswani, Ashish, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin (2017). “Attention is all you need”. In: _Advances in neural information processing systems_ .
+
+Webb, Taylor, Keith J Holyoak, and Hongjing Lu (2023). “Emergent analogical reasoning in large language models”. In: _Nature Human Behaviour_ .
+
+Webb, Taylor W., Steven M. Frankland, Awni Altabaa, Kamesh Krishnamurthy, Declan Campbell, Jacob Russin, Randall O’Reilly, John Lafferty, and Jonathan D. Cohen (2024). “The Relational Bottleneck as an Inductive Bias for Efficient Abstraction”. arXiv: 2309.06629 [cs.AI].
+
+Webb, Taylor Whittington, Ishan Sinha, and Jonathan Cohen (2021). “Emergent Symbols through Binding in External Memory”. In: _International Conference on Learning Representations_ .
+
+Whittington, James C.R., Timothy H. Muller, Shirley Mark, Guifen Chen, Caswell Barry, Neil Burgess, and Timothy E.J. Behrens (2020). “The Tolman-Eichenbaum Machine: Unifying Space and Relational Memory through Generalization in the Hippocampal Formation”. In: _Cell_ .
+
+Wolf, Thomas, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. (2020). “Transformers: State-ofthe-art natural language processing”. In: _Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations_ .
+
+Xiong, Ruibin, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tieyan Liu (2020). “On layer normalization in the transformer architecture”. In: _International Conference on Machine Learning_ . PMLR.
+
+Zhou, Shuheng, John Lafferty, and Larry Wasserman (2009). “Compressed and Privacy-Sensitive Sparse Regression”. In: _IEEE Trans. Information Theory_ .
+
+11
+
+## A MULTI-ATTENTION DECODER
+
+**Algorithm 2:** Multi-Attention Decoder
+
+**Input :** Target sequence: _**y**_ = ( _y_ 0 _, . . . , yly−_ 1), Context sequences: _X_[(] _[i]_[)] = ( _x_[(] 1 _[i]_[)] _[, . . . , x]_[(] _li[i]_[)][)] _[,][i]_[ = 1] _[, . . . , K] D_[(0)] _←_ _**y**_ **for** _l ←_ 1 **to** _L_ **do** _D_[(] _[l]_[)] _←_ CausalSelfAttention � _D_[(] _[l][−]_[1)][�] residual connection and layer-normalization **for** _i ←_ 1 **to** _K_ **do** _D_[(] _[l]_[)] _←_ CrossAttention � _D_[(] _[l]_[)] _, X_[(] _[i]_[)][�] residual connection and layer-normalization **end** _D_[(] _[l]_[)] _←_ FeedForward � _D_[(] _[l]_[)][�] **end Output:** _D_[(] _[L]_[)]
+
+## B UNIVERSAL APPROXIMATION OF RELATION FUNCTIONS
+
+In this section, we characterize the function class of the Abstractor and relational cross-attention. We will show that, in an appropriate sense, a single Abstractor layer can compute a sequence of abstract states _A_ = ( _A_ 1 _, . . . , An_ ) such that _Ai_ approximates an arbitrary function of object _i_ ’s relations with the other objects in the input. Recall that relational cross-attention takes the form
+
+**==> picture [124 x 19] intentionally omitted <==**
+
+where _ϕq, ϕk_ : _X →_ R _[d]_[proj] are multi-layer perceptrons, and _S_ is the matrix of symbols. In this analysis, we consider _σ_ rel : _x �→ x_ to be the linear activation function. Further, we consider positional symbols. For simplicity, we will assume the single-head variant of relational cross-attention. The function class results derived here would of course carry over to the multi-head case, where each ‘head’ can approximate a function in the function class.
+
+Recall that an Abstractor module comprises several layers, each composed of relational cross-attention and a feedforward layer. Hence, the overall operation in one layer of an Abstractor module is
+
+AbstractorLayer( _X_ ) = FeedForward _ϕq_ ( _X_ ) _ϕk_ ( _X_ ) _[⊤] S ._ (7) � �
+
+We will characterize the function class AbstractorLayer : _X[n] →_ R _[n][×][d]_ induced by varying the parameters of _ϕq, ϕk,_ FeedForward and _S_ .
+
+**Remark 1.** _In Equation_ (4) _, we formulate relational cross-attention with the maps ϕq, ϕk as linear projections, whereas ϕq, ϕk are multi-layer perceptrons in Equation_ (7) _. However, recall that the input to each Abstractor layer is the output of the preceding layer which ends with a multi-layer perceptron. The function class of a multi-layer perceptron followed by two different linear projections is the same as the function class of two different multi-layer perceptrons. We focus on Equation_ (7) _for ease of presentation._
+
+The following result shows that a single-layer abstractor returns a sequence of abstract states which can approximate an arbitrary function of each object’s relations with the other object in the input. The result is based on the analysis in (Altabaa and Lafferty, 2024) which characterizes the function class of inner products of neural networks.
+
+**Theorem 1.** _Suppose X is a compact Euclidean space. Let r_ : _X × X →_ R _be any continuous relation function, and f_ : R _[n] →_ R _[d] any continuous function. Consider the function g_ : _X[n] →_ R _[n][×][d] defined by_
+
+**==> picture [154 x 11] intentionally omitted <==**
+
+12
+
+_where Ri_ = ( _r_ ( _xi, xj_ )) _j∈_ [ _n_ ] _is the vector of xi’s relations with the other objects in the input, according to r. Then, for any ε >_ 0 _, there exists MLPs ϕq, ϕk,_ FeedForward _and a choice of symbols S such that the Abstractor layer approximates g in the sup-norm_
+
+**==> picture [360 x 12] intentionally omitted <==**
+
+> _Proof._ Let ( _A_ 1 _, . . . , An_ ) = AbstractorLayer( _x_ 1 _, . . . , xn_ ) be the abstract states returned by the abstractor layer. For each _i ∈_ [ _n_ ], the abstract state _Ai_ takes the form,
+
+**==> picture [198 x 37] intentionally omitted <==**
+
+where _S_ = ( _s_ 1 _, . . . , sn_ ) are the symbols assigned to each object. Let the symbol dimension be _n_ and let _si_ = _**e** i_ , the canonical basis vectors. Then, _Ai_ = FeedForward( _Ri_ ), where _Ri_ = ( _⟨ϕq_ ( _xi_ ) _, ϕk_ ( _xj_ ) _⟩_ ) _j∈_ [ _n_ ] _∈_ R _[n]_ . By (Altabaa and Lafferty, 2024, Theorem 3.1), there exists MLPs _ϕq, ϕk_ such that their inner product approximates any continuous relation function. In particular, for any _ε_ 1 _>_ 0, there exists _ϕq, ϕk_ such that
+
+**==> picture [336 x 12] intentionally omitted <==**
+
+Let _ϕq, ϕk_ be such MLPs where _ε_ 1 is to be determined later. Note that (Altabaa and Lafferty, 2024) gives a bound on the number of neurons needed in terms of the continuity of _r_ and the dimension of _X_ . Similarly, by the universal approximation property of MLPs (e.g., Cybenko, 1989), _f_ : R _[n] →_ R _[d]_ can be approximated by FeedForward uniformly in the sup-norm. That is, for any _ε_ 2 there exists FeedForward such that
+
+**==> picture [282 x 17] intentionally omitted <==**
+
+Let [ _R_ ] _ij_ = _r_ ( _xi, xj_ ) and [ _R_[ˆ] ] _ij_ = _⟨ϕq_ ( _xi_ ) _, ϕk_ ( _xj_ ) _⟩_ . Then, the difference _g_ ( _x_ 1 _, . . . , xn_ ) _−_ AbstractorLayer( _x_ 1 _, . . . , xn_ ) is given by
+
+**==> picture [344 x 18] intentionally omitted <==**
+
+Note that _R_[ˆ] _i·_ is close to _Ri·_ by Equation (8)
+
+**==> picture [306 x 36] intentionally omitted <==**
+
+Now consider the ( _i, j_ )-th element of the difference in Equation (10)
+
+**==> picture [366 x 19] intentionally omitted <==**
+
+The first term is bounded by _ε_ 2 due to Equation (9). Let _ε_ 2 = _ε/_ 2. Recall that _f_ : R _[n] →_ R _[d]_ is continuous, and hence for all _ϵ >_ 0 there exists _δf_ ( _ε_ ) _>_ 0 such that _∥z_ 1 _− z_ 2 _∥∞ ≤ δ_ ( _ε_ ) = _⇒ ∥f_ ( _z_ 1) _− f_ ( _z_ 2) _∥∞ ≤ ε_ . Letting _ε_ 1 = _δ_ ( _ε/_ 2), implies that the second term is bounded by _ε/_ 2 Lebesgue almost-everywhere due to Equation (11).
+
+This holds for all _i, j_ , which completes the proof.
+
+## C EXPERIMENTAL DETAILS
+
+In this section, we give further experimental details including architectures, hyperparameters, and implementation details. All models and experiments are implemented in Tensorflow. The code is publicly available on the project repo along with detailed experimental logs and instructions for reproducing our results.
+
+13
+
+## C.1 DISCRIMINATIVE TASKS (SECTION 4.1)
+
+## C.1.1 PAIRWISE ORDER
+
+Each model in this experiment has the following form input _→{·} →_ flatten _→_ MLP, where _{·}_ is one of the modules below and MLP is an MLP composed of one hidden layer with 32 neurons and ReLU activation.
+
+**Abstractor architecture.** The Abstractor module used the following hyperparameters: number of layers _L_ = 1, relation dimension _dr_ = 4, symbol dimension _ds_ = 64, projection (key) dimension _dk_ = 16, feedforward hidden dimension _d_ ff = 64, relation activation function _σ_ rel = sigmoid. No layer normalization or residual connection. We use positional symbols as the symbol assignment mechanism, which are learned parameters of the model. The output of the Abstractor module is flattened and passed to the MLP.
+
+**CoRelNet architecture.** CoRelNet has no hyperparameters. Given a sequence of objects, _X_ = ( _x_ 1 _, . . . , xn_ ), standard CoRelNet (Kerg et al., 2022) simply computes the inner product and takes the Softmax. We also add a learnable linear map, _W ∈_ R _[d][×][d]_ . Hence, _R_[¯] = Softmax( _R_ ) _, R_ = [ _⟨Wxi, Wxj⟩_ ] _ij_ . The CoRelNet architecture flattens _R_[¯] and passes it to an MLP to produce the output. The asymmetric variant of CoRelNet is given by _R_[¯] = Softmax( _R_ ) _, R_ = [ _⟨W_ 1 _xi, W_ 2 _xj⟩_ ] _ij_ , where _W_ 1 _, W_ 2 _∈_ R _[d][×][d]_ are learnable matrices.
+
+**PrediNet architecture.** We based our implementation of PrediNet (Shanahan et al., 2020) on the authors’ publicly available code. We used the following hyperparameters: using 4 heads, and 16 relations, a key dimension of 4 (see the original paper for the meaning of these hyperparameters). The output of the PrediNet module is flattened and passed to the MLP.
+
+**MLP.** The embeddings of the objects are concatenated and passed directly to an MLP. The MLP has two hidden layers each with 32 neurons and a ReLU activation.
+
+**Training/Evaluation.** We use the crossentropy loss and the Adam optimizer with a learning rate of 10 _[−]_[2] , _β_ 1 = 0 _._ 9 _, β_ 2 = 0 _._ 999 _, ε_ = 10 _[−]_[7] . We use a batch size of 64. We train for 100 epochs and restore the best model according to validation loss. We evaluate on the test set.
+
+## C.1.2 _SET_
+
+The card images are RGB images of dimension 70 _×_ 50 _×_ 3. A CNN embedder processes the images separately and produces embeddings of dimension _d_ = 64 for each card. The CNN is trained to predict the four attributes of each card and then an embedding for each card is obtained from an intermediate layer (i.e., the parameters of the CNN are then frozen). Recall that the common architecture is CNN Embedder _→{·} →_ Flatten _→_ Dense(2), where _{·}_ is an Abstractor, CoRelNet, PrediNet, or an MLP. We tested against the standard version of CoRelNet, but found that it did not learn anything. We iterated over the hyperparameters and architecture to improve its performance. We found that removing the softmax activation in CoRelNet improved performance a bit. We describe hyperparameters below.
+
+**Common embedder’s architecture** The architecture is given by Conv2D _→_ MaxPool2D _→_ Conv2D _→_ MaxPool2D _→_ Flatten _→_ Dense(64, ’relu’) _→_ Dense(64, ’relu’) _→_ Dense(2). The embedding is extracted from the penultimate layer. The CNN is trained to predict the four attributes of each card until it reaches perfect accuracy and near-zero loss.
+
+**Abstractor architecture** The Abstractor module has hyperparameters: number of layers _L_ = 1, relation dimension _dr_ = 4, symmetric relations (i.e., _Wq[i]_[=] _[ W][ i] k_[,] _[ i][ ∈]_[[] _[d][r]_[]][), linear relation activation] (i.e., _σ_ rel : _x �→ x_ ), symbol dimension _ds_ = 64, projection (key) dimension _dk_ = 16, feedforward hidden dimension _d_ ff = 128, and no layer normalization or residual connection. We use positional symbols as the symbol assignment mechanism, which are learned parameters of the model.
+
+**CoRelNet architecture** Standard CoRelNet is described above. It simply computes, _R_ = Softmax( _A_ ) _, A_ = [ _⟨Wxi, Wxj⟩_ ] _ij_ . This variant was stuck at 50% accuracy regardless of training set size. We found that removing the Softmax helped. Figure 4b compares against both variants of CoRelNet.
+
+14
+
+This finding suggests that allowing _σ_ rel to be a configurable hyperparameter is a useful feature of the Abstractor. Softmax performs contextual normalization of relations, such that the relation between _i_ and _j_ is normalized in terms of _i_ ’s relations with all other objects. This may be useful at times, but may also cripple a relational model when it is more useful to represent an absolute relation between a pair of objects, independently of the relations with other objects.
+
+**PrediNet architecture.** We used the following hyperparameters: using 4 heads, and 16 relations, a key dimension of 4 (see the original paper for the meaning of these hyperparameters). The output of the PrediNet module is flattened and passed to the MLP.
+
+**MLP.** The embeddings of the objects are concatenated and passed directly to an MLP. The MLP has two hidden layers each with 32 neurons and a ReLU activation.
+
+**Data generation** The data is generated by randomly sampling a “set” with probability 1/2 and a non-“set” with probability 1/2. The triplet of cards is then randomly shuffled.
+
+**Training/Evaluation** We use the crossentropy loss and the Adam optimizer with a learning rate of 10 _[−]_[3] , _β_ 1 = 0 _._ 9 _, β_ 2 = 0 _._ 999 _, ε_ = 10 _[−]_[7] . We use a batch size of 64. We train for 200 epochs and restore the best model according to validation loss. We evaluate on the test set.
+
+## C.2 RELATIONAL SEQUENCE-TO-SEQUENCE TASKS (SECTION 4.2)
+
+## C.2.1 SAMPLE-EFFICIENCY IN RELATIONAL SEQ2SEQ TASKS
+
+**Abstractor architecture** The Abstractor model uses architecture (b) of Figure 2. For each of the Encoder, Abstractor, and Decoder modules, we use _L_ = 2 layers, 2 attention heads/relation dimensions, a feedforward network with _d_ ff = 64 hidden units and a model/symbol dimension of _d_ model = 64. The relation activation function is _σ_ rel = Softmax. We use positional symbols as the symbol assignment mechanism, which are learned parameters of the model. The number of trainable parameters is 386 _,_ 954.
+
+**Transformer architecture** We implement the standard Transformer of (Vaswani et al., 2017). For both the Encoder and Decoder modules, use matching hyperparameters per-layer but increase the number of layers. We use 4 layers, 2 attention heads, a feedforward network with 64 hidden units and a model dimension of 64. The number of trainable parameters is 469 _,_ 898. We increased the number of layers compared to the Abstractor in order to make it a comparable size in terms of parameter count.
+
+**Ablation model architecture** The Ablation model uses an identical architecture to the Abstractor, except that the relational cross-attention is replaced with standard cross-attention at the EncoderAbstractor interface (with _Q ← A, K ← E, V ← E_ ). It has the same number of parameters as the Abstractor-based model.
+
+**Training/Evaluation** We use the crossentropy loss and the Adam optimizer with a learning rate of 10 _[−]_[3] , _β_ 1 = 0 _._ 9 _, β_ 2 = 0 _._ 999 _, ε_ = 10 _[−]_[7] . We use a batch size of 512. We train for 100 epochs and restore the best model according to validation loss. We evaluate learning curves by varying the training set size and sampling a random subset of the data at that size. Learning curves are evaluated starting at 100 samples up to 3000 samples in increments of 100 samples. Each ‘sample’ is a pair of input-output sequences. For each model and training set size, we evaluate 10 runs with different random seeds and report the mean and standard error of the mean.
+
+## C.2.2 GENERALIZATION TO NEW OBJECT-SORTING TASKS
+
+**Abstractor architecture** The Abstractor model uses architecture (a) of Figure 2. The Abstractor module uses learned positional symbols, has _L_ = 1 layer, a model dimension of _d_ model = 64, a relation dimension of _dr_ = 4, a softmax relation activation _σ_ rel = Softmax, and a feedforward network with _d_ ff = 64. The decoder also has 1 layer with 4-head MHA and a 64-unit feedforward network.
+
+**Transformer architecture** The Transformer is identical to the previous section.
+
+**Training/Evaluation** The loss, optimizer, batch size, and learning curve evaluation steps are identical to the previous sections. Two object-sorting datasets are created based on an “attribute-product
+
+15
+
+structure”—a primary dataset and a pre-training dataset. As described in Section 4.2, the pre-training dataset uses the same random objects as the primary dataset but with the order relation of the primary attribute reshuffled. The models are trained on 3,000 labeled sequences of the pre-training task and the weights are used to initialize training on the primary task. Learning curves are evaluated with and without pre-training for each model.
+
+## C.3 MATH PROBLEM-SOLVING (SECTION 4.3)
+
+**Abstractor architectures.** The Abstractor models use architecture (d) of Figure 2. The Encoder, Abstractor, and Decoder modules share the same hyperparameters: number of layers _L_ = 1, relation dimension/number of heads _dr_ = _nh_ = 4, symbol dimension/model dimension _ds_ = _d_ model = 128, projection (key) dimension _dk_ = 32, feedforward hidden dimension _d_ ff = 256. In the Abstractor, the relation activation function is _σ_ rel = softmax. In one model, positional symbols are used, with sinusoidal embeddings. In the other model, symbolic attention is used with a symbol library of _ns_ = 256 learned symbols, and 4-head symbolic attention.
+
+**Transformer architecture.** The Transformer Encoder and Decoder have identical hyperparameters to the Encoder and Decoder of the Abstractor architecture.
+
+**Transformer+ architecture.** In ‘Transformer+’, the model dimension is increased to _d_ model = 200 and the feedforward hidden dimension is increased to _d_ ff = 400. The remaining hyperparameters are the same.
+
+**Training/Evaluation** We train each model for 50 epochs with the categorical cross-entropy loss and the Adam optimizer using a learning rate of 6 _×_ 10 _[−]_[4] , _β_ 1 = 0 _._ 9 _, β_ 2 = 0 _._ 995 _, ε_ = 10 _[−]_[9] . We use a batch size of 128.
+
+- C.4 ADDITIONAL EXPERIMENT: ROBUSTNESS AND OUT-OF-DISTRIBUTION GENERALIZATION IN THE OBJECT-SORTING EXPERIMENTS
+
+This experiment explores the Abstractor’s robustness to noise and out-of-distribution generalization as compared to a standard Transformer. We consider the models in Section 4.2 and the corresponding object-sorting task. We train each model on this task using 3,000 labeled sequences. We chose the fixed training set size of 3,000 because is large enough that both the Abstractor and Transformer are able to learn the task. Then, we corrupt the objects with noise and evaluate performance on sequences in the hold-out test set where objects are replaced by their corrupted versions. We evaluate robustness to a random linear map as well as to additive noise, while varying the noise level. We evaluate over several trials, averaging over the realizations of the random noise.
+
+On the hold out test set, we corrupt the object representations by applying a random linear transformation. In particular, we randomly sample a random matrix the entries of which are iid zero-mean Gaussian with variance _σ_[2] , Φ _∈_ R _[d][×][d] ,_ Φ _ij ∼N_ (0 _, σ_[2] ). Each object in _O_ is then corrupted by this random linear transformation, ˆ _oi_ = Φ _oi,_ for each _i ∈_ [48]. We also test robustness to additive noise via ˆ _oi_ = _oi_ + _εi, εi ∼N_ (0 _, σ_[2] _Id_ ).
+
+**==> picture [179 x 120] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Robustness to Additive Noise 1 . 00 Abstractor Ablation Model Transformer 0 . 75 0 . 50 0 . 25 0 . 00 0 . 0 0 . 2 0 . 4 0 . 6 0 . 8 1 . 0 Noise Level Accuracy Sorting **----- End of picture text -----**
+
+**==> picture [180 x 18] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) The Abstractor is more robust to corruption by additive noise. **----- End of picture text -----**
+
+**==> picture [180 x 143] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Robustness to Random Linear Transformations 1 . 00 Abstractor Ablation Model 0 . 75 Transformer 0 . 50 0 . 25 0 . 00 0 . 0 0 . 2 0 . 4 0 . 6 0 . 8 1 . 0 Noise Level (b) The Abstractor is more robust to corruption by a random linear transformation. Accuracy Sorting **----- End of picture text -----**
+
+Figure 8: Experiments on robustness.
+
+16
+
+The models are evaluated on the hold-out test set with objects replaced by their corrupted version. We evaluate the sorting accuracy of each model while varying the noise level _σ_ (5 trials at each noise level). The results are shown in figures 8a and 8b. We emphasize that the models are trained only on the original objects in _O_ , and are not trained on objects corrupted by any kind of noise.
+
+This experiment can be interpreted in two lights: the first is robustness to noise. The second is a form of out-of-distribution generalization. Note that the objects seen by the models post-corruption lie in a different space than those seen during training. Hence the models need to learn relations that are in some sense independent of the value representation. As a theoretical justification for this behavior, Zhou et al., 2009 shows that _⟨_ Φ _x,_ Φ _y⟩≈⟨x, y⟩_ in high dimensions, for a random matrix Φ with iid Gaussian entries. This indicates that models whose primary computations are performed via inner products, like Abstractors, may be more robust to this kind of corruption.
+
+17
+
diff --git a/open_review/iclr2024_8560.json b/open_review/iclr2024_8560.json
new file mode 100644
index 0000000000000000000000000000000000000000..4fba6de08f6ed8b267a6f165fc293c82b2f210c8
--- /dev/null
+++ b/open_review/iclr2024_8560.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8560",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Understanding and Robustifying Sub-domain Alignment for Domain Adaptation",
+ "abstract": "In unsupervised domain adaptation (UDA), aligning source and target domains improves the predictive performance of learned models on the target domain. A common methodological improvement in alignment methods is to divide the domains and align sub-domains instead. These sub-domain-based algorithms have demonstrated great empirical success but lack theoretical support. In this work, we establish a rigorous theoretical understanding of the advantages of these methods that have the potential to enhance their overall impact on the field. Our theory uncovers that sub-domain-based methods optimize an error bound that is at least as strong as non-sub-domain-based error bounds and is empirically verified to be much stronger. Furthermore, our analysis indicates that when the marginal weights of sub-domains shift between source and target tasks, the performance of these methods may be compromised. We therefore implement an algorithm to robustify sub-domain alignment for domain adaptation under sub-domain shift, offering a valuable adaptation strategy for future sub-domain-based methods. Empirical experiments across various benchmarks validate our theoretical insights, prove the necessity for the proposed adaptation strategy, and demonstrate the algorithm's competitiveness in handling label shift.",
+ "rebuttal": "Thank you once again for the invaluable time and effort you put into reviewing our work. We are sincerely grateful for your insightful comments!\n\nDear Reviewer epCK,\n\nAs the discussion period approaches its end, we would like to again express our sincere gratitude for your help and dedication to the review of our work. In light of our discussions, we wish to highlight the core contributions that we believe are important to the field of domain adaptation research:\n\n**Main Contributions:**\n\na. Theoretical Contributions: \n\nOur work analyzes and provides a theoretical foundation for sub-domain based methods in domain adaptation, addressing their previous lack of rigorous understanding. **Our theoretical framework not only supports our algor [...]\n\nDear Reviewer p9oY, \n\nThank you for your comments. Please see below our response to your concerns. \n\n---\n> While the theory behind sub-domain alignment is certainly compelling, in its practical application, it merely utilizes class labels to segment subdomains. This results in a method that essentially merges class importance weighting with W1 distance to gauge domain discrepancies. While this is a fresh approach, it's not exceptionally innovative. It would enhance the paper if the author explored alternative sub-domain segmentation techniques.\n\nWe would like to clarify that the primary focus [...]\n\nDear Reviewer epCK, \n\nThank you for your comments. Please see below our response to your concerns. \n\n---\n\n### *Responses to Weakness/Question (1) and (3)*\n**Rationale Behind Baseline Selection:** Regarding the selection of compared methods, our benchmarks were meticulously chosen to demonstrate the robustness and effectiveness of our proposed algorithm. This includes theoretically solid methods such as DANN, and methods that have top performances in digit transfer learning tasks as recognized on the Papers with Code website [1]. We also included relevant sub-domain-based methods [2, 3], alig [...]\n\nDear Reviewer W1Lh, \n\nThank you for your comments. Please see below our response to your concerns. \n> The theoretical analysis is not instructive. The theoretical analysis has two main theorems, Sub-domain-based Generalization Bound (Theorem 4.5) and Benefits of Sub-domain Alignment (Theorem 4.7 and 4.10). Theorem 4.5 shows that the error of the target domain can be bounded by the weighted error of the source domain and the weighted error of the sub-domain distance. However, some works [1][2] have pointed out similar conclusions.\n\nWe indeed have already included [1] in our Related Work section [...]\n\n### Continuation\n> The experiments are not sufficient to show the effectiveness of the proposed algorithm. First, the number of datasets used for the experiments is too small. Second, the compared methods are not advanced enough.\n\n**Rationale Behind Baseline Selection:** Regarding the selection of compared methods, our benchmarks were meticulously chosen to demonstrate the robustness and effectiveness of our proposed algorithm. This includes theoretically solid methods such as DANN and methods that have top performances in digit transfer learning tasks as recognized on the Papers with Code we [...]\n\n### Thank you\nDear Reviewer W1Lh,\n\nAs the discussion period draws to a close, we wish to express our sincere gratitude for your acknowledgement of our rebuttal, which confirms that most of the concerns have been adequately addressed. \n\nIn these crucial stages of our research, the value of your expertise and backing cannot be overstated. We respectfully and eagerly seek your support in promoting our work further. Your observations, along with those from other reviewers, have highlighted the clarity and fundamental theoretical contributions of our manuscript, particularly in sub-domain based app [...]\n\n### Thank you\nDear Reviewer p9oY, \n\nAs we approach the conclusion of this discussion period, we would like to express our gratitude towards your constructive comments and dedicated efforts to help improve the quality of work. \n\nAt this critical moment for our research, your expertise and support are immensely valuable to us. With great respect, we earnestly request your favorable consideration in advancing our work. As commented by you and your fellow reviewers, this work is well-written and establishes fundamental theoretical support for sub-domain based. Moreover, we believe it is valuable t [...]",
+ "initial_scores": [
+ 6,
+ 5,
+ 6
+ ],
+ "score_mean": 5.67,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "This is a borderline paper. On one hand, this paper makes some contributions to a theoretical study about sub-domain alignment for DA. On the other hand, the empirical studies are relatively weak to comprehensively demonstrate the effectiveness of the proposed method based on the theoretical findings. Though the authors explain the rationales behind dataset selection and baseline selection, overall, the experimental setup and results are not convincing enough to fully demonstrate the effectiveness of a general DA method.",
+ "forum_id": "gLZeEpfVjy",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_W1Lh",
+ "review_id": "JbiAZczKSR",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 2412,
+ "edit_detected": true,
+ "edit_delta_seconds": 1781936,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_epCK",
+ "review_id": "k3hSvonC7K",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1946,
+ "edit_detected": true,
+ "edit_delta_seconds": 1891333,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_p9oY",
+ "review_id": "QOiw3Uzt8F",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2032,
+ "edit_detected": true,
+ "edit_delta_seconds": 1167112,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8560.md b/open_review/iclr2024_8560.md
new file mode 100644
index 0000000000000000000000000000000000000000..9795dfd414f365da5d372aef55662df6164308d7
--- /dev/null
+++ b/open_review/iclr2024_8560.md
@@ -0,0 +1,917 @@
+
+
+## - UNDERSTANDING AND ROBUSTIFYING SUB DOMAIN ALIGNMENT FOR DOMAIN ADAPTATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+In unsupervised domain adaptation (UDA), aligning source and target domains improves the predictive performance of learned models on the target domain. A common methodological improvement in alignment methods is to divide the domains and align sub-domains instead. These sub-domain-based algorithms have demonstrated great empirical success but lack theoretical support. In this work, we establish a rigorous theoretical understanding of the advantages of these methods that have the potential to enhance their overall impact on the field. Our theory uncovers that sub-domain-based methods optimize an error bound that is at least as strong as non-sub-domain-based error bounds and is empirically verified to be much stronger. Furthermore, our analysis indicates that when the marginal weights of sub-domains shift between source and target tasks, the performance of these methods may be compromised. We therefore implement an algorithm to robustify sub-domain alignment for domain adaptation under sub-domain shift, offering a valuable adaptation strategy for future sub-domain-based methods. Empirical experiments across various benchmarks validate our theoretical insights, prove the necessity for the proposed adaptation strategy, and demonstrate the algorithm’s competitiveness in handling label shift.
+
+## 1 INTRODUCTION
+
+Supervised deep learning has achieved unprecedented success in a wide range of real-world applications. However, obtaining labeled data may be costly, labor-intensive, and/or time-consuming in certain applications, particularly in medical and biological domains (Lu et al., 2017; Li et al., 2020). To this end, unsupervised domain adaptation (UDA) transfers knowledge from a labeled source domain to a different but related unlabeled target domain (Farahani et al., 2021). However, efficient UDA is challenging due to the statistical discrepancies between two domains, hereafter referred to as _domain shift_ (Wang & Deng, 2018; Sankaranarayanan et al., 2018; Deng et al., 2019). To address this challenge, much of the UDA research has focused on reducing the distributional gap between the source and target domains (Shen et al., 2018; Liu et al., 2016; Isola et al., 2017; Tzeng et al., 2015; 2017; 2020; Ganin & Lempitsky, 2015; Ganin et al., 2016; Peng et al., 2018). Recent methods further partition the data into sub-domains and align the sub-domains instead (Pinheiro, 2018; Long et al., 2018; Deng et al., 2019). One straightforward definition of the sub-domains is the conditional distributions based on the classification label. Other strategies for defining sub-domains include cross-domain adaptive clustering (Li et al., 2021b), classifier-based backprop-induced weighting (Westfechtel et al., 2023), domain consensus clustering (Li et al., 2021a), joint learning of domaininvariant features and classifiers (Shi & Sha, 2012), and the use of deep clustering (Gao et al., 2020). These sub-domain-based algorithms have shown substantial empirical success. However, the benefits of sub-domain alignments have not been rigorously justified.
+
+In this work, we present a theoretical analysis to establish that the sub-domain based methods are in fact optimizing a generalization bound that is at least as strong as (and empirically much stronger than) the full-domain-based objective functions. Our analysis further reveals that when the marginal weights of the sub-domains shift between source and target, the sub-domain based methods can fail. We then present a novel UDA algorithm, _Domain Adaptation via Rebalanced Sub-domain Alignment_ (DARSA), that is motivated by our analysis and addresses the case when marginal subdomain weights shift. DARSA optimizes reweighted classification error and discrepancy between sub-domains of the source and target tasks. The reweighting scheme follows a simple intuition:
+
+1
+
+**==> picture [377 x 219] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) One-dimensional space (d) Visualization of high-dimensional space (b) Sub-domain 1 (c) Sub-domain 2 (e) DARSA illustration **----- End of picture text -----**
+
+Figure 1: Conceptual overview of our motivation. Listed distances are Wasserstein-1 distances. (a): Representation of data prior to training. The source domain _DS_ (coral) consists of two Gaussian centered at _−_ 1 _._ 5 and 1 _._ 5 with weights 0 _._ 7 and 0 _._ 3, respectively. The target domain _DT_ (darkblue) is a mixture of two Gaussians centered at _−_ 1 _._ 4 and 1 _._ 6 with inverse weights. We split into subdomains at _x_ = 0. (b-c): Representation of data after training. The sub-domain distances are trivial compared to the domain distance in (a). (d) MNIST to MNIST-M UDA task. The features are projected to 2-D with UMAP. The legend indicates distances between corresponding sub-domains (with red subdomain indices labeled in the figure), and the sub-figure title shows the overall distance. These subdomain distances are small compared to the overall distance given at the top. (e) DARSA illustration with _wT[k]_[indicating target sub-domain weights, showing DARSA’s applicability under label shifting.]
+
+_important sub-domains in the target domain need more attention_ . To illustrate the concept visually, Figure 1 highlights the strengths of sub-domain alignment, providing insight into how our method operates and the benefits it brings. The contribution of our work is two-fold:
+
+- **Theoretical Contribution:** Our work analyzes and provides a theoretical foundation for subdomain based methods in domain adaptation, addressing their previous lack of rigorous understanding. Our theoretical framework not only supports our algorithm but can be extended to other methods, contributing to broader impact and value in the field.
+
+- **Algorithmic Contribution:** Our theoretical analysis leads to our algorithm DARSA. DARSA addresses shifted marginal sub-domain weights, which adversely impact existing sub-domainbased methods. We empirically verify its competitive performance under label shifting on various benchmarks, confirming our theoretical insights and validating the proposed adaptation strategy.
+
+## 2 RELATED WORK
+
+We review the most relevant work below and provide a comprehensive discussion in Appendix A.
+
+**Sub-domain-based Domain Adaptation.** Sub-domain alignment has been proven effective in aligning multi-modal distributions and enhancing performance across various tasks (Deng et al., 2019; Long et al., 2018; Pinheiro, 2018; Shi & Sha, 2012; Jiang et al., 2020; Snell et al., 2017). While these methods have demonstrated empirical success, a detailed theoretical perspective on the benefits of incorporating sub-domain structures has yet to be fully explored. Our work complements these existing methodologies by providing a comprehensive theoretical understanding of their inherent advantages. Our theory has the potential to further enhance their overall impact on the field.
+
+**Discrepancy-based Domain Adaptation.** UDA commonly tries to reduce the distribution gap between the source and target domains. One approach to achieve this is discrepancy-based methods in the feature space (Tzeng et al., 2014; Long et al., 2015; Sun et al., 2016), which often use maximum
+
+2
+
+mean discrepancy (MMD) (Borgwardt et al., 2006). While MMD is a well-known Reproducing Kernel Hilbert Space (RKHS) metric, it is weaker than the Wasserstein-1 distance (Lu & Lu, 2020). Therefore, we use Wasserstein-1 distance in our work.
+
+**Theoretical Analysis of Domain Adaptation.** Many existing domain adaptation methods are inspired by the generalization bounds based on the _H_ -divergence (Ben-David et al., 2006) which is a modified version of the total variation distance that restricts the hypothesis to a given class. These generalization bounds can be estimated by learning a domain classifier with a finite Vapnik–Chervonenkis (VC) dimension. However, this results in a loose bound for most neural networks (Li et al., 2018). In this work, we use the Wasserstein distance for two reasons. First, the Wasserstein-1 distance is upper bounded by the total variation distance (Ben-David et al., 2010), leading to stronger generalization bounds. Additionally, the Wasserstein-1 distance is bounded above by the Kullback-Leibler divergence (a special case of the R´enyi divergence when _α_ goes to 1 (Fournier & Guillin, 2015)), giving stronger bounds than those presented by Redko et al (Redko et al., 2017) and Mansour et al (Mansour et al., 2012). Additionally, the Wasserstein distance has stable gradients even when the compared distributions are far apart (Gulrajani et al., 2017).
+
+## 3 PRELIMINARIES
+
+Assume a labeled source dataset _{_ ( _x[i] S[, y] S[i]_[)] _[}] i[N]_ =1 _[S]_[from a source domain] _[ X][S]_[with distribution] _[ P][S]_[and] an unlabeled target dataset _{x[i] T[}][N] i_ =1 _[T]_[from][a][target][domain] _[X][T]_[with][distribution] _[P][T]_[ .][The][source] dataset has _NS_ labeled samples, and the target dataset has _NT_ unlabeled samples. We assume that the samples _x[i] S[∈X][⊆]_[R] _[d]_[and] _[x][i] T[∈X][⊆]_[R] _[d]_[are][independently][drawn][from] _[P][S]_[and] _[P][T]_[ ,] respectively. The goal is to learn a classifier _f_ ( _x_ ) that predicts labels _{yT[i][}][N] i_ =1 _[T]_[for the target dataset.] We further assume that _PS_ and _PT_ are probability densities of Borel probability measures in the Wasserstein space _P_ 1(R _[d]_ ), i.e., the space of probability measures with finite first moment. **Sub-domains.** We assume that both _XS_ and _XT_ are mixtures of _K_ sub-domains. In other words, we have _PS_ =[�] _[K] k_ =1 _[w] S[k][P][ k] S_[and] _[P][T]_[=][�] _[K] k_ =1 _[w] T[k][P][ k] T_[where][we][use] _[P][ k] S_[and] _[P][ k] T_[to][respectively] represent the distribution of the _k_ -th sub-domain of the source domain and that of the target domain, and _wS[k]_[/] _[w] T[k]_[correspond][to][the][weights][of][each][sub-domain.][Note][that] **[w][S]**[=] _[.]_[[] _[w] S_[1] _[, . . . , w] S[K]_[]] and **wT** = _[.]_ [ _wT_[1] _[, . . . , w] T[K]_[]][belong][to][∆] _[K]_[(the] _[K][−]_[1][probability][simplex).][It][is][straightforward] to define sub-domains as conditional distributions, such that the _k_ -th sub-domain is represented as _PS[k]_[=] _[P]_[(] _[X][S][|][Y][S]_[=] _[k]_[)][ and] _[ P][ k] T_[=] _[P]_[(] _[X][T][ |][Y][T]_[=] _[k]_[)][,][where] _[ Y][S]_[and] _[ Y][T]_[are the source and target la-] bels, respectively. However, we note that the framework presented in this work is applicable across various sub-domain methods.
+
+**Probabilistic Classifier Discrepancy.** For a distribution _D_ , we define the discrepancy between two functions _f_ and _g_ as:
+
+**==> picture [140 x 11] intentionally omitted <==**
+
+We use _gT_ and _gS_ to represent the true labeling functions of the target and source domains, respectively. We use _γS_ ( _f_ ) = _[.] γPS_ ( _f, gS_ ) and _γT_ ( _f_ ) = _[.] γPT_ ( _f, gT_ ) to respectively denote the discrepancies of a hypothesis _f_ to the true labeling function for the source and target domains.
+
+**Wasserstein Distance.** The Kantorovich-Rubenstein dual representation of the Wasserstein-1 distance (Villani, 2009) between two distributions _PS_ and _PT_ is defined as
+
+**==> picture [234 x 13] intentionally omitted <==**
+
+where the supremum is over the set of 1-Lipschitz functions (all Lipschitz functions _f_ with Lipschitz constant _L ≤_ 1. For notational simplicity, we use _D_ ( _X_ 1 _, X_ 2) to denote a distance between the distributions of any pair of random variables _X_ 1 and _X_ 2. For instance, _W_ 1(Φ( _XS_ ) _,_ Φ( _XT_ )) denotes the Wasserstein-1 distance between the distributions of the random variables Φ( _XS_ ) and Φ( _XT_ ) for any transformation Φ.
+
+## 4 UNDERSTANDING SUB-DOMAIN-BASED METHODS
+
+We now present our theoretical analysis of sub-domain-based methods, with all proofs deferred to the Appendix B. We first present a generalization bound for domain adaptation that is closely
+
+3
+
+related to existing work, and then establish a novel generalization bound for sub-domain-based methods, aligning with the objectives used by these existing methods. Furthermore, we demonstrate that the sub-domain-based generalization bound is at least as strong as the non-sub-domain-based generalization bound, which establishes a rigorous theoretical understanding of the advantages of these methods. Our analysis also uncovers that when the marginal weights of sub-domains shift between the source and the target task, sub-domain methods can potentially fail.
+
+## 4.1 GENERALIZATION BOUNDS FOR DOMAIN ADAPTATION
+
+Before presenting our novel theoretical results about sub-domain-based domain adaptation, we first present an upper bound closely related to Ben-David et al. (2010) and Li et al. (2018) Theorem A.8. It is worth noting that we use the Wasserstein-1 distance in our analysis, as it provides a stronger bound than the total variation distance Redko et al. (2017) employed by Ben-David et al. (2010).
+
+**Theorem 4.1** (Full Domain Generalization Bound) **.** _For a hypothesis f_ : _X →_ [0 _,_ 1] _,_
+
+**==> picture [295 x 11] intentionally omitted <==**
+
+_where γ[⋆]_ = min _f ∈_ H _[γ][S]_[(] _[f]_[)+] _[γ][T]_[ (] _[f]_[)] _[,]_[ H] _[ is a hypothesis class included in the set of][ λ][H][-Lipschitz functions,] and the true functions gT and gS are both λ-Lipschitz functions (as defined in Appendix B.1). Remark_ 4.2 _._ The upper bound in Theorem 4.1 consists of three components: (i) _γS_ ( _f_ ) is the performance of the hypothesis on the source domain, (ii) _W_ 1( _PS, PT_ ) is the distance between the source and the target domains, and (iii) _γ[⋆]_ is a constant related to the difference between the source and the target problems that cannot be addressed by domain adaptation. For succinctness and clarity of the following analysis, we assume without loss of generality that _λ_ + _λH ≤_ 1, simplifying the bound to
+
+**==> picture [275 x 11] intentionally omitted <==**
+
+Numerous works attempt to solve the domain adaptation problem by designing algorithms that minimize similar generalization bounds to the one in equation 2, e.g., Theorem 1 in Ben-David et al. (2010). These approaches consist of two components: _(i)_ a mapping Φ : _X →H_ that transforms the original problem by embedding _XS_ and _XT_ into a shared hidden space _H_ , and _(ii)_ a hypothesis _h_ : _H →_ [0 _,_ 1] for prediction. Since _γT_ ( _h ◦_ Φ) = _γ_ Φ( _XT_ )( _h_ ), with Theorem 4.1, we have a generalization bound of the function _h ◦_ Φ : _X →_ [0 _,_ 1] on the original target problem:
+
+**==> picture [338 x 12] intentionally omitted <==**
+
+If the distance between Φ( _XS_ ) and Φ( _XT_ ), i.e., _W_ 1(Φ( _XS_ ) _,_ Φ( _XT_ )), is close and the classification error of _h_ on the transformed source problem, i.e., _γ_ Φ( _XS_ )( _h_ ), remains low, then the performance of the hypothesis _h ◦_ Φ on the _original_ target problem can be guaranteed. This motivation has led to a variety of domain adaptation frameworks with objectives of the following format:
+
+**==> picture [299 x 18] intentionally omitted <==**
+
+where _γ_ Φ( _XS_ )( _h_ ) is the classification error of _h_ on the transformed source problem, _D_ is a distance between distributions and _α_ is the balancing weight. In this work, we use Wasserstein-1 distance.
+
+## 4.2 ANALYSIS OF SUB-DOMAIN-BASED METHODS
+
+We first present several results that will be used to build the main theorem. These results themselves may be of interest. First of all, Theorem 4.1 directly leads to the following proposition:
+
+**Proposition 4.3** (Individual Sub-domain Generalization Bound) **.** _For k ∈{_ 1 _, . . . , K}, where K represents the total number of distinct sub-domains, for sub-domain XS[k][with][distribution][P][ k] S[and] XT[k][with distribution][ P][ k] T[, it holds any][ f][∈]_[H] _[ that]_
+
+**==> picture [397 x 40] intentionally omitted <==**
+
+The second result below shows that the classification error of any hypothesis _f_ on a domain can be decomposed into a weighted sum of the classification errors of _f_ on its sub-domains.
+
+4
+
+**Lemma 4.4** (Decomposition of the Classification Error) **.** _For any hypothesis f ∈_ H _,_
+
+**==> picture [306 x 14] intentionally omitted <==**
+
+With above results, we present a generalization bound with sub-domain information: **Theorem 4.5** (Sub-domain-based Generalization Bound) **.**
+
+**==> picture [343 x 14] intentionally omitted <==**
+
+_In particular, in a balanced domain adaptation setting where for all k, wS[k]_[=] _[ w] T[k][, we have that]_
+
+_γT_ ( _f_ ) _≤ γS_ ( _f_ ) +[�] _[K] k_ =1 _[w] S[k][W]_[1][(] _[P][ k] S[, P] T[ k]_[) +][ �] _[K] k_ =1 _[w] S[k]_[(] _[γ][k]_[)] _[⋆][.]_ (8)
+
+_Remark_ 4.6 _._ Note that the format of the RHS of equation 8 is reminiscent of the objectives used by the majority of the sub-domain-based methods.
+
+We next show that, under reasonable assumptions, the weighted sum of distances between corresponding sub-domains of the source and target domains is at most as large as the distance between the marginal distribution of the source domain and that of the target domain.
+
+**Theorem 4.7** (Benefits of Sub-domain Alignment) **.** _Under the following assumptions:_
+
+_**A1.** For all k, PS[k][/][ P][ k] T[are Gaussian distributions with mean][ m][k] S[/][ m][k] T[and covariance]_[ Σ] _[k] S[/]_[ Σ] _[k] T[.]_ _**A2.** Distance between the paired source-target sub-domain is less or equal to distance between the non-paired source-target sub-domain, i.e., W_ 1( _PS[k][, P] T[ k]_[)] _[ ≤][W]_[1][(] _[P][ k] S[, P] T[ k][′]_[)] _[ for][ k]_[=] _[ k][′][.]_ _**A3.** There exists a small constant ϵ >_ 0 _, such that_ max _S_[))] _[≤][ϵ][ and]_[max] _T_[))] _[≤][ϵ][.]_ 1 _≤k≤K_[(] _[tr]_[(Σ] _[k]_ 1 _≤k≤K_[(] _[tr]_[(Σ] _[k][′]_
+
+_Then the following inequality holds:_
+
+**==> picture [289 x 14] intentionally omitted <==**
+
+_where δc is_ 4 _[√] ϵ. In particular, when wS[k]_[=] _[ w] T[k][for all][ k][,]_
+
+**==> picture [288 x 14] intentionally omitted <==**
+
+_Remark_ 4.8 _._ In Appendix C, we provide empirical evidence to verify that these assumptions are satisfied on real-world datasets. We note that the assumption of a Gaussian distribution for _X[k]_ is not unreasonable since it is often the result of a complex transformation, Φ, and the Central Limit Theorem indicates that the outcome of such a transformation is approximately normally distributed under regularity assumptions (please see Appendix C.1 for empirical evidence).
+
+_Remark_ 4.9 _. δc_ is a constant dependent only on the variance of the features but not the covariance between features in different dimensions. Moreover, the inequality holds empirically without _δc_ as demonstrated in Figure 3, as well as Figure 7 and Figure 8 in Appendix G.2.
+
+Theorem 4.7 shows that the objective function of sub-domain methods is at least as strong as the objective function of domain alignment methods, explaining its improved performance. However, if the marginal weights of the sub-domain shifts, i.e., _wS[k]_[=] _[w] T[k]_[,][the inequality in equation 10 is not] likely to hold and the framework can collapse. One such example is the scenario of shifted label distributions where _wT[k]_[and] _[ w] S[k]_[(class weights for target and source domains) can be vastly different.] To overcome this, we propose to minimize an objective with the simple intuition that _important subdomains in the target domain need more attention_ . With this motivation, we propose the following objective function for UDA with shifted label distribution:
+
+**==> picture [249 x 14] intentionally omitted <==**
+
+In other words, _L_ reweights the losses of sub-domains so that the sub-domain with more weight in the target domain can be emphasized more. We next prove that through the proposed approach, we can again obtain a sub-domain-based generalization bound that is at least as strong as the full domain generalization bound without the sub-domain information.
+
+**Theorem 4.10.** _Let_ H = _[.] {f |f_ : _X →_ [0 _,_ 1] _} denote a hypothesis space. Under the assumptions in Theorem 4.7, for any f ∈_ H _such that:_
+
+**==> picture [271 x 13] intentionally omitted <==**
+
+5
+
+_then we have_[�] _[K] k_ =1 _[w] T[k]_[(] _[γ][k]_[)] _[⋆][≤][γ][⋆][.][Further, let]_
+
+**==> picture [281 x 14] intentionally omitted <==**
+
+_denote the sub-domain-based generalization bound and let_
+
+**==> picture [146 x 11] intentionally omitted <==**
+
+_denote the generalization bound without any sub-domain information, we have,_
+
+**==> picture [82 x 11] intentionally omitted <==**
+
+_Remark_ 4.11 _._ In Section 6.1 and Appendix G.2, we provide extensive empirical evidence to establish that equation 12 can easily hold, as the left hand side is the optimization objective. Moreover, in these sections, we offer empirical evidence to further verify the value of this theoretical result by showing that our proposed bound is empirically much stronger than the existing one.
+
+Inspired by our analysis, we propose a framework, _Domain Adaptation with Rebalanced Sub-domain Alignment_ (DARSA), for imbalanced UDA, a special case of the sub-domain weight shifting scenario where the class weights of the target domain shifts from that of the source domain.
+
+## 5 METHODS
+
+In DARSA, we divide the source domains into sub-domains based on class labels, and divide target domains into sub-domains using predicted class labels (serving as pseudo labels, which have shown success in previous research (Deng et al., 2019; Lee et al., 2013)) for unlabeled target domains. Motivated by Theorem 4.10, the framework of DARSA, shown in Figure 2, is composed of a source encoder _fE[S]_[parameterized][by] _[θ] E[S]_[,][a][target][encoder] _[f] E[ T]_[parameterized][by] _[θ] E[T]_[,][and][a][classifier] _[f][Y]_ parameterized by _θY_ . The pseudo-code for DARSA can be found in Appendix D.
+
+The objective function of DARSA is defined as follows:
+
+**==> picture [273 x 13] intentionally omitted <==**
+
+where _LY_ , _LD_ , _LC_ are losses described below with relative weights given by _λY_ and _λD_ .
+
+**Weighted source domain classification error** _LY_ **.** The weighted source domain classification error in Theorem 4.10 can be further expressed as:
+
+**==> picture [390 x 36] intentionally omitted <==**
+
+where variable _c_ represents class, _wT[k]_[=] _[ P][T]_[ (] _[c]_[ =] _[ k]_[)] _[, w] S[k]_[=] _[ P][S]_[(] _[c]_[ =] _[ k]_[)] _[, w] S[k]_[(] _[x]_[) =] _[ P][S]_[(] _[c]_[ =] _[ k][|][x]_[)][.][We] set _PS_ ( _c_ = _k|x_ ) = 1 only when data point _x_ is in class _k_ , otherwise _PS_ ( _c_ = _k|x_ ) = 0. _wS[k]_[can be] set to the marginal source label distribution, and _wT[k]_[can][be][estimated][from][the][target][predictions.] From equation 14, _LY_ ( _θY , θE[S]_[)][ is defined as:]
+
+**==> picture [190 x 19] intentionally omitted <==**
+
+ˆ where _y[i]_ = _fY_ ( _fE[S]_[(] _[x][i]_[))][is][the][predicted][label][and] _[ℓ]_[can][be][any][non-negative][loss][function][(e.g.,] cross-entropy loss for classification tasks).
+
+**Weighted source-target subdomain discrepancy** _LD_ **.** The weighted source-target domain discrepancy in Theorem 4.10 can be further expressed as:
+
+**==> picture [356 x 13] intentionally omitted <==**
+
+whereˆ _x[k] S_[are source samples with labels] _[ y][S]_[=] _[k]_[,][and] _[ x][k] T_[are target samples with predicted labels] _yT_ = _k_ . We leverage the Sinkhorn algorithm (Cuturi, 2013) to approximate the Wasserstein metric.
+
+**Clustering loss** _LC_ **.** The clustering loss _LC_ = _λcLintra_ + _λaLinter_ is comprised of two components: the intra-clustering loss, _Lintra_ , and the inter-clustering loss, _Linter_ . The role of _Lintra_ is to satisfy the assumption A.3 in Theorem 4.7. It encourages embeddings of the same label to
+
+6
+
+**==> picture [258 x 136] intentionally omitted <==**
+
+Figure 2: The DARSA framework. Orange lines representing the clustering loss _LC_ , green lines indicating domain discrepancy _LD_ , and purple lines indicating source classification loss _LY_ .
+
+cluster tightly together, while also pushing embeddings of different labels to separate by at least a user-specified distance, _m_ (Luo et al., 2018). The inter-clustering loss _Linter_ further enhances subdomain alignment by aligning the centroids of source sub-domains with those of their corresponding target sub-domains in the representation space. We define _Lintra_ and _Linter_ as follows:
+
+**==> picture [342 x 52] intentionally omitted <==**
+
+where _N_ represents the number of samples in the domain _X_ and _C_ ( _·_ ) calculates the centroids of the sub-domains, _δij_ = 1 only if _xi_ and _xj_ have the same label; otherwise, _δij_ = 0. We use the ground truth label or the predicted label if _x_ is in source domain or target domain, respectively. _m_ is a predefined distance controlling how separated each sub-domain should be. _Dij_ = _∥fE_ ( _xi_ ) _− fE_ ( _xj_ ) _∥_[2] represents distance between _xi_ and _xj_ .
+
+## 6 EXPERIMENTS
+
+In this section, we verify our theoretical results and assess DARSA’s efficacy through real-world experiments. We begin by empirically confirming the superiority of the sub-domain-based generalization bound (Theorem 4.10) in Section 6.1. Then, we verify that the assumptions for Theorem 4.10 are empirically satisfied on real-world datasets (details in Appendix C). Next, we demonstrate the vital role of subdomain weight re-balancing in Section 6.2 and show DARSA’s robustness to minor weight estimation discrepancies. Lastly, given that our theoretical analysis guarantees that DARSA should have competitive performance in scenarios where the number of classes is not overwhelming, we evaluate DARSA on real-world datasets with this property. Comparing with other state-of-the-art UDA baselines, we verify the correctness of our analysis as well as an advantage of DARSA that its strong performance can be guaranteed on particular real-world applications such as those in medical and operations research. We base the following confirmatory experiments on two sets of datasets.
+
+**Experiments on the Digits Datasets.** In our Digits datasets experiments, we evaluate our performance across four datasets: MNIST (M) (LeCun et al., 1998), MNIST-M (MM) (Ganin et al., 2016), USPS (U), and SVHN (S), all modified to induce label distribution shifts. Here, the parameter _α_ denotes the class imbalance rate, representing a ratio such as 1: _α_ and _α_ :1 for the odd:even distribution in the source and target datasets, respectively. Weak and strong imbalance correspond to _α_ = 3 and _α_ = 8. For comprehensive details, refer to Appendix G.
+
+**Experiments on the TST Dataset.** We use the Tail Suspension Test (TST) dataset (Gallagher et al., 2017) of local field potentials (LFPs) from 26 mice with two genetic backgrounds: Clock-∆19 (a bipolar disorder model) and wildtype. This dataset is publicly available (Carlson et al., 2023). Our
+
+> 1The code to replicate all experiments is available at: [URL removed] DARSA/
+
+7
+
+**==> picture [112 x 108] intentionally omitted <==**
+
+**==> picture [116 x 107] intentionally omitted <==**
+
+**==> picture [220 x 10] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Domain Discrepancy (b) Source Classification Loss **----- End of picture text -----**
+
+Figure 3: For MNIST to MNIST-M task under weak imbalance. (a) Compare the domain discrepancy term ( _LD_ ) in our proposed bound to that in Theorem 4.1. (b) Compare the source classification term ( _LY_ ) in our proposed bound to that in Theorem 4.1
+
+study involves two domain adaptation tasks, predicting the current condition - home cage (HC), open field (OF), or tail-suspension (TS) - from one genotype to the other. We subsample datasets to induce label distribution shifts with imbalance rate = 2. For comprehensive details, refer to Appendix H.
+
+## 6.1 EMPIRICAL ANALYSIS OF OUR PROPOSED GENERALIZATION BOUND
+
+We first verify the pivotal result in Theorem 4.10 that the sub-domain based generalization bound is at least as tight as the the non-sub-domain bound. We empirically evaluate the proposed bound on the Digits datasets under weak imbalance. As shown in Figure 3, our empirical results demonstrate that the sub-domain-based generalization bound in Theorem 4.5 is empirically much stronger than the non-sub-domain-based bound in Theorem 4.1, corroborating our insights for the effectiveness of sub-domain based methods. Additional experiments on the other UDA tasks in the Digits datasets under weak and strong imbalance also support this claim, and full results are in Appendix G.2.
+
+## 6.2 IMPORTANCE OF RE-WEIGHTING
+
+Here, we experiment on the Digits datasets under weak imbalance to demonstrate the importance of ( _i_ ) weights re-weighting and ( _ii_ ) the accuracy of target sub-domain weights estimation. We compare DARSA with one variation of DARSA which employs uniform weights for all sub-domains and another variation which swaps sub-domain weights estimation of source with target. We also include two other baselines where the weights of the target domain are chosen to be deviating from the truth. Specifically, we compare DARSA with the following configurations:
+
+- DARSA: Full algorithm where weights are inferred.
+
+- DARSA Oracle: Utilizing true values of _wT[k]_
+
+ - _T_[.]
+
+- DARSA Small Divergence: Setting _wT[k]_[to be 20% divergent from true values.]
+
+- DARSA Large Divergence: Setting _wT[k]_[to be 50% divergent from true values.]
+
+- • DARSA Flip: Swapping _wT[k]_[with] _[ w] S[k]_[, effectively flipping importance weighting.]
+
+- DARSA Uniform: Assigning uniform weights for all sub-domains.
+
+The results of these experiments are in Table 1. We verify the importance of subdomain weights rebalancing by showing that the performance of DARSA degrades significantly without the weights rebalancing or wrong sub-domain weights, further corroborating the value of our insights. Aditionally, while the oracle case provides the best performance, inferring the weights in the DARSA algorithm provides nearly the same quality of predictions. In addition, we found our method, DARSA is robust to minor divergence in weights estimation and varying imbalance rates.
+
+## 6.3 DARSA ON REAL-WORLD DATASETS
+
+We now compare DARSA with many competing algorithms on these two datasets. Full details on the experiments, the rationale for competing algorithms choices, and their settings are in Appendix G and Appendix H for the Digits and TST datasets, respectively.
+
+8
+
+Table 1: Evaluation of the importance of re-weighting on Digits datasets under weak imbalance. Performance is measured by prediction accuracy (%) on the target domain.
+
+||M_→_MM MM_→_M U_→_M S_→_M|
+|---|---|
+|DARSA Oracle DARSA Uniform DARSA Small Divergence DARSA Large Divergence DARSA Flip|**96.2** 98.4 **92.7** **92.6** 67.9 96.6 75.9 71.7 95.6 98.3 91.4 92.4 85.0 98.2 86.1 85.2 55.7 65.7 57.4 65.7|
+|DARSA|96.0 **98.8** 92.6 90.1|
+
+Table 2: Summary of UDA results on the Digits datasets with shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
+
+||M_→_MM _α_= 3 MM_→_M _α_= 3 U_→_M _α_= 3 S_→_M _α_= 3 M_→_MM _α_= 8 MM_→_M _α_= 8 U_→_M _α_= 8 S_→_M _α_= 8|
+|---|---|
+|DANN (Ganin et al., 2016) DSN (Bousmalis et al., 2016) ADDA (Tzeng et al., 2017) pixelDA(Bousmalis et al., 2017) CDAN (Long et al., 2018) WDGRL (Shen et al., 2018) MCD (Saito et al., 2018) CAT (Deng et al., 2019) MDD (Zhang et al., 2019) DRANet (Lee et al., 2021) Source Only|63.1 93.0 59.8 64.9 61.1 90.2 49.1 57.3 62.3 98.4 59.9 15.2 57.5 95.3 30.3 17.8 88.2 90.7 44.8 42.4 47.9 89.4 45.7 45.3 95.0 96.0 72.0 68.0 **81.0** 95.6 29.2 60.4 58.7 96.0 42.0 38.3 37.1 90.6 34.8 32.5 60.4 93.6 63.9 64.3 22.3 91.4 46.7 52.2 58.1 98.2 74.6 75.5 37.4 **97.5** 76.1 66.7 54.1 95.4 81.0 65.8 48.9 93.8 61.3 62.2 48.7 97.7 82.3 62.4 47.6 93.6 83.2 64.5 95.2 97.8 86.5 40.2 63.3 96.1 54.2 31.3 47.9 91.5 40.8 53.7 39.6 88.4 27.8 47.2|
+|DARSA|**96.0** **98.8** **92.6** **90.1** 78.8 97.3 **87.9** **83.5**|
+
+**Digits.** Results shown in Table 2 demonstrates DARSA’s competitiveness in handling label shifting. Additionally, DARSA performs well with varying imbalance rates (Appendix Table 5) and competes favorably in scenarios without label distribution shifts (Appendix Table 7).
+
+**TST.** As demonstrated in Table 3, DARSA achieves competitive performance on this biologically relevant task. For comprehensive experimental details, refer to Appendix H.
+
+Table 3: Summary of UDA results on the TST datasets with shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
+
+||DANN WDGRL DSN ADDA CAT CDAN Source only **DARSA**|
+|---|---|
+|Clock-∆19 to Wildtype Wildtype to Clock-∆19|79.9 79.6 79.4 75.1 77.3 75.0 73.8 **86.6** 81.5 79.5 80.9 72.6 78.6 73.6 70.4 **84.8**|
+
+**Ablation.** To assess the impact of each component within our objective function (Section 5), we conduct an ablation study under weak imbalance. Due to space constraint, the results of this investigation are detailed in Appendix G.6. The ablation analysis confirms that each component in our objective function contributes to the overall performance. Therefore, we recommend the use of all components for optimal results. In addition, we have included feature space visualizations in Appendix E and Appendix Figure 9 which demonstrate that the learned representation of DARSA has improved separation when using all the components, supporting the effectiveness of the proposed objective function.
+
+## 7 CONCLUSION
+
+Sub-domain-based algorithms have demonstrated considerable empirical success across various applications in domain adaptation. However, a comprehensive theoretical understanding of their advantages had been elusive. This work addresses this gap and presents a substantial contribution by providing a rigorous theoretical perspective on the benefits of sub-domain-based methods, thereby potentially enhancing their overall impact in the field. Moreover, our analysis leads to an algorithm DARSA with improved robustness to the shift of sub-domain weights and label distributions.
+
+9
+
+## REPRODUCIBILITY STATEMENT
+
+Rigorous definitions and complete proofs of our theoretical analysis are included in the Appendix B, with empirical evidence to verify assumptions in Appendix C. The code to replicate all experiments is available at: [URL removed] Full details on the experiments, competing algorithms, and their settings are in Appendix G and Appendix H for the Digits and TST dataset, respectively. The MNIST, BSDS500, USPS, and SVHN datasets are publicly available with an open-access license. The Tail Suspension Test (TST) dataset (Gallagher et al., 2017) is available to download at [URL removed] concern/datasets/zc77sr31x?locale=en for free under a Creative Commons BY-NC Attribution-NonCommercial 4.0 International license. The experiments are conducted on a computer cluster equipped with a NVIDIA GeForce RTX 2080 Ti that has a memory capacity of 11019MiB.
+
+## REFERENCES
+
+- Isabela Albuquerque, Jo˜ao Monteiro, Tiago H Falk, and Ioannis Mitliagkas. Adversarial targetinvariant representation learning for domain generalization. _arXiv preprint arXiv:1911.00804_ , 8, 2019.
+
+- Pablo Arbelaez, Michael Maire, Charless Fowlkes, and Jitendra Malik. Contour detection and hierarchical image segmentation. _IEEE transactions on pattern analysis and machine intelligence_ , 33(5):898–916, 2010.
+
+- Eytan Bakshy, Max Balandat, and Kostya Kashin. Open-sourcing ax and botorch: New ai tools for adaptive experimentation. _URL [URL removed] facebook. com/blog/open-sourcing-ax-and-botorchnew-ai-tools-for-adaptive-experimentation_ .
+
+- Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. _Advances in neural information processing systems_ , 19, 2006.
+
+- Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. _Machine learning_ , 79(1):151–175, 2010.
+
+- Gilles Blanchard, Aniket Anand Deshmukh, Urun Dogan, Gyemin Lee, and Clayton Scott.[¨] Domain generalization by marginal transfer learning. _The Journal of Machine Learning Research_ , 22(1): 46–100, 2021.
+
+- Karsten M Borgwardt, Arthur Gretton, Malte J Rasch, Hans-Peter Kriegel, Bernhard Sch¨olkopf, and Alex J Smola. Integrating structured biological data by kernel maximum mean discrepancy. _Bioinformatics_ , 22(14):e49–e57, 2006.
+
+- Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. _Advances in neural information processing systems_ , 29, 2016.
+
+- Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 3722–3731, 2017.
+
+- David Carlson, Sunil Kumar, and Kafui Dzirasa. Multi-region local field potential recordings during a tail-suspension test. _Duke Research Data Repository_ , 2023.
+
+- Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. _Advances in neural information processing systems_ , 26, 2013.
+
+- Julie Delon and Agnes Desolneux. A wasserstein-type distance in the space of gaussian mixture models. _SIAM Journal on Imaging Sciences_ , 13(2):936–970, 2020.
+
+- Zhijie Deng, Yucen Luo, and Jun Zhu. Cluster alignment with a teacher for unsupervised domain adaptation. In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 9944–9953, 2019.
+
+10
+
+- Sofien Dhouib, Ievgen Redko, and Carole Lartizien. Margin-aware adversarial domain adaptation with optimal transport. In _International conference on machine learning_ , pp. 2514–2524. PMLR, 2020.
+
+- Abolfazl Farahani, Sahar Voghoei, Khaled Rasheed, and Hamid R Arabnia. A brief review of domain adaptation. _Advances in data science and information engineering_ , pp. 877–894, 2021.
+
+- Nicolas Fournier and Arnaud Guillin. On the rate of convergence in wasserstein distance of the empirical measure. _Probability Theory and Related Fields_ , 162(3):707–738, 2015.
+
+- Neil Gallagher, Kyle R Ulrich, Austin Talbot, Kafui Dzirasa, Lawrence Carin, and David E Carlson. Cross-spectral factor analysis. _Advances in neural information processing systems_ , 30, 2017.
+
+- Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In _International conference on machine learning_ , pp. 1180–1189. PMLR, 2015.
+
+- Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, Franc¸ois Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. _The journal of machine learning research_ , 17(1):2096–2030, 2016.
+
+- Boyan Gao, Yongxin Yang, Henry Gouk, and Timothy M Hospedales. Deep clustering for domain adaptation. In _ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 4247–4251. IEEE, 2020.
+
+- Pascal Germain, Amaury Habrard, Franc¸ois Laviolette, and Emilie Morvant. A new pac-bayesian perspective on domain adaptation. In _International conference on machine learning_ , pp. 859–868. PMLR, 2016.
+
+- Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. _Advances in neural information processing systems_ , 30, 2017.
+
+Mahta HassanPour Zonoozi and Vahid Seydi. A survey on adversarial domain adaptation. _Neural Processing Letters_ , pp. 1–41, 2022.
+
+- Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In _International conference on machine learning_ , pp. 1989–1998. Pmlr, 2018.
+
+- Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 1125–1134, 2017.
+
+- Xiang Jiang, Qicheng Lao, Stan Matwin, and Mohammad Havaei. Implicit class-conditioned domain alignment for unsupervised domain adaptation. In _International Conference on Machine Learning_ , pp. 4816–4827. PMLR, 2020.
+
+Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. _Proceedings of the IEEE_ , 86(11):2278–2324, 1998.
+
+- Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In _Workshop on challenges in representation learning, ICML_ , volume 3, pp. 896, 2013.
+
+- Seunghun Lee, Sunghyun Cho, and Sunghoon Im. Dranet: Disentangling representation and adaptation networks for unsupervised cross-domain adaptation. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 15252–15261, 2021.
+
+- Benjamin Letham, Brian Karrer, Guilherme Ottoni, and Eytan Bakshy. Constrained bayesian optimization with noisy experiments. 2019.
+
+- Guangrui Li, Guoliang Kang, Yi Zhu, Yunchao Wei, and Yi Yang. Domain consensus clustering for universal domain adaptation. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 9757–9766, 2021a.
+
+11
+
+- Jichang Li, Guanbin Li, Yemin Shi, and Yizhou Yu. Cross-domain adaptive clustering for semisupervised domain adaptation. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 2505–2514, 2021b.
+
+- Xiaomeng Li, Lequan Yu, Hao Chen, Chi-Wing Fu, Lei Xing, and Pheng-Ann Heng. Transformation-consistent self-ensembling model for semisupervised medical image segmentation. _IEEE Transactions on Neural Networks and Learning Systems_ , 32(2):523–534, 2020.
+
+- Yitong Li, David E Carlson, et al. Extracting relationships by multi-domain matching. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Kevin J Liang, Chunyuan Li, Guoyin Wang, and Lawrence Carin. Generative adversarial network training is a continual learning problem. _arXiv preprint arXiv:1811.11083_ , 2018.
+
+- Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Coupled generative adversarial networks. _arXiv preprint arXiv:1606.07536_ , 2016.
+
+- Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In _International conference on machine learning_ , pp. 97–105. PMLR, 2015.
+
+- Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. _Advances in neural information processing systems_ , 31, 2018.
+
+- Le Lu, Yefeng Zheng, Gustavo Carneiro, and Lin Yang. Deep learning and convolutional neural networks for medical image computing. _Advances in computer vision and pattern recognition_ , 10:978–3, 2017.
+
+- Yulong Lu and Jianfeng Lu. A universal approximation theorem of deep neural networks for expressing probability distributions. _Advances in neural information processing systems_ , 33:3094–3105, 2020.
+
+- Yucen Luo, Jun Zhu, Mengxi Li, Yong Ren, and Bo Zhang. Smooth neighbors on teacher graphs for semi-supervised learning. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 8896–8905, 2018.
+
+- Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation: Learning bounds and algorithms. _arXiv preprint arXiv:0902.3430_ , 2009.
+
+- Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Multiple source adaptation and the r´enyi divergence. _arXiv preprint arXiv:1205.2628_ , 2012.
+
+- Papers with Code. Domain Adaptation. [URL removed] domain-adaptation, 2023. Online; accessed 24-Sept-2023.
+
+- Kuan-Chuan Peng, Ziyan Wu, and Jan Ernst. Zero-shot deep domain adaptation. In _Proceedings of the European Conference on Computer Vision (ECCV)_ , pp. 764–781, 2018.
+
+- Pedro O Pinheiro. Unsupervised domain adaptation with similarity learning. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 8004–8013, 2018.
+
+- Ievgen Redko, Amaury Habrard, and Marc Sebban. Theoretical analysis of domain adaptation with optimal transport. In _Joint European Conference on Machine Learning and Knowledge Discovery in Databases_ , pp. 737–753. Springer, 2017.
+
+- Tim Sainburg, Leland McInnes, and Timothy Q Gentner. Parametric umap embeddings for representation and semisupervised learning. _Neural Computation_ , 33(11):2881–2907, 2021.
+
+- Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 3723–3732, 2018.
+
+- Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Learning from synthetic data: Addressing domain shift for semantic segmentation. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 3752–3761, 2018.
+
+12
+
+- Jian Shen, Yanru Qu, Weinan Zhang, and Yong Yu. Wasserstein distance guided representation learning for domain adaptation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 32, 2018.
+
+- Yuan Shi and Fei Sha. Information-theoretical learning of discriminative clusters for unsupervised domain adaptation. _arXiv preprint arXiv:1206.6438_ , 2012.
+
+- Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. _Advances in neural information processing systems_ , 30, 2017.
+
+- Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 30, 2016.
+
+- Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. _arXiv preprint arXiv:1412.3474_ , 2014.
+
+- Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In _Proceedings of the IEEE international conference on computer vision_ , pp. 4068–4076, 2015.
+
+- Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 7167–7176, 2017.
+
+- Eric Tzeng, Coline Devin, Judy Hoffman, Chelsea Finn, Pieter Abbeel, Sergey Levine, Kate Saenko, and Trevor Darrell. Adapting deep visuomotor representations with weak pairwise constraints. In _Algorithmic Foundations of Robotics XII_ , pp. 688–703. Springer, 2020.
+
+- C´edric Villani. _Optimal transport: old and new_ , volume 338. Springer, 2009.
+
+- Haohan Wang, Zeyi Huang, Hanlin Zhang, Yong Jae Lee, and Eric P Xing. Toward learning humanaligned cross-domain robust models by countering misaligned features. In _Uncertainty in Artificial Intelligence_ , pp. 2075–2084. PMLR, 2022.
+
+- Mei Wang and Weihong Deng. Deep visual domain adaptation: A survey. _Neurocomputing_ , 312: 135–153, 2018.
+
+- Thomas Westfechtel, Hao-Wei Yeh, Qier Meng, Yusuke Mukuta, and Tatsuya Harada. Backprop induced feature weighting for adversarial domain adaptation with iterative label distribution alignment. In _Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision_ , pp. 392–401, 2023.
+
+- Yuchen Zhang, Tianle Liu, Mingsheng Long, and Michael Jordan. Bridging theory and algorithm for domain adaptation. In _International conference on machine learning_ , pp. 7404–7413. PMLR, 2019.
+
+- Han Zhao, Shanghang Zhang, Guanhang Wu, Jos´e MF Moura, Joao P Costeira, and Geoffrey J Gordon. Adversarial multiple source domain adaptation. _Advances in neural information processing systems_ , 31, 2018.
+
+13
+
+## APPENDIX
+
+## A RELATED WORK
+
+**Discrepancy-based Domain Adaptation.** UDA commonly tries to reduce the distribution gap between the source and target domains. One approach to achieve this is discrepancy-based methods in the extract feature space (Tzeng et al., 2014; Long et al., 2015; Sun et al., 2016), which often use maximum mean discrepancy (MMD) (Borgwardt et al., 2006). While MMD is a well-known Reproducing Kernel Hilbert Space (RKHS) metric, it is weaker than the Wasserstein-1 distance (Lu & Lu, 2020). Therefore, we use Wasserstein-1 distance in our work. Futhermore, many discrepancy-based methods enforce the sharing of the first few layers of the networks between the source and target domains (HassanPour Zonoozi & Seydi, 2022). In contrast, our method allows a more flexible feature space.
+
+**Adversarial-based Domain Adaptation.** Adversarial-based domain adaptation methods aim to encourage domain similarity through adversarial learning (Shen et al., 2018; Liu et al., 2016; Isola et al., 2017; Tzeng et al., 2015; 2017; 2020; Ganin & Lempitsky, 2015; Ganin et al., 2016; Peng et al., 2018; Hoffman et al., 2018). These methods are divided into generative methods, which combine discriminative models with a generating process, and non-generative methods, which use a domain confusion loss to learn domain-invariant discriminative features (Wang & Deng, 2018). However, many existing algorithms fail to align multi-modal distributions under label shifting scenarios. Additionally, training adversarial networks can be challenging due to mode collapse and oscillations (Liang et al., 2018).
+
+**Sub-domain-based Domain Adaptation.** The use of sub-domain adaptation has proven effective in aligning multi-modal distributions, enhancing performance across various tasks (Deng et al., 2019; Long et al., 2018; Pinheiro, 2018; Shi & Sha, 2012; Jiang et al., 2020; Snell et al., 2017). (Deng et al., 2019) introduces the Cluster Alignment with a Teacher (CAT) approach that aligns class-conditional structures across domains. (Long et al., 2018) offers conditional adversarial domain adaptation, enhancing alignment through classifier predictions. (Pinheiro, 2018) proposes an unsupervised domain adaptation approach based on similarity learning, wherein classification is conducted by computing similarities between target domain images and prototype representations of each category. On the other hand, (Shi & Sha, 2012) introduces a method that concurrently learns domain-invariant features and classifiers. (Jiang et al., 2020) elucidates a sampling-based implicit alignment technique, addressing concerns of class imbalance. (Snell et al., 2017) presents prototypical networks designed for few-shot classification, employing distances to class prototype representations for the process. While these methods have demonstrated empirical success, a detailed theoretical perspective on the benefits of incorporating sub-domain structures has yet to be fully explored. Our work aims to complement these existing methodologies by providing a comprehensive theoretical understanding of the advantages inherent in these structures. We believe that such a theoretical perspective, when coupled with the already proven practical success of these methods, holds the potential to further enhance their overall impact on the field.
+
+**Theoretical Analysis of Domain Adaptation.** Many existing domain adaptation methods are inspired by generalization bounds based on the _H_ -divergence (Ben-David et al., 2006). The _H_ - divergence (Ben-David et al., 2006) is a modified version of the total variation distance ( _L_ 1) that restricts the hypothesis to a given class. These generalization bounds can be estimated by learning a domain classifier with a finite Vapnik–Chervonenkis (VC) dimension. However, this results in a loose bound for most neural networks (Li et al., 2018). In our method, we use the Wasserstein distance for two reasons. First, the Wasserstein-1 distance is bounded above by the total variation distance (Ben-David et al., 2010). Additionally, the Wasserstein-1 distance is bounded above by the Kullback-Leibler divergence (a special case of the R´enyi divergence when _α_ goes to 1 (Fournier & Guillin, 2015)), giving stronger bounds than those presented by Redko et al (Redko et al., 2017) and Mansour et al (Mansour et al., 2012). Additionally, the Wasserstein distance has stable gradients even when the compared distributions are far apart (Gulrajani et al., 2017).
+
+**Additional Theoretical Analysis of Domain Adaptation.** Our work contributes to the understanding and improvement of sub-domain alignment methods, a type of popular but yet to be rigorously investigated domain adaptation method. In contrast to our work, (Mansour et al., 2009) studies the adaptation performance of various loss functions and models; (Dhouib et al., 2020) focuses on
+
+14
+
+the margin violation rate; (Wang et al., 2022) addresses the problem of learning features that align with human understanding of data; (Zhang et al., 2019) proposes generalization theory for classifiers with scoring function and margin loss; (Germain et al., 2016) studies the generalization theory for the weighted majority vote framework; (Blanchard et al., 2021; Albuquerque et al., 2019; Zhao et al., 2018) focus on the setting with multiple source domain.
+
+## B DEFINITIONS AND PROOFS
+
+**Definition B.1.** For some _K ≥_ 0, the set of _K_ -Lipschitz functions denotes the set of functions _f_ that verify:
+
+**==> picture [174 x 12] intentionally omitted <==**
+
+In the coming proofs, we assume that the hypothesis class H is a subset of _λH_ -Lipschitz functions, where _λH_ is a positive constant, and we assume that the true labeling functions are _λ_ -Lipschitz for some positive real number _λ_ .
+
+**Definition B.2.** For a distribution _D_ , we define the discrepancy between two functions _f_ and _g_ as:
+
+_γD_ ( _f, g_ ) = E _x∼D_ [ _|f_ ( _x_ ) _− g_ ( _x_ ) _|_ ]
+
+We use _gT_ and _gS_ to represent the true labeling functions of the target and source domains, respectively. We use _γS_ ( _f_ ) = _[.] γPS_ ( _f, gS_ ) and _γT_ ( _f_ ) = _[.] γPT_ ( _f, gT_ ) to respectively denote the discrepancies of a hypothesis _f_ to the true labeling function for the source and target domains.
+
+**Definition B.3.** For a distribution _D_ that can be represented as mixture of _K_ sub-distribution, we define the discrepancy between two functions _f_ and _g_ as:
+
+**==> picture [140 x 12] intentionally omitted <==**
+
+where we use _D[k]_ to represent the distribution of the _k_ -th sub-distribution.
+
+We use _PS[k]_[/] _[P] T[ k]_[to represent the distribution of the] _[ k]_[-th subdomain of the source domain/target do-] main respectively. Thus we can use _γS[k]_[(] _[f]_[)][=] _[.][γ] PS[k]_[(] _[f, g][S]_[)][ and] _[ γ] T[k]_[(] _[f]_[)][=] _[.][γ] PT[k]_[(] _[f, g][T]_[ )][ to respectively] denote the discrepancies of a hypothesis _f_ to the true labeling function of the _k_ -th subdomain of the source domain and that of the target domain. **Theorem B.4** (Overall Generalization Bound, extending Li et al. (2018) Theorem A.8) **.** _For a hypothesis f_ : _X →_ [0 _,_ 1] _,_
+
+**==> picture [292 x 12] intentionally omitted <==**
+
+_where γ[⋆]_ = min _f ∈_ H _[γ][S]_[(] _[f]_[)+] _[γ][T]_[ (] _[f]_[)] _[,]_[ H] _[ is a hypothesis class included in the set of][ λ][H][-Lipschitz functions,] and the true functions gT and gS are both λ-Lipschitz functions (as defined in Definition B.1)._
+
+_Proof._ For a hypothesis _f_ : _X →_ [0 _,_ 1] with _f ∈_ H, we have that
+
+**==> picture [363 x 11] intentionally omitted <==**
+
+And then bound the RHS by taking the absolute value of differences:
+
+**==> picture [376 x 25] intentionally omitted <==**
+
+As stated in Li et al. (2018), the first two terms proceed exactly as in Ben-David et al. (2010); further derivations are not provided here. We next provide an upper bound for the last term. Let _PS_ and _PT_ be the densities of _XS_ and _XT_ , respectively.
+
+**==> picture [339 x 26] intentionally omitted <==**
+
+Since our hypothesis class H is assumed to be _λH_ -Lipschitz and the true labeling functions are _λ_ - Lipschitz, we have that for every function _f ∈_ H, _h_ : _x �→|f_ ( _x_ ) _− gT_ ( _x_ ) _|_ is _λ_ + _λH_ -Lipschitz and it takes its values in [0 _,_ 1]. Therefore,
+
+**==> picture [362 x 49] intentionally omitted <==**
+
+15
+
+Note that due to the symmetric nature of the function space, i.e., if _h_ is K-Lipschitz then _−h_ is K-Lipschitz, we can just pick either side to lead with and drop the absolute value, yielding
+
+**==> picture [304 x 11] intentionally omitted <==**
+
+Following the Theorem 2 of Ben-David et al. (2010), we can also easily bound the target error _γPT_ ( _f, gT_ ) by: _γPT_ ( _f, gT_ ) _≤ γPS_ ( _f, gS_ ) + ( _λ_ + _λH_ ) _W_ 1( _PS, PT_ ) + _γ[⋆]_ (24) where _γ[⋆]_ = min _f ∈_ H _γPS_ ( _f, gS_ ) + _γPT_ ( _f, gT_ ).
+
+For succinctness and clarity of the following analysis in this work, as defined in Definition B.2, we express equation 18 as:
+
+**==> picture [292 x 11] intentionally omitted <==**
+
+where _γ[⋆]_ = min _f ∈_ H _[γ][S]_[(] _[f]_[) +] _[ γ][T]_[ (] _[f]_[)]
+
+**Lemma B.5** (Decomposition of the Classification Error) **.** _For any hypothesis f ∈_ H _,_
+
+**==> picture [245 x 66] intentionally omitted <==**
+
+_Proof._ As stated in Section 3, we assume that both _XS_ and _XT_ are mixtures of _K_ sub-domains. In other words, we have _PS_ =[�] _[K] k_ =1 _[w] S[k][P][ k] S_[and] _[P][T]_[=][�] _[K] k_ =1 _[w] T[k][P][ k] T_[where][we][use] _[P][ k] S_[and] _[P][ k] T_ to represent the distribution of the _k_ -th subdomain of the source domain and that of the target domain respectively and _wS[k]_[and] _[ w] T[k]_[correspond to the weights of each sub-domain in the respective] domains.
+
+We can write out _γS_ ( _f_ ) = _γPS_ ( _f, gS_ ) as sub-domain specific component.
+
+**==> picture [281 x 227] intentionally omitted <==**
+
+With similar proof, we have:
+
+**==> picture [318 x 30] intentionally omitted <==**
+
+16
+
+**Theorem B.6** (Sub-domain-based Generalization Bound) **.**
+
+**==> picture [324 x 30] intentionally omitted <==**
+
+_Proof._
+
+**==> picture [326 x 65] intentionally omitted <==**
+
+We next show that, under reasonable assumptions, the weighted sum of distances between corresponding sub-domains of the source and target domains is at most as large as the distance between the marginal distribution of the source domain and that of the target domain.
+
+First we define a Wasserstein-like distance between Gaussian Mixture Models in Definition B.7, which uses Wasserstein-1 distance that extends the Proposition 4 of Delon & Desolneux (2020).
+
+**Definition B.7.** (Wasserstein-like distance between Gaussian Mixture Models) Assume that both _XS_ and _XT_ are mixtures of _K_ sub-domains. In other words, we have _PS_ =[�] _[K] k_ =1 _[w] S[k][P][ k] S_[and] _PT_ =[�] _[K] k_ =1 _[w] T[k][P][ k] T_[where][we][use] _[P][ k] S_[and] _[P][ k] T_[to][represent][the][distribution][of][the] _[k]_[-th][subdomain] of the source domain and that of the target domain respectively and _wS[k]_[and] _[ w] T[k]_[correspond to the] weights of each sub-domain in the respective domains. We define:
+
+**==> picture [317 x 31] intentionally omitted <==**
+
+where **wS** = [ _[.] wS_[1] _[, . . . , w] S[K]_[]][ and] **[ w][T]**[= [] _[.][w] T_[1] _[, . . . , w] T[K]_[]][ belong to][ ∆] _[K]_[(the] _[ K][−]_[1][ probability simplex).] Π( _wS, wT_ ) represents the simplex ∆ _[K][×][K]_ with marginals **wS** and **wT** .
+
+To demonstrate that _MW_ 1 is less or equal to the sum of _W_ 1 and a term that is dependent on the trace of the covariance matrices of two Gaussian mixtures (extend the proof of Delon & Desolneux (2020)), we start with a lemma. This lemma makes more explicit the distance _MW_ 1 between a Gaussian mixture and a mixture of Dirac distributions.
+
+**Lemma B.8** (Extension to Lemma 4.1 of Delon & Desolneux (2020)) **.** _Let µ_ 0 =[�] _[K] k_ =1[0] _[π]_ 0 _[k][µ][k]_ 0 _[with] µ[k]_ 0[=] _[N]_[(] _[m][k]_ 0 _[,]_[ Σ] _[k]_ 0[)] _[ and][ µ]_[1][=][�] _[K] k_ =1[1] _[π]_ 1 _[k][δ] m[k]_ 1 _[.][Let][µ]_[˜][0][=][�] _[K] k_ =1[0] _[π]_ 0 _[k][δ] m[k]_ 0 _[(][µ]_[ ˜][0] _[only retains the means of] µ_ 0 _). Then,_
+
+**==> picture [198 x 30] intentionally omitted <==**
+
+**==> picture [381 x 12] intentionally omitted <==**
+
+17
+
+_Proof._
+
+**==> picture [337 x 153] intentionally omitted <==**
+
+_Remark_ B.9 _._ We use _µ_ 0, _µ_ 1, and _µ_ ˜0 to represent a general scenario for measuring the distance between a Gaussian mixture and a mixture of Diract distributions. In the following proofs, we will utilize the defined notation. For instance, _µ_ 0 can be denoted as _PS_ , while _µ_ ˜0 corresponds to _P_[˜] _S_ .
+
+**Theorem B.10** (Extension to Proposition 6 in (Delon & Desolneux, 2020)) **.** _Let PS and PT be two Gaussian mixtures with PS_ =[�] _[K] k_ =1 _[w] S[k][P][ k] S[and][P][T]_[=][�] _[K] k_ =1 _[w] T[k][P][ k] T[.][For][all][k][,][P][ k] S[/][P][ k] T[are] Gaussian distributions with mean m[k] S[/][ m][k] T[and covariance]_[ Σ] _[k] S[/]_[ Σ] _[k] T[.][If for][ ∀][k,][ k][′][, we assume there] exists a small constant ϵ >_ 0 _, such that_ max _k_ ( _trace_ (Σ _[k] S_[))] _[ ≤][ϵ][ and]_[ max] _[k][′]_[(] _[trace]_[(Σ] _T[k][′]_[))] _[ ≤][ϵ][.][then:]_
+
+**==> picture [276 x 12] intentionally omitted <==**
+
+_Proof._ Here, we follow the same structure of the proof for Wassertein-2 in Delon & Desolneux (2020). Let ( _PS[n]_[)] _[n]_[ and][ (] _[P][ n] T_[)] _[n]_[ be two sequences of mixtures of Dirac masses respectively converging] to _PS_ and _PT_ in _P_ 1(R _[d]_ ). Since _MW_ 1 is a distance,
+
+**==> picture [288 x 25] intentionally omitted <==**
+
+We can study the limits of these three terms when n _→_ + _∞_
+
+First, observe that _MW_ 1( _PS[n][, P] T[ n]_[)][=] _[W]_[1][(] _[P][ n] S[, P] T[ n]_[)] _→_[is continuous on] _n→_ + _∞[W]_[1][(] _[P][S][, P][T]_[ )][ since] _[ W]_[1] _P_ 1(R _[d]_ ).
+
+Second, based on Lemma B.8, we have that
+
+**==> picture [372 x 30] intentionally omitted <==**
+
+We observe that _x �→[√] x_ is a concave function, thus by Jensen’s inequality, we have that
+
+**==> picture [152 x 37] intentionally omitted <==**
+
+Also By Jensen’s inequality, we have that,
+
+**==> picture [118 x 12] intentionally omitted <==**
+
+And from Proposition 6 in (Delon & Desolneux, 2020), we have
+
+**==> picture [134 x 37] intentionally omitted <==**
+
+18
+
+Similarly for _MW_ 1( _PT , PT[n]_[)][ the same argument holds.][Therefore we have,]
+
+And
+
+**==> picture [174 x 88] intentionally omitted <==**
+
+We can conclude that:
+
+**==> picture [322 x 71] intentionally omitted <==**
+
+This concludes the proof.
+
+**Theorem B.11** (Sub-domain Alignment Can Improve Domain Alignment) **.** _If the following assumptions hold:_
+
+_**A1.** For all k, PS[k][/][ P][ k] T[are Gaussian distributions with mean][ m][k] S[/][ m][k] T[and covariance]_[ Σ] _[k] S[/]_[ Σ] _[k] T[.]_ _**A2.** Distance between the paired source-target sub-domain is less or equal to distance between the non-paired source-target sub-domain, i.e., W_ 1( _PS[k][, P] T[ k]_[)] _[ ≤][W]_[1][(] _[P][ k] S[, P] T[ k][′]_[)] _[ for][ k]_[=] _[ k][′][.]_ _**A3.** There exists a small constant ϵ >_ 0 _, such that_ max _S_[))] _[≤][ϵ][ and]_[max] _T_[))] _[≤][ϵ][.]_ 1 _≤k≤K_[(] _[tr]_[(Σ] _[k]_ 1 _≤k≤K_[(] _[tr]_[(Σ] _[k][′]_
+
+_Then the following inequality holds:_
+
+**==> picture [177 x 14] intentionally omitted <==**
+
+_where δc is_ 4 _[√] ϵ._
+
+_Proof._ With _w ∈_ Π( **wS** _,_ **wT** ), we can write out _wT[k]_[as][ �] _[K] k[′]_ =1 _[w][k,k][′]_[, then based on assumption A.2,] we have:
+
+Thus we have,
+
+**==> picture [326 x 135] intentionally omitted <==**
+
+Also we prove in Theorem B.10 that:
+
+**==> picture [156 x 11] intentionally omitted <==**
+
+Then we conclude our proof and show that:
+
+**==> picture [323 x 30] intentionally omitted <==**
+
+19
+
+**Theorem B.12.** _Let_ H = _[.] {f |f_ : _X →_ [0 _,_ 1] _} denote a hypothesis space. Under the Assumptions in Theorem 4.7(or Theorem B.11), if the following assumption hold for all f ∈_ H _:_
+
+_then we have_
+
+**==> picture [271 x 40] intentionally omitted <==**
+
+_Further, let_
+
+**==> picture [339 x 43] intentionally omitted <==**
+
+_denote the general generalization bound without any sub-domain information. We have for all f , ϵc_ ( _f_ ) _≤ ϵg_ ( _f_ ) + _δc_
+
+_where δc is_ 4 _[√] ϵ._
+
+**==> picture [398 x 324] intentionally omitted <==**
+
+where the first inequality (the 6th line in the equation) is based on the assumption that _K_ � _k_ =1 _[w] T[k][γ] S[k]_[(] _[f]_[)] _[≤]_[�] _[K] k_ =1 _[w] S[k][γ] S[k]_[(] _[f]_[)][.][The][second][inequality][(the][7th][line][in][the][equation)][is][based] on min _{f_ ( _x_ ) + _g_ ( _x_ ) _} ≥_ min _{f_ ( _x_ ) _}_ + min _{g_ ( _x_ ) _}_
+
+## C EMPIRICAL EVIDENCE FOR ASSUMPTIONS IN THEOREM 4.7
+
+## C.1 GAUSSIAN DISTRIBUTION
+
+To affirm the Gaussian distribution assumption for latent representations of each sub-domain, we include Figure 4. These plots, derived from the MNIST and MNIST-M datasets for all values of k, reinforce our theorem’s practical realization.
+
+20
+
+**==> picture [195 x 106] intentionally omitted <==**
+
+**==> picture [195 x 106] intentionally omitted <==**
+
+**==> picture [244 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) MNIST (b) MNIST-M **----- End of picture text -----**
+
+Figure 4: Distributions of the learned representations
+
+.
+
+## C.2 DISTANCE ASSUMPTION
+
+We further present empirical evidence to support the distance relations between paired and nonpaired source-target sub-domains on the MNIST to MNIST-M task. Our methodology specifically aims to minimize the distance between paired source-target sub-domains during the training process. Table 4 illustrates that empirically the distance between the paired source-target sub-domain is consistently less than the average distance between non-paired source-target sub-domains.
+
+Table 4: Distance relations between paired and non-paired source-target sub-domains on the MNIST to MNIST-M task. We use Wasserstein-1 (W1) distance as distance metric.
+
+|Sub-domain|Paired source-target sub-domain Non-paired source-target sub-domains|
+|---|---|
+|0 1 2 3 4 5 6 7 8 9|5.9 79.4 9.5 85.5 7.5 85.4 11.4 82.6 7.7 80.5 11.4 84.8 7.0 89.5 11.9 89.6 8.1 72.8 9.6 81.2|
+
+## D ALGORITHM
+
+Our framework is outlined in pseudo-code in Algorithm 1.
+
+**Algorithm 1** Domain Adaptation via Rebalanced Sub-domain Alignment(DARSA)
+
+**Input:** Source data _XS_ ; Source label _yS_ , Target data _XT_ ; coefficient _λY , λD, λc, λa_ ; learning rate _α_ ; Pretrain feature extractor and classifier with _XS_ and _yS_ , initialize _θE[S]_[,] _[ θ] E[T]_[, and] _[ θ][Y]_[with pretrained] weights. Initialize _wT[k]_[and] _[ w] T[k]_[with 1/K for k = 1,2 ..., K] **repeat** Sample minibatch from _XS_ and _XT θY ← θY − α∇θY_ ( _λY LY_ + _λDLD_ + _λcLintra_ + _λaLinter_ ) _θE[S][←][θ] E[S][−][α][∇] θE[S]_[(] _[λ][Y][ L][Y]_[+] _[ λ][D][L][D]_[ +] _[ λ][c][L][intra]_[ +] _[ λ][a][L][inter]_[)] _θE[T][←][θ] E[T][−][α][∇] θE[T]_[(] _[λ][D][L][D]_[ +] _[ λ][c][L][intra]_[ +] _[ λ][a][L][inter]_[)] **until** _θE[S]_[,] _[ θ] E[T]_[, and] _[ θ][Y]_[converge]
+
+## E ANALYSIS OF FEATURE SPACE
+
+We visualize the feature spaces learned by DANN (Ganin et al., 2016), CAT (Deng et al., 2019) and our method, DARSA, using UMAP (Sainburg et al., 2021). As shown in Figure 5, features learned
+
+21
+
+with DARSA form stronger clusters when the labels are the same, and clusters with different labels are more separated from one another. In contrast, both DANN and CAT fail to learn a good sourcetarget domain alignment in the feature space (shown in Figure 5 (b)(c)) in the presence of label distribution shifts. This confirms that our method, DARSA, can learn a label-conditional feature space that is discriminative and domain-invariant, which improves performance in target domain prediction.
+
+**==> picture [238 x 119] intentionally omitted <==**
+
+**==> picture [238 x 291] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) DARSA (b) DANN (c) CAT **----- End of picture text -----**
+
+Figure 5: For MNIST to MNIST-M UDA task with label shifting (a) feature space learned by our method, DARSA. (b) feature space learned by DANN. (c) feature space learned by CAT. Left panel: colored by source/target; Right panel: colored by true label (digits). The features are projected to 2-D using UMAP.
+
+## F ANALYSIS OF WEIGHTS
+
+In order to assess the accuracy of our target weight estimation in the DARSA algorithm, we conducted an additional analysis. This analysis focused on the MNIST to MNIST-M experiment under
+
+22
+
+**==> picture [160 x 156] intentionally omitted <==**
+
+Figure 6: Evolution of the absolute difference between the estimated target weight _w_ ˆ _T_ and the actual ground truth _wT_ across epochs.
+
+conditions of weak imbalance. Specifically, we compared the difference between the actual ground truth target weight (denoted as _wT_ ) and our estimated target weight (denoted as _w_ ˆ _T_ ) across epochs.
+
+As illustrated in the figure 6, our estimation aligns closely with the ground truth towards the end of the training process. This proximity indicates the effectiveness of our weight estimation approach within the DARSA algorithm.
+
+## G DETAILS OF EXPERIMENTAL SETUP: DIGITS DATASETS WITH LABEL SHIFTING
+
+In our Digits datasets experiments, we evaluate our performance across four datasets: MNIST (LeCun et al., 1998), MNIST-M (Ganin et al., 2016), USPS, and SVHN, all modified to induce label distribution shifts. Here, the parameter _α_ denotes the class imbalance rate, representing a ratio such as 1: _α_ and _α_ :1 for the odd:even distribution in the source and target datasets, respectively. Weak and strong imbalance correspond to _α_ = 3 and _α_ = 8. A small subset of the target domain is used for hyperparameter search, serving as an upper performance bound for UDA methods. Results shown in Table 2 demonstrates DARSA’s competitiveness in handling label shifting. It is worth noting that many state-of-the-art comparisons are not specifically tailored for shifted label distribution scenarios, potentially affecting their performance. To ensure a fair comparison, we use the Ax platform (Bakshy et al.; Letham et al., 2019) for automated hyperparameter tuning to maximize domain-shifting performance (More details in G.8). Additionally, DARSA performs well with varying imbalance rates (Table 5) and competes favorably in scenarios without label distribution shifts (Table 7).
+
+## G.1 DETAILS OF THE DIGITS DATASETS WITH LABEL DISTRIBUTION SHIFTS
+
+## G.1.1 WEAK IMBALANCE: _α_ = 3
+
+**MNIST** _→_ **MNIST-M** : For source dataset, we randomly sample 36000 images from MNIST training set with odd digits three times the even digits. For target dataset, we randomly sample 6000 images from MNIST-M constructed from MNIST testing set, with even digits three times the odd digits. To create MNIST-M dataset, we follow the procedure outlined in Ganin et al. (2016) to blend digits from the MNIST over patches randomly extracted from color photos in the BSDS500 dataset (Arbelaez et al., 2010).
+
+**MNIST-M** _→_ **MNIST** : For source dataset, we randomly sample 36000 images from MNIST-M constructed from MNIST training set, with even digits three times the odd digits. For target dataset, we randomly sample 5800 images from MNIST testing set, with odd digits three times the even digits.
+
+23
+
+**USPS** _→_ **MNIST** : For source dataset, we randomly sample 3600 images from USPS training set, with even digits three times the odd digits. For target dataset, we randomly sample 5800 images from MNIST testing set, with odd digits three times the even digits.
+
+**SVHN** _→_ **MNIST** : For source dataset, we randomly sample 30000 images from SVHN training set, with even digits three times the odd digits. For target dataset, we randomly sample 5800 images from MNIST testing set, with odd digits three times the even digits.
+
+- G.1.2 STRONG IMBALANCE: _α_ = 8
+
+**MNIST** _→_ **MNIST-M** : For source dataset, we randomly sample 27000 images from MNIST training set with odd digits eight times the even digits. For target dataset, we randomly sample 4500 images from MNIST-M constructed from MNIST testing set, with even digits eight times the odd digits. To create MNIST-M dataset, we follow the procedure outlined in Ganin et al. (2016) to blend digits from the MNIST over patches randomly extracted from color photos in the BSDS500 dataset (Arbelaez et al., 2010).
+
+**MNIST-M** _→_ **MNIST** : For source dataset, we randomly sample 13500 images from MNIST-M constructed from MNIST training set, with even digits eight times the odd digits. For target dataset, we randomly sample 13500 images from MNIST testing set, with odd digits eight times the even digits.
+
+**USPS** _→_ **MNIST** : For source dataset, we randomly sample 2700 images from USPS training set, with even digits eight times the odd digits. For target dataset, we randomly sample 13500 images from MNIST testing set, with odd digits eight times the even digits.
+
+**SVHN** _→_ **MNIST** : For source dataset, we randomly sample 27000 images from SVHN training set, with even digits eight times the odd digits. For target dataset, we randomly sample 18000 images from MNIST testing set, with odd digits eight times the even digits.
+
+## G.2 ADDITIONAL EMPIRICAL ANALYSIS OF OUR PROPOSED GENERALIZATION BOUND
+
+Here we empirically evaluate the proposed generalization bound with weak imbalance ( _α_ = 3) and strong imbalance ( _α_ = 8). As shown in Figure 7 and Figure 8, our empirical results demonstrate that the sub-domain-based generalization bound in Theorem 4.5 is empirically much stronger than the non-sub-domain-based bound in Theorem 4.1.
+
+24
+
+**==> picture [96 x 92] intentionally omitted <==**
+
+**==> picture [100 x 91] intentionally omitted <==**
+
+**==> picture [96 x 93] intentionally omitted <==**
+
+**==> picture [100 x 92] intentionally omitted <==**
+
+**==> picture [396 x 125] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Domain Discrepancy (b) Source Clf Loss (c) Domain Discrepancy (d) Source Clf Loss (e) Domain Discrepancy (f) Source Clf Loss (g) Domain Discrepancy (h) Source Clf Loss **----- End of picture text -----**
+
+Figure 7: For experiments with weak imbalance ( _α_ = 3), we compare the domain discrepancy term ( _LD_ ) and source classification term ( _LY_ ) in our proposed bound to that in Theorem 4.1, respectively. Empirical results for each experiment are demonstrated in the subfigures: (a)(b) MNIST to MNISTM (c)(d) MNIST-M to MNIST, (e)(f) USPS to MNIST, (g)(h) SVHN to MNIST.
+
+**==> picture [96 x 93] intentionally omitted <==**
+
+**==> picture [100 x 96] intentionally omitted <==**
+
+**==> picture [96 x 93] intentionally omitted <==**
+
+**==> picture [100 x 96] intentionally omitted <==**
+
+**==> picture [396 x 129] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Domain Discrepancy (b) Source Clf Loss (c) Domain Discrepancy (d) Source Clf Loss (e) Domain Discrepancy (f) Source Clf Loss (g) Domain Discrepancy (h) Source Clf Loss **----- End of picture text -----**
+
+Figure 8: For tasks with strong imbalance ( _α_ = 8), we compare the domain discrepancy term ( _LD_ ) and source classification term ( _LY_ ) in our proposed bound to that in Theorem 4.1, respectively. Empirical results for each experiment are demonstrated in the subfigures: (a)(b) MNIST to MNISTM (c)(d) MNIST-M to MNIST, (e)(f) USPS to MNIST, (g)(h) SVHN to MNIST.
+
+## G.3 EVALUATE DARSA ON VARYING IMBALANCE RATES
+
+We have conducted a study on the USPS to MNIST adaptation to explore the effects of varying imbalance rates. As can be seen from Table 5, the performance of our algorithm is stable across a wide range of imbalance rates.
+
+25
+
+Source: USPS - even : odd digit = 1: _α_ Target: MNIST - odd : even digit = _α_ :1
+
+Table 5: Summary of UDA results on USPS to MNIST adaptation with varying imbalance rates
+
+|_α_|1 2 3 4 5 6 7 8 9 10|
+|---|---|
+|Accuracy (%)|97.1 92.8 92.6 92.1 85.8 93.3 88.1 87.9 77.4 71.3|
+
+## G.4 THE RATIONALE FOR COMPETING ALGORITHMS CHOICES
+
+For benchmark methods, we have chosen methods that not only have theoretical underpinnings, but also exhibit impressive performance in transfer learning on digit benchmarks as per the listings on the public competition Papers with Code (2023). Furthermore, our selection includes methods that contemplate sub-domain alignment to facilitate a direct comparison with our approach. It’s important to note that our selection of benchmark methods may include some older models. However, these models were chosen not just for their performance but for their theoretical relevance and their ability to provide valuable insights into the effectiveness of our proposed method. Thus, while our experiments primarily serve to validate our theory, the benchmarks also offer meaningful evaluation of our theory’s practical impact.
+
+## G.5 MODEL STRUCTURES
+
+For feature extractor, we employ a network structure similar to LeNet-5 ((LeCun et al., 1998)), but with minor modifications: the first convolutional layer produces 10 feature maps, the second convolutional layer produces 20 feature maps, and we use ReLU as an activation function for the hidden layer. Our feature space has 128 dimensions. For benchmarks, we utilize the network structures provided in the benchmark source code. In cases where experiments are not included in the source code, we use the same network architecture as our model to ensure fair comparisons. For classifier, we use a network structure with three fully connected layers with ReLU activation and a dropout layer with a rate of 0.5. See the included code link for further details of each experiment.
+
+## G.6 ABLATION STUDY
+
+To gain insight into the individual impact of each component within our objective function (Section 5), we performed an ablation study under conditions of weak imbalance. The outcomes of this investigation are detailed in Table 6. The ablation analysis confirms that each component in our objective function contributes to its overall performance. Therefore, we recommend the use of all components for optimal results. In addition, we have included ablation study with feature space visualization in Figure 9. As can be seen in Figure 9, the learned representation of DARSA has improved separation when using all the components, supporting the effectiveness of the proposed objective function.
+
+## G.7 EVALUATE DARSA ON BENCHMARKS WITHOUT ADDITIONAL LABEL DISTRIBUTION SHIFTS
+
+We conduct additional experiments to evaluate how DARSA performs in scenarios without label distribution shifts. Results in Table 7 show DARSA’s performance is comparable with the most competitive methods.
+
+## G.8 MODEL HYPERPARAMETERS
+
+We use Adaptive Experimentation (Ax) platform (Bakshy et al.; Letham et al., 2019), an automatic tuning approaches to select hyperparameters to maximize the performance of our method. We use Bayesian optimization supported by Ax with 20 iterations to decide the hyperparameter choice. We note that most of the SOTA comparisons are not specifically designed for shifted label distribution scenarios, and this setting caused issues in several competing methods. We used Ax to maximize their performance in label shifting scenarios. Details on the model hyperparameters used for the Digits datasets with shifted label distribution are provided in Table 8 and Table 9 (If not explicitly
+
+26
+
+Table 6: Ablation study results. Each row represents a configuration with different _λ_ values. The last column reports the prediction accuracy (%) for each configuration.
+
+|Experiment|_λY_|_λD_|_λa_|_λc_|Accuracy|
+|---|---|---|---|---|---|
+|M_→_MM M_→_MM M_→_MM M_→_MM M_→_MM|0.4 0 0.4 0.4 0.4|0.35 0.35 0 0.35 0.35|0.9 0.9 0.9 0 0.9|1 1 1 1 0|96.0 61.3 72.5 61.9 33.5|
+|MM_→_M MM_→_M MM_→_M MM_→_M MM_→_M|1 0 1 1 1|0.5 0.5 0 0.5 0.5|1 1 1 1 0|1 1 1 0 1|98.8 96.7 98.4 15 98.2|
+|U_→_M U_→_M U_→_M U_→_M U_→_M|1 0 1 1 1|0.5 0.5 0 0.5 0.5|1 1 1 0 1|1 1 1 1 0|92.60 65.90 85.80 76.20 58.40|
+|S_→_M S_→_M S_→_M S_→_M S_→_M|0.95 0 0.95 0.95 0.95|0.11 0.11 0 0.11 0.11|0.11 0.11 0.11 0.11 0|0.3 0.3 0.3 0 0.3|90.1 77.9 86.1 64.3 84.9|
+
+**==> picture [179 x 90] intentionally omitted <==**
+
+**==> picture [179 x 90] intentionally omitted <==**
+
+**==> picture [360 x 121] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) No LY (b) No LD (c) No Lintra (d) No Linter **----- End of picture text -----**
+
+Figure 9: For MNIST to MNIST-M UDA task with shifted label distribution with representations learnt by ablation study. Colored by 1) source/target; 2) predicted label (digit). The features are projected to 2-D using UMAP.
+
+.
+
+27
+
+Table 7: Summary of UDA results on the Digits datasets without shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
+
+||DANN WDGRL DSN ADDA CAT CDAN pixelDA DRANet DARSA|
+|---|---|
+|U_→_M S_→_M|74.5 84.8 91.0 90.1 80.9 98.0 87.6 97.8 97.4 73.9 59.3 82.7 76.0 98.1 89.2 71.6 59.7 98.6|
+
+Table 8: Model hyperparameters used for Digits datasets with weak imbalance _α_ = 3
+
+||MNIST to MNIST-M MNIST-M to MNIST USPS to MNIST SVHN to MNIST|
+|---|---|
+|DARSA|batch size = 512, _α_= 0_._01,_λY_ = 0_._4, _λD_ = 0_._35,_λc_ = 1, _λa_ = 0_._9, m = 30 SGD,momentum = 0.5 batch size = 512, _α_= 0_._01,_λY_ = 1, _λD_ = 0_._5,_λc_ = 1, _λa_ = 1, m = 30 SGD,momentum = 0.4 batch size = 256, ,_α_= 0_._01,_λY_ = 1, _λD_ = 0_._5,_λc_ = 1, _λa_ = 1, m = 30 SGD,momentum = 0.4 batch size = 256, _α_= 0_._05,_λY_ = 0_._95, _λD_ = 0_._11,_λc_ = 0_._3, _λa_ = 0_._11, m = 50 SGD,momentum = 0.4|
+|DANN|batch size = 32 Adam, learningrate = 1e-4 batch size = 32 Adam, learningrate = 1e-5 batch size = 32 Adam, learningrate = 1e-4 batch size = 64 Adam, learningrate = 1e-4|
+|WDGRL|batch size = 32 Adam, learning rate = 1e-5, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 3 batch size = 64 Adam, learning rate = 1e-4, _γ_ = 10, critic training step: 5, feature extractor and discriminator trainingstep: 10 batch size = 32 Adam, learning rate = 1e-4, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 2 batch size = 32 Adam, learning rate = 1e-5, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 3|
+|DSN|batch size = 32 SGD, momentum = 0.8, learning rate = 1e-2, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._25 batch size = 32 SGD, momentum = 0.8, learning rate = 0.01, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._25 batch size = 32 SGD, momentum = 0.8, learning rate = 0.01, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._4 batch size = 512 SGD, momentum = 0.5, learning rate = 1e-5, _α_= 0_._046, _β_ = 0_._61_, γ_ = 0_._92|
+|ADDA|batch size = 64 Adam, learning rate = 1e-3, critic training step: 1, target model trainingstep: 10 batch size =64 Adam, learning rate = 1e-5, critic training step: 1, target model trainingstep: 1 batch size = 64 Adam, learning rate = 1e-3, critic training step: 1, target model trainingstep: 1 batch size = 64 Adam, learning rate = 1e-3, critic training step: 3, target model trainingstep: 2|
+|CAT|batch size = 512 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 256 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30|
+|CDAN|batch size = 64 SGD, momentum = 0.9, learningrate =0.01 batch size = 64 SGD, momentum = 0.9, learningrate =0.01 batch size = 64 SGD, momentum = 0.9, learningrate =0.01 batch size = 64 SGD, momentum = 0.9, learningrate =0.1|
+|pixelDA|batch size = 64 Adam learning rate =0.0002, dim of the noise input: 10 batch size = 64 Adam learning rate =0.0002, dim of the noise input: 10 batch size = 32 Adam, learning rate =0.0001, dim of the noise input: 20 batch size = 32 Adam, learning rate =0.0001, dim of the noise input: 20|
+|DRANet|batch size = 32 Adam batch size = 32 Adam batch size = 32 Adam batch size = 32 Adam|
+|MCD|batch size = 128 learningrate = 0.01 batch size = 128 learningrate = 0.01 batch size = 128 learningrate = 0.01 batch size = 128 learningrate = 0.01|
+|MDD|batch size = 128 learning rate = 0.01 batch size = 128 learning rate = 0.01 batch size = 128 learning rate = 0.01 batch size = 128 learning rate = 0.01|
+
+stated, we resort to the default hyperparameters from the respective implementations of the benchmark.).
+
+28
+
+Table 9: Model hyperparameters used for Digits datasets with strong imbalance _α_ = 8
+
+||MNIST to MNIST-M MNIST-M to MNIST USPS to MNIST SVHN to MNIST|
+|---|---|
+|DARSA|batch size = 1024, _α_= 0_._01,_λY_ = 0_._8, _λD_ = 0_._4,_λc_ = 0_._9, _λa_ = 0_._9, m = 30 SGD,momentum = 0.5 batch size = 1024, _α_= 0_._01,_λY_ = 1, _λD_ = 0_._5,_λc_ = 1, _λa_ = 0_._5, m = 30 SGD,momentum = 0.4 batch size = 1024, ,_α_= 0_._01,_λY_ = 1, _λD_ = 0_._1,_λc_ = 1, _λa_ = 1, m = 30 SGD,momentum = 0.4 batch size = 1024, _α_= 0_._01,_λY_ = 0_._95, _λD_ = 0_._11,_λc_ = 1, _λa_ = 1, m = 50 SGD,momentum = 0.4|
+|DANN|batch size = 64 Adam, learningrate = 1e-3 batch size = 256 Adam, learningrate = 1e-6 batch size = 64 Adam, learningrate = 1e-4 batch size = 128 Adam, learningrate = 1e-3|
+|WDGRL|batch size = 64 Adam, learning rate = 1e-4, _γ_ = 10, critic training step: 5, feature extractor and discriminator trainingstep: 10 batch size = 128 Adam, learning rate = 1e-5, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 5 batch size = 64 Adam, learning rate = 1e-4, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 4 batch size = 64 Adam, learning rate = 1e-6, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 3|
+|DSN|batch size = 32 SGD, momentum = 0.8, learning rate = 1e-2, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._25 batch size = 32 SGD, momentum = 0.8, learning rate = 1e-2, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._25 batch size = 64 SGD, momentum = 0.8, learning rate = 1e-2, _α_= 0_._01, _β_ = 0_._075_, γ_ = 0_._4 batch size = 256 SGD, momentum = 0.1, learning rate = 1e-4, _α_= 0_._046, _β_ = 0_._075_, γ_ = 0_._25|
+|ADDA|batch size = 128 Adam, learning rate = 1e-5, critic training step: 1, target model trainingstep: 1 batch size =256 Adam, learning rate = 1e-6, critic training step: 2, target model trainingstep: 1 batch size = 128 Adam, learning rate = 1e-5, critic training step: 1, target model trainingstep: 1 batch size = 128 Adam, learning rate = 1e-6, critic training step: 4, target model trainingstep: 1|
+|CAT|batch size = 512 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 256 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30 batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 30|
+|CDAN|batch size = 64 SGD, momentum = 0.9, learningrate =1e-3 batch size = 128 SGD, momentum = 0.5, learningrate =0.1 batch size = 64 SGD, momentum = 0.9, learningrate =0.01 batch size = 16 SGD, momentum = 0.1, learningrate =1e-4|
+|pixelDA|batch size = 64 Adam learning rate =0.0002, dim of the noise input: 10 batch size = 64 Adam learning rate =0.0002, dim of the noise input: 20 batch size = 32 Adam, learning rate =0.001, dim of the noise input: 20 batch size = 32 Adam, learning rate =0.001, dim of the noise input: 20|
+|DRANet|batch size = 32 Adam batch size = 32 Adam batch size = 32 Adam batch size = 32 Adam|
+|MCD|batch size = 128 learningrate = 0.1 batch size = 128 learningrate = 0.01 batch size = 128 learningrate = 0.01 batch size = 128 learningrate = 0.01|
+|MDD|batch size = 128 learning rate = 0.1 batch size = 128 learning rate = 0.01 batch size = 128 learning rate = 0.01 batch size = 128 learning rate = 0.01|
+
+## H DETAILS OF EXPERIMENTAL SETUP: TST DATASET WITH SHIFTED LABEL DISTRIBUTION
+
+The Tail Suspension Test (TST) dataset (Gallagher et al., 2017) consists of local field potentials (LFPs) recorded from the brains of 26 mice. These mice belong to two genetic backgrounds: a genetic model of bipolar disorder (Clock-∆19) and wildtype mice. Each mouse is subjected to 3 behavioral assays which are designed to vary stress: home cage (HC), open field (OF), and tailsuspension (TS). We conduct experiments on two domain adaptation tasks using these neural activity data: transferring from wildtype mice to the bipolar mouse model and vice versa. We aim to predict for each one second window which of the 3 conditions (HC, OF, or TS) the mouse is currently experiencing. To create label distribution shifts, we subsample the datasets so that we have 6000 Homecage observations, 3000 Open Field observations, and 6000 Tail Suspension observations in the bipolar genotype dataset and 3000 Homecage observations, 6000 OpenField observations, and 3000 Tail Suspension observations in the wildtype genotype dataset.
+
+29
+
+## H.1 DETAILS OF THE TST DATASET WITH SHIFTED LABEL DISTRIBUTION
+
+The Tail Suspension Test (TST) dataset (Gallagher et al., 2017) consists of 26 mice recorded from two genetic backgrounds, Clock-∆19 and wildtype. Clock-∆19 is a genotype which has been proposed as a model of bipolar disorder while wildtype is considered as a typical or common genotype. Local field potentials (LFPs) are recorded from 11 brain regions and segmented into 1 second windows. For each window, power spectral density, coherence, and granger causality features are derived. Each mouse is placed through 3 behavioral contexts while collecting LFP recordings: home cage, open field, and tail-suspension. Mice spent 5 minutes in the home cage which is considered a baseline or low level of distress behavioral context. Mice spent 5 minutes in the open field context which is considered a moderate level of distress. Mice then spent 10 minutes in the tail suspension test which is a high distress context.
+
+## H.2 MODEL STRUCTURES
+
+For feature extractor of the wildtype to bipolar task we use a network structure consisting of: a fully connected layer that maps our data to a feature space of 256 dimensions, with a LeakyReLU activation function; a fully connected layer that maps the feature space to 128 dimensions, and a Softplus activation function. For the bipolar to wildtype task, we use a network structure that includes: a fully connected layer that maps our data to a feature space of 256 dimensions, with a ReLU activation function; a fully connected layer that maps the feature space to 128 dimensions, with another ReLU activation function. For the classifier, we use a network structure that includes: three fully connected layers with ReLU activation and a dropout layer with a rate of 0.5. For benchmarks, we use the same network structures as our model to ensure fair comparisons, with the exception of DSN which has two fully connected layers with ReLU activation. See the included code link for additional details on each experiment.
+
+## H.3 MODEL HYPERPARAMETERS
+
+Again, we use Adaptive Experimentation (Ax) platform (Bakshy et al.; Letham et al., 2019), an automatic tuning approaches to select hyperparameters to maximize the performance of our method. We use Bayesian optimization supported by Ax with 20 iterations to decide the hyperparameter choice. We note that most of the SOTA comparisons are not specifically designed for shifted label distribution scenarios, and this setting caused issues in several competing. We used Ax to maximize their performance in label shifting scenarios. Details on the model hyperparameters are provided in Table 10 (If not specified, the default hyperparameters from their respective implementations are employed.).
+
+## I ACCESSIBILITY OF THE DATASETS AND COMPUTING RESOURCES
+
+**Accessibility of the Datasets** The MNIST, BSDS500, USPS, and SVHN datasets are publicly available with an open-access license. The Tail Suspension Test (TST) dataset (Gallagher et al., 2017) is available to download at [URL removed] concern/datasets/zc77sr31x?locale=en for free under a Creative Commons BY-NC Attribution-NonCommercial 4.0 International license.
+
+**Computing Resources** The experiments are conducted on a computer cluster equipped with a NVIDIA GeForce RTX 2080 Ti that has a memory capacity of 11019MiB.
+
+30
+
+Table 10: Model hyperparameters used for the label distribution shifting TST datasets
+
+||Clock-∆19 to Wildtype Wildtype to Clock-∆19|
+|---|---|
+|DARSA|batch size = 128, _α_=1e-4,_λY_ = 1, _λD_ = 0_._4,_λc_ = 0_._1, _λa_ = 0_._9, m = 50 SGD,momentum = 0.6 batch size = 128, _α_= 0_._001,_λY_ = 0_._7, _λD_ = 0_._1,_λc_ = 0_._1, _λa_ = 1, m = 50 SGD,momentum = 0.3|
+|DANN|batch size = 32 Adam, learningrate = 1e-4 batch size = 32 Adam, learningrate = 1e-4|
+|WDGRL|batch size = 32 Adam, learning rate = 1e-4, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 2 batch size = 32 Adam, learning rate = 1e-5, _γ_ = 10, critic training step: 1, feature extractor and discriminator trainingstep: 3|
+|DSN|batch size = 64 SGD, momentum = 0.5, learning rate = 0.1, _α_= 1, _β_ = 1_, γ_ = 1 batch size = 32 SGD, momentum = 0.5, learning rate = 0.1, _α_= 1, _β_ = 1_, γ_ = 1|
+|CAT|batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 3 batch size = 128 SGD, learning rate = 0_._01 (1+10_p_)0_._75 , momentum = 0.9, p = 0.9, m = 3|
+|CDAN|batch size = 64 SGD, momentum = 0.9, learningrate = 0.1 batch size = 64 SGD, momentum = 0.9, learningrate = 0.1|
+
+31
+
diff --git a/open_review/iclr2024_8562.json b/open_review/iclr2024_8562.json
new file mode 100644
index 0000000000000000000000000000000000000000..bf0613e519cb1616efa0921c3cd536f30a85cc11
--- /dev/null
+++ b/open_review/iclr2024_8562.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8562",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicry",
+ "abstract": "Linear attentions have shown promise for improving Transformer efficiency, reducing attention's quadratic complexity to linear in sequence length. This holds exciting promise for (1) training linear Transformers from scratch, (2) `inetuned-conversion of task-specific Transformers into linear versions that recover task performance, and (3) pretrained-conversion of Transformers, such as language models, into linear versions readily finetunable on downstream tasks. However, linear attentions often underperform compared to standard softmax attention. To close this performance gap, we study the behaviors of softmax and linear attentions in various train-from-scratch and finetuned-conversion settings. We find prior linear attentions lack key properties of softmax attention tied to good performance: low-entropy (or spiky) weights and dot-product monotonicity. We further observe surprisingly simple feature maps that retain these properties match softmax performance, but are inefficient to compute in linear attention. We thus propose Hedgehog, a learnable linear attention that retains the spiky and monotonic properties of softmax attention while maintaining linear complexity. Hedgehog uses simple, trainable MLPs to produce attention weights mimicking softmax attention. Experiments show Hedgehog recovers over 99\\% of standard Transformer performance in train-from-scratch and finetuned-conversion settings, outperforming prior linear attentions by up to 6 perplexity points on WikiText-103 when training causal GPT models from scratch, and up to 8.7 GLUE score points when converting finetuned bidirectional BERT models. Hedgehog also enables pretrained-conversion. Converting a pretrained GPT-2 into a linear attention variant achieves state-of-the-art 16.7 perplexity on WikiText-103 for 125M subquadratic decoder models. We finally turn a pretrained Llama-2 7B into a viable linear attention Llama. With low-rank adaptation, Hedgehog-Llama-2 7B achieves 28.1 higher ROUGE-1 points over the base standard attention model, where prior linear attentions lead to 16.5 point drops.",
+ "rebuttal": "### General Response + Revision Summary\nMany thanks to the reviewers for their helpful comments and feedback. \n* We appreciated that reviewers consistently found our work interesting and novel (ZtxG, y6Q1), tackling a relevant and important research problem of improving Transformer efficiency via linear attention (y6Q1, PsQx).\n* We also thank reviewers for noting our thorough, consistent, and well-written investigation, and finding our method (Hedgehog) effective on a wide variety of evaluation settings (ZtxG, y6Q1, PsQx). \n\nThanks to reviewers comments, we updated the draft to include additional results, experiments, and analysis on Hedgehog’s performance (expanding to new data, modalities, models), along with general tidying of the presentation (changes in blue). \n\nThese include:\n\n#### **1. Extended analysis of Hedgehog generalization to new data and sequence lengths**\n\n* Thanks to Reviewer ZtxG, we updated Section 4.3 (now Section 5.1) to include new results showing Hedgehog’s learned feature maps can transfer to new data. We extend this analysis in Appendix C.2 to show this corresponds with improved downstream task performance.\n\n* We also show that Hedgehog’s attention weights continue to match softmax attention over inputs with longer sequence lengths. \n\n#### **2. Further support for new models and modalities**\n\n* We include additional results showing that Hedgehog can be applied to additional models and modalities via Llama-2 7B and ViT-base (patch size 16) linear attention conversion. \n\n * Thanks to Reviewer PsQx’s comment on different modalities, we show Hedgehog supports linear attention conversion of Vision Transformers, recovering 99% of top-1 ImageNet-1k accuracy for the popular pretrained ViT-base model (Section 5.3)\n\n * Thanks to Reviewer y6Q1’s comment on scaling up, we show Hedgehog also works to convert Llama-2 7B models for downstream finetuning. In particular, we can combine Hedgehog with parameter-efficient finetuning (e.g., LoRA), and show that we can finetune the “linearized” Llamas for downstream summarization tasks (Section 5.4).\n\n#### **3. General tidying of presentation**\n\nWe appreciated reviewers’ helpful comments and feedback, and made best efforts to incorporate and address all in the latest revision. \n\n* We revised the presentation in our motivating analysis (Section 3) to make clear the relation between Hedgehog (our method) and alternatives that motivate Hedgehog’s development (such as the Taylor approximation for exponentials, which we clarify is noted in prior work)\n\n* Relatedly, we clarify the evaluation settings and scope of evaluation for individual experiments\n\n* We extend the Appendix to include additional results, analysis, and experiments to complement the main findings presented in the main paper. \n\n\nPlease see our responses to individual reviewers in the threads below for details. We are happy to follow-up and discuss any remaining questions or comments.\n\n### Response to Reviewer PsQx\nThank you for your review! We appreciate that you find our paper well-written and dealing with an important research task. \n\nWe also appreciate your comments on the LRA comparisons and scalability to other modalities. We have updated the paper to address these, where we:\n1. Clarify the scope of the LRA comparison (where we aim to compare against Transformers and attention approximations)\n2. Clarify the framing of the Taylor approximation here vs in past work\n2. Add additional results showing Hedgehog can apply to additional modalities (e.g., images via Vision Tran [...]\n\n### Response to Reviewer ZtxG (1/2)\nThank you for your review! We appreciate finding our work interesting and novel, with thorough and strong benchmarks. \n\nWe also appreciate the feedback on presentation on comparisons between the Taylor approximation for exponentials and Hedgehog, and comparison to GPT-2. We first address these below, and have updated the draft to reflect these changes. \n\nIn the next reply thread, please find our answers to your questions on Hedgehog generalization and understanding of the learned weights. We appreciate the insightful questions, and have updated both the main [...]\n\n### Response to Reviewer ZtxG (2/2)\n**Investigation into the learned weights of Hedgehog for intuition** \nWe explored this under two angles and added our findings in the updated draft. \n\nFirst, we tried to better understand if the learned weights are actually important, or if just the exponential feature map suffices. We expanded Sec. 4.3 (now Sec. 5.1) to visualize the attention weights of Hedgehog without training (Fig. 8) in comparison to with training (Fig. 7) and found that learning the MLP weights (vs just replacing the MLPs with the identity matrix) lead to significantly better match [...]\n\n### Response to Reviewer y6Q1\nThank you very much for your review! We are glad that you appreciated our work, and are likewise excited about scaling Hedgehog up to larger models. We address your questions on this scaling and clarification of Hedgehog initialization when training-from-scratch below.\n\n**Hedgehog scaling to Llama-2 7B** \nInspired by your comments, we added initial experiments showing that Hedgehog enables conversion of Llama-2 7B models into linear attention versions, where subsequent parameter-efficient finetuning results can significantly improve performance over the base mode [...]",
+ "initial_scores": [
+ 5,
+ 8,
+ 6
+ ],
+ "score_mean": 6.33,
+ "score_variance": 2.33,
+ "score_spread": 3,
+ "score_min": 5,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper provides new frameworks for linear attention to avoid the quadratic bottleneck of transformers. It characterizes two properties of softmax attention, low-entropy (spikiness) and monotonicity. They show prior approaches to linear attention to do not possess these properties and propose to learn the linear approximation. Empirical performance is stronger than previous approaches. There is some disagreement about this paper, with two reviewers feeling positive and one feeling negative about it. I believe the author rebuttal and revised version addressed the concerns of the latter, while also applying their proposed technique to larger models (LLaMA2, 7B). I am leaning towards acceptance.",
+ "forum_id": "4g02l2N2Nx",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_ZtxG",
+ "review_id": "Txr5iZ6dGK",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 1515,
+ "edit_detected": true,
+ "edit_delta_seconds": 673446,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_y6Q1",
+ "review_id": "4M84HaQsnE",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3372,
+ "edit_detected": true,
+ "edit_delta_seconds": 703259,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_PsQx",
+ "review_id": "a9VIdkeDR1",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 1237,
+ "edit_detected": true,
+ "edit_delta_seconds": 802398,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8562.md b/open_review/iclr2024_8562.md
new file mode 100644
index 0000000000000000000000000000000000000000..8faa65a4bc20f061dc743fd1080f9afd0d9f15ca
--- /dev/null
+++ b/open_review/iclr2024_8562.md
@@ -0,0 +1,665 @@
+
+
+## THE HEDGEHOG & THE PORCUPINE: EXPRESSIVE LINEAR ATTENTIONS WITH SOFTMAX MIMICRY
+
+Authors withheld for review
+
+## ABSTRACT
+
+Linear attentions have shown potential for improving Transformer efficiency, reducing attention’s quadratic complexity to linear in sequence length. This holds exciting promise for (1) training linear Transformers from scratch, (2) “finetunedconversion” of task-specific Transformers into linear versions that recover task performance, and (3) “pretrained-conversion” of Transformers such as large language models into linear versions finetunable on downstream tasks. However, linear attentions often underperform standard softmax attention in quality. To close this performance gap, we find prior linear attentions lack key properties of softmax attention tied to good performance: low-entropy (or “spiky”) weights and dotproduct monotonicity. We further observe surprisingly simple feature maps that retain these properties and match softmax performance, but are inefficient to compute in linear attention. We thus propose Hedgehog, a learnable linear attention that retains the spiky and monotonic properties of softmax attention while maintaining linear complexity. Hedgehog uses simple trainable MLPs to produce attention weights mimicking softmax attention. Experiments show Hedgehog recovers over 99% of standard Transformer quality in train-from-scratch and finetunedconversion settings, outperforming prior linear attentions up to 6 perplexity points on WikiText-103 with causal GPTs, and up to 8.7 GLUE score points on finetuned bidirectional BERTs. Hedgehog also enables pretrained-conversion. Converting a pretrained GPT-2 into a linear attention variant achieves state-of-the-art 16.7 perplexity on WikiText-103 for 125M subquadratic decoder models. We finally turn a pretrained Llama-2 7B into a viable linear attention Llama. With low-rank adaptation, Hedgehog-Llama2 7B achieves 28.1 higher ROUGE-1 points over the base standard attention model, where prior linear attentions lead to 16.5 point drops.
+
+## 1 INTRODUCTION
+
+Linear attentions are promising methods for improving Transformer efficiency. By replacing the softmax of attention’s query and key dot products with kernel function feature maps, linear attentions reduce attention’s time and space complexity from _O_ ( _n_[2] _d_ ) to _O_ ( _ndd[′]_ ) where _n_ is sequence length, _d_ is head dimension and _d[′]_ the feature map dimension (Katharopoulos et al., 2020; Choromanski et al., 2020; Peng et al., 2021; Xiong et al., 2021; Schlag et al., 2021). For typical Transformer settings, _e.g.,_ with head dimension = 64 and sequence lengths at 512 to 32K, this quadratic-to-linear scaling can result in significant speed and memory improvements (Fig. 6). As drop-in alternatives to popular softmax attention (Vaswani et al., 2017), linear attentions not only improve Transformer efficiency when training new models from scratch but can also improve inference efficiency by converting pretrained Transformers into corresponding linear variants (Kasai et al., 2021; Mao, 2022). Linear attention enables efficient Transformers in a variety of regimes:
+
+- **Training-from-scratch** : training Transformer models with linear attention with the goal of matching standard Transformer performance, _e.g.,_ as tested on benchmarks such as Long Range Arena (LRA) classification (Tay et al., 2021) and WikiText-103 language modeling (Merity et al., 2017).
+
+- **Finetuned-conversion** : swapping the attentions of task-specific Transformers and finetuning them to convert existing models into linear versions, with the goal to recover original task performance with improved efficiency (Kasai et al., 2021; Mao, 2022).
+
+1
+
+**==> picture [396 x 116] intentionally omitted <==**
+
+Figure 1: Hedgehog learns a trainable linear attention feature map designed to mimic standard attention, resulting in expressive yet efficient linear attentions for various Transformer training settings
+
+- **Pretrained-conversion** : doing the same as finetuned-conversion but for pretrained Transformers such as large language models (LLMs), _e.g.,_ to transfer to new tasks and longer contexts.
+
+Unfortunately, existing linear attention mechanisms typically fail to match softmax attention in modeling quality. When training from scratch, linear attentions achieve 4-6 worse perplexity (ppl) than softmax attention on standard benchmarks such as WikiText-103 (Schlag et al., 2021; Irie et al., 2021; Fu et al., 2023), the equivalent gap between 125M and 255M Transformers (Dai et al., 2019). When converting finetuned models, linear attention models require additional quadratic attention modules to close the gap (Kasai et al., 2021; Mao, 2022). One might worry that such gaps are fundamental; for example, recent theory using the Strong Exponential Time Hypothesis (SETH) showed that high-quality truly subquadratic algorithms to approximate softmax attention may be impossible with large sequence length _n_ (Alman & Song, 2023; Keles et al., 2023).
+
+We begin by empirically studying why this performance gap exists between standard softmax and proposed linear attentions. We identify two simple properties for softmax attention which prior linear attentions lack: 1) low-entropy “spikyness” and 2) dot-product monotonicity. We hypothesize that the quality gap in linear attentions corresponds with lacking these two properties:
+
+- **Low-entropy “spikyness”** : Intuitively, we want attentions that attend to relevant tokens while ignoring irrelevant ones via their query-key interactions. We observe these low-entropy or “spiky” attention-weight distributions in standard Transformer attention but not prior linear attention maps—where spikes enabled via the scaled dot-product softmax are lost via other feature maps (Fig. 2)—and find this strongly corresponds to Transformer performance (Fig. 4).
+
+- **Dot-product monotonicity** : This property requires that attention weights increase as the dot products of their corresponding queries and keys increase. Intuitively, the lack of this monotonicity can produce unstable gradients during training and finetuning, where increasing the query-key dot product can result in decreasing the attention weight the other way (and vice versa).
+
+As a first step to recover these properties, we explore simple feature maps—such as low-degree Taylor polynomial approximations to the exp() function—that satisfy the above two properties (albeit in restricted regimes of bounded query-key dot products). In practice, we find that queries and keys are often bounded, resulting in linear attentions that recover softmax attention’s spikiness, monotonicity, and subsequent performance. Unfortunately, while technically linear in sequence length, these polynomial feature maps remain inefficient to compute. They take _O_ ( _nd[p]_[+1] ) time and space, and we find degree _p ≥_ 2 necessary for performance.
+
+We thus propose Hedgehog, an efficient-to-compute _learnable_ linear attention trained to capture the spiky and monotonic softmax properties. Unlike prior works that propose a specific kernel function (Katharopoulos et al., 2020; Choromanski et al., 2020; Qin et al., 2022b) and our polynomial feature maps, we learn these feature maps as single-layer MLPs specifically _trained to match_ softmax attention weights. By mapping from R _[d] �→_ R _[d]_ , we maintain prior linear attentions’ _O_ ( _nd_[2] ) complexity. However, training these mappings via softmax attention weights as cross-entropy softlabels, we find Hedgehog can match softmax attention weights with much higher fidelity (Fig. 7), producing low-entropy and monotonic weights that match standard attention performance quality.
+
+We validate experimentally that Hedgehog’s improved expressivity translates to closing the softmax attention performance gap in the three regimes mentioned above:
+
+2
+
+- **Training-from-scratch** : we find Hedgehog matches Transformers on standard attention benchmarks such as Long Range Arena (LRA) (Tay et al., 2021) task, and closes the linear attention gap by 68.6% on WikiText-103 language modeling (improving up to 6 ppl).
+
+- **Finetuned-conversion** : we find Hedgehog recovers _>_ 99% of original model performance on average across bidirectional encoder-only 110M BERT-base models finetuned on GLUE and causal decoder-only 125M GPT models finetuned on Wikitext-103.
+
+- **Pretrained-conversion** : we find Hedgehog enables effective transfer to new tasks and efficient scaling to longer contexts, while frequently outperforming modern subquadratic sequence architectures by linearizing existing pretrained Transformers. A 125M Hedgehog-GPT-2 finetuned on Wikitext-103 achieves a new state-of-the-art 16.7 ppl for subquadratic models of the same size.
+
+Finally, we demonstrate that Hedgehog can be scaled up to modern large language models; we convert pretrained Llama-2 7B into a viable linear attention Llama. With low-rank adaptation, Hedgehog-Llama2 7B achieves up to 28.1 higher ROUGE-1 points over the base standard attention model. In contrast, prior linear attentions result in models that struggle to produce coherent text (with 16.5 ROUGE-1 point drops).
+
+## 2 PRELIMINARIES AND RELATED WORK
+
+We provide background on attention computation, describe kernel feature based linear attentions, and finally provide details on existing linear attention mechanisms proposed in the literature.
+
+**Attention setup** . Let _{_ _**q** i}[n] i_ =1[,] _[{]_ _**[k]**[i][}][n] i_ =1[,] _[{]_ _**[v]**[i][}][n] i_ =1[denote][the][set][of][queries,][keys,][and][values,][with] individual elements in R _[d]_ . Let _n_ denote sequence length and _d_ denote head dimension. We compute attention outputs _**y** i ∈_ R _[d]_ by first computing similarities between each _**q** i_ and every _**k** j_ ; for causal attention we compute these similarities for _j ≤ i_ . The vanilla Transformer attention computes these similarities using the softmax dot products (Vaswani et al., 2017):
+
+**==> picture [340 x 28] intentionally omitted <==**
+
+While very expressive, computing attention via Eq. 1 for all _{_ _**y** i}[n] i_ =1[requires] _[O]_[(] _[n]_[2] _[d]_[)][time][and] memory, making this inefficient for long sequences. To improve efficiency without sacrificing quality, we thus want alternative _linear attention_ maps which maintain standard attention’s expressivity.
+
+**Linear attention and kernel functions** . Observe that the exp( _·_ ) in Eq. 1 can be viewed as a kernel function, which Tsai et al. (2019); Katharopoulos et al. (2020) show can be replaced in general with _K_ ( _**x** ,_ _**x**[′]_ ) = _ϕ_ ( _**x**_ ) _[⊤] ϕ_ ( _**x**[′]_ ). Here _ϕ_ : R _[d] �→_ R _[d][′]_ is a feature map applied to each vector. We can thus compute attention in _linear_ time and space over the sequence length _n_ , seen by rewriting Eq. 1 as:
+
+**==> picture [259 x 28] intentionally omitted <==**
+
+**Prior feature maps** . From the previous section, we observe that linear attentions are promising directions for improving Transformer efficiency at both training and inference time. Numerous prior works have proposed feature maps _ϕ_ aiming to remain more efficient (where linear attention is desirable to standard attention if _d[′] < n_ ), while still being expressive and stable to train. These range from _ϕ_ ensuring positive attention weights, _e.g.,_ via 1 + ELU (Katharopoulos et al., 2020) or ReLU (Kasai et al., 2021), to softmax or Gaussian kernel approximations via randomized features (Rahimi & Recht, 2007; Choromanski et al., 2020; Peng et al., 2021; Choromanski et al., 2021; Zheng et al., 2023) or low-rank approximations (Xiong et al., 2021; Chen et al., 2021).
+
+## 3 IMPROVING LINEAR ATTENTION VIA SPIKY AND MONOTONIC WEIGHTS
+
+We begin by identifying two key properties of attention weights which we hypothesize are essential for good performance quality. The first, _low-entropy spikyness_ , requires that the attention map is able to capture effectively capture sparse relevant tokens in a sequence. The second, _monotonicity over query-key dot products_ , requires the attention map to increase with increasing dot products, and allows for smooth conversion of pretrained Transformers into linear variants.
+
+3
+
+**==> picture [397 x 124] intentionally omitted <==**
+
+Figure 2: **Attention weight spikiness** . (Plots 1 - 5): Softmax attention results in lower entropy and “spiky” selective weighting compared to prior linear attentions (training from scratch on associative recall (Sec. 3.2)). (Plot 6): By training to mimic softmax attention, our proposed Hedgehog recovers this spikiness as a linear attention, corresponding with improved performance (Sec. 5).
+
+**==> picture [396 x 68] intentionally omitted <==**
+
+Figure 3: **Attention weight monotonicity** . (Plots 1 - 5): In contrast to softmax attention, prior linear attentions are not smoothly monotonic over trained query-key dot products, resulting in poor performance when converting BERT models by replacing attentions (Table 1). (Plot 6): Hedgehog recovers this monotonicity, and thus recovers 99% of BERT performance after conversion (Table 8).
+
+## 3.1 PROPERTIES FOR EXPRESSIVE ATTENTION MAPS
+
+Here we describe the spiky and monotonic properties hypothesized for desirable linear attention. We note these add to past observations for more performant linear attentions, including positive attention weights (Katharopoulos et al., 2020), orthogonal features (Choromanski et al., 2020; Irie et al., 2021), or locality (upweighting nearby values) (Qin et al., 2022a;b). We validate these properties among past linear attentions in Sec. 3.2, and preview how our proposed Hedgehog linear attention recovers these properties in correspondence with improved performance (Sec. 5) in Fig. 2, 3.
+
+**Low-entropy spikiness.** Intuitively, one source of attention’s effectiveness is its ability to selectively upweight relevant tokens in a sequence. This is a popular interpretation visualized in various Transformer architectures and settings ranging from encoder-decoder language translation (Bahdanau et al., 2014) to ViT image segmentation (Dosovitskiy et al., 2020; Caron et al., 2021). Mechanically, the softmax over query-key dot products exponentiates relative similarities between a query and each key, quantified via low-entropy or “spiky” attention weight distributions (Fig. 2).
+
+Linear attention maps work by replacing the softmax with the normalized dot product of alternate feature maps (Eq. 2). With existing feature maps, we find the resulting attention weights can result in much higher entropy or more uniform distributions. This is true even for methods designed to approximate the softmax under mean-squared error bounds (Choromanski et al., 2020) (Performer, Fig. 2) or imposed locality (Qin et al., 2022b) (cosFormer, Fig. 2). This uniformity in attention weights reduces the modeling capacity of linear attentions leading to worse performance quality.
+
+**Monotonicity over query-key dot products.** This property requires that the attention maps are monotonic over query-key dot products: when the dot product increases (decreases), the attention weight increases (decreases). In Fig. 3, we observe that while softmax attention exhibits this monotonicty (first subplot), the existing linear attentions do not. We believe this can cause training issues after swapping attentions due to conflicting gradients between attentions and original model parameters. In Fig. 3, trying to upweight attentions by increasing product similarity can actually result in
+
+4
+
+||BERT-FT|1|+ ELU|ReLU|Performer|cosFormer|exp(t = 1)|exp(t = 2)|
+|---|---|---|---|---|---|---|---|---|
+|Matthew’s correlation|**58.8**||28.1|39.5|24.7|39.9|45.9|50.0|
+
+Table 1: Finetuned-conversion performance of BERT finetuned on CoLA (BERT-FT), using prior linear attentions. With poor monotonicity (Fig. 3), prior methods fail to recover performance.
+
+_decreased_ attention weights. Later in Sec 3.2, we find this corresponds to failing to recover original performance when converting finetuned Transformers.
+
+## 3.2 EXPLAINING THE LINEAR ATTENTION PERFORMANCE GAP
+
+We validate the two properties introduced above by showing that (1) lacking spikiness corresponds to significantly worse performance when training from scratch, and (2) lacking spikiness and monotonicity corresponds to failing to recover performance when converting finetuned models.
+
+**Training from scratch** . We compare various Transformers’ abilities to solve Associative Recall (AR) (Ba et al., 2016), a next-token prediction task previously studied as a proxy for language modeling capability (Olsson et al., 2022). AR tests how well a model can recall specific content in an input sequence, structured as a list of key-value pairs which ends in a key (Table 12).
+
+**==> picture [160 x 103] intentionally omitted <==**
+
+As a control for evaluating our hypothesis, we also consider a simple feature map designed to induce “spikiness” but not monotonicity: _ϕt_ ( _x_ ) = exp( _x · t_ ), which applies a temperature- _t_ scaled exponential element-wise.
+
+In Fig. 4, we observe a strong correspondence between low-entropy attention weights and AR accuracy. While softmax attention solves the AR task perfectly, prior linear attentions struggle to achieve even 20% accuracy, at the same time obtaining much larger attention weight entropies. As further support to our hypothesis, we see that while the exponential map _ϕ_ 1 fails AR and produces similarly high entropy attention weights, increasing spikiness with _t_ = 2 actually solves the task.
+
+Figure 4: Associative recall performance strongly corresponds to lower attention entropy; present in softmax attention but not prior linear variants.
+
+**Finetuned-conversion** . We next compare how various
+
+linear attentions perform at recovering original softmax attention performance for finetunedconversion. We adopt the procedure in Kasai et al. (2021), which takes a Transformer already finetuned on a specific task, swaps the attention layers with a linear attention variant, and further finetunes the entire model on the same task.
+
+For this setting, we evaluate with a BERT-base-uncased model (Devlin et al., 2018) finetuned on the Corpus of Linguistic Acceptability (CoLA) task (Warstadt et al., 2019), where the goal is to classify whether a sentence is grammatically correct. We compare the performance of the original (softmax attention) BERT model[1] with the linear attention converted models. In Table 1, we find that just as no linear attention smoothly captures monotonicity over the trained model’s query-key dot products, no linear attentions fully recover the original finetuned BERT’s Matthew’s correlation of 58.8. This includes the spiky _ϕ_ 2 feature map which was sufficient in the training-from-scratch regime.
+
+## 4 HEDGEHOG: EXPRESSIVE LINEAR ATTENTION VIA SOFTMAX MIMICRY
+
+We present Hedgehog, a simple, efficient, and expressive feature map trained to mimic softmax attention. Hedgehog is predicated by (1) there existing linear attention approximations to the softmax that recover the spiky and monotonic properties of standard attention in practice, and (2) that we can efficiently compute similar approximations efficiently.
+
+In Sec. 4.1, we motivate Hedgehog and show that (1) is possible by revisiting low-degree Taylor polynomials. We find that for linear attention, the Taylor exponential works as a surprisingly simple feature map, recovering spikiness and monotonicity while matching standard Transformer performance. Unfortunately, we also find it introduces its own issues, where the feature map results in
+
+> 1[URL removed]
+
+5
+
+large query and key dimensions and becomes inefficient to compute. In Sec. 4.2, to thus overcome these challenges, we propose and describe Hedgehog, a _trainable_ linear attention trained to mimic softmax attention. In Sec. 5.1, we show how this enables similar spiky and monotonic properties to the softmax and Taylor exponential attentions, while retaining past linear attentions’ efficiency.
+
+## 4.1 SIMPLE POLYNOMIAL APPROXIMATIONS TO SOFTMAX ATTENTION
+
+From our findings in Sec. 3, we seek an efficient linear alternative to the softmax which retains its spiky and monotonic properties. We first consider a simple potential approach: approximating the exponential in softmax by a low-degree Taylor polynomial (Keles et al., 2023; Banerjee et al., 2020).
+
+While in general, a high-quality approximation to the softmax should retain its spiky, monotonic, and performant properties, we ground our investigation with two potential caveats for the Taylor polynomial. First, recall that feature maps for _p_ -degree polynomial approximations can be computed in _O_ ( _nd[p]_ ) time and space for every query and key vector. Thus, while this is indeed subquadratic in sequence length, the question remains whether we can set _p_ low enough to make the computation feasible while approximating exp reasonably. Second, as a general property of polynomials, the Taylor approximation only tracks its original function with low error in bounded regimes.
+
+**Setup** . To test the Taylor approximation, we use the second-degree exp approximation, and evaluate on the prior train-from-scratch and finetuned-conversion settings (Sec. 3.2). We implement the feature map as exp( _**q**[⊤]_ _**k**_ ) _≈ ϕ_ taylor( _**q**_ ) _[⊤] ϕ_ taylor( _**k**_ ), where _ϕ_ taylor( _**x**_ ) projects a _d_ -dimensional query or key to _O_ ( _d_[2] )-dimensional features _ϕ_ taylor( _**x**_ ) = �1 _, x_ 1 _, . . . , xd,_ � _∪_ � _xi · xj | i, j ∈_ [ _d_ ]�. **Positive results.** We find that the 2nd-degree Taylor approximation retains both the spikiness and monotonic properties (Fig. 5), and this corresponds to (near)-matching softmax attention performance (Table 2). We also note that here, the BERT query-key dot products are bounded in regimes where the secondorder Taylor series exp approximation maintains monotonicity (Fig. 5). This suggests we can enable expressive linear attentions for training from scratch and finetuned-conversion.
+
+**Caveats** . Unfortunately, the 2nd-degree Taylor approximation is not efficient. Even with _p_ = 2, the feature map dimension is now _d[′]_ = 1 + _d_ + _d_[2] , resulting in _O_ ( _nd_[3] ) attention complexity. As summarized in Table 2, this introduces an efficiency-effectiveness trade-off among functional attention approximations. Thus, the question remains whether we can recover the expressivity and modeling quality of softmax while achieving similar _O_ ( _nd_[2] ) scaling of past linear attentions.
+
+## 4.2 LEARNABLE LINEAR ATTENTIONS FOR MIMICKING SOFTMAX
+
+Our key insight is that rather than rely on fixed functional form that captures our spiky and monotonic properties, we can learn linear attention feature maps that do so. For each attention block, we propose feature maps as trainable single-layer MLPs, which is similar to prior work (Kasai et al., 2021) and acts similarly to an adapter (Houlsby et al., 2019) inserted after the query and key projections in Transformer attention layers (Fig. 1). However, unlike prior work, we explicitly train these feature maps such that the attention layers mimic the properties of softmax attention. We describe these two core components below, and validate these design choices in Sec. 5.1.
+
+**Spiky MLP feature map.** Recall the kernel based linear attention paradigm from Sec. 2, where a feature map _ϕ_ : R _[d] �→_ R _[d][′]_ is applied to both queries and keys to compute causal self-attention outputs using equation 2. However, unlike prior work that sticks to a pre-specified function as a feature map, we make the feature map a trainable MLP. In particular, for the single-head attention
+
+|Method|Complexity|Spiky?|Mono- tonic?|Train-from- scratch (acc)|BERT-FT (MC)|**Taylor Spikiness**|**Taylor Monotonicity**|
+|---|---|---|---|---|---|---|---|
+|Softmax|_O_(_n_2_d_)|✓|✓|100.0|58.8|||
+|1 + ELU|**_O_(****_nd_2)**|✗|✗|17.0|28.1|||
+|Performer|_O_(_nd′_2)|✗|✗|17.0|24.7|||
+|CosFormer|**_O_(****_nd_2)**|✗|✗|17.0|39.9|||
+|Taylor Exp|_O_(_nd_3)|✓|✓|**100.0**|**58.4**|||
+
+Table 2: Summary of feature maps compared to softmax, exhibiting an efficiency vs. expressivity tradeoff.
+
+Figure 5: Taylor approximation recovers spikiness and monotonicity
+
+6
+
+setting, we compute _ϕ_ mlp( _**q** i_ ) _[⊤] ϕ_ mlp( _**k** j_ ) with a simple one-layer MLP as _ϕ_ mlp( _**x**_ ) = Φ( _**W**[⊤]_ _**x**_ + _**b**_ ) where the matrix _**W** ∈_ R _[d][×][d][′]_ and the bias _**b** ∈_ R _[d][′]_ are learned, and Φ is an activation function. To induce spikiness, we set Φ as the element-wise exponential function studied in Sec. 3.2, resulting in
+
+**==> picture [292 x 17] intentionally omitted <==**
+
+**Attention weight distillation loss.** To learn a softmax approximation, we train _ϕ_ mlp to minimize the cross-entropy loss between the computed linear attention weights and those that would have been computed via softmax attention. For query _**q** i_ and keys _{_ _**k** j}_ 1 _[n]_[, we compute the sample losses as]
+
+**==> picture [316 x 28] intentionally omitted <==**
+
+For training Hedgehog attentions in multi-layer and multi-head attention Transformers, we apply a separate MLP to each head and each layer, and use the same _ϕ_ mlp for the queries and keys. We include further implementation details and pseudocode in Appendix A.
+
+## 5 EXPERIMENTS
+
+In experiments, we evaluate whether Hedgehog recovers softmax attention expressivity while retaining linear attention efficiency (Sec. 5.1), and how this improves modeling quality in training-fromscratch (Sec. 5.2), finetuned-conversion (Sec. 5.3), and pretrained-conversion regimes (Sec. 5.4).
+
+## 5.1 BENCHMARKING HEDGEHOG FOR EXPRESSIVITY AND EFFICIENCY
+
+Before evaluating Hedgehog on downstream tasks, we aim to validate Hedgehog’s design choices for efficiency and expressivity. We address: (1) Do Hedgehog’s spiky feature map and distillation loss recover the spiky and monotonic properties of softmax attention on the prior associative recall and BERT CoLA tasks? (2) Does Hedgehog achieve improved efficiency over softmax attention? (3) For conversion, do the learned attention weights actually match those of “ground-truth” softmax attention? Once learned, does this transfer to longer contexts and different tasks?
+
+**Recovering softmax spiky and monotonic properties** . We test Hedgehog in the same train-fromscratch associative recall (AR) and finetuned-conversion of BERT on CoLA settings in Sec. 3.2. For training-from-scratch on AR, we do not use the distillation loss, and train the model end-to-end with next-token-prediction after inserting the learnable MLPs. In Table. 3, we find that Hedgehog achieves both favorable complexity and modeling for train-from-scratch and finetuned-conversion. This corresponds respectively with the spiky (Fig. 2) and monotonic (Fig. 3) properties noted prior.
+
+**Recovering linear attention efficiency.** We next find Hedgehog’s _O_ ( _nd_[2] ) scaling in compute and memory can lead to real-world efficiency gains. We benchmark inference in wall-clock time and memory usage for one attention layer with 12 heads and head dimension = 64 on sequences up to _n_ = 32K tokens long (Fig. 6). Hedgehog achieves near 6x faster inference and similar memory to FlashAttention (Dao et al., 2022) (linear in memory but quadratic in time). Meanwhile, the Taylor approximation, while _O_ ( _n_ ), gets significantly larger memory and slower speed due to the extra _d_ .
+
+**Recovering softmax attention weights** . We next study the _combination_ of Hedgehog’s feature map and distillation loss for matching softmax attention weights. Beyond recovering the spiky
+
+|Method|Complexity|AR|BERT-FT|
+|---|---|---|---|
+|Softmax|_O_(_n_2_d_)|100.0|58.8|
+|Taylor Exp|_O_(_nd_3)|100.0|58.4|
+|Hedgehog|**_O_(****_nd_2)**|**100.0**|**59.2**|
+
+Table 3: Hedgehog matches performance on associative recall (AR) and BERT-finetuned conversion (BERT-FT) with prior best approaches, while achieving better time and space complexity.
+
+**==> picture [179 x 69] intentionally omitted <==**
+
+Figure 6: Hedgehog linear scaling in wallclock time (left) and memory (right). Unlike the Taylor approx., Hedgehog inference gets real-world gains over FlashAttention.
+
+7
+
+**==> picture [396 x 55] intentionally omitted <==**
+
+Figure 7: Compared to prior linear attentions, trained Hedgehog layers ( **2nd left** ) produce attention weights closely tracking softmax ( **left** ), with greater fidelity with both components (vs. Fig. 8).
+
+|Dataset|HH (CoLA)|HH (WT-103)|T2R-HH (CoLA)|HH (No Train)|1 + ELU|Performer|CosFormer|
+|---|---|---|---|---|---|---|---|
+|CoLA|**0.172**|0.352|0.191|0.694|1.223|1.293|1.196|
+|MRPC|0.663|**0.485**|1.128|1.250|2.165|2.234|1.982|
+|MNLI|**0.345**|0.382|0.613|0.851|1.51|1.581|1.338|
+|QNLI|0.671|**0.444**|1.126|1.139|1.968|2.069|1.817|
+
+**==> picture [99 x 54] intentionally omitted <==**
+
+Table 4: We find Hedgehog feature maps trained via distillation on CoLA or WikiText-103 generalize to new GLUE data, better matching softmax than prior linear attentions or ablations (reporting KL div.).
+
+Figure 8: Hedgehog ablated attention weights.
+
+**==> picture [228 x 49] intentionally omitted <==**
+
+|Seq. Len|256|1024|2048|4096|
+|---|---|---|---|---|
+|CoLA KL|0.182|0.187|0.190|0.181|
+
+Table 5: Hedgehog attention maintains fidelity with softmax attention over context lengths for BERT-FT on CoLA.
+
+Figure 9: Hedgehog trained on CoLA and WT-103 recover softmax attentions on MRPC data.
+
+and monotonic properties, learning to exactly match the weights can be particularly effective for converting or “distilling” pretrained quadratic Transformers into linear variants. For evaluation, we visualize the attention weights for different linear attentions in our BERT-FT CoLA setting (Fig. 7). We find Hedgehog recovers linear attention weights that match softmax’s with much higher fidelity.
+
+To further understand the contribution of Hedgehog’s (1) spiky MLP and (2) distillation loss in Sec. 4.2, we visualize ablated attention weights by (1) using the distillation loss with the ReLU feature map used in Transformer-to-RNN (T2R-HH) (Kasai et al. (2021)), and (2) using untrained MLPs, replacing the trainable weights with an identity function (HH No Train). We find that distillation training is necessary to recover attention weights, and that the spiky MLP is also helpful for matching attentions (later supported by improved Transformer conversion in Sec. 5.3).
+
+**Generalization to new data and longer contexts.** Finally, we investigate the generality of learned Hedgehog feature maps. We show Hedgehog attentions learned over specific data and context lengths can still better match softmax attention weights for new data and sequence lengths than prior linear attentions. We distill attentions for BERT models using CoLA or WikiText-103 (WT103) samples, and report attention weights compared to softmax attention on three other GLUE tasks: qualitatively (Fig. 9) and quantitatively via KL divergence w.r.t. the “ground-truth” softmax weights (Table 4). We include additional visualizations and comparisons Appendix 5.
+
+In Table 9, we further show that Hedgehog attention matching remains consistent across longer contexts. Post-distillation on CoLA samples, we concatenate CoLA samples into sequences 256 to 4096 tokens long (up to 8x the default 512 context length). We then compute attention weights using softmax and learned Hedgehog feature maps, and find that their KL divergence remains consistent.
+
+## 5.2 LEARNING SEQUENCE MODELING FROM SCRATCH
+
+We evaluate Hedgehog Transformers trained from scratch on the popular LRA sequence classification and WikiText-103 language modeling benchmarks. For training from scratch, we initialize MLPs as identity matrices for Hedgehog feature maps, and train the entire models end-to-end with the task-specific loss. We find Hedgehog achieves best average accuracy for both tasks among linear attentions (Table 6, 7). For LRA, while non-Transformer models are now state-of-the-art (Gu et al., 2021), our work focuses on approximating attention, so we compare with competitive subquadratic Transformers. We adopt the same hyperparameter settings as the official benchmark (Tay et al.,
+
+8
+
+|Model ListOps|Model ListOps|Text Retrieval|Text Retrieval|Image Pathfnder Average|Image Pathfnder Average|Image Pathfnder Average|
+|---|---|---|---|---|---|---|
+|Transformer|36.37|64.27|57.46|42.44|71.40|54.39|
+|Local Att Linear Trans. Reformer Sparse Trans. Sinkhorn Trans. Linformer Performer Synthesizer Longformer BigBird Nystrmformer_†_ cosFormer_†_ Skyformer_†_|15.82 16.13 37.27 17.07 33.67 35.70 18.01 36.99 35.63 36.05 37.15 37.90 **39.25**|52.98 **65.90** 56.10 63.58 61.20 53.94 65.40 61.68 62.85 64.02 65.52 63.41 64.70|53.39 53.09 53.40 59.59 53.83 52.27 53.82 54.67 56.89 59.29 79.56 61.36 82.06|41.46 42.34 38.07 44.24 41.23 38.56 42.77 41.61 42.22 40.83 41.58 **43.17** 40.77|66.63 75.30 68.50 71.71 67.45 76.34 **77.05** 69.45 69.71 74.87 70.94 70.33 70.73|46.06 50.55 50.67 51.24 51.29 51.36 51.41 52.88 53.46 55.01 58.95 55.23 59.50|
+|Hedgehog|37.15|64.60|**82.24**|40.15|74.16|**59.66**|
+
+Table 6: Training-from-scratch on LRA. Hedgehog achieves best avg. acc. (%) across most competitive Transformers (full results in Table 13, trends hold). _[†]_ indicates results reported from original works. All others reported from the official LRA benchmark (Tay et al., 2021). **Best** , 2nd-best.
+
+|Model|Transformer|Performer|Reformer|AFT|(1|+ ELU)|Hedgehog|
+|---|---|---|---|---|---|---|---|
+|Perplexity|**18.6**|26.8|25.6|28.2||25.6|20.8|
+
+Table 7: Training-from-scratch on WikiText-103. Among 125M decoder-only models, Hedgehog significantly closes the gap between standard Transformers and prior linear attention maps by 68.6%.
+
+2021). On WikiText-103, we adopt the setting in Fu et al. (2023), evaluating a 125M decoder-only Transformer on perplexity over 1024 tokens. Hedgehog significantly closes the gap by up to 6 PPL.
+
+## 5.3 FINETUNED CONVERSION OF QUADRATIC TO LINEAR TRANSFORMERS
+
+For the finetuned Transformer conversion regime, we evaluate performance recovery for BERT-base models finetuned on GLUE, and ViT-B/16 models trained on ImageNet-1K. For both settings, we first swap attentions and train via our distillation loss (Sec. 4.2). We then finetune the converted BERT models on their original tasks as in Transformer-to-RNN (T2R) (Kasai et al., 2021).
+
+For BERT, we compare Hedgehog to T2R in Table 8, and find that in contrast, Hedgehog conversion recovers near-100% of the original softmax attention performance. To further test Hedgehog’s feature map and attention distillation, we also compare against an ablation that trains the T2R feature map with our distillation loss (T2R-HH). We find that training to mimic softmax attentions boosts performance of T2R, suggesting that attention weight distillation may be a general step to improving linear attention feature maps. However, Hedgehog’s exponential still leads to superior performance. We find similar results for ViT-B/16, suggesting Hedgehog can also apply to other modalities.
+
+## 5.4 PRETRAINED CONVERSION FOR SUBQUADRATIC TASK TRANSFER
+
+We finally evaluate Hedgehog for converting pretrained Transformers into linear Transformers. We consider two settings: (1) To benchmark Hedgehog and the pretrained-conversion regime for subquadratic sequence modeling, we use the same WT-103 evaluation in Sec. 5.2 for converting 125Mparameter GPT-2. (2) As an early application for Hedgehog on larger models, we convert Llama-2 7B (Touvron et al., 2023) before finetuning with low-rank adapters (LoRA) (Hu et al., 2021) on SAMSum summarization (Gliwa et al., 2019). We include further training details in Appendix. B.5.
+
+To most directly measure pretrained-conversion quality, for both settings we compare against T2R. For GPT-2, we find Hedgehog both outperforms T2R, and further outperforms modern subquadratic sequence models such as H3 (Fu et al., 2023) and Hyena (Poli et al., 2023) (Table 10). Although not directly comparable due to pretraining, we also compare with zero-shot and finetuned GPT-2 for reference. While Hedgehog is 1 PPL off the fully quadratic finetuned GPT-2, it significantly
+
+9
+
+improves over zero-shot while being linear to train. We finally apply Hedgehog for Llama-2 conversion, where Hedgehog enables linear attention Llamas that train via LoRA (see Appendix C.3 for sample generations).
+
+|Method|CoLA|SST2|MRPC|STS-B|QQP|MNLI|QNLI|RTE|(%) Recover|Top-1|Acc. %|
+|---|---|---|---|---|---|---|---|---|---|---|---|
+|BERT-FT|58.8|93.2|90.2|88.8|91.0|84.7|91.3|68.2|100.0|ViT-B/16|80.3|
+|T2R|43.6|87.7|83.0|78.6|86.7|78.9|84.6|54.1|88.9|||
+|T2R-HH|56.9|90.9|89.1|77.7|90.0|77.4|84.5|56.3|93.5|T2R-HH|77.0|
+|Hedgehog|**59.2**|**92.6**|**90.1**|**87.4**|**91.0**|**82.6**|**89.6**|**69.3**|**99.3**|Hedgehog|**79.5**|
+|Table 8: original|Finetuned-conversion evaluation. fnetuned BERT (BERT-FT) GLUE|||||Hedgehog recovers performance.|||99.3% of|Table 9: Hedgehog achieve 99% ViT acc.||
+
+Table 8: Finetuned-conversion evaluation. Hedgehog recovers 99.3% of original finetuned BERT (BERT-FT) GLUE performance.
+
+|Method GPT-2 GPT-2 FT Hybrid H3 Hyena T2R-GPT-2 HH-GPT-2 PPL 28.0 15.8 18.5 18.5 19.4 **16.7** Table 10: Pretrained-conversion for 125M GPT-2 on WT-103 lang.|Llama-2 R1 / R2 / RL|
+|---|---|
+||Softmax (Zero-shot) 19.3 / 6.8 / 14.9 Softmax (LoRA) 51.1 / 27.6 / 43.5|
+||T2R (LoRA) 2.8 / 0.0 / 2.6 Hedgehog (LoRA) **47.4 / 23.4 / 39.1**|
+
+Table 10: Pretrained-conversion for 125M GPT-2 on WT-103 lang. modeling. While finetuned GPT-2 gets lowest PPL, among _subquadratic_ models Hedgehog significantly outperforms by 1.8 PPL.
+
+Table 11: Hedgehog Llama-2 conversion (ROUGE).
+
+## 6 CONCLUSION
+
+We present Hedgehog, a learnable linear attention to mimic softmax attention. This enables training linear attention models from scratch and _converting_ existing Transformers into linear attention variants. To motivate Hedgehog we study why prior linear attentions underperform softmax attention, and identify two missing properties: (1) the ability to capture low entropy or spiky attention maps and (2) to be monotonic with respect to the underlying query-key dot products. We find training to match softmax attentions results in recovering many of its expressive properties, and that Hedgehog leads to competitive performance with softmax-based attention in training from scratch, finetunedconversion, and pretrained conversion regimes.
+
+10
+
+## REFERENCES
+
+Josh Alman and Zhao Song. Fast attention requires bounded entries. _arXiv preprint arXiv:2302.13214_ , 2023.
+
+- Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. _Advances in neural information processing systems_ , 29, 2016.
+
+- Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. _arXiv preprint arXiv:1409.0473_ , 2014.
+
+- Kunal Banerjee, Vishak C., Rishi Raj Gupta, Kartik Vyas, Anushree H., and Biswajit Mishra. Exploring alternatives to softmax function. _ArXiv_ , abs/2011.11538, 2020. URL https: //api.semanticscholar.org/CorpusID:227127574.
+
+- Stella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley, Kyle OBrien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. Pythia: A suite for analyzing large language models across training and scaling. In _International Conference on Machine Learning_ , pp. 2397–2430. PMLR, 2023.
+
+- Mathilde Caron, Hugo Touvron, Ishan Misra, Herv´e J´egou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 9650–9660, 2021.
+
+- Shouyuan Chen, Sherman Wong, Liangjian Chen, and Yuandong Tian. Extending context window of large language models via positional interpolation. _arXiv preprint arXiv:2306.15595_ , 2023.
+
+- Yifan Chen, Qi Zeng, Heng Ji, and Yun Yang. Skyformer: Remodel self-attention with gaussian kernel and nystr _\_ ”om method. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , 2021. URL https: //openreview.net/forum?id=pZCYG7gjkKz.
+
+- Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. _arXiv preprint arXiv:2009.14794_ , 2020.
+
+- Krzysztof Choromanski, Haoxian Chen, Han Lin, Yuanzhe Ma, Arijit Sehanobish, Deepali Jain, Michael S Ryoo, Jake Varley, Andy Zeng, Valerii Likhosherstov, et al. Hybrid random features. _arXiv preprint arXiv:2110.04367_ , 2021.
+
+11
+
+- Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 2978–2988, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1285. URL [URL removed]
+
+- Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher R´e. Flashattention: Fast and memoryefficient exact attention with io-awareness. _Advances in Neural Information Processing Systems_ , 35:16344–16359, 2022.
+
+- Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. _arXiv preprint arXiv:2305.14314_ , 2023.
+
+- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. _arXiv preprint arXiv:1810.04805_ , 2018.
+
+- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. _arXiv preprint arXiv:2010.11929_ , 2020.
+
+- Daniel Y Fu, Tri Dao, Khaled Kamal Saab, Armin W Thomas, Atri Rudra, and Christopher Re. Hungry hungry hippos: Towards language modeling with state space models. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed] net/forum?id=COZDy0WYGg.
+
+- Bogdan Gliwa, Iwona Mochol, Maciej Biesek, and Aleksander Wawer. SAMSum corpus: A humanannotated dialogue dataset for abstractive summarization. In Lu Wang, Jackie Chi Kit Cheung, Giuseppe Carenini, and Fei Liu (eds.), _Proceedings of the 2nd Workshop on New Frontiers in Summarization_ , pp. 70–79, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-5409. URL [URL removed]
+
+- Albert Gu, Karan Goel, and Christopher R´e. Efficiently modeling long sequences with structured state spaces. _arXiv preprint arXiv:2111.00396_ , 2021.
+
+- Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for nlp. In _International Conference on Machine Learning_ , pp. 2790–2799. PMLR, 2019.
+
+- Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. _arXiv preprint arXiv:2106.09685_ , 2021.
+
+- Kazuki Irie, Imanol Schlag, R´obert Csord´as, and J¨urgen Schmidhuber. Going beyond linear transformers with recurrent fast weight programmers. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , 2021. URL [URL removed]
+
+- Jungo Kasai, Hao Peng, Yizhe Zhang, Dani Yogatama, Gabriel Ilharco, Nikolaos Pappas, Yi Mao, Weizhu Chen, and Noah A. Smith. Finetuning pretrained transformers into RNNs. In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pp. 10630– 10643, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.830. URL [URL removed] org/2021.emnlp-main.830.
+
+- Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Franc¸ois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In _International conference on machine learning_ , pp. 5156–5165. PMLR, 2020.
+
+- Feyza Duman Keles, Pruthuvi Mahesakya Wijewardena, and Chinmay Hegde. On the computational complexity of self-attention. In _International Conference on Algorithmic Learning Theory_ , pp. 597–619. PMLR, 2023.
+
+12
+
+- Huanru Henry Mao. Fine-tuning pre-trained transformers into decaying fast weights. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , pp. 10236– 10242, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.emnlp-main.697. URL [URL removed] 2022.emnlp-main.697.
+
+- Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In _International Conference on Learning Representations_ , 2017. URL https: //openreview.net/forum?id=Byj72udxe.
+
+- Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads. _arXiv preprint arXiv:2209.11895_ , 2022.
+
+- Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah A Smith, and Lingpeng Kong. Random feature attention. _arXiv preprint arXiv:2103.02143_ , 2021.
+
+- Michael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y Fu, Tri Dao, Stephen Baccus, Yoshua Bengio, Stefano Ermon, and Christopher R´e. Hyena hierarchy: Towards larger convolutional language models. _arXiv preprint arXiv:2302.10866_ , 2023.
+
+- Zhen Qin, Xiaodong Han, Weixuan Sun, Dongxu Li, Lingpeng Kong, Nick Barnes, and Yiran Zhong. The devil in linear transformer. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , pp. 7025–7041, Abu Dhabi, United Arab Emirates, December 2022a. Association for Computational Linguistics. doi: 10.18653/v1/2022.emnlp-main. 473. URL [URL removed]
+
+- Zhen Qin, Weixuan Sun, Hui Deng, Dongxu Li, Yunshen Wei, Baohong Lv, Junjie Yan, Lingpeng Kong, and Yiran Zhong. cosformer: Rethinking softmax in attention. _arXiv preprint arXiv:2202.08791_ , 2022b.
+
+- Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019. URL [URL removed] semanticscholar.org/CorpusID:160025533.
+
+- Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In J. Platt, D. Koller, Y. Singer, and S. Roweis (eds.), _Advances in Neural Information Processing Systems_ , volume 20. Curran Associates, Inc., 2007. URL [URL removed] 013a006f03dbc5392effeb8f18fda755-Paper.pdf.
+
+- Imanol Schlag, Kazuki Irie, and J¨urgen Schmidhuber. Linear transformers are secretly fast weight programmers. In _International Conference on Machine Learning_ , pp. 9355–9366. PMLR, 2021.
+
+- Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena : A benchmark for efficient transformers. In _International Conference on Learning Representations_ , 2021. URL https: //openreview.net/forum?id=qVyeW-grC2k.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. _arXiv preprint arXiv:2307.09288_ , 2023.
+
+- Yao-Hung Hubert Tsai, Shaojie Bai, Makoto Yamada, Louis-Philippe Morency, and Ruslan Salakhutdinov. Transformer dissection: An unified understanding for transformer’s attention via the lens of kernel. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pp. 4344–4353, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1443. URL [URL removed] D19-1443.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+13
+
+- Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. _Transactions of the Association for Computational Linguistics_ , 7:625–641, 2019.
+
+- Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nystr¨omformer: A nystr¨om-based algorithm for approximating self-attention. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 14138–14148, 2021.
+
+- Lin Zheng, Jianbo Yuan, Chong Wang, and Lingpeng Kong. Efficient attention via control variates. In _The Eleventh International Conference on Learning Representations_ , 2023. URL https: //openreview.net/forum?id=G-uNfHKrj46.
+
+14
+
+## A HEDGEHOG IMPLEMENTATION DETAILS
+
+We provide further details on the Hedgehog feature map and attention weight distillation training.
+
+## A.1 MECHANICS FOR HEDGEHOG FEATURE MAP
+
+To improve Hedgehog performance in practice, we explored variations along two additional criteria for numerical stability and improved expressivity.
+
+**Numerical stability** In practice, we find that computing Φ as the softmax applied over the _MLP output dimension_ also seems to work but with better stability. In this case, we expand Eq. 3 as
+
+**==> picture [311 x 28] intentionally omitted <==**
+
+(also performing better than dividing each element by the max over _{_ exp( _**w** i[⊤]_ _**[x]**_[ +] _**[ b]**_[)] _[}][d] i_ =1[)]
+
+**Negation mapping** . To better compute dot products as a similarity measure between queries and keys, in practice we also set Φ as a mapping from R _[d] �→_ R[2] _[d]_ , _e.g.,_ via
+
+**==> picture [390 x 19] intentionally omitted <==**
+
+where the additional negation mapping in R[2] _[d]_ intuitively lets us better factor in negative dimensionalities, which prior linear attention feature maps like ReLU ignore. While this results in a larger feature dimension, it only scales by a fixed constant 2 such that the overall time and space complexity for Hedgehog linear attention is still _O_ ( _nd_[2] ). We further find that in practice, this still accomplishes favorable scaling and much faster inference with smaller memory than the Taylor exponential discussed in Sec. 4.1 (see Fig. 6 for real-world wall-clock time and memory savings).
+
+## A.2 HEDGEHOG FEATURE MAP AND MODEL ARCHITECTURE
+
+We apply Hedgehog feature maps for each head and layer individually in a standard Transformer architecture, where the addition of head-specific MLPs is akin to inserting “adapters” (Houlsby et al., 2019) after every query and key projection. Each MLP is a single linear layer with input and output dimensions equal to the base Transformer’s head dimension. Pytorch-like code is given below.
+
+1 import torch 2 import torch.nn as nn 3 4 class HedgehogFeatureMap(nn.Module): 5 def __init__(self, head_dim: int, activation: str = ’exp’): 6 super().__init__() 7 # Trainable map 8 self.layer = nn.Linear(head_dim, head_dim) 9 self.init_weights_() 10 11 def self.init_weights_(self): 12 """Initialize trainable map as identity""" 13 nn.init.eye_(self.layer.weight) 14 nn.init.zeros_(self.layer.bias) 15 16 def forward(self, x: torch.Tensor): 17 x = self.layer(x) # shape b, h, l, d 18 return torch.cat([torch.exp(x), torch.exp(-x)], dim=-1)
+
+A.3 HEDGEHOG DISTILLATION AND FINETUNING IMPLEMENTATION DETAILS
+
+We include additional details for training Hedgehog layers to obtain linear attention Transformers. These fall under two categories: (1) training-from-scratch, and (2) finetuned / pretrained conversion.
+
+15
+
+**1. Training-from-scratch** . When training Hedgehog Transformers from scratch, we insert a Hedgehog MLP for each query and key projection of the randomly initialized Transformer ( _e.g.,_ for each head of a multi-head attention layer, and for all such layers). We then train the Hedgehog MLPS jointly with all other model parameters end-to-end with a single objective function, _e.g.,_ crossentropy loss on next-token prediction when training models for language modeling.
+
+**2. Finetuned / pretrained conversion** . For both these regimes, we carry out training as a two stage process. Like training-from-scratch, we initially insert Hedgehog MLPs for query and key projections. Following this, we proceed in two stages:
+
+1. **Attention distillation.** We first freeze the Transformer’s original weights and specifically train the Hedgehog MLPs, such that the resulting linear attention weights match those produced via softmax attention over the same query and key tensors. For each head, we conceptually follow Listing 1 below to compute a soft cross-entropy or KL-divergence between the “predicted” linear attention weights and “ground-truth” softmax attention weights. We compute these losses for each attention head and layer after one forward pass of the entire model, using data samples from the target task. We find it sufficient to use one optimizer for joint training over all Hedgehog layers in parallel, using the sum of each individual attention head distillation loss as the final criterion. This makes training simple and comparable to a standard training loop; we further provide code _[†]_ in Listing 2 to do so with popular APIs such as HuggingFace Transformers[2] .
+
+2. **Original parameter finetuning.** Following attention distillation, we simply unfreeze all model weights and train with a standard task-specific loss function. We find we can also keep certain layers frozen or train with parameter-efficient finetuning such as low-rank adaptation (Hu et al., 2021); we explore this in Sec. 5.4 with Llama-2 models.
+
+1 # Hedgehog distillation loss for one attention head 2 3 def softmax_attn(q: torch.Tensor, k: torch.Tensor): 4 """Get softmax attention weights -> Assume q, k are both shape (b, h, l, d)""" 5 scale = q.shape[-1] ** 0.5 6 qk = torch.einsum(’bhmd,bhnd->bhmn’, q, k) / scale 7 return torch.softmax(qk, dim=-1) 8 9 def quadratic_linear_attn(q: torch.Tensor, k: torch.Tensor): 10 """ 11 Get linear attention weights 12 -> Assume q, k are both shape (b, h, l, d), and feature maps already applied 13 """ 14 qk = torch.einsum(’bhmd,bhnd->bhmn’, q, k) 15 return qk / qk.sum(dim=-1, keepdim=True) 16 17 def compute_hedgehog_loss(q: torch.Tensor, 18 k: torch.Tensor, 19 hh_mlp_q: HedgehogFeatureMap, 20 hh_mlp_k: HedgehogFeatureMap): 21 """ 22 Compute the attention distillation loss 23 -> Assume ‘soft_label_cross_entropy‘ is implemented 24 (alternatively use KL divergence) 25 -> Assume q and k are the queries and keys of a 26 pretrained Transformer, 27 e.g., via q = self.q_proj(hidden_states) 28 """ 29 true_attn = softmax_attn(q, k) 30 pred_attn = quadratic_linear_attn(hh_mlp_q(q), hh_mlp_k(k)) 31 return soft_label_cross_entropy(pred_attn, true_attn) 32
+
+Listing 1: Hedgehog distillation loss for one attention head
+
+> 2[URL removed]
+
+16
+
+1 # Hedgehog Attention class for easy attention distillation 2 3 class HedgehogAttention(nn.Module): 4 """ 5 Sample code for HedgehogAttention, following HuggingFace API 6 """ 7 def __init__(self, base_attn, training = True): 8 self.base_attn = base_attn # e.g., LlamaAttention 9 10 # Trainable feature maps 11 self.mlp_q = HedgehogFeatureMap(base_attn.head_dim) 12 self.mlp_k = HedgehogFeatureMap(base_attn.head_dim) 13 14 # Freeze original attention parameters 15 for p in self.base_attn.parameters(): 16 p.requires_grad = False 17 18 self.q_proj = self.base_attn.q_proj 19 self.k_proj = self.base_attn.k_proj 20 21 # Whether we train attentions or not 22 self.training = training 23 24 def forward(self, 25 hidden_states: torch.Tensor, 26 output_attentions: bool = True, 27 **[base_kwargs:][any][):] 28 29 if self.training: 30 # Compute ground-truth attention weights 31 outputs, true_attns = self.base_attn( 32 hidden_states=hidden_states, 33 output_attentions=True, 34 **[base_kwargs)] 35 36 # Compute Hedghog feature maps 37 q = self.mlp_q(self.q_proj(hidden_states)) 38 k = self.mlp_k(self.k_proj(hidden_states)) 39 40 pred_attns = quadratic_linear_attn(q, k) 41 42 if output_attentions: # Hook for attentions 43 return outputs, (pred_attns, true_attns) 44 45 # ... End relevant
+
+Listing 2: Hedgehog Attention class for easy attention distillation.
+
+> _†_ In practice, to train all Hedgehog layers easily in a joint end-to-end fashion, we make use of popular pretrained Transformer APIs such as those in the HuggingFace transformers library. We implement a Hedgehog equivalent of the base Transformers’ attention class, which (1) abstracts away the Transformer-specific attention computation and (2) lets us hook attention weights calculated at each layer to the model’s final outputs, _e.g.,_ via output ~~a~~ ttentions = True keyword args. We can subsequently substitute each attention layer with the “HedgehogAttention” equivalent, and train via a simple loop over the data. We present Pytorch-like code in Listing 3.
+
+17
+
+1 # End-to-end joint attention distillation 2 3 from transformers import AutoModel 4 5 # Load base model 6 base_model = AutoModel.from_pretrained(...) 7 8 # Freeze original parameters 9 for p in base_model: p.requires_grad = False 10 11 # Convert attentions for all layers 12 for layer in base_model: 13 base_model.attn = HedgehogAttention(base_model.attn) 14 15 # Define single optimizer for training all feature maps 16 optim = optimizer(base_model.parameters()) 17 18 # Train Hedgehog feature maps 19 for data in dataloader: 20 21 # Compute outputs and hook to attentions 22 outputs = base_model(**data, output_attentions=True) 23 outputs = outputs.get(’attentions’) 24 25 total_loss = 0 26 for attns in enumerate(outputs): # attentions for each layer 27 pred_attn, true_attn = attns 28 total_loss += soft_label_cross_etnropy(pred_attn, true_attn) 29 30 loss.backward() # Jointly optimize all feature maps 31 optim.step()
+
+Listing 3: End-to-end joint attention distillation.
+
+## B DEFERRED EXPERIMENTAL DETAILS
+
+## B.1 ASSOCIATIVE RECALL ANALYSIS (SECTION 3.2)
+
+In Sec. 3.2, we compare various Transformers’ abilities to solve Associative Recall (AR) (Ba et al., 2016), a next-token prediction task previously studied as a proxy for language modeling capability (Olsson et al., 2022). AR tests how well a model can recall specific content in an input sequence, structured as a list of key-value pairs which ends in a key Table 12.
+
+|Input Sequence|Next Token|Vocab Size|Seq. Length|
+|---|---|---|---|
+|c9 k 8 j 3 ... f 1c|9|40|128|
+
+Table 12: Associative recall task. Example from Ba et al. (2016).
+
+**Dataset details.** To understand the effects of more uniform attention weightings, we evaluate with 40 possible tokens and 128 token-long-sequences, such that models must recall pairings that only occur three times on average in-context. We generate 10,000 training samples following the patterns described in Table 12, and evaluate on 2000 newly-generated test samples (again using the same associative recall structure, but with different token associations).
+
+**Architecture details.** For all experiements, we use a four layer Transformer with four heads-perlayer, head dimension = 64, and rotary embeddings. This is similar to modern model families such
+
+18
+
+as Pythia (Biderman et al., 2023) and LLaMA / Llama-2 (Touvron et al., 2023). We keep all parts consistent except for the multi-head attention, comparing popular linear attentions (c.f., Fig. 2).
+
+**Training details.** For fair comparison to evaluate just the feature map / modeling architecture, we train all models by sweeping learning rate _∈{_ 1e-2, 1e-4 _}_ , weight decay _∈{_ 0, 5e-4 _}_ , and batch size _∈{_ 8, 32 _}_ with AdamW optimizer. We train up to 100 epochs with early stopping (explicitly stopping training if validation loss stops decreasing after 10 epochs).
+
+## B.2 BERT-BASE FINETUNED ON COLA CONVERSION (SECTION 3.2)
+
+**Training details.** For our finetuned-conversion analysis, we replace the attentions of a finetuned BERT-base-uncased model available on the HuggingFace model hub[3] . We train with batch size 8, learning rate 1e-5, zero weight decay, AdamW optimizer, and up to 10 epochs with early stopping.
+
+## B.3 HEDGEHOG TRAINING FROM SCRATCH (SECTION 5.2)
+
+**LRA training and model details.** On LRA, for fair comparison we implement Hedgehog in the existing PyTorch implementation provided by Xiong et al. (2021), deferring to the same model configurations and hyperparameters used in the original repository (Tay et al., 2021).
+
+**WikiText-103 training and model details.** For WikiText-103, we train a 125M parameter GPT-2 style Transformer with learning rate 6e-4, weight decay 0.01, and AdamW optimizer. For close comparison, we follow the architectural details of GPT-2 125M, and use a 12 layer decoder-only network with 12 heads, head dimension = 64, hidden dimension 768, and MLP dimension 3072.
+
+## B.4 HEDGEHOG FINETUNED CONVERSION (SECTION 5.3)
+
+**Recovering finetuned BERT performance on GLUE tasks.** For finetuned conversion, we first conduct Hedgehog attention distillation by training attention layers up to five epochs with early stopping based on validation loss. We train with learning rate 1e-2, weight decay 0, AdamW optimizer. We follow the same procedure for the Transformer-to-RNN (T2R) (Kasai et al., 2021) ablation. For regulard T2R and subsequently post attention distillation, we train each BERT model with batch size 8, learning rate 1e-5, weight decay 0, AdamW optimizer, and cosine scheduler for up to five epochs on the individual classification (all except STS-B) or regression tasks (STS-B) on the GLUE benchmark. For all tasks, we use the corresponding available finetuned BERT-base-uncased checkpoints hosted at the HuggingFace model hub[4] , and thank the original uploader for their contributions.
+
+**Recovering finetuned Vision Transformer performance on ImageNet-1K.** To demonstrate finetuned-conversion for the image domain, we use the vit-base-patch16-224 checkpoint provided by Google on HuggingFace[5] , which is trained on ImageNet-21k before being finetuned on ImageNet-1K at resolution of 224 x 224 pixels (Dosovitskiy et al., 2020). For distillation, we freeze the original ViT weights, and train linear attention MLPS with batch size 32, learning rate 0.01, zero weight decay, and AdamW optimizer, and train for two epochs. We then train all parameters with learning rate 1e-3, zero weight decay and AdamW optimizer up to 10 epochs with early stopping.
+
+## B.5 HEDGEHOG PRETRAINED CONVERSION (SECTION 5.4)
+
+**Linear GPT-2 125M conversion for WikiText-103 language modeling.** We use the available GPT-2 125M pretrained checkpoint available on HuggingFace[6] from Radford et al. (2019). For Hedgehog, we first do attention distillation and train Hedgehog MLPs for two epochs over the WikiText-103 data, using batch size 8, learning rate 0.01, zero weight decay, AdamW optimizer, and 1024-tokens per input. For T2R-GPT-2 and the subsequent Hedgehog-GPT-2 model, we finetune all model parameters with learning rate 6e-4, weight decay 0.01, and AdamW optimizer and 1024 tokens-per-input.
+
+> 3[URL removed]
+
+> 4[URL removed]
+
+> 5[URL removed]
+
+> 6[URL removed]
+
+19
+
+**Linear Llama-2 7B conversion for SAMSum corpus summarization.** We use the base Llama-2 7B model available via Meta and HuggingFace (llama-2-7b-hf) from Touvron et al. (2023). For all experiments, we use non-quantized model weights in bfloat16, and conduct all training runs and evaluations on a single A6000 GPU.
+
+For dataset preparation, we first convert individual document and summarization pairs into single next-token prediction samples, using the template in Listing 4. For both distillation and subsequent finetuning, we then chunk these samples into concatenated inputs 1024 tokens long.
+
+For attention distillation, we freeze all original Llama-2 weights, and train Hedgehog MLPs for every head and layer (0.495% of the original model size). We then train for two epochs with learning rate 0.01, zero weight decay, AdamW optimizer, and batch size 8 with gradient accumulation.
+
+For finetuning and comparison to T2R and standard attention, we apply LoRA to query, key, value, and output projections of each layer. We use alpha parameter 16 and rank 8. We train with learning rate 1e-4, zero weight decay, AdamW optimizer, and batch size 8 with gradient accumulation.
+
+For generation, we compute ROUGE metrics (R1, R2, RL; for overlap of unigrams, bigrams, and longest common subsequence) over model outputs. We generate sequences up to 100 tokens long, and evaluate based on outputs up til the first Llama stop token.
+
+1 # Llama-2 prompt template for SAMSum 2 3 Summarize this dialog: 4 {input} 5 --6 Summary: 7 {output}{eos_token}
+
+Listing 4: Llama-2 prompt template for SAMSum corpus summarization
+
+## C ADDITIONAL RESULTS
+
+## C.1 EXTENDED COMPARISON TO ATTENTION MODELS ON LRA
+
+In Table 13, we compare Hedgehog’s performance on LRA against a fuller set of Transformer and subquadratic Transformer based alternatives sourced either from the official benchmark leaderboard (Tay et al., 2021) or recent subquadratic attention works (where we display the most competitive alternatives in Table 6). We find Hedgehog on average obtains best accuracy. Although recently non-Transformer models such as deep state-space models have shown impressive results outperforming Transformers on LRA (Gu et al., 2021), as our work focuses on how to improve and recover the expressivity of standard softmax Transformers, we focus the comparison against other attention-based methods. We defer to Gu et al. (2021) and related works for their LRA results.
+
+## C.2 HEDGEHOG FEATURE MAP GENERALIZATION TO NEW DATA
+
+We extend our analysis into how Hedgehog’s feature maps learned with one dataset generalize to attentions computed on a new dataset ( _c.f._ Table 4 and Fig. 9 in Sec. 5.1). As in the prior section, we find Hedgehog learned feature maps frequently generalize to new datasets. Despite training to match the softmax attentions on one model and dataset, we first find Hedgehog feature maps can produce attention weights that closely resemble softmax attention for the same model on another dataset (App. C.2.1). We next quantify this fidelity via KL divergence w.r.t. the softmax attentions (App. C.2.2). We find that Hedgehog learned feature maps almost always still generalize better than prior linear attention feature maps. We finally show that this attention matching generalization transfers to actual pretrained-conversion performance (App. C.2.3). We replace BERT-base softmax attentions with Hedgehog attentions trained on one task, and find finetuning with these converted models on _another_ GLUE task still leads to improvements over prior linear attentions.
+
+**Setup.** For all experiments, we begin by training Hedgehog attentions on “in-distribution” softmax attention data. We use the pretrained BERT-base-uncased model (Devlin et al., 2018) as the Trans-
+
+20
+
+|Model ListOps|Model ListOps|Text Retrieval|Text Retrieval|Image Pathfnder Average|Image Pathfnder Average|Image Pathfnder Average|
+|---|---|---|---|---|---|---|
+|Transformer|36.37|64.27|57.46|42.44|71.40|54.39|
+|Local Att Linear Trans. Reformer Sparse Trans. Sinkhorn Trans. Linformer Performer Synthesizer Longformer BigBird Nystrmformer_†_ cosFormer_†_ Skyformer_†_|15.82 16.13 37.27 17.07 33.67 35.70 18.01 36.99 35.63 36.05 37.15 37.90 **39.25**|52.98 65.90 56.10 63.58 61.20 53.94 65.40 61.68 62.85 64.02 65.52 63.41 64.70|53.39 53.09 53.40 59.59 53.83 52.27 53.82 54.67 56.89 59.29 79.56 61.36 82.06|41.46 42.34 38.07 44.24 41.23 38.56 **42.77** 41.61 42.22 40.83 41.58 43.17 40.77|66.63 75.30 68.50 71.71 67.45 76.34 **77.05** 69.45 69.71 74.87 70.94 70.33 70.73|46.06 50.55 50.67 51.24 51.29 51.36 51.41 52.88 53.46 55.01 58.95 55.23 59.50|
+|Hedgehog|37.15|64.60|**82.24**|40.15|74.16|**59.66**|
+
+Table 13: Training-from-scratch on LRA. Hedgehog achieves best average performance across Transformers and subquadratic variants. _[†]_ indicates method results reported from original works. All other reported from the official LRA benchmark (Tay et al., 2021). **Best** , 2nd-best acc (%).
+
+former we wish to convert, and distill two sets of Hedgehog attentions over (1) the GLUE CoLA task or (2) 512-token chunks of WikiText-103 corpus. Thus, queries and keys computed with the BERT-base-uncased model over CoLA validation samples are “in-distribution” for the first set, and we are interested in seeing how attention weight fidelity or downstream performance recovery are affected when subsequently finetuning on non-CoLA GLUE data. We compare with various prior ablations and alternative feature maps, such as the Transformer-to-RNN feature map (Kasai et al., 2021) after attention distillation, Hedgehog without attention distillation, and prior representative linear attentions such as Performer (Choromanski et al., 2020) and cosFormer (Qin et al., 2022b).
+
+## C.2.1 QUALITATIVE EVIDENCE OF HEDGEHOG DATA GENERALIZATION
+
+In Fig. 10 and Fig. 11, we visualize attention weights computed via various methods on heads in the 1st, 6th, and 12th layers of the BERT-base uncased model. We find Hedgehog can learn feature maps that lead to matching softmax attention weights, even when computed on new data samples. Interestingly, the Hedgehog feature maps result in significantly more similar attention weights versus alternative feature maps (quantified in the next section).
+
+In addition, our comparisons to Hedgehog ablations suggest that the proposed Hedgehog feature map _and_ distillation procedure are important for best generalization. Removing either the Hedgehog feature map form (via doing attention distillation using the prior Transformer-to-RNN feature map (T2R-HH) or not training feature maps (HH (No Train)) leads to lower fidelity, where attention distillation seems critical for retaining weights reasonably similar to softmax attention.
+
+## C.2.2 QUANTITATIVE ANALYSIS OF HEDGEHOG DATA GENERALIZATION
+
+To quantify the above observations, we compute the KL divergence between Hedgehog attention weights computed on various GLUE tasks and the “ground-truth” softmax attention weights, using the pretrained BERT-base-uncased model. We report the KL divergence in Table 14. Similar to the above visualizations, we find that Hedgehog feature maps do seem to produce better matching attention weights to softmax attention via significantly smaller KL divergences.
+
+## C.2.3 HEDGEHOG DATA GENERALIZATION VIA GLUE TASK TRANSFER
+
+We finally evaluate the Hedgehog attention generalization by finetuning the pretrained BERT models with trained Hedgehog on new GLUE tasks. We follow the same procedure described in Ap-
+
+21
+
+**==> picture [396 x 173] intentionally omitted <==**
+
+Figure 10: **Qualitative generalization to MRPC** . Attention weights for BERT-base-uncased queries and keys computed on MRPC samples. We compare attentions from the 3rd head in the 1st, 6th and 12th layers (top, middle, bottom). Hedgehog feature maps trained on CoLA or WikiText103 often still produce attention weights similar to those of softmax attention on new data.
+
+**==> picture [396 x 172] intentionally omitted <==**
+
+Figure 11: **Qualitative generalization to QNLI** . Attention weights for BERT-base-uncased queries and keys computed on QNLI samples. We compare attentions from the 3rd head in the 1st, 6th and 12th layers (top, middle, bottom). Hedgehog feature maps trained on CoLA or WikiText-103 often still produce attention weights similar to those of softmax attention on new data.
+
+pendix B.4. In Table 15, we find that the above attention weight observations on Hedgehog generalization also correspond with downstream task performance. Hedgehog-BERT models achieve best or second-best performance, despite using attention feature maps trained on different data. We leave further generalization studies, such as how Hedgehog attentions trained on one model generalize to _an entirely different_ model for future work.
+
+22
+
+|CoLA|MNLI MRPC|MNLI MRPC|QNLI|QQP|RTE|SST-2|STS-B|
+|---|---|---|---|---|---|---|---|
+|**0.173** 0.357 0.191 0.687|**0.340** 0.381 0.603 0.845|0.652 **0.484** 1.124 1.264|0.673 **0.446** 1.141 1.146|**0.374** 0.432 0.658 0.890|0.932 **0.428** 1.357 1.493|**0.211** 0.347 0.254 0.859|**0.275** 0.360|
+||||||||0.444 0.743|
+|1.231 1.293 1.191|1.500 1.592 1.341|2.150 2.239 1.987|1.947 2.059 1.840|1.509 1.588 1.330|2.491 2.594 2.398|1.505 1.558 1.443|1.285 1.352 1.142|
+
+Table 14: **KL divergence of attention weights generalizing to new data** . Hedgehog attentions trained on either CoLA (CoLA) or WikiText-103 (WT-103) data, still best match softmax attention weights computed on different GLUE tasks, despite being trained with task-specific data (measured via KL divergence; lower is better).
+
+||||QQP|RTE SST-2 STS-B|RTE SST-2 STS-B|RTE SST-2 STS-B|
+|---|---|---|---|---|---|---|
+|**58.4** 47.2 50.3|**89.4** **89.4** 83.3|87.7 **89.2** 85.9|89.8 **90.4** 86.5|62.1 **62.5** 55.6|**91.9** 91.4 89.5|85.3 **86.7** 79.3|
+|26.8 24.7 41.1|81.9 81.4 82|78.5 75.8 82.6|89.1 86.5 89.3|55.6 55.6 54.9|85.9 85.1 88.4|41.8 39.8 76.6|
+
+Table 15: **Attention generalization on downstream tasks** . BERT models with Hedgehog attentions trained on either CoLA (CoLA) or WikiText-103 (WT-103) achieve best GLUE performance despite being finetuned on different GLUE tasks. This corresponds with prior observations in generalization via improved attention weight fidelity.
+
+## C.3 LLAMA-2 SAMSUM GENERATIONS
+
+We include sample generations from the SAMSum corpus summarization task (Gliwa et al., 2019), used to evaluate Hedgehog conversion of LLama-2 7B models in combination with low-rank adaptation (LoRA). Via the generation quality, we find that in contrast to prior conversion methods such as Transformer-to-RNN (T2R) (Kasai et al., 2021), Hedgehog makes pretrained-conversion with parameter-efficient finetuning feasible on larger models.
+
+We report generations for four test samples of the SAMSum test set (first 3, and a longer 6th), comparing standard attention Llama-2 models, linear attention Llama-2 models achieved via Hedgehog attention distillation, and linear attention Llama-2 models following T2R, all with LoRA finetuning on a single A6000 GPU (unquantized bfloat16 weights; LoRA on all query, key, value, and output projections).
+
+For future work, we think further showing how Hedgehog and pretrained-conversion can help apply larger models to tasks requiring longer contexts or more efficient inference, are promising avenues of exploration. Several considerations include additional explorations to improve generation quality, parameter training efficiency ( _e.g.,_ combining Hedgehog with quantization (Dettmers et al., 2023)), and further utilizing Hedgehog’s linear attention efficiency via transfer to longer contexts ( _e.g.,_ combining Hedgehog with positional interpolation (Chen et al., 2023)).
+
+# (Input): Summarize this dialog: Hannah: Hey, do you have Betty’s number? Amanda: Lemme check Hannah: Amanda: Sorry, can’t find it.
+
+23
+
+Amanda: Ask Larry Amanda: He called her last time we were at the park together Hannah: I don’t know him well Hannah: Amanda: Don’t be shy, he’s very nice Hannah: If you say so.. Hannah: I’d rather you texted him Amanda: Just text him Hannah: Urgh.. Alright Hannah: Bye Amanda: Bye bye --Summary: # (Llama-2): Hannah is looking for Betty’s number. Amanda can’t find it. Amanda suggests Hannah to ask Larry. # (Hedgehog Llama-2): Hannah is looking for Betty’s number. Amanda will text her. # (T2R Llama-2): along recently acquired the biggest, I’tch. SCHPW182seud is the biggest, I’t a. SCHPentua. SCHPentle ’t a. SCHPentua. ? along ch. ? along ch. ? along ch. ? along ch. ? along ch. ? along ch. ?
+
+Listing 5: SAMSum Llama-2 generations after LoRA finetuning.
+
+24
+
+# (Input): Summarize this dialog: Eric: MACHINE! Rob: That’s so gr8! Eric: I know! And shows how Americans see Russian ;) Rob: And it’s really funny! Eric: I know! I especially like the train part! Rob: Hahaha! No one talks to the machine like that! Eric: Is this his only stand-up? Rob: Idk. I’ll check. Eric: Sure. Rob: Turns out no! There are some of his stand-ups on youtube. Eric: Gr8! I’ll watch them now! Rob: Me too! Eric: MACHINE! Rob: MACHINE! Eric: TTYL? Rob: Sure :) --Summary: # (Llama-2): Eric and Rob are watching a stand-up by a Russian comedian. # (Hedgehog Llama-2): Eric and Rob are watching a stand-up comedy by a Russian comedian. # (T2R Llama-2): along recently acquired the biggest, I’tch. SCHPentua. SCHPentua. SCHPentua. SCHPentua. S C H P along ch. ? along ch. ? along ch. S C H P along ch. ? along ch. ? along ch. ? along for: along for: al
+
+Listing 6: SAMSum Llama-2 generations after LoRA finetuning.
+
+25
+
+# (Input): Summarize this dialog: Lenny: Babe, can you help me with something? Bob: Sure, what’s up? Lenny: Which one should I pick? Bob: Send me photos Lenny: Lenny: Lenny: Bob: I like the first ones best Lenny: But I already have purple trousers. Does it make sense to have two pairs? Bob: I have four black pairs :D :D Lenny: yeah, but shouldn’t I pick a different color? Bob: what matters is what you’ll give you the most outfit options Lenny: So I guess I’ll buy the first or the third pair then Bob: Pick the best quality then Lenny: ur right, thx Bob: no prob :) --Summary: # (Llama-2): Lenny is looking for new trousers. Bob suggests the first or the third pair. # (Hedgehog Llama-2): Lenny wants to buy a new pair of trousers. Bob suggests the first two options. # (T2R Llama-2): along, I’t a. SCHPentua. S C H P along ch. SCHPentua. ? along ch. S C H P along ch. ? along ch. ? along ch. ? along for: along ch. ? along ch. ? along for: along ch. ? along for:
+
+Listing 7: SAMSum Llama-2 generations after LoRA finetuning.
+
+26
+
+# (Input): Summarize this dialog: Benjamin: Hey guys, what are we doing with the keys today? Hilary: I’ve got them. Whoever wants them can meet me at lunchtime or after Elliot: I’m ok. We’re meeting for the drinks in the evening anyway and I guess we’ll be going back to the apartment together? Hilary: Yeah, I guess so Daniel: I’m with Hilary atm and won’t let go of her for the rest of the day, so any option you guys choose is good for me Benjamin: Hmm I might actually pass by at lunchtime, take the keys and go take a nap. I’m sooo tired after yesterday Hilary: Sounds good. We’ll be having lunch with some French people (the ones who work on the history of food in colonial Mexico - I already see you yawning your head off) Benjamin: YAAAAWN Where and where are you meeting? Hilary: So I’m meeting them at the entrance to the conference hall at 2 pm and then we’ll head to this place called La Cantina. Italian cuisine, which is quite funny, but that’s what they’ve chosen Benjamin: Interesting To be honest, Hilary, I almost feel like changing my mind. Wanting to take this nap might end up costing me to dear Hilary: Oh come on Benjamin: All these terrible obstacles on mu way to bed might just prove to much to take Hilary: We’ll try to avoid talking about their subject of research. Oh wait, no, I’m actually meeting them because I wanted to chat about their research lol Elliot: Hilary: Do join us, we’re going to have fun. And then you’ll take the keys and take this most deserved of naps Elliot: Sounds like a plan Hilary: Elliot: See you at 2 then xx # (Llama-2): Hilary has the keys. Benjamin is tired after yesterday. Hilary is meeting some French people at 2 pm. Benjamin will join them. # (Hedgehog Llama-2): Hilary and Elliot are going to meet at the entrance of the conference hall at 2 pm. Hilary and Benjamin will meet there. Hilary and Benjamin will take the keys to the apartment. Hilary and Benjamin will meet Elliot at 2 pm. Hilary and Benjamin will take a nap. # (T2R Llama-2): Most is the biggest, I’s: Most is the biggest, I’s: Most is the biggest, I’s: Most is the biggest, I’s: Most is the biggest, I’s: Most is the biggest, I’s: M
+
+Listing 8: SAMSum Llama-2 generations after LoRA finetuning.
+
+## C.4 ADDITIONAL ATTENTION WEIGHT VISUALIZATIONS
+
+We finally include additional visualizations of the attention weights computed via softmax attention in comparison to Hedgehog and alternate linear attention feature maps. We visualize attentions computed on GLUE tasks (Sec. 5.4) from the 1st, 6th, and 12th (first, middle, last) layers of BERT models in top, middle, and bottom rows respectively, and for the 1st, 6th, and 12th heads.
+
+27
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 12: BERT attention visualizations for CoLA. Head 1; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 163] intentionally omitted <==**
+
+Figure 13: BERT attention visualizations for CoLA. Head 6; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 14: BERT attention visualizations for CoLA. Head 12; 1st, 6th, and 12th layers.
+
+28
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 15: BERT attention visualizations for RTE. Head 0; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 163] intentionally omitted <==**
+
+Figure 16: BERT attention visualizations for RTE. Head 6; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 17: BERT attention visualizations for RTE. Head 12; 1st, 6th, and 12th layers.
+
+29
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 18: BERT attention visualizations for SST2. Head 1; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 163] intentionally omitted <==**
+
+Figure 19: BERT attention visualizations for SST2. Head 6; 1st, 6th, and 12th layers.
+
+**==> picture [378 x 164] intentionally omitted <==**
+
+Figure 20: BERT attention visualizations for SST2. Head 12; 1st, 6th, and 12th layers.
+
+30
+
diff --git a/open_review/iclr2024_8564.json b/open_review/iclr2024_8564.json
new file mode 100644
index 0000000000000000000000000000000000000000..a2951bbdbf1d5037f6c215cd68450fb2e12cdedd
--- /dev/null
+++ b/open_review/iclr2024_8564.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8564",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "How does overparametrization affect features?",
+ "abstract": "Overparametrization, the condition where models have more parameters than necessary to fit their training loss, is a crucial factor for the success of deep learning. However, the characteristics of the features learned by overparametrized networks are not well understood. In this work, we explore this question by comparing models with the same architecture but different widths. We first examine the expressivity of the features of these models, and show that the feature space of overparametrized networks cannot be spanned by concatenating many underparametrized features, and vice versa. This reveals that both overparametrized and underparametrized networks acquire some distinctive features. We then evaluate the performance of these models, and find that overparametrized networks outperform underparametrized networks, even when many of the latter are concatenated. We corroborate these findings using a VGG-16 and ResNet18 on CIFAR-10 and a Transformer on the MNLI classification dataset. Finally, we propose a toy setting to explain how overparametrized networks can learn some important features that the underparamaterized networks cannot learn.",
+ "rebuttal": "We tune all the models using a variety of different hyperparameters and do not bias training process to favor larger size models. We provide best possible training setting for each model to get their best predictive performance. We compare different size models with their best possible performances. So, they are comparable.\\\nAs we stated before, it is expected that underparameterized smaller models may not reach 100 training accuracy since they have lower capacity. This doesn't mean that they are poorly trained.\n\nWe don't think it is a limitation that we focus on the last layer features. The expressive power of a model depends the linear span of its last layer features. Hence, a direct comparison of last layer features of two models help us fully understand these two models' expressivity relative to each other. We cannot have the same insights by comparing the intermediate layer features only.\n\\\nIf last layer features of model A can span those of model B perfect, i.e. FSE score is zero, that means model A can express any function model B can express. We cannot have the same conclusion by comparing the [...]\n\nWe thank Reviewer Y4Do for their comments. We address their concerns as follows: \n\n**\"Independently trained underparameterized networks are likely to converge to similar feature representationss, as each of them tries to minimize the target loss \"**\\\nAlthough the reviewer's claim may have a point, it does not necessarily hold. The learning process of each network can be different depending on their initialization. It is a noisy process and smaller networks may be learning some bad quality (noisy or redundant) features and these features may not help in the test set. \n\\\nMoreover, for instance, [...]\n\nWe thank Reviewer Si1X for their comments. We address their concerns as follows: \n\n**\"The feature difference can come from well-learned / poorly-learned networks instead of overparameterized / underparameterized networks.\"** \\\nOur purpose is to create smaller (underparameterized) networks that has number of parameters comparable to the data size. Hence, we cannot use resnet18 as the lowest degree model in our experiments since it has much more paramaters than the data size. \n\\\nMoreover, we train all the networks for 300 epochs. Since smaller networks ($\\alpha \\le 1/8$) do not achieve a trainin [...]\n\nWe thank Reviewer 6Vs9 for their comments. We address their concerns as follows: \n\n**\"The true expressive power should be analyzed in terms of the function classes of these two kinds of networks.\"**\\\nIn this paper (Section 2.2), the expressivity of a model follows from the set of functions that it can express through the linear combination of its features (that are fixed as they are learned features after training), which is different from any functions the model can express in theory without considering the optimization (learning) part. The true expressive power should be analyzed in terms of [...]\n\nWe thank Reviewer 3arT for their comments. We address their concerns as follows:\n\n**\"The experiments did not scale past the CIFAR and MNLI scale.\"**\\\nWe preferred smaller scale experiments because for our results we solve many regression problems that becomes computationally very expensive as the dataset and the networks grow.\n\n**\"My biggest reservation about the paper is that there are multiple ways of comparing the similarity of neural representations.\"**\\\nAs we state in our introduction, our focus (with FSE and FSG) is not on similarity rather the expressivity that is dictated by the featu [...]",
+ "initial_scores": [
+ 6,
+ 3,
+ 3,
+ 3
+ ],
+ "score_mean": 3.75,
+ "score_variance": 2.25,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "This paper attempts to understand how overparameterization affects the features learned by the neural networks. To understand this, the authors compare the features learned by a concatenation of under-parameterized models and an over-parameterized model. The authors show that the concatenation of under-parameterized models cannot span the space of features learned by the overparameterized model.\n\nThere were several questions raised by the reviewers. The authors gave convincing replies to most of the questions. Particularly, I am not rejecting this paper for simplicity of tasks or lack of novelty of the similarity metric when compared to existing metrics.\n\nThere were two valid criticisms that are worth considering:\n\nFirst, reviewer Si1X mentioned that an alternative explanation for the results could be just that the under-parameterized models have high error and hence poorly trained. While authors argue that they are not poorly trained, both versions of the models do not have the same accuracy so this needs an explanation.\n\nMy main reason for rejecting the paper is the second criticism by the reviewer Y4Do who questions the set-up itself since a bunch of under-parameterized models could actually just learn the same or similar representation and hence they cannot learn the same representation as the over-parameterized models. This could be mostly true because these small models are trained independently. There is no good answer from the authors to this question.\n\nI suggest the ",
+ "forum_id": "M8Q3XTUJP9",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_3arT",
+ "review_id": "gC3dyJHMli",
+ "scores": {
+ "rating": 6,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2609,
+ "edit_detected": true,
+ "edit_delta_seconds": 906284,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_6Vs9",
+ "review_id": "Jat4EyLQl2",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2097,
+ "edit_detected": true,
+ "edit_delta_seconds": 968641,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Si1X",
+ "review_id": "VHkphzQdam",
+ "scores": {
+ "rating": 3,
+ "soundness": 1,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3583,
+ "edit_detected": true,
+ "edit_delta_seconds": 1040445,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Y4Do",
+ "review_id": "gzhy4eCgIu",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 4226,
+ "edit_detected": true,
+ "edit_delta_seconds": 1239634,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8564.md b/open_review/iclr2024_8564.md
new file mode 100644
index 0000000000000000000000000000000000000000..8a0baef3b5fcc5b874684129082830c69bb2c86b
--- /dev/null
+++ b/open_review/iclr2024_8564.md
@@ -0,0 +1,533 @@
+
+
+## - HOW DOES OVERPARAMETERIZATION AFFECT FEA TURES?
+
+Authors withheld for review
+
+## ABSTRACT
+
+Overparameterization, the condition where models have more parameters than necessary to fit their training loss, is a crucial factor for the success of deep learning. However, the characteristics of the features learned by overparameterized networks are not well understood. In this work, we explore this question by comparing models with the same architecture but different widths. We first examine the expressivity of the features of these models, and show that the feature space of overparameterized networks cannot be spanned by concatenating many underparameterized features, and vice versa. This reveals that both overparameterized and underparameterized networks acquire some distinctive features. We then evaluate the performance of these models, and find that overparameterized networks outperform underparameterized networks, even when many of the latter are concatenated. We corroborate these findings using a VGG-16 and ResNet18 on CIFAR-10 and a Transformer on the MNLI classification dataset. Finally, we propose a toy setting to explain how overparameterized networks can learn some important features that the underparamaterized networks cannot learn.
+
+## 1 INTRODUCTION
+
+Overparameterized neural networks, which have more parameters than necessary to fit the training data, have achieved remarkable success in various tasks, such as image classification (He et al., 2016; Krizhevsky et al., 2017), object detection (Girshick et al., 2014; Redmon et al., 2016) or text classification (Zhang et al., 2015; Johnson & Zhang, 2016). However, the theoretical understanding of why these networks outperform underparameterized ones, which have fewer parameters and less capacity, is still limited. Several works have attempted to explain the advantages of overparametrization from various perspectives, such as the neural tangent kernel (Arora et al., 2019), the lottery ticket hypothesis (Frankle & Carbin, 2018), or the implicit regularization (Neyshabur et al., 2014). Most of these papers claim that overparameterized networks are more powerful due to their greater number of parameters. In this paper, we aim to go beyond this perspective, focusing on the case where overparameterized and underparameterized networks are compared on an _equal_ footing. More specifically, we analyze their features, which are the representations learned by the hidden layers of the networks, and ensure that both overparameterized and underparameterized have the same number of features in our comparison. Analyzing neural networks features is a common in deep learning (Kornblith et al., 2021; Raghu et al., 2021; Cianfarani et al., 2022) to unveil important properties of the networks, such as generalization ability, robustness, or interpretability.
+
+A few existing works have taken this approach to characterize overparameterized networks. Nguyen et al. (2020) studied how varying depth and width affects features and discovered a distinctive block structure in overparameterized networks. Morcos et al. (2018) observed that wider networks learn more similar features. However, these works do not study a direct comparison between overparameterized and underparameterized networks features, which could reveal if overparameterized networks capture unique features compared to underparameterized networks, and vice versa. Our paper aims to address the following question:
+
+_Even after many concatenations of independently trained underparameterized networks, can we fully retrieve the expressive power and the performance of overparameterized networks?_
+
+Our answer to this question is negative, and we summarize our contributions as follows:
+
+1
+
+– Section 2 introduces our feature analysis methods. Our first approach, called feature span error (FSE), uses ridge regression to measure how well overparameterized features capture underparameterized network features, and vice versa. We also introduce the feature performance (FP) method to assess feature accuracy in task performance through linear probing.
+
+- To ensure a fair comparison between the two sets of features, we compare the features of a single overparameterized network with those concatenated from many underparameterized networks trained with different initializations. As such, both sets are of comparable size.
+
+- Section 3 presents our numerical results. FSE and FP demonstrate that i) overparameterized and concatenations of underparameterized networks learn distinct features and ii) linear probing with the concatenated features of underparameterized networks do not reach the same test accuracy as linear probing with overparameterized features.
+
+- We further demonstrate that the part of overparameterized features that concatenations of underparameterized networks features cannot capture, which we name overparameterized residuals, are essential in the high performance of overparameterized networks. Conversely, the underparameterized residuals do not improve the performance of a model.
+
+- Section 4 proposes a toy setting to illustrate how overparameterized networks can learn some important features differently from underparameterized networks. Our setting partially covers the observations made in Section 3 since we do not show that overparameterized networks cannot learn some features learned by underparameterized ones. Nevertheless, it conveys crucial insights.
+
+## RELATED WORK
+
+**Scaling the size of neural networks.** In this paper, we construct our smaller networks by scaling down the widths of a base overparameterized network while keeping the depth fixed. Studying neural networks with scaling widths or depths has been widely done in the literature. Cybenko (1989); Hanin & Sellke (2017) analyzed the effect of varying width on the expressiveness of neural networks. On the empirical side, the effect of scaling width on the performance has been extensively studied (Zagoruyko & Komodakis, 2016; Kaplan et al., 2020) Closer to our work, (Morcos et al., 2018; Nguyen et al., 2020) study the effect of scaling width and/or depth on the features of a network. While (Nguyen et al., 2020) investigates the features across all hidden layers, (Morcos et al., 2018) demonstrates that the wider networks learn similar last layer features. We also investigate the last layer features, but with a focus on directly comparing underparameterized and overparameterized network features.
+
+**Analyzing the features to gain insights in neural networks.** Many research has focused on analyzing and understanding the representations learned by neural networks (Merchant et al., 2020; Cianfarani et al., 2022). Many of these works provide insights about interpretability, generalization, model comparison, transfer learning, and model improvement. Utilizing similarity metrics is a common approach for analyzing features to compare different models. Nguyen et al. (2020) employ the centered kernel alignment (CKA) metric, while Morcos et al. (2018) utilize the projection weighted CCA metric to measure the similarity between features. In this paper, our focus lies on the expressivity of the features of one network compared to another, rather than solely on their similarity. To that end, we introduce the feature span error (FSE) metric, which is based on ridge regression. While using regression as a similarity metric is mentioned in (Kornblith et al., 2019), its application, to the best of our knowledge, has not been explored.
+
+**Notations.** Throughout the paper, we use the upper case _M_ to refer to a neural network, the calligraphic _M_ to refer to its features and the lower case _m_ to its feature mapping. For a matrix _**A**_ , we refer to _A_ [ _i,_ :] as its _i_ -th row and _A_ [: _, j_ ] as its _j_ -th column and for a vector _**v**_ , _v_ [ _k_ ] is its k-th component. For two matrices _**A** ∈_ R _[m][×][N][A] ,_ _**B** ∈_ R _[m][×][N][B]_ , ( _**A**_ ; _**B**_ ) _∈_ R _[m][×]_[(] _[N][A]_[+] _[N][B]_[)] refers to the concatenation along the column axis. For _C >_ 0 and a vector _**x** ∈_ R _[C]_ , _σ_ ( _**x**_ ) _∈_ R _[C]_ is the softmax vector defined as _σ_ ( _**x**_ )[ _c_ ] = exp( _x_ [ _c_ ]) _/_ ([�] _[C] j_ =1[exp(] _[x]_[[] _[j]_[]))] _[.]_[ In Section 3, we use the] _[ r]_[ superscript to] indicate that the model is only randomly initialized (and not trained). In Section 4, we say that a random event _E_ occurs with high probability if P[ _E_ ] _≥_ 1 _− e[−]_[poly(] _[d]_[)] .
+
+2
+
+## 2 SETTING
+
+## 2.1 SCALED MODELS AND FEATURES
+
+This paper aims to obtain insights into the features of overparameterized networks in comparison to the underparameterized ones given their superior performance. For this comparison, we utilize
+
+- **Base network (High-width)** : We start with a base overparameterized (with respect to the dataset) network _M_ 1 with _L_ layers and widths _n_ 1 _, . . . , nL_
+
+- **Low-width networks** : We then create scaled models _Mα_ with _α ∈_ [0 _,_ 1), which have the same architecture as _M_ 1 but with scaled widths _⌊α · n_ 1 _⌋, . . . , ⌊α · nL⌋_ . This width scaling ensures that all the models have the same inductive bias (essential good performance).
+
+We explore how the features of the base model compare to those of low-width networks as we change _α_ . While the low-width networks may not always be underparameterized for each _α_ , this comparison provides insights into impact of the degree of parameterization as _α_ decreases.
+
+We focus on a multi-classification setting with _C_ classes, where a model is trained on the dataset _D_ train and evaluated on the test dataset _D_ test. Given a datapoint _**x** k ∈_ R _[d]_ , a neural network _Mβ_ predicts the class _c ∈{_ 1 _, . . . , C}_ with probability
+
+**==> picture [392 x 29] intentionally omitted <==**
+
+where _mβ_ : R _[d] →_ R _[βn][L]_ is the function computing the activation at layer _L_ (which we also name feature mapping) and _**W**_[(] _[L]_[+1)] _∈_ R _[C][×][βn][L]_ are the weights of the last layer. The model _Mβ_ makes predictions based on a _linear combination of the features {mβ_ ( _**x** k_ )[ _s_ ] _}[βn] s_ =1 _[L]_[, which capture the infor-] mation extracted from the input by the network.
+
+**Definition 2.1** (Features) **.** _Let Mβ be a model with β ∈_ [0 _,_ 1] _and {_ ( _**x** i, yi_ ) _}[N] i_ =1 _[be a dataset.][Let] mβ_ : R _[d] →_ R _[βn][L] be the feature mapping of Mβ. Then, we define the the set of features Mβ as_
+
+**==> picture [269 x 19] intentionally omitted <==**
+
+**==> picture [215 x 13] intentionally omitted <==**
+
+## 2.2 FEATURE SPAN ERROR
+
+We are interested in understanding how the features learned by overparameterized networks differ from the features learned by low-width networks. In particular, we want to answer the following questions: Do the features of overparameterized networks exhibit greater expressivity than the features of low-width networks, given that they tend to perform better? As we have seen, the model _Mβ_ makes predictions based on a linear combination of the features _{mβ_ ( _**x** k_ )[ _s_ ] _}[αn] s_ =1 _[L]_[.][Therefore,] one of the goals of this paper is to investigate whether the features learned by underparameterized networks can be span by the features learned by low-width networks.
+
+**Definition 2.2.** _[FSE(Mβ →Mγ)] Let Mβ and Mγ be two models where β, γ >_ 0 _. Consider the following ridge regression problems for each j ∈{_ 1 _, . . . , γnL},_
+
+**==> picture [380 x 31] intentionally omitted <==**
+
+_Let_ ( _R_[2] ) _[j] be the R_[2] _-error for the regression (Reg). The feature span error FSE(Mβ →Mγ) is:_
+
+**==> picture [292 x 30] intentionally omitted <==**
+
+Definition 2.2 quantifies how well the features _Mβ_ span the features _Mγ_ . To understanding the implications of a smaller FSE score, consider the following. When FSE( _Mβ →Mγ_ ) = 0, _Mβ_ can perfectly fit _Mγ_ , making _Mβ_ is more expressive than _Mγ_ . As such, the span of _Mβ_ can express the same prediction distribution (2.1) as _Mγ._ In appendix, we describe how we solve (Reg).
+
+3
+
+Using the FSE, we thus measure whether a model that uses the linear combination of its features can approximate the features of a target model. Therefore, in this paper, the expressivity of the model is measured through the linear combination of its learned features. This definition of expressivity is different from literature’s classical definition for a neural network’s expressivity which defines it as the set of functions a neural network can express for any choice of parameters. This classical definition does not consider the factors (such as optimization bias) which may make different width neural networks learn some distinct features.
+
+## 2.3 CONCATENATION OF LOW-WIDTH NETWORKS
+
+While it is believable that low-width networks features are less expressive just because they have fewer features or parameters, in this paper, we ask a more challenging question: even if we concatenate a large number of low-width networks trained independently with different initializations, so that the total number of features/parameters match that of the overparameterized network, do the concatenated low-width features have the same expressivity as the overparameterized ones?
+
+**Definition 2.3** (Concatenation of features) **.** _Let Mα_[(1)] _[, . . . , M] α_[ (] _[U]_[)] _be low-width networks with the same architecture that have been independently trained with different initializations. The concatenation of features Sα_[(] _[U]_[)] _is defined as Sα_[(] _[U]_[)] := ( _M_[(1)] _α[, . . . ,][ M]_[(] _α[U]_[)][)] _[ ∈]_[R] _[m][×][αn][L][U][.]_
+
+For _U_ in Definition 2.3, we consider the two following values:
+
+– _U_[¯] : the smallest integer such that _Sα_[( ¯] _[U]_[)] has at least as many features as _M_ 1, i.e., _U_[¯] = _⌈_ 1 _/α⌉_ .
+
+– _U[∗]_ : the smallest integer such that the models _Mα_[(1)] _[, . . . , M] α_[ (] _[U]_[)] collectively have at least the same number of parameters as _M_ 1.
+
+## 2.4 FEATURE PERFORMANCE
+
+While the FSE method provides insights into the feature expressivity, it does not exactly inform us on the predictive power of the features. Therefore, we introduce the feature performance (FP) to measure the performance obtained by a set of features on a given task.
+
+**Definition 2.4** (Feature performance) **.** _Let Dtrain and Dtest be training and test datasets of a task. Let M be a set of features. Assume that we train a linear classifier on top of the features M on Dtrain. Then, the feature performance FP_ ( _M_ ) _is the accuracy of this classifier on Dtest._
+
+A plausible hypothesis to explain the superior performance of overparameterized networks over lowwidth ones is: _Sα_[(] _[U]_[)] cannot fully learn the features _M_ 1 and this uncaptured part in the _M_ 1 features may be responsible for the superior performance of overparameterized networks. We refer to the part of the features that the other model cannot capture as _feature residuals_ . These residuals are what enable overparameterized and low-width networks to express unique functions.
+
+**Definition 2.5** (Feature residuals) **.** _After solving (Reg) with regressors Mβ and targets Mγ, we obtain the prediction M_[�] _γ_ [ _j,_ :] =[�] _[n] k_ =1 _[L][c]_[ˆ][(] _k[j]_[)] _[M][β]_[[] _[k,]_[ :]] _[.][ The feature residuals][ R]_[(] _[M][β][→M][γ]_[)] _[ are]_
+
+**==> picture [265 x 14] intentionally omitted <==**
+
+In Section 3, we focus on the overparameterized feature residuals _R_ ( _Sα_[(] _[U]_[)] _→M_ 1) –the features of overparameterized that low-width cannot fully capture– and on the low-width feature residuals _R_ ( _M_ 1 _→Sα_[(] _[U]_[)] ) –the features of low-width that overparameterized cannot fully capture.
+
+## 3 NUMERICAL EXPERIMENTS
+
+We state our main results in this section. We apply the FSE and FP methods to image and text classification settings and state our empirical results.
+
+## 3.1 EXPERIMENTAL SETUP
+
+For the computer vision experiments, we trained VGG-16 (Simonyan & Zisserman, 2014) and ResNet-18 models (He et al., 2016) on CIFAR-10 (Krizhevsky et al., 2009) as our base models. Ad-
+
+4
+
+**==> picture [384 x 105] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 3 0 . 2 Sα [(] [U] [∗] [)] → T1 Sα [(] [U] [∗] [)] → RN1 0 . 2 Sα [(] [U] [∗] [)] → VGG1 0 . 2 T1 → T1 RN1 → RN1 VGG1 → VGG1 0 . 1 0 . 1 0 . 1 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Error Error Error **----- End of picture text -----**
+
+Figure 1: **FSG with respect to overparameterized features (after training).** Figures 1a, 1b and 1c display FSE( _Sα_[(] _[U][∗]_[)] _→M_ 1) in blue line and FSE( _M_ 1 _→M_ 1) in red line in the Transformer, ResNet and VGG settings. While mildly low-width networks ( _α_ = 1 _/_ 2) can fit the features of a trained overparameterized network well, low-width models ( _α_ = 1 _/_ 8 or _α_ = 1 _/_ 16) have significantly lower performance.
+
+ditionally, we conducted natural language processing (NLP) experiments by training a Transformer model with 4 hidden layers, hidden size 128, MLP dimension 1024, and 4 attention heads (base model) on the MNLI text classification dataset (Williams et al., 2018). The aforementioned models are overparameterized since they have more parameters than the number of training examples. The scaled models are denoted as VGG _α_ , RN _α_ , and T _α_ for VGG-19, ResNet-18, and Transformer models, respectively. In this paper, we focus on small-scale settings because computing FSE is computationally expensive. Indeed, solving (Reg) involves a multi-target regression problem with a large number of regressors and targets. Moreover, we report the FSE results using the validation errors although our empirical findings are consistent with the test errors. All the results are averaged over 4 seeds. Further experimental details can be found in the Appendix.
+
+- 3.2 CONCATENATION OF LOW-WIDTH NETWORKS CANNOT FULLY CAPTURE THE FEATURES OF OVERPAMETRIZED ONES AFTER TRAINING
+
+FSE( _Sα_[(] _[U]_[)] _→M_ 1) alone does not necessarily reveal whether width- _α_ networks features can capture overparameterized network features (up to a good degree). In this context, a good point of reference is FSE( _M_ 1 _→M_ 1), in which a network fits another of the same type but with different initialization. Indeed, this latter indicates the minimum error (due to different randomness used in the training) that can be achieved by networks with the same structure and parameterization. Therefore, we introduce the feature span gap (FSG):
+
+**==> picture [331 x 13] intentionally omitted <==**
+
+A positive FSG indicates that width-[ _α_ ] networks cannot fully capture the overparameterized features well while a negative gap suggests the opposite. We now present our first result.
+
+**Empirical finding 3.1.** _For α <_ 1 _/_ 2 _, concatenation of low-width network features Sα_[(] _[U][ ∗]_[)] _cannot fully capture the features of overparameterized networks M_ 1 _._
+
+Empirical finding 3.1 states that even when concatenating many low-width networks, _Sα_[(] _[U][ ∗]_[)] does not manage to capture _M_ 1 as well as another overparameterized network with a different initialization would do. We choose _U_ = _U[∗]_ from the two options given in Definition 2.3 to concatenate more underparameterized networks and achieve a more robust empirical finding.
+
+We establish Empirical finding 3.1 based on Figures 1 and 7, which provide the following observations:
+
+- **For trained networks,** _α_ **decreases** _⇒_ **FSG increases.** In Figure 1, as we decrease _α_ , FSG( _Sα_[(] _[U]_[)] _→M_ 1) gets larger implying that _Sα_[(] _[U]_[)] gets worse at capturing _M_ 1.
+
+- – **For random networks,** _α_ **decreases** _⇒_ **FSG decreases.** We consider a baseline experiment where we measure FSG( _Sα_[(] _[U]_[)] _[,r] →M[r]_ 1[) where] _[ S] α_[(] _[U]_[)] _[,r] , M[r]_ 1[are the features at initialization.][This] experiment verifies where Empirical finding 3.1 is specific to the trained networks. Figure 7 shows that the random low-width features can capture the overparameterized ones. Since _M[r]_ 1[,] _[S] α_[(] _[U]_[)] _[,r]_ are sampled from the distribution, it is indeed expected that they share similar features.
+
+5
+
+**==> picture [398 x 245] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 3 T1 → T α 0 . 4 RN1 → RN α 0 . 4 VGG1 → VGG α Sα [( ¯] U ) → T α Sα [( ¯] U ) → RN α Sα [( ¯] U ) → VGG α 0 . 2 0 . 2 0 . 2 0 . 1 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 1/2 1/4 1/8 α α (a) (b) (c) Figure 2: FSG with respect to low-width concatenated networks features (after training). Figures 2a, 2b and 2c display FSE( M 1 →Sα [( ¯] U )) in blue line and FSE( Sα [( ¯] U ) →Mα ) in red line in the Transformer, ResNet and VGG settings. As α decreases, the models have lower width and M 1 further struggles to capture Mα . Transformer (FP) ResNet (FP) VGG (FP) 95 95 . 0 80 . 0 92 . 5 90 77 . 5 Sα [(] [U] [∗] [)] Sα [(] [U] [∗] [)] Sα [(] [U] [∗] [)] T1 90 . 0 RN1 85 VGG1 75 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Error Error Error Accuracy Accuracy Accuracy Test Test Test **----- End of picture text -----**
+
+Figure 3: **Feature Performance.** Figures 3a, 3b, 3c display the feature performance obtained by concatenated low-width in blue line and by overparameterized networks in red line. As _α_ decreases, low-width networks fail to match the test accuracy of a single overparameterized network.
+
+Empirical finding 3.1 alone does not necessarily imply that overparameterized models have a superior expressivity over low-width models. Low-width models may also learn some features that overparameterized models cannot express as well.
+
+**Overparameterized networks cannot fully capture the features of sufficiently low-width ones.** We establish this finding based on Figures 2 and 8. To strengthen our result, we set _U_ = _U_[¯] (instead of _U_ = _U[∗]_ ) to decrease the ability of low-width networks to fit the features to get a more robust result. In Figure 2, we observe that the FSG is large for sufficiently low-width models ( _α_ = 1 _/_ 8 or _α_ = 1 _/_ 16), while it is close to zero for mildly low-width models. In Figure 8, we observe that the FSE is almost negligible, which is consistent with the observations in Figure 7.
+
+In summary, we have showed that the low-width networks cannot fully capture the features of overparameterized networks and the converse also holds.
+
+3.3 CONCATENATIONS OF LOW-WIDTH NETWORKS CANNOT ACHIEVE THE PERFORMANCE OF A SINGLE OVERPARAMETERIZED NETWORK
+
+Subsection 3.2 focused on the expressivity of overparameterized and low-width networks features. In this section, we investigate the performance of these two feature sets.
+
+**Empirical finding 3.2.** _For α <_ 1 _/_ 2 _, we observe that the features of low-width networks Sα_[(] _[U][ ∗]_[)] _cannot perform as well as the overparameterized features M_ 1 _i.e. for some small constant δ >_ 0 _,_
+
+FP( _M_ 1) _−_ FP( _Sα_[(] _[U][ ∗]_[)] ) _≥ δ._ (3.2) Empirical finding 3.2 is based on Figure 3. We observe that FP( _Sα_[(] _[U]_[)] ) is significantly lower than FP( _M_ 1), and the performance gap between them increases as _α_ decreases. Overall, Empirical findings 3.1 and 3.2 demonstrate that the low-width features do not capture certain parts of the features of overparameterized networks –which are the overparameterized feature residuals– that contribute to their superior performance. With that insight, we now investigate the contribution of feature residuals to the model performance.
+
+**Impact of the feature residuals on the performance.** Empirical finding 3.2 suggests that the feature residuals _R_ ( _Sα_[(] _[U]_[)] _→M_ 1) significantly improve the performance of the model contrary to the residuals _R_ ( _M_ 1 _→Sα_[(] _[U]_[)] ). We empirically validate this hypothesis using Figures 4.
+
+6
+
+**==> picture [387 x 80] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FP) ResNet (FP) Transformer (FP) ResNet (FP) 96 . 0 80 . 0 95 . 0 (T1; R 1 [(] [U] → [∗] α [)][)] (RN1; R 1 [(] [U] → [∗] α [)][)] T1 RN1 92 . 5 81 . 0 95 . 5 77 . 5 ( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)] ( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)] Sα [(] [U] [∗] [)] 90 . 0 Sα [(] [U] [∗] [)] 80 . 5 95 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/2 1/4 1/8 1/16 α α α α (a) (b) (c) (d) Accuracy Accuracy Accuracy Accuracy Test Test Test Test **----- End of picture text -----**
+
+Figure 4: **Contribution of feature residuals to test accuracy.** Figures 4a and 4b compares the concatenated low-width network _Sα_[(] _[U][∗]_[)] (red line) with the same model to which we append feature residuals _R_ ( _Sα_[(] _[U][∗]_[)] _→ M_ 1) –shortly _Rα_[(] _[U] →[∗]_ 1[)][– in blue line.][These plots show that as] _[ α]_[ decreases, the test accuracy gains brought by] the residuals increases. Figures 4c and 4d show that adding the residuals _R_ ( _M_ 1 _→Sα_[(] _[U][∗]_[)] ) –shortly _R_ 1[(] _[U] →[∗] α_[)][–] does not increase or lowers the performance of _M_ 1 (a result of adding redundant features).
+
+- In Figures 4a and 4b, the feature concatenation ( _R_ ( _Sα_[(] _[U]_[)] _→M_ 1); _Sα_[(] _[U]_[)] ) outperforms _Sα_[(] _[U]_[)] . Thus, _R_ ( _Sα_[(] _[U]_[)] _→M_ 1) helps low-width models to span new functions that improve their performance.
+
+- – In Figures 4c and 4d, adding _R_ ( _M_ 1 _→Sα_[(] _[U]_[)] ) to _M_ 1 does not improve the performance of _M_ 1.
+
+## 4 HOW DO WIDE MODELS CAPTURE FEATURES THAT SHALLOW ONES CANNOT?
+
+Our empirical results highlight a main observation: overparameterized networks can learn some essential features that low-width models cannot capture. In this section, we present a toy setting to illustrate this observation. We demonstrate that certain features can only be learned by overparameterized networks, while the concatenation of low-width networks fails to capture them effectively. Note that our setting partially covers the results from Section 3, since we do not show that overparameterized networks cannot learn some features learned by underparameterized networks. Lastly, our setting involves deep neural networks and because the analysis of their dynamics is an open question, we only validate the mechanism empirically and leave the formal proof for future work.
+
+**Data distribution.** Let _**v**_ 1 _, . . . ,_ _**v**_ 5 _∈_ R _[d]_ be an orthonormal set of vectors which we name _signal vectors_ . Each sample consists of an input _**X**_ and a label _y_ such that:
+
+1. _**X**_ = ( _**X**_ [1] _, . . . ,_ _**X**_ [7]) _∈_ R[7] _[d]_ , where each patch _**X**_ [ _j_ ] _∈_ R _[d] ._
+
+2. Sample _s_ 1 _, . . . , s_ 5 such that each _sj_ is uniformly distributed over _{−_ 1 _,_ 1 _}_ .
+
+3. The label _y_ is defined by _y_ = sgn( _s_ 1 + _s_ 2 + _s_ 3 _· s_ 4 _· s_ 5) _._
+
+4. Signal patches: Uniformly sample indices _ℓ_ 1( _**X**_ ) _, . . . , ℓ_ 5( _**X**_ ) such that
+
+**==> picture [85 x 11] intentionally omitted <==**
+
+5. Noisy patches: _**X**_ [ _j_ ] _∼N_ (0 _, ξ_[2] ( **I** _d −_[�][5] _i_ =1 _**[v]**[i]_ _**[v]** i[⊤]_[))] _[,]_[ for the remaining patches.]
+
+We refer to the signal vectors _**v** j_ whose sign _sj_ are involved in the addition (resp. multiplication) operator in item 3 as the addition (resp. multiplication) signal vectors. These signal vectors represent the features of the task but we do not refer to them as such to avoid a confusion with Definition 2.1. Our setting is a binary classification problem on a synthetic dataset of images, where each image is made of 7 patches. Each patch is either a random Gaussian vector or a signal vector. The highlight of our setting is that the label is a linear combination of a sum and product over the signs _sj_ . This choice leads overparameterized networks to learn some features that low-width ones cannot capture as we explain below. We choose _d_ = 17 in our experiments.
+
+**Learner model.** We train a model _M_ which is a 4-hidden layer multilayer perceptron with ReLU activation. Given an input _**X**_ , the output of _M_ is
+
+**==> picture [273 x 10] intentionally omitted <==**
+
+where _**W**_ 1 denotes the first layer weights, and _g_ represents the subsequent three layers. (MLP) is a standard MLP except that we substract the pre-activation of the first layer by **1** _P ·d_ , which is key to discriminate the learning of low-width and overparameterized models as explained below.
+
+7
+
+**Initialization.** The way we initialize neurons in the first layer plays a crucial role in our setting. We initialize as _**W**_ 1[(0)] [ _j,_ :] _∼N_ (0 _, χ_[2] **I** _d_ ) where the variance _χ_[2] is chosen such that:
+
+– The activation of a neuron _j_ by a signal vector _**v** k_ (i.e., _⟨|_ _**W**_ 1[(0)] [ _j,_ :] _|,_ _**v** k⟩ >_ 1) is a rare event. – As such, wider networks are likely to have more neurons activated by the signal vectors _**v** k._
+
+– While the activation of a neuron by a noisy patch is a rare event, it is still more likely to occur compared to activation by a signal vector –since the expected norm of noisy patches is slightly larger than the norm of the signal vectors.
+
+Furthermore, all signal vectors are orthogonal to each other and to the noisy patches. This constraints the activation of a neuron _j_ in several ways.
+
+Table 1: **Performance of concatenations of low-width and overparameterized networks** Our study focus on analyzing first layer only where networks learn signal patches, not the upper layers that learn multiplication and addition of the signs. Hence, _U[∗]_ is calculated according to the first layer. We refer to the largest three network as overparameterized while referring to the others as underparameterized.
+
+||_n_1|_U ∗_|Average train|Average test|
+|---|---|---|---|---|
+||100 250|300 120|accuracy (%) 75_._01_±_0_._07 75_._12_±_0_._25|accuracy (%) 74_._12_±_0_._88 74_._23_±_0_._74|
+||10,000|3|100_._00_±_0_._00|100_._00_±_0_._00|
+||15,000|2|100_._00_±_0_._00|100_._00_±_0_._00|
+||30,000|1|100_._00_±_0_._00|100_._00_±_0_._00|
+
+First, a neuron is likely to be activated by at most one single signal vector at initialization. Besides, because of weight decay, the norm of the neuron is constrained throughout the training. As such, it is unlikely to be simultaneously activated by two different signal vectors later on. Lastly, for similar reasons, a neuron activated by a noisy patch at initialization is unlikely to be activated by a signal later on. See the Appendix for more details.
+
+**Training.** We train our model using binary cross entropy and normalized stochatic gradient descent for faster convergence. See the Appendix for more details.
+
+We measure the performance of a model through their ability to learn the signal vectors. A model _M_ learns the signal vector _**v** k_ if it has at least one activated neuron _j_ which is highly correlated with _**v** k_ ,
+
+**==> picture [387 x 30] intentionally omitted <==**
+
+where _**W**_ 1[(] _[final]_[)] are the first layer weights after training and _δ >_ 0 is some small constant. On the other hand, _M_ does not learn _**v** k_ if _⟨_ _**W**_ 1[(] _[final]_[)] [ _j,_ :] _,_ _**v** k⟩≤_ 1 _._
+
+**Empirical finding 4.1.** _Let M_ 1 _be overparameterized network and Mα_[(1)] _[, . . . , M] α_[ (] _[U][ ∗]_[)] _be low-width networks with different initialization. After independently training these models, we observe that_
+
+_1. M_ 1 _learns all the signal vectors._
+
+_2. The concatenation of low-width networks learn the addition signal vectors. However, none of the networks in the concatenation learns the multiplication signal vectors._
+
+We now describe some important dynamics of the learning process as follows:
+
+– **Initialization** : In order to learn _**v** k_ , the network needs to have some neurons that are _activated_ .
+
+– **Neuron deactivation by weight decay:** A neuron is subjected to two forces: weight decay, which attracts the neuron to have a zero norm and leads to its deactivation and the gradient, which pushes the neuron in a direction that potentially increases its correlation with _**v** k_ (see Figure 6).
+
+– **Irreversibility of Deactivation:** Neurons that becomes deactivated (or not activated before) are unlikely to be activated by _**v** k_ during training. Indeed, for deactivated neurons, the only term in the gradient is the one arising from weight decay, which makes the neuron shrink further.
+
+– **Low-width networks have a few neurons activated by signal vectors at initialization** : Each small network have at most a few neurons that are activated by signal vectors (see Figure 9). This is due to their small number of neurons.
+
+– **Overparameterized networks have many activated neurons at initialization** : because of their large width, for each signal vector _**v** k_ , there exists many neurons that are activated.
+
+8
+
+**==> picture [395 x 108] intentionally omitted <==**
+
+**----- Start of picture text -----**
+150 v 1 α = 1 / 300 150 v 3 α = 1 / 300 1 . 0 M 1 α = 1 / 120 α = 1 / 120 50 α = 1 / 3 50 α = 1 / 3 25 αα == 11 / 2 25 αα == 11 / 2 v 1 0 . 8 v 2 v 3 3 3 v 4 1 1 v 5 0 0 0 . 6 1000 2500 4000 1000 2500 4000 500 4000 # epochs # epochs # epochs (a) (b) (c) neurons neurons activated activated Correlation # # **----- End of picture text -----**
+
+Figure 5: Figures 5a and 5b display the total number of activated neurons by _**v**_ 1 (addition signal vector) and _**v**_ 3 (multiplication signal vector) throughout the training process. We display these curves for overparameterized ( _α_ = 1) and low-width concatenations ( _α ∈{_ 1 _/_ 300 _,_ 1 _/_ 120 _,_ 1 _/_ 3 _,_ 1 _/_ 2 _}_ ) networks. Both models learn the addition vectors but the low-width ones fail to learn _**v**_ 3 since the curves for _α ∈{_ 1 _/_ 300 _,_ 1 _/_ 200 _}_ quickly collapse to 0. Figure 5c displays the evolution of the correlation between an overparameterized model’s neurons and the signal vectors. The correlations gradually increase to 1, meaning that _M_ 1 has learned the signal vectors.
+
+During the training, overparameterized models learn all the signal vectors while the neurons of concetenations of low-width networks unlearn some signal vectors.
+
+– **Both models learn the addition signal vectors.** Lowwidth and overparameterized networks keep a non-zero correlation with _**v**_ 1 by the end of the training (Figure 5a).
+
+– **Low-width networks unlearn the multiplication signal vectors** : Figure 5b shows that the neurons’ correlations with _**v**_ 3 collapse to zero for low-width networks while it stays non-zero for overparameterized ones.
+
+**What is special about the multiplication features?** A model can independently learn the addition signal vectors _**v**_ 1 and _**v**_ 2 for an improved model accuracy. However, the model must learn the multiplication vectors _**v**_ 3, _**v**_ 4, and _**v**_ 5 simultaneously for improved accuracy:
+
+– Addition case: assume that a model _M_ has learned _**v**_ 1 _._ Then, it can predict its sign _s_ 1, and the accuracy is P( _**X** ,y_ )[ _Y_ = _y|s_ 1] = 0 _._ 75, better than random predictor. – Multiplication case: assume a model has learned _**v**_ 3 _,_ _**v**_ 4 and not _**v**_ 5 _._ Its accuracy is then P( _**X** ,y_ )[ _Y_ = _y|s_ 3 _, s_ 4] = 0 _._ 5, the same as the random predictor. Learning all but one provides no value.
+
+**==> picture [160 x 106] intentionally omitted <==**
+
+Figure 6: **Sketch of a three neurons at initialization.** The grey and white areas respectively represent the areas where neurons are activated and deactivated by the signal vector _**v** k_ . _**W**_[(0)] [2 _,_ :] is deactivated while _**W**_[(0)] [3 _,_ :] is far from the activation hyperplane and is likely to stay activated during training. _**W**_[(0)] [1 _,_ :] is also activated but may eventually get deactivated because of the weight decay and nosier signal from the gradient, particularly during the early stages of training with active noisy patches.
+
+## 5 CONCLUSION AND FUTURE WORK
+
+In this work, we study the difference between overparameterized and underparameterized networks in terms of expressivity and performance. Through experiments on CIFAR-10 and MNLI, we have demonstrated that even after concatenating many models, underparameterized features cannot cover the span nor retrieve the performance of overparameterized features. Our work suggests some future work. We consider a deep network in Section 4 since our labeling function involves a multiplication operation. It is known that these labels cannot be recovered by a 1-hidden layer network with finite width (Allen-Zhu & Li, 2020). It would be interesting to find a 1-hidden layer network setting where we can prove the benefits of overparameterized features. Lastly, our setting does not exactly match with our empirical results since we do not demonstrate that underparameterized networks learn some features that overparameterized ones cannot capture.
+
+9
+
+## REFERENCES
+
+- Zeyuan Allen-Zhu and Yuanzhi Li. Backward feature correction: How deep learning performs deep learning. _arXiv preprint arXiv:2001.04413_ , 2020.
+
+- Sanjeev Arora, Simon Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. In _International Conference on Machine Learning_ , pp. 322–332. PMLR, 2019.
+
+- Christian Cianfarani, Arjun Nitin Bhagoji, Vikash Sehwag, Ben Zhao, Heather Zheng, and Prateek Mittal. Understanding robust learning through the lens of representation similarities. _Advances in Neural Information Processing Systems_ , 35:34912–34925, 2022.
+
+- George Cybenko. Approximation by superpositions of a sigmoidal function. _Mathematics of control, signals and systems_ , 2(4):303–314, 1989.
+
+Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. _arXiv preprint arXiv:1803.03635_ , 2018.
+
+- Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 580–587, 2014.
+
+- Boris Hanin and Mark Sellke. Approximating continuous functions by relu nets of minimal width. _arXiv preprint arXiv:1710.11278_ , 2017.
+
+- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In _Proceedings of the IEEE international conference on computer vision_ , pp. 1026–1034, 2015.
+
+- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 770–778, 2016.
+
+- Rie Johnson and Tong Zhang. Supervised and semi-supervised text categorization using lstm for region embeddings. In _International Conference on Machine Learning_ , pp. 526–534. PMLR, 2016.
+
+- Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. _arXiv preprint arXiv:2001.08361_ , 2020.
+
+- Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In _International Conference on Machine Learning_ , pp. 3519– 3529. PMLR, 2019.
+
+- Simon Kornblith, Ting Chen, Honglak Lee, and Mohammad Norouzi. Why do better loss functions lead to less transferable features? _Advances in Neural Information Processing Systems_ , 34: 28648–28662, 2021.
+
+- Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
+
+- Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. _Communications of the ACM_ , 60(6):84–90, 2017.
+
+- Amil Merchant, Elahe Rahimtoroghi, Ellie Pavlick, and Ian Tenney. What happens to bert embeddings during fine-tuning? _arXiv preprint arXiv:2004.14448_ , 2020.
+
+- Ari Morcos, Maithra Raghu, and Samy Bengio. Insights on representational similarity in neural networks with canonical correlation. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. In search of the real inductive bias: On the role of implicit regularization in deep learning. _arXiv preprint arXiv:1412.6614_ , 2014.
+
+10
+
+- Thao Nguyen, Maithra Raghu, and Simon Kornblith. Do wide and deep networks learn the same things? uncovering how neural network representations vary with width and depth. _arXiv preprint arXiv:2010.15327_ , 2020.
+
+- F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. _Journal of Machine Learning Research_ , 12:2825–2830, 2011.
+
+- Maithra Raghu, Thomas Unterthiner, Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? _Advances in Neural Information Processing Systems_ , 34:12116–12128, 2021.
+
+- Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 779–788, 2016.
+
+- Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. _arXiv preprint arXiv:1409.1556_ , 2014.
+
+- Adina Williams, Nikita Nangia, and Samuel Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)_ , pp. 1112–1122. Association for Computational Linguistics, 2018. URL [URL removed]
+
+- Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. _arXiv preprint arXiv:1605.07146_ , 2016.
+
+- Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. _Advances in neural information processing systems_ , 28, 2015.
+
+11
+
+## A ADDITIONAL DETAILS AND RESULTS ON THE FSG METHOD
+
+In this section, we provide additional implementation details on the FSG method and present some experiments that were mentioned in the main paper. In Equation Reg, we present the method to solve the regression problem equation Reg. In Subsection A.2, we present additional details about our experiments. Lastly, in Subsection A.3, we present our FSG results on randomly initialized networks. These results were mentioned in Section 3.
+
+## A.1 METHODOLOGY TO SOLVE THE REGRESSION PROBLEM.
+
+The regression problem equation Reg is defined in the context of a particular task with fixed training and test datasets, which we denote by _Dtrain_ and _Dtest_ , respectively. We now explain some important details about how we implement the regression.
+
+– **Why adding a** _L_ 2 **-regularization?** : We add a _L_ 2-regularization in equation Reg for multiple reasons. First, it helps with multicollinearity and ill-conditioning. Second, it provides regularization, which leads to better out-of-sample predictions. Finally, it has a closed-form solution that makes it possible to solve the regression problem for all target variables simultaneously, which is computationally more efficient than solving the regression problem for each target variable separately. The closed-form solution requires the inversion of a matrix that can be precomputed once and used to solve the regression problem for any target variable, making it faster.
+
+- **Cross-validation** : We independently solve equation Reg for each _j ∈{_ 1 _, . . . , ⌊αnL⌋}_ by using the RidgeCV function from the scikit-learn package (Pedregosa et al., 2011). It implements leaveone-out cross-validation (LOOV) to tune the penalty parameter _λ_ . In our experiments we tune _λ_ over the interval [1 _e −_ 5 _,_ 3 _e_ 5].
+
+– **Datasets in the regression** : The training (resp. test) dataset of the regression consists of the features extracted from the training (resp. test) dataset _Dtrain_ (resp. _Dtest_ ) of the task.
+
+– **Reporting FSE** : We only present the validation errors of equation Reg for FSE in our empirical findings of section 3. That is because the training dataset is much larger compared to the test dataset, and the relationship between the features of different width networks may differ between the datasets _Dtrain_ and _Dtest_ due to the weights of the trained models (for that matter the features of the networks) being dependent on _Dtrain_ but not _Dtest_ . We discuss this issue further in Subsection D.4, where we present regression results using a training dataset consisting of data points from both _Dtrain_ and _Dtest_ (training and test datasets of the task). Nevertheless, the empirical findings remain consistent for the test errors (Subsection D.3), although there may be a gap between the test and validation errors in some cases.
+
+## A.2 ADDITIONAL DETAILS ABOUT EXPERIMENTAL SETUP
+
+Regarding the training procedure of the vision experiments, all the models are trained with standard augmentations techniques and using SGD with momentum 0.9, a tuned weight-decay, a tuned learning-rate and a linear decay step-size scheduler (applied by the factor of 0 _._ 1 at epochs 180 and 255). We run all the experiments for 300 epochs, with batch size 128 otherwise. For NLP, we run all the experiments for 30 epochs, using AdamW with a tuned weight-decay, a tuned learning-rate, and a cosine learning rate scheduler. Table 2 displays the average training and test accuracies of the networks used in the experiments.
+
+We note that for each different model, we tune the learning-rate and weight-decay for a single seed and use the same hyperparameters for all other models of the same kind but with a different initialization. In our computer vision experiments, our range of learning rates is _{_ 0 _._ 02 _,_ 0 _._ 04 _,_ 0 _._ 06 _,_ 0 _._ 08 _,_ 0 _._ 1 _}_ and for weight decay, the range is _{_ 7 _e−_ 4 _,_ 5 _e−_ 4 _,_ 9 _e−_ 4 _,_ 3 _e−_ 4 _,_ 5 _e−_ 4 _,_ 5 _e−_ 4 _}_ and use dropout=0.1. In our NLP experiments, our range of learning rates is _{_ 5 _e−_ 6 _,_ 1 _e−_ 5 _,_ 5 _e−_ 5 _,_ 9 _e−_ 5 _,_ 1 _e−_ 4 _,_ 5 _e−_ 4 _,_ 9 _e−_ 4 _,_ 5 _e −_ 3 _}_ and for weight decay, _{_ 1 _e −_ 6 _,_ 1 _e −_ 5 _,_ 5 _e −_ 5 _,_ 1 _e −_ 4 _,_ 5 _e −_ 4 _,_ 1 _e −_ 3 _,_ 1 _e −_ 2 _,_ 5 _e −_ 3 _,_ 5 _e −_ 2 _}_ .
+
+To create low-width networks from ResNet-18 and VGG-16 vision models, we reduce the number of filters or channels in each layer compared to the original architecture. Specifically, we achieve the scaled model _Mα_ by adjusting the number of filters in each layer, multiplying the original number of filters by a factor of _α <_ 1. Similarly, for the transformer model, the hidden size is modified by scaling it down by a factor of _α <_ 1. This process results in the low-width model _Mα_ .
+
+12
+
+**Remark about the NLP experiments.** The primary focus of this paper is to analyze the impact of overparameterization on network features, driven by their superior performance. As a result, we specifically investigate scenarios where overparameterized networks exhibit significantly better performance than low-width networks. In our NLP experiments, we observed that when using a transformer model, there was no notable difference in performance between low-width and overparameterized networks. We attribute this lack of distinction to the embedding layer, which has a vocabulary size of approximately 50k, causing low-width networks to have an excessive number of parameters. To address this, we removed the embedding layer from the models studied in this paper. Additionally, we leveraged a pre-trained network to process the data and provide its hidden representation as input to these models.
+
+## A.3 MEASURING THE FSG FOR RANDOM NETWORKS
+
+**==> picture [384 x 281] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 3 0 . 4 0 . 4 Sα [(] [U] [∗] [)] [,r] → RN [r] 1 Sα [(] [U] [∗] [)] [,r] → T [r] 1 0 . 2 RN [r] 1 [→] [RN] [r] 1 0 . 2 FSE(T [r] 1 [→] [T] [r] 1 [)] 0 . 1 0 . 2 Sα [(] [U] [∗] [)] [,r] → VGG [r] 1 VGG [r] 1 [→] [VGG] [r] 1 0 . 0 0 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Figure 7: FSG with respect to overparameterized features (random networks). FSE( Sαα [[(]] [[U]] [[∗]] [[)]] [[,r]] →M [[r]] 1 FSE( M [[r]] 1 [[→M][r]][[r]] 1 [[)]] [[are]] [[displayed]] [[by]] [[blue]] [[and]] [[red]] [[lines,]] [[respectively,]] [[in]] [[the]] [[settings]] [[of]] [[Transformer,]] and VGG. Unlike trained networks, the concatenated random low-width network features are capable of fitting overparameterized network features effectively, regardless of their size. In fact, we observe that the improves as the value of α decreases. Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 6 0 . 4 RN [r] 1 [→] [RN] α [r] 0 . 4 0 . 4 Sα [( ¯] U ) ,r → RN [r] α 0 . 2 T [r] 1 [→] [T] α [r] 0 . 2 0 . 2 VGG [r] 1 [→] [VGG] α [r] Sα [( ¯] U ) ,r → T [r] α Sα [( ¯] U ) ,r → VGG [r] α 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 1/2 1/4 1/8 α α α (a) (b) (c) Error Error Error Error Error Error **----- End of picture text -----**
+
+Figure 7: **FSG with respect to overparameterized features (random networks).** FSE( _Sαα_[[(]] _[[U]][[∗]]_[[)]] _[[,r]] →M[[r]]_ 1[) and] FSE( _M[[r]]_ 1 _[[→M][r]][[r]]_ 1[[)]][[are]][[displayed]][[by]][[blue]][[and]][[red]][[lines,]][[respectively,]][[in]][[the]][[settings]][[of]][[Transformer,]][ResNet,] and VGG. Unlike trained networks, the concatenated random low-width network features are capable of fitting overparameterized network features effectively, regardless of their size. In fact, we observe that the fitting improves as the value of _α_ decreases.
+
+Figure 8: **FSG with respect to low-width concatenated networks features (random networks).** FSE( _Sα_[(] _[U][∗]_[)] _[,r] →M[r]_ 1[)][and][FSE(] _[M][r]_ 1 _[→M][r]_ 1[)][are][displayed][by][blue][and][red][lines,][respectively,][in][the][set-] tings of Transformer, ResNet, and VGG. Unlike trained networks, the concatenated random low-width network features exhibits no difference compared to overparameterized networks in capturing overparamaeterized network features.
+
+## B ADDITIONAL DETAILS ABOUT FEATURE PERFORMANCE
+
+In the feature performance experiments in Subsection 3.3, the models are trained with standard augmentations techniques (only for the vision experiments) and using SGD with momentum 0.9, a tuned weight-decay, a tuned learning-rate and a linear decay step-size scheduler. We run all the experiments with 40 or 80 epochs and ensure that at the end of training, the training loss is constant in all the cases.
+
+## C ADDITIONAL DETAILS FOR OUR THEORETICAL SETTING
+
+In this section, we provide some technical information about our initialization scheme. We then display the number of neurons activated by each feature at initialization (Figure 9).
+
+13
+
+||||RN_α_|||VGG_α_|||T_α_||
+|---|---|---|---|---|---|---|---|---|---|---|
+||||Average training|Average test||Average training|Average test||Average training|Average test|
+|_α_|¯_U_|_U ∗_|accuracy (%)|accuracy (%)|_U ∗_|accuracy (%)|accuracy (%)|_U ∗_|accuracy (%)|accuracy (%)|
+|1|-|-|99_._99_±_0_._01|95_._29_±_0_._14|-|99_._98_±_0_._01|94_._00_±_0_._01|-|86_._49_±_0_._16|81_._06_±_0_._18|
+|1/2|2|4|99_._98_±_0_._01|94_._56_±_0_._13|4|99_._80_±_0_._02|92_._82_±_0_._13|4|83_._64_±_0_._20|79_._72_±_0_._36|
+|1/4|4|16|99_._81_±_0_._02|92_._72_±_0_._25|16|98_._11_±_0_._06|90_._27_±_0_._25|15|79_._66_±_0_._29|77_._63_±_0_._21|
+|1/8|8|64|96_._12_±_0_._10|89_._30_±_0_._28|64|90_._12_±_0_._14|85_._90_±_0_._21|59|74_._93_±_0_._25|73_._77_±_0_._21|
+|1/16|16|254|86_._81_±_0_._19|84_._30_±_0_._28|251|75_._66_±_0_._52|76_._47_±_0_._63|-|-|-|
+
+Table 2: **Average training and test accuracies of trained models** : _U[∗]_ is shown with respect to the largest model ( _α_ = 1). Accuracies are rounded to the nearest second digit after decimal.
+
+## C.1 INITIALIZATION SCHEME
+
+**Initialization.** We assume that the first layer is initialized for all _j ∈_ [ _n_ 1] as _**W**_ 1[(0)] [ _j,_ :] _∼ N_ (0 _, χ_[2] **I** _d_ ) where _χ_ = _d[−]_[(5] _[/]_[12)] _._ The remaining parameters may be initialized as in standard ReLU neural networks, e.g., by using Kaiming initialization (He et al., 2015).
+
+**Justification of the parameters choice.** We here justify the multiple choices made in the setting described above:
+
+– Variances _ξ_[2] _, χ_[2] and activation in in the first layer: these choices are made for two reasons. First, with high probability, the norm of the noisy patches are slightly bigger than the norm of the signal ones. This incentivizes the model to have more signal-activated neurons than noise-activated neurons. That, in turn, makes it possible for some (or possibly all) signal-activated neurons to get de-activated especially early in the training when noise patches are more dominant in the objective function.
+
+Besides, under this parameters choice, neurons rarely activate a signal patch, i.e., for _j ∈_ [ _n_ 1] and _p ∈{ℓ_ 1( _**X**_ ) _, . . . , ℓk_ ( _**X**_ ) _}_ , the event ” _σ_ ( _**W**_ 1[(0)] [ _j,_ :] _[⊤]_ _**X**_ [ _p_ ] _−_ 1) _>_ 0” is rare. Indeed, by concentration inequality, we have
+
+**==> picture [282 x 14] intentionally omitted <==**
+
+– Orthogonality of features and noisy patches: given the orthogonal structure in _D_ , a neuron
+
+_**W**_ 1[(0)] [ _j,_ :] can only activate a single feature. Indeed, by Pythagoras theorem, we have
+
+**==> picture [269 x 31] intentionally omitted <==**
+
+With high probability, we have _|_ _**W**_ 1[(0)] [ _j,_ :] _∥_ 2[2][=] _[χ]_[2] _[d]_[=] _[d]_[0] _[.]_[02] _[∈]_[[1] _[,]_[ 2)][ and by definition, a neuron] activates a feature if _⟨_ _**W**_ 1[(0)] [ _j,_ :] _,_ _**v** p⟩_[2] _>_ 1 _._ Thus, at initialization, a neuron can only activate a single feature.
+
+– Adding weight decay to the loss: weight decay usually leads to a solution with minimal _L_ 2-norm. In our case, we show that if a neuron isn’t activated by any feature or noise in the beginning, then its weight will keep shrinking and never get activated. This follows from the fact that in this case the neuron’s weights is updated only by weight decay since gradient from the loss function is zero.
+
+## C.2 ADDITIONAL IMPLEMENTATION DETAILS
+
+In our experiments in Section 4, we set the learning rate to 0.002 and weight decay to 0.003. Depending on the value of _α_ , we train the model for a different time. For instance, for _α ∈{_ 1 _/_ 300 _,_ 1 _/_ 120 _}_ , we train the models for 1000 epochs, _α ∈{_ 1 _/_ 3 _,_ 1 _/_ 2 _}_ , we train for 2500 epochs and for _α_ = 1, 4000 epochs. This explains why the lines are discontinuous in Figure 5. In every case, we ensure that the training has ended by checking that the training loss is constant.
+
+14
+
+**==> picture [384 x 105] intentionally omitted <==**
+
+**----- Start of picture text -----**
+v 1 v 2 Multiplication features 100 0 100 0 100 0 1 1 1 2 50 50 50 3 0 0 0 Models Models Models (a) (b) (c) % % % 100 250 10,000 15,000 30,000 100 250 10,000 15,000 30,000 100 250 10,000 15,000 30,000 **----- End of picture text -----**
+
+Figure 9: Barplots 9a and 9b show the percentage of networks in which the first and second addition features are activated at initialization, respectively, with 1 representing the percentage of networks with the corresponding features activated. Barplot 9c categorizes the models by the number of multiplication features that are activated at initialization.
+
+## D ADDITIONAL EXPERIMENTAL RESULTS
+
+In this section, we present some empirical results that were briefly mentioned in the main paper. In Subsection D.1, we measure the performance of the feature residuals. In Subsection D.2, we append feature residuals to overparameterized and low-width networks and measure their contribution to the task performance. While in the main paper we report the validation errors for the FSG method, we report in Subsection D.3 the test errors. Lastly, in Subsection D.4, we present FSE results where the features in the regression problem are obtained from a dataset that is a mix of training and test sets.
+
+## D.1 PERFORMANCE OF FEATURE RESIDUALS ALONE
+
+|Features||Transformer|ResNet|VGG|
+|---|---|---|---|---|
+|FP(_R_(_M_1 _→S_(_U∗_) _α_|))|31.47_±_0.52|17.79_±_0.73|40.05_±_1.16|
+|FP(_S_(_U∗_)_,r_ _α_ )||46.98_±_0.55|34.30_±_0.04|47.48_±_0.01|
+|FP(_R_(_S_(_U∗_) _α_ _→M_1))||50.97_±_0.18|53.46_±_0.03|56.42_±_0.06|
+|FP(_Mr_ 1)||51.37_±_0.28|28.73_±_0.36|19.03_±_1.03|
+
+Table 3: **The performance (test accuracy) of residuals alone** : Lowest _α_ is picked for each model in this experiment (1/16 for ResNet and VGG, and 1/8 for Transformer).
+
+In Table 3, we present the performance of feature residuals together with the feature performance of the random networks which serve as a baseline. In this experiment, only the feature residual with the lowest _α_ is used for each model (1/16 for ResNet and VGG, and 1/8 for Transformer). We observe the the residuals of the overparameterized have better or similar performance compared to the performance of its baseline (random overparameterized network features). By contrast, the residual of the low-width networks underperform its baseline (concatenation of random low-width network features).
+
+D.2 CONTRIBUTION OF FEATURE RESIDUALS FOR VGG
+
+This section shows the contribution of residuals for VGG.
+
+## D.3 TEST ERRORS FOR THE FSG METHOD
+
+Figures 11, 12, 13, and 14 display the test errors corresponding to the figures in Sections 3 and A.3. We observe that the test errors exhibit a similar trend to the validation errors, indicating consistent empirical findings. However, there is a noticeable gap between test and validation errors in the trained networks of vision experiments. We delve into the details of this disparity in Subsection D.4 to provide a more comprehensive analysis.
+
+Furthermore, we noticed a significant disparity between the test and validation errors in the random VGG experiment, as shown in Figures 7c and 12c. Upon closer examination, we discovered that
+
+15
+
+**==> picture [389 x 158] intentionally omitted <==**
+
+**----- Start of picture text -----**
+VGG (FP) VGG (FP) 95 96 (VGG1; R 1 [(] [U] → [∗] α [)][)] 95 VGG1 90 ( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)] 94 85 Sα [(] [U] [∗] [)] 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α (a) (b) Accuracy Accuracy Test Test **----- End of picture text -----**
+
+Figure 10: **Contribution of residuals to the test accuracy.** Figure 10a compares the concatenated lowwidth network _Sα_[(] _[U][∗]_[)] (red line) with the same model to which we append feature residuals _R_ ( _Sα_[(] _[U][∗]_[)] _→M_ 1) –shortly _Rα_[(] _[U] →[∗]_ 1[)][–][in][blue][line.][This][plots][show][that][as] _[α]_[decreases,][the][test][accuracy][gains][brought][by][the] residuals increases. Figure 10b show that adding the residuals _R_ ( _M_ 1 _→Sα_[(] _[U][∗]_[)] ) –shortly _R_ 1[(] _[U] →[∗] α_[)][–][does][not] increase the performance of _M_ 1
+
+certain features of the overparameterized network led to test errors that were notably larger than one. To improve the statistical accuracy of our results, we decided to exclude the features that resulted in a test error greater than 5. This amounted to only 12 out of the total 5120 features. Figure 12d illustrates the impact of removing these outliers on the test errors. We observe that the errors depicted in Figure 12d align with those shown in Figure 7c. As a result, by removing the outliers, we achieve consistent validation and test errors. We do not report on the change in the validation error following the removal of outliers, as the change is deemed insignificant.
+
+**==> picture [384 x 105] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 3 0 . 2 Sα [(] [U] [∗] [)] → T1 Sα [(] [U] [∗] [)] → RN1 0 . 2 Sα [(] [U] [∗] [)] → VGG1 0 . 2 T1 → T1 RN1 → RN1 VGG1 → VGG1 0 . 1 0 . 1 0 . 1 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Error Error Error **----- End of picture text -----**
+
+Figure 11: **Test Error: FSG with respect to overparameterized features (after training).** This figure displays the test errors corresponding to Figure 1.
+
+**==> picture [387 x 80] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) 0 . 3 Resnet (FSE) VGG (FSE) 0 . 4 VGG (FSE) outliers removed 0 . 4 Sα [(] [U] [∗] [)] [,r] → T [r] 1 0 . 2 S FSE( α [(] [U] [∗] RN [)] [,r] → [r] 1 [→] RN [RN] [r] 1 [r] 1 [)] 0 . 4 0 . 3 0 . 2 T [r] 1 [→] [T] [r] 1 0 . 1 0 . 2 Sα [(] [U] [∗] [)] [,r] → VGG [r] 1 0 . 2 Sα [(] [U] [∗] [)] [,r] → VGG [r] 1 VGG [r] 1 [→] [VGG] [r] 1 VGG [r] 1 [→] [VGG] [r] 1 0 . 0 0 . 0 0 . 1 1/2 1/4 1/8 1/16 1/8 1/4 1/2 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α α (a) (b) (c) (d) Error Error Error Error **----- End of picture text -----**
+
+Figure 12: **Test Error: FSG with respect to overparameterized features (random networks).** Figures 12a and 12b display the test errors of Transformer and ResNet corresponding to Figure 7. Figures 12c and 12d display the test errors of VGG corresponding to Figure 7c.
+
+16
+
+**==> picture [384 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) T1 → T α RN1 → RN α VGG1 → VGG α 0 . 4 0 . 4 Sα [( ¯] U ) → T α Sα [( ¯] U ) → RN α Sα [( ¯] U ) → VGG α 0 . 2 0 . 2 0 . 2 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Error Error Error **----- End of picture text -----**
+
+Figure 13: **Test Error: FSG with respect to low-width concatenated networks features (after training).** This figure displays the test errors corresponding to Figure 2.
+
+**==> picture [384 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Transformer (FSE) ResNet (FSE) VGG (FSE) 0 . 6 0 . 4 RN [r] 1 [→] [RN] α [r] 0 . 4 0 . 4 Sα [( ¯] U ) ,r → RN [r] α 0 . 2 T [r] 1 [→] [T] α [r] 0 . 2 0 . 2 VGG [r] 1 [→] [VGG] α [r] Sα [( ¯] U ) ,r → T [r] α Sα [( ¯] U ) ,r → VGG [r] α 0 . 0 0 . 0 0 . 0 1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16 α α α (a) (b) (c) Error Error Error **----- End of picture text -----**
+
+Figure 14: **Test Error: FSG with respect to low-width concatenated networks features (random networks).** This figure displays the test errors corresponding to Figure 8.
+
+## D.4 SHUFFLED REGRESSION FOR VISION EXPERIMENTS
+
+As shown in Subsection D.3, a non-negligible difference between validation and test errors is observed in vision experiments for the trained networks. One explanation behind this gap could be that training (resp. test) data used in training (resp. testing) the networks is the same as the training (resp. test) data used in regression. Since weights of the trained networks, for that matter features of the trained networks, is a function of training data, we may expect smaller errors with training data than with test data for FSE. To further understand this effect, we run another regression, which we call shuffled regression for vision experiments, where training data is created by randomly sub-sampling from training and test data (85% from each) used in network training.
+
+After comparing the regular and shuffled regression results presented in tables 4 and 5, we can observe a significant reduction in the gap between validation and test errors for the shuffled regression. This observation is in line with our earlier intuition that the dependence of trained network weights or features on the training data can lead to smaller errors on training data than on test data for FSE. Thus, we can conclude that the FSE results are sensitive to the data type (training vs test data of the task) used in the regression for vision experiments, unlike NLP experiments where a much larger training dataset is available.
+
+|Regression|Error|FSE(RN1 _→_RN1)|FSE(_S_(_U∗_) 1_/_2 _→_RN1)|FSE(_S_(_U∗_) 1_/_4 _→_RN1)|FSE(_S_(_U∗_) 1_/_8 _→_RN1)|FSE(_S_(_U∗_) 1_/_16 _→_RN1)|
+|---|---|---|---|---|---|---|
+|Regular|valid. test|0.0236_±_0_._000106 0.0505_±_0_._000747|0.0201_±_3_._1_e −_05 0.041_±_0_._000109|0.0327_±_0_._000165 0.0607_±_0_._00023|0.0967_±_0_._000294 0.1212_±_0_._000401|0.1885_±_0_._000111 0.1845_±_0_._000396|
+|Shuffed|valid. test|0.0279_±_0_._00019 0.0281_±_0_._000259|0.0234_±_2_._9_e −_05 0.0236_±_3_._7_e −_05|0.0372_±_0_._000178 0.0376_±_0_._000155|0.1004_±_0_._000264 0.102_±_0_._000384|0.1871_±_7_e −_05 0.1908_±_0_._000731|
+
+Table 4: **Shuffled Regression for Resnet**
+
+17
+
+|Regression|Error|FSE(VGG1 _→_VGG1)|FSE(_S_(_U∗_) 1_/_2 _→_VGG1)|FSE(_S_(_U∗_) 1_/_4 _→_VGG1)|FSE(_S_(_U∗_) 1_/_8 _→_VGG1)|FSE(_S_(_U∗_) 1_/_16 _→_VGG1)|
+|---|---|---|---|---|---|---|
+|Regular|valid. test|0.0084_±_6_._9_e −_05 0.0694_±_0_._000778|0.0079_±_3_._3_e −_05 0.0508_±_0_._000267|0.0143_±_0_._000119 0.0658_±_0_._000426|0.0734_±_0_._000126 0.1134_±_0_._000214|0.2116_±_0_._000362 0.209_±_0_._003072|
+|Shuffed|valid. test|0.0168_±_0_._000129 0.017_±_0_._000168|0.0145_±_5_._5_e −_05 0.0148_±_5_._9_e −_05|0.0224_±_0_._000183 0.0236_±_0_._000177|0.0791_±_0_._000118 0.0833_±_0_._000514|0.2101_±_0_._000295 0.2124_±_0_._000795|
+
+Table 5: **Shuffled Regression for VGG**
+
+18
+
diff --git a/open_review/iclr2024_8566.json b/open_review/iclr2024_8566.json
new file mode 100644
index 0000000000000000000000000000000000000000..198f1d68e61b5589e29bc456545aa191b380e881
--- /dev/null
+++ b/open_review/iclr2024_8566.json
@@ -0,0 +1,104 @@
+{
+ "paper_id": "iclr2024_8566",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Relational Convolutional Networks: A framework for learning representations of hierarchical relations",
+ "abstract": "A maturing area of research in deep learning is the development of architectures that can learn explicit representations of relational features. In this paper, we focus on the problem of learning representations of *hierarchical* relations, proposing an architectural framework we call \"relational convolutional networks\". Given a sequence of objects, a \"multi-dimensional inner product relation\" module produces a relation tensor describing all pairwise relations. A \"relational convolution\" layer then transforms the relation tensor into a sequence of new objects, each describing the relations within some group of objects at the previous layer. Graphlet filters, analogous to filters in convolutional neural networks, represent a template of relations against which the relation tensor is compared at each grouping. Repeating this yields representations of higher-order, hierarchical relations. We present the motivation and details of the architecture, together with a set of experiments to demonstrate how relational convolutional networks can provide an effective framework for modeling relational tasks that have hierarchical structure.",
+ "rebuttal": "Thank you very much for your feedback and your thoughts. We have incorporated feedback from you and other reviewers and made several additions to the paper. We believe this meaningfully improves the paper, and are grateful for this feedback. Please see the global response and the updated pdf for these additions; we hope you will take a look. \n\n---\n\n> The authors claim the method to be more interpretable and parameter-efficient manner, but there is no analysis for the same.\n\nThanks for the suggestion! We have added a section in the appendix analyzing the representations learned by the MD-IPR and RelConv layers on the \"contains set\" task. This is an appendix C of the updated pdf. The findings are quite interesting. We observe that the encoders in MD-IPR learn to encode and separate the four latent attributes in the task (number, color, fill, and shape). Moreover, the learned graphlet filters process these relations to *exactly separate* triplets of objects which form a \"set\" from those that do not. Please see Figure 7-9 in the appendix.\n\nWe also added a discussion of parameter efficiency in Appendix B.1. The key idea is that the number of parameters in MD-IPR and RelConv is independent of the number of objects and the number of groups considered. This leads to computational and statistical benefits, as useful transformations are shared across pairs of objects and groups of objects. That is, analogous to the translation invariance of CNNs, the inner product relations are shared across pairs of objects and the graphlet filters are shared across groups of objects.\n\nPlease take a look and let us know if this addresses your concern. We'd appreciate any further comments or questions you may have.\n\nWe are grateful for your feedback. We have integrated it into an updated version of the paper, and believe that it has improved the final paper. Please see the global response, the updated pdf, and the responses below.\n\n---\n\n> Limited analysis of how the architecture scales as the number of objects and relations grow large. Memory and computation costs need investigation.\n\nThank you for the constructive suggestion! Indeed, it is possible to reduce the computation of the $n \\times n$ relation tensor. Since the relational convolution considers relations *within a group*, we only need to compute [...]\n\nWe appreciate your feedback. Please see the global response as well as the updated pdf for a description of some of the additions we made based on the feedback of reviewers. Below are some responses to your questions.\n\n---\n\n> Some techinical details need to be claimed\n\nCan you clarify what you mean by this?\n\n---\n> More explanations about Fig.2 should be included, like symbol defination, and how you process pooling on graph.\n\nThanks for the suggestion. We have expanded the description in the caption. Please note that the notation is defined in the main body of the text, as well as in the annota [...]\n\nWe are thrilled you found our paper interesting and enjoyable to read! Thank you for your thoughts, feedback, and suggestions. We have incorporated your feedback into an updated version of the paper. Please see the global response, updated pdf, and the response below for more details.\n\n---\n\n> Despite interpretability...\n\nWe agree that this would be interesting to see! We added a section to the appendix (section C) exploring and visualizing the representations learned by the MD-IPR and RelConv layers on the SET task. The results are interesting---we indeed see that different encoders in the MD- [...]\n\n### Global response: additions to paper and integration of feedback\nHi all. Thank you for taking the time to engage with our work and provide your thoughtful feedback. We appreciate your feedback and we believe it has improved our paper significantly. We look forward to discussing this work with you more.\n\nWe have updated our paper in light of your feedback and have uploaded the updated pdf. We would like to bring your attention to a few of the additions.\n- In Section 5.1 (the experiments on relational games) we have added an evaluation of RelConvNet with learned grouping layers. In particular [...]",
+ "initial_scores": [
+ 5,
+ 8,
+ 5,
+ 6
+ ],
+ "score_mean": 6.0,
+ "score_variance": 2,
+ "score_spread": 3,
+ "score_min": 5,
+ "score_max": 8,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "The paper proposes a new neural network architecture called \"relational convolutional networks\" for learning hierarchical relational representations. While the reviewers agree that this is an interesting direction, they also present salient arguments about the suitability of this paper for ICLR in its current form: limiting analysis of scaling behaviour, missing comparison to related work, main experiments on simple synthetic tasks only, and claims interpretability not quantitatively shown (e.g. using a user study). We hope that the reviews are useful to you will push for one of the next DL venues.",
+ "forum_id": "CARclfc9ci",
+ "primary_area": "unsupervised, self-supervised, semi-supervised, and supervised representation learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_mJyy",
+ "review_id": "rJvUylFhuA",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3541,
+ "edit_detected": true,
+ "edit_delta_seconds": 539670,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ikDu",
+ "review_id": "NGGCkjjhR2",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 4,
+ "confidence": 4
+ },
+ "review_text_chars": 6893,
+ "edit_detected": true,
+ "edit_delta_seconds": 728803,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": [
+ {
+ "to": 8
+ }
+ ]
+ },
+ {
+ "reviewer": "Reviewer_nJRP",
+ "review_id": "YAmSGBd0yC",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1346,
+ "edit_detected": true,
+ "edit_delta_seconds": 825845,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Y5Cn",
+ "review_id": "ekX7n1iT89",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 1574,
+ "edit_detected": true,
+ "edit_delta_seconds": 838690,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8566.md b/open_review/iclr2024_8566.md
new file mode 100644
index 0000000000000000000000000000000000000000..3a3ab78a4bc5fe9f47ff433be9b3b8990d03b1d1
--- /dev/null
+++ b/open_review/iclr2024_8566.md
@@ -0,0 +1,538 @@
+
+
+## RELATIONAL CONVOLUTIONAL NETWORKS: A FRAMEWORK FOR LEARNING REPRESENTATIONS OF HIERARCHICAL RELATIONS
+
+Authors withheld for review
+
+## ABSTRACT
+
+A maturing area of research in deep learning is the development of architectures that can learn explicit representations of relational features. In this paper, we focus on the problem of learning representations of _hierarchical_ relations, proposing an architectural framework we call “relational convolutional networks”. Given a sequence of objects, a “multi-dimensional inner product relation” module produces a relation tensor describing all pairwise relations. A “relational convolution” layer then transforms the relation tensor into a sequence of new objects, each describing the relations within some group of objects at the previous layer. Graphlet filters, analogous to filters in convolutional neural networks, represent a template of relations against which the relation tensor is compared at each grouping. Repeating this yields representations of higher-order, hierarchical relations. We present the motivation and details of the architecture, together with a set of experiments to demonstrate how relational convolutional networks can provide an effective framework for modeling relational tasks that have hierarchical structure.
+
+## 1 INTRODUCTION
+
+Modeling of relations between objects is important to a range of machine learning problems. For instance, an image analysis application might rely on comparing objects in terms of relations that extract color, size, or texture features; a natural language task may use relations that are based on syntactic or semantic features of pairs of words. To enable efficient learning of relational information, it is important to explore learning architectures that support processing of relations in a natural, expressive, and efficient manner.
+
+Compositionality, the ability to compose modules together to build iteratively more complex feature maps, is key to the success of deep representation learning. For example, in a feed forward network, each layer builds on the one before, and in a CNN, each convolution builds an iteratively more complex feature map (Zeiler & Fergus, 2014). So far, work on relational representation learning has been limited to “flat” first-order architectures. In this work, we propose a compositional framework for learning hierarchical relational representations, which we call “relational convolutional networks.”
+
+A schematic of the proposed architecture to support hierarchical relational learning is shown in Figure 1. The key idea involves formalizing a notion of “convolving” a relation tensor, describing the pairwise relations in a sequence of objects, with a “graphlet filter” which represents a template of relations between subsets of objects. Each composition of those operations computes relational features of a higher order.
+
+In a series of experiments, we show how relational convolutional neural networks provide an effective framework (and inductive bias) for relational learning. We first carry out experiments on “relational games” proposed as a benchmark for relational reasoning by (Shanahan et al., 2020). This consists of a suite of binary classification tasks for identifying abstract relational rules between a set of objects represented as images. We next carry out experiments on a version of the SET game, which requires processing of higher-order relations between multiple attributes on a set of cards. For both tasks, relational convolutional networks are able to achieve more sample efficient learning compared to Transformers, as well as other architectures that have been specifically developed for relational learning.
+
+1
+
+## 1.1 RELATED WORK
+
+Several previous works have considered the design of machine learning architectures which support the representation of relational information, in various forms (Battaglia et al., 2018; Palm et al., 2018; Zhang et al., 2019).
+
+**Graph Neural Networks.** Graph neural networks (GNNs) are a class of neural network architectures which operate on graphs and process “relational” data (Kipf et al., 2018; Kipf & Welling, 2017; Niepert et al., 2016; Schlichtkrull et al., 2017; Veliˇckovi´c et al., 2017). A defining feature of the GNN model is its use of a form of neural message-passing, wherein the hidden representation of a node is updated as a function of the hidden representations of its neighbors (Gilmer et al., 2017). Typical examples of tasks which GNNs are applied to include node classification, graph classification, and link prediction (Hamilton, 2020).
+
+In GNNs, the ‘relations’ are given to the model via edges in a graph. In contrast, our architecture, as well as the explicitly relational architectures described below, operate on collections of objects without any relations given as input. Instead, such relational architectures must infer the relevant relations from the objects themselves. Still, graph neural networks can be applied to relational tasks by passing in the collection of
+
+**==> picture [198 x 224] intentionally omitted <==**
+
+**----- Start of picture text -----**
+𝑙 𝑙 𝑧1 , … , 𝑧𝑛𝑙 ∈ℝ [𝑑][𝑙][×𝑛][𝑙] Relational Convolution 𝑅 [(𝑙−1)] ∈ℝ [𝑛][𝑙−1][×𝑛][𝑙−1][×𝑟][𝑙−1] Inner Product Relation ⋮ 2 2 𝑧1 , … , 𝑧𝑛2 ∈ℝ [𝑑][2][×𝑛][2] Relational Convolution 𝑅 [(1)] ∈ℝ [𝑛][1][×𝑛][1][×𝑟][1] Inner Product Relation 1 1 𝑧1 , … , 𝑧𝑛1 ∈ℝ [𝑑][1][×𝑛][1] Initial Embedder 𝑥1, … , 𝑥𝑛1 ∈𝕏 [𝑛][1] **----- End of picture text -----**
+
+Figure 1: Proposed architecture for relational convolutional networks. Hierarchical relations are modeled by iteratively computing pairwise relations between objects and convolving the resultant relation tensor with graphlet filters representing templates of relations between subsets of objects.
+
+objects along with a complete graph. A Transformer Encoder can be thought of as a special case of this architecture, and hence is the representative baseline we compare against in our experiments.
+
+**Attention as modeling relations** Several works have proposed architectures with the ability to model relations by incorporating an attention mechanism (Locatello et al., 2020; Santoro et al., 2018; Vaswani et al., 2017; Veliˇckovi´c et al., 2017; Zambaldi et al., 2018). Attention mechanisms model relations between objects implicitly as an intermediate step in a form of neural message-passing in order to update the representation of each object as a function of its context.
+
+**Emerging literature on “explicitly relational” architectures.** There exists a growing literature on neural architectures which aim to explicitly model relational information between objects. An early example is (Santoro et al., 2017). Shanahan et al. (2020) proposes the PrediNet architecture, which aims to learn relational representations which are compatible with predicate logic. Webb et al. (2021) proposes ESBN, a recurrent neural network augmented with external memory with a memory-write operation which factors representations into ‘sensory’ and ‘relational’. Kerg et al. (2022) proposes CoRelNet, a simple architecture based on ‘similarity scores’ which aims to distill the relational inductive biases discovered in previous work into a minimal architecture.
+
+We aim to contribute to this literature by proposing a framework for learning hierarchical relational representations in a natural, interpretable, sample-efficient, and parameter-efficient manner.
+
+## 2 MULTI-DIMENSIONAL INNER PRODUCT RELATION MODULE
+
+A relation function is a function which maps a pair of objects _x, y_ P _X_ to a vector representing the relation between the two objects. For example, a relation may represent the information “ _x_ has the same color as _y_ ”, “ _x_ is larger than _y_ ”, and “ _x_ is to the left of _y_ ”. In principle, this can be modeled by an arbitrary learnable function on the concatenation of the two objects’ representations. For example, (Santoro et al., 2017) models relations by MLPs applied to the concatenation of pairs of
+
+2
+
+objects, _gθ_ p _x, y_ q . While this approach may work in some cases, it is missing some crucial inductive biases. In particular, there is no constraint that the learned pairwise function is in fact _relational_ — _gθ_ p _x, y_ q may just as well represent non-relational information like “ _x_ is bright” and “ _y_ is small”, as opposed to relational information like “ _x_ is larger than _y_ ”.
+
+Recent work has explored using _inner products_ to model relations between objects (Altabaa et al., 2023; Kerg et al., 2022; Webb et al., 2021). The advantage of such an approach is that it provides added pressure to learn explicitly relational representations, disentangling relational information from attributes of individual objects. In particular, it induces a geometry on the object space _X_ which allows objects to be described in relation to each other. For example, in the symmetric case, the inner product x _φ_ p _x_ q _, φ_ p _y_ qy induces a metric on _X_ . In fact, the relation x _φ_ p _x_ q _, φ_ p _y_ qy attaches well-defined notions of distance, angles, and orthogonality to the space _X_ .
+
+More generally, we can allow for multi-dimensional relations by having multiple encoding functions, each extracting a feature to compute a relation on. Furthermore, we can allow for asymmetric relations by having different encoding functions for each object. Hence, we model relations by,
+
+_r_ p _x, y_ q px _φ_ 1 p _x_ q _, ψ_ 1 p _y_ qy _, . . . ,_ x _φdr_ p _x_ q _, ψdr_ p _y_ qyq P R _[d][r] ,_ (1)
+
+where _φ_ 1 _, ψ_ 1 _, . . . , φdr , ψdr_ are learnable functions. For each dimension of the relation function, the maps _φk, ψk_ extract a particular attribute of the objects which is then compared by the inner product.
+
+To promote weight sharing, we can have one common non-linear map _φ_ across all dimensions along with different linear maps for each object and each dimension of the relation. That is,
+
+**==> picture [346 x 19] intentionally omitted <==**
+
+where the learnable parameters are _φ_ and _W_ 1[p] _[k]_[q] _, W_ 2[p] _[k]_[q] _, k_ P r _dr_ s . _φ_ : _X_ Ñ R _[d][φ]_ may be an MLP, for example, and _W_ 1[p] _[k]_[q] _, W_ 2[p] _[k]_[q] are _d_ proj � _dφ_ matrices. The class of functions realizable by Equation (2) is the same as Equation (1) but enables greater weight sharing.
+
+The “Multi-dimensional Inner Product Relation” (MD-IPR) module receives a sequence of objects _x_ 1 _, . . . , xm_ as input and models the pairwise relations between them by Equation (2), returning an _m_ � _m_ � _dr_ relation tensor, _R_ r _i, j_ s _r_ p _xi, xj_ q , describing the relations between each pair of objects.
+
+## 3 RELATIONAL CONVOLUTIONS WITH GRAPHLET FILTERS
+
+## 3.1 RELATIONAL CONVOLUTIONS WITH DISCRETE GROUPS
+
+Suppose that we have a sequence of objects p _x_ 1 _, . . . , xm_ q P p R _[d]_ q _[m]_ and a relation tensor _R_ P R _[m]_[�] _[m]_[�] _[d][r]_ describing the pairwise relations between them (obtained by a MD-IPR layer). The relational convolution operation we will define does two things: 1) extracts features of the relations between groups of objects using pairwise relations 2) transforms the relation tensor back into a sequence of objects, allowing it be composed with another relational layer to compute higher-order relations.
+
+Fix some filter size _s n_ , where _s_ is a hyperparameter of the relational convolution layer. One ‘filter’ is given by the _graphlet f_ 1 P R _[s]_[�] _[s]_[�] _[d][r]_ . This is a ‘template’ for the pairwise relations between _s_ objects. Note that the dimension of the relations in this filter matches that of the input relation tensor. Let _g_ r _n_ s be a subset of the objects of size _s_ . Suppose for now that _g_ is an ordered set (i.e., the group p 1 _,_ 2 _,_ 3 q is different from the group p 2 _,_ 3 _,_ 1 q ). Then, denote the relation sub-tensor given by this (ordered) subset by _R_ r _g_ s : r _R_ r _i, j_ ss _i,j_ P _g_ . We define the ‘relational inner product’ between this relation subtensor and the filter _f_ 1 by
+
+**==> picture [350 x 24] intentionally omitted <==**
+
+This is simply the inner product in the corresponding euclidean space R _[s]_[2] _[d][r]_ . This quantity represents how much the relations within the objects in _g_ match the relations in the template _f_ 1.
+
+The relational convolution layer has _nf_ filters (a hyperparameter). Denote the collection of filters by _**f**_ � _f_ 1 _, . . . , fnf_ � P R _[s]_[�] _[s]_[�] _[d][r]_[�] _[n][f]_ , which we call a _graphlet filter_ . We define the relational inner
+
+3
+
+**==> picture [358 x 194] intentionally omitted <==**
+
+**----- Start of picture text -----**
+graphlet filters 𝒇∈ℝ [𝑠×𝑠×𝑑][𝑟][×𝑛][𝑓] ⋅,⋅ 𝑟𝑒𝑙 ⋅,⋅ 𝑟𝑒𝑙 ⋅,⋅ 𝑟𝑒𝑙 relation subtensors ⋯ 𝑅 𝑔, 𝑔∈𝒢 𝑅∗𝒇 ǁ𝑧1 ǁ𝑧2 ⋯ ǁ𝑧|𝒢| (𝑅∗𝒇)(𝐺) 𝑧1 𝑧2 ⋯ 𝑧𝑛𝑔 **----- End of picture text -----**
+
+Figure 2: A depiction of the relational convolution operation. The input is a relation tensor _R_ P R _[m]_[�] _[m]_[�] _[d][r]_ . A learned set of graphlet filters _**f**_ P R _[s]_[�] _[s]_[�] _[d][r]_[�] _[n][f]_ are compared to each relation subtensor _R_ r _g_ s _, g_ P _G_ , producing the relational convolution _R_ � _**f**_ . With a group matrix _G_ P R _[m]_[�] _[n][g]_ , p _R_ � _**f**_ qp _G_ q represents the relational information in a set of _ng_ “soft groups”.
+
+product of a relation subtensor _R_ r _g_ s with a graphlet filter _**f**_ as the _nf_ -dimensional vector consisting of the relational inner products with each individual filter,
+
+**==> picture [284 x 42] intentionally omitted <==**
+
+This vector summarizes various aspects of the relations within a group, captured by several different filters[1] .Each filter corresponds to one dimension in the final relation-summarizing vector for the group _g_ . This is reminiscent of convolutional neural networks, where each filter gives us one channel in the output tensor.
+
+We can also define a symmetric variant of the relational inner product which is invariant to the ordering of the elements in _g_ . This can be done by pooling over all permutations of _g_ . In particular, we suggest max-pooling and average-pooling, although any set-aggregator would be valid. We denote the permutation-invariant relational inner product by x _R_ r _g_ s _, f_ 1 y rel _,_ sym,
+
+**==> picture [306 x 14] intentionally omitted <==**
+
+where _g_ ! denotes the set of permutations of the group _g_ . Recall that each x _R_ r _g_[1] s _,_ _**f**_ y rel is _nf_ - dimensional, and the pooling is done independently for each dimension.
+
+For a given group _g_ r _m_ s , the relational inner product with a graphlet filter, x _R_ r _g_ s _,_ _**f**_ y rel, gives us a vector summarizing the relational patterns inside that group. We aim to get a sequence of objects which each describes the relational patterns within each group of interest. Let _G_ be a set of size- _s_ groups of the the _m_ objects. The relational convolution between a relation tensor _R_ and a relational graphlet filter _**f**_ is the sequence of relational inner products with each group in _G_ ,
+
+**==> picture [309 x 15] intentionally omitted <==**
+
+_G_ is a pre-specified hyperparameter of the relational convolution operation. The choice depends on the usecase. If some prior information is known about reasonable groupings, this can be encoded in _G_ . When _m_ is small and no prior information is available, a reasonable choice might be the the set of all combinations of size _s_ . When _m_ is large, considering all combinations will be intractable. One solution is to consider a random sample of combinations. In the next subsections, we consider the problem of _learning_ the relevant groups.
+
+1We have overloaded notation, but will use the convention that a collection of filters is denoted by a bold symbol to distinguish between the two forms of the relational inner product.
+
+4
+
+## 3.2 RELATIONAL CONVOLUTIONS WITH ‘SOFT’ GROUPS
+
+In the above formulation, the groups are ‘discrete’. Having discrete groups can be desirable for interpretability, if the relevant groupings are known a priori or if considering every possible grouping is computationally and statistically feasible. However, if the relevant groupings are not known, then considering all possible combinations results in a rapid growth of the number of objects at each layer.
+
+In order to address these issues, we propose _explicitly modeling groups_ . This allows us to control the number of objects in the output sequence of a relational convolution operation such that only relevant groups are considered. In the next section, we outline some ways to model ‘soft groups’ using _grouping layers_ . These layers take a sequence of objects and/or the relation tensor as input and produce a ‘group matrix’ _G_ P R _[m]_[�] _[n][g]_ representing _ng_ ‘soft groups’. The p _i, j_ q -th entry of the group matrix represents the degree to which the _i_ -th object belongs to the _j_ -th group. The number of groups _ng_ is a configurable hyperparameter of the grouping layers. For the remainder of this subsection, we assume that the group matrix _G_ is given as input to the relational convolution layer.
+
+Consider the group matrix _G_ P R _[m]_[�] _[n][g]_ and filters _**f**_ of size _s_ . First, we use _G_ to compute a “group-match score” for each discrete group _g_ of size _s_ (e.g., _g_ P _G_ �r _ms_ s� ). This is done via
+
+**==> picture [319 x 51] intentionally omitted <==**
+
+where the soft-plus function is Softplus p _x_ q log p exp p _x_ � 1 qq , applied elementwise. This has the effect of making the group matrix _G_ non-negative which is needed for the product of its elements to represent a “group-match score”. The product inside the softmax is over elements in the discrete group _g_ P _G_ . Hence, it will be large whenever the soft group _Gk_ : _G_ r : _, k_ s aligns with the discrete group _g_ . Normalize p�q normalizes the group match scores so that[°] _g[α][gk]_[ 1][.][We propose the use] of sparse normalizers (Laha et al., 2018) so that only a sparse subset of discrete groups in _G_ contribute to each soft group (see also Appendix B.2). In our experiments, we use ‘sparsemax’ (Martins & Astudillo, 2016). Thus, _αgk_ is a normalized “group-match score” indicating the degree to which the discrete group _g_ matches the given soft group _Gk_ .
+
+Now, we can define the ‘soft’ relational inner product _given_ the soft group _Gk_ by
+
+**==> picture [276 x 24] intentionally omitted <==**
+
+This notation should be read as “the relational inner product of the relation tensor _R_ with the graphlet filters _**f**_ given the group _Gk_ ”. This expression is essentially a convex combination of the relational inner product with all possible discrete groups weighted by how much they match the soft group _Gk_ .
+
+With this modification, the number of objects in the output sequence is fixed and controlled by the number of groups, _ng_ (which is a hyperparameter). The output sequence of the relational convolution given groups _G_ is now given by
+
+**==> picture [330 x 13] intentionally omitted <==**
+
+## 4 GROUPING LAYERS
+
+A grouping layer is a layer which outputs a group matrix _G_ P R _[m]_[�] _[n][g]_ representing the degree to which each object _i_ P r _m_ s belongs to each group _j_ P r _ng_ s . The number of groups _ng_ is a configurable hyperparameter. We briefly describe some proposals for grouping layers with different properties.
+
+**Temporal (Positional) Grouping.** In the temporal grouping layer, the groups are a function only of the temporal order of the objects. This can be achieved by learning the group matrix _G_ directly as a parameter of the model. _G_ will be optimized along with the rest of the model parameters as a function of its effect on the relational convolution layer. Temporal grouping would be appropriate in situations where the order in which objects appear is predetermined and indicates the relevant groups. For example, objects that are positionally close to each other may be grouped together.
+
+5
+
+**Feature-based Grouping.** In a feature-based grouping layer, the group(s) to which each object belongs is a function of that object’s features (and position). That is,
+
+**==> picture [264 x 43] intentionally omitted <==**
+
+where _φ_ : r _m_ s � _X_ Ñ R _[n][g]_ is a learnable function which maps an object’s temporal order _i_ and feature representation _xi_ to a _ng_ -dimensional group membership vector where the _j_ th entry of the vector represents the degree to which the object belongs to the _j_ th group. For example _φ_ can be a multi-layer perceptron of the form _φ_ p _i, x_ q MLP p concat p _ei, x_ qq . Feature-based grouping may be useful in situations where group membership can be determined for each object using only that object’s features, irrespective of the context of the other objects in the sequence.
+
+**Context-aware Grouping.** In some applications, the group(s) to which each object belongs to may depend on the full context of the other objects in the sequence. One way to model this is to use a message-passing neural network to update the representations of each object, incorporating the context of the other objects in the sequence. Then, a multi-layer perceptron is applied to each encoded object to produce the group membership vector for that object.
+
+**==> picture [305 x 57] intentionally omitted <==**
+
+This is the most general form of grouping, as it encompasses the previous two forms as special cases. The updated representation of each object _Ei_ now contains any relevant information about the other objects which should be considered in computing its group membership vector. One simple and effective option for the message-passing operation is to use self-attention. In this case, since an inner product relation layer precedes the relational convolution layer, the relation tensor can be re-used in the self-attention operation to compute attention scores.
+
+## 5 EXPERIMENTS
+
+## 5.1 RELATIONAL GAMES
+
+The _relational games_ dataset was contributed as a benchmark for relational reasoning by (Shanahan et al., 2020). It consists of a family of binary classification tasks for identifying abstract relational rules between a set of objects represented as images. The objects consist of three sets of simple geometric shapes, referred to as “pentominoes”, “hexominoes”, and “stripes”. The objects are arranged in a 3 � 3 grid. Each task corresponds to some relationship between the objects (see Figure 3), and the target is to classify whether the relationship holds among a given sequence of objects or not.
+
+In our experiments, we evaluate out-of-distribution generalization by training all models on the pentominoes objects and evaluating on the hexominoes and stripes objects. The input to all models is presented as a sequence of 9 objects, each represented as a 12 � 12 � 3 RGB image. In all models, the objects are processed independently by a CNN with a shared architecture. The individuallyprocessed sequence of objects is then passed to the relation-processing component of the model. The results are then flattened and passed through an MLP with a shared architecture to produce the final prediction. We compare four models: a relational convolutional network (abbreviated RelConvNet), CoRelNet (Kerg et al., 2022), PrediNet (Shanahan et al., 2020), and a Transformer (Vaswani et al., 2017). Further, we evaluate variants of RelConvNet with learned grouping layers (temporal, featurebased, and contextual). The architectural details of each model are described in Appendix A.
+
+The pentominoes split is used for training, and the hexominoes and stripes splits are used to test out-of-distribution generalization after training. We train for 50 epochs using the categorical crossentropy loss and the Adam optimizer with learning rate 0 _._ 001, _β_ 1 0 _._ 9 _, β_ 2 0 _._ 999 _, ϵ_ 10[�][7] . We use a batch size of 512. For each model and task, we run 5 trials with different random seeds.
+
+6
+
+**==> picture [376 x 296] intentionally omitted <==**
+
+**----- Start of picture text -----**
+same occurs xoccurs between match patt Pentominoes Hexominoes Stripes Figure 3: Relational games dataset. Left Examples of objects from each split. Right problem instances for each task. The first row is an example where the relation holds and the second row is an example where the relation does not hold. same occurs xoccurs 1 . 0 1 . 0 1 . 0 0 . 8 0 . 8 0 . 8 0 . 6 0 . 6 0 . 6 0 1000 2000 0 1000 2000 0 1000 2000 batch step batch step batch step between match pattern 1 . 0 1 . 0 Model RelConvNet 0 . 8 0 . 8 CoRelNet 0 . 6 0 . 6 PrediNet Transformer 0 1000 2000 0 1000 2000 batch step batch step accuracy accuracy accuracy training training training accuracy accuracy training training **----- End of picture text -----**
+
+Figure 3: Relational games dataset. **Left** Examples of objects from each split. **Right** Examples of problem instances for each task. The first row is an example where the relation holds and the second row is an example where the relation does not hold.
+
+Figure 4: Training curves, up to 2,000 batch steps, for each relational games task. Solid lines indicate the mean over 5 trials and the shaded regions indicate a bootstrap 95% confidence interval.
+
+**Sample efficiency.** We observe that the relational inductive biases of RelConvNet, and relational models more generally, grant a significant advantage in sample-efficiency. Figure 4 shows the training accuracy over the first 2,000 batches for each model. RelConvNet, CoRelNet, and PrediNet are explicitly relational architectures, whereas the Transformer is not. The Transformer is able to process relational information through its attention mechanism, but this information is entangled with the features of individual objects (which, for these relational tasks, is extraneous information). The Transformer consistently requires the largest amount of data to learn the relational games tasks. PrediNet tends to be more sample-efficient. RelConvNet and CoRelNet are the most sample-efficient, with RelConvNet only slightly more sample-efficient on most tasks.
+
+On the ‘match pattern’ task, however, RelConvNet is significantly more sample-efficient. We attribute this to the fact that RelConvNet is able to model higher-order relations through its relational convolution module. The ‘match pattern’ task can be thought of as a simple second-order relational task—it involves computing relations between two groups of objects, and comparing the relations within the two groups. The relational convolution module naturally models this kind of situation since it learns representations of the relations among subsets of objects.
+
+**==> picture [397 x 137] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Split = Hexos Split = Stripes 1 . 0 0 . 8 Model CoRelNet 0 . 6 PrediNet Transformer RelConvNet 0 . 4 RelConvNet (Temporal G) RelConvNet (Feature G) RelConvNet (Contextual G) 0 . 2 0 . 0 same occurs xoccurs between match pattern same occurs xoccurs between match pattern Task Task Accuracy **----- End of picture text -----**
+
+Figure 5: Out-of-distribution generalization on hold-out object sets. Bar heights indicate the mean over 5 trials and the error bars indicate a bootstrap 95% confidence interval.
+
+7
+
+**Out-of-distribution generalization.** Figure 5 reports model performance on the two hold-out object sets after training. On the hexominoes objects, which are similar-looking to the pentominoes objects used for training, RelConvNet and CoRelNet do nearly perfectly. PrediNet and the Transformer do well on the simpler tasks, but struggle with the more difficult ‘match pattern’ task. The stripes objects are visually more distinct from the training split objects, making generalization more difficult. We observe an overall drop in performance for all models. The drop is particularly dramatic for CoRelNet[2] . We conjecture that this is due to CoRelNet’s inability to model multi-dimensional relations, necessitating that all relational information is squeezed into a scalar quantity. The separation between RelConvNet and the other models is largest on the “match pattern” task of the stripes split (the most difficult task and the most difficult generalization split). Here, RelConvNet (with temporal grouping) maintains a mean accuracy of 97% while the other models drop below 65%. We attribute this to RelConvNet’s ability to naturally represent higher-order relations and model groupings of objects. This split is also where the addition of learned grouping layers yield improvements over the variant of RelConvNet with only discrete groups. The grouping layers allow the model to represent the latent groups which exist in the task, enabling improved out-of-distribution generalization.
+
+## 5.2 ‘SET’: GROUPING AND COMPOSITIONALITY IN RELATIONAL REASONING
+
+‘SET’ is a card game which forms a simple but challenging relational task. The ‘objects’ are a set cards each representing four attributes which can take one of three values each. ‘Color’ can be red, green, or purple; ‘number’ can be one, two, or three; ‘shape’ can be diamond, squiggle, or oval; and ‘fill’ can be solid, striped, or empty. A ‘set’ is a triplet of cards such that each attribute is either the same on all three cards or different on all three cards. Figure 6a shows a sample of SET cards.
+
+In SET, the task is: given a hand of _k_ ¡ 3 cards, find a ‘set’ among them (typically, SET is played with _k_ 12, with two players competing to find a ‘set’ first). This task is deceptively challenging, and is representative of the type of relational reasoning that humans excel at but machine learning systems still struggle with. To solve the task, one must process the sensory information of individual cards to identify the values of each attribute, then somehow search over combinations of cards and reason about the relations between them. Importantly, this type of relational reasoning requires attending over several attributes and relations simultaneously while representing some notion of ‘groups’. The construct of relational convolutions proposed in this paper is a step towards developing machine learning systems which can perform this kind of relational reasoning.
+
+In this section, we evaluate RelConvNet on a task based on ‘SET’ and compare it to several baselines. The task is: given a sequence of _k_ 5 images of SET cards, determine whether or not they contain a ‘set’. All models share the common architecture p _x_ 1 _, . . . , xk_ q Ñ CNN Ñ t�u Ñ MLP Ñ _y_ ˆ, where t�u is RelConvNet, CoRelNet, PrediNet, or a Transformer. The architectures are identical to the previous section with the exception that RelConvNet uses the permutation-invariant version of the relational inner product (eq. (5)) with max-pooling, and the projection dimension is changed to 16 to better match the larger embedding dimension of the card images. The CNN embedder is pre-trained on the task of classifying the four attributes of the cards and an intermediate layer is used to generate embeddings of dimension 64 for each card. The output MLP architecture is shared across all models, and consists of two hidden layers with 64 and 32 neurons, respectively, and ReLU activations.
+
+In SET, there exists � 813 � 85 320 triplets of cards, of which 1 080 are a ‘set’. We partition the ‘sets’ into training (70%), validation (15%), and test (15%) sets. The training, validation, and test datasets are generated by sampling _k_ -tuples of cards such that with probability 1 { 2 the _k_ -tuple does not contain a set, and with probability 1 { 2 it contains a set among the corresponding partition of sets. Partitioning the data in this way allows us to measure the models’ ability to “learn the rule” and identify new unseen ‘sets’. We train for 100 epochs with the same loss, optimizer, and batch size as the experiments in the previous section. Figure 6b shows the hold-out test accuracy for each model. Figures 6c and 6d show the training and validation accuracy over the course of training.
+
+We observe that RelConvNet is able to learn the task and generalize to new ‘sets’ with near-perfect accuracy. On the other hand, CoRelNet and the Transformer have accuracies only slightly better than random guessing on the test set, while PrediNet learns nothing that generalizes to the test set. The
+
+2The experiments in (Kerg et al., 2022) on the relational games benchmark use a technique called “context normalization” (Webb et al., 2020) as a preprocessing step. We choose not to use this technique since it is an added confounder. We discuss this more in Appendix E.
+
+8
+
+**==> picture [359 x 238] intentionally omitted <==**
+
+**----- Start of picture text -----**
+1 . 0 0 . 8 0 . 6 0 . 4 0 . 2 0 . 0 RelConvNet CoRelNet PrediNet Transformer * * * Model (a) Example of “contains set” task. (b) Hold-out test accuracy. 1 . 0 1 . 0 0 . 9 0 . 9 Model Model 0 . 8 RelConvNet 0 . 8 RelConvNet CoRelNet CoRelNet 0 . 7 PrediNet 0 . 7 PrediNet Transformer Transformer 0 . 6 0 . 6 0 . 5 0 . 5 0 20 40 60 80 100 0 20 40 60 80 100 epoch epoch (c) Training accuracy over the course of training. (d) Validation accuracy over the course of training. label = 0 Accuracy label = 1 accuracy accuracy training validation **----- End of picture text -----**
+
+Figure 6: Results of “contains set” experiments. Bar height/solid lines indicate the mean over 10 trials and error bars/shaded regions indicate 95% bootstrap confidence intervals.
+
+picture becomes more clear when looking at training curves. While the Transformer and PrediNet are eventually able to fit the training data, they are unable to “learn the rule” in a way that generalizes to the validation or test sets. This suggests that the Transformer architecture has the general-purpose function-approximation capabilities to fit a wide array of sequence-tasks, but it does not have the right inductive biases for specialized relational reasoning. A possible explanation is that relations are processed only implicitly through its attention mechanism, rather than explicitly via a relation tensor. Moreover, it does not naturally support reasoning about the relations between groups of objects. These are strengths of the relational convolutional networks architecture.
+
+## 6 DISCUSSION
+
+**Summary.** In this paper, we proposed a framework for hierarchical relational representation learning via a novel relational convolution operation. The relational convolution operation we propose here is a ‘convolution’ in the sense that it considers a patch of the relation tensor, given by a group, and compares the relations within it to a template graphlet filter via an appropriately-defined inner product. This is analogous to convolutional neural networks, where we would compare an image filter against different patches of the input image. Since the same graphlet filters are used for all groupings, the relational convolution operation implements a form of _parameter-sharing_ which yields improved sample-efficiency and generalization.
+
+An important feature of the relational convolution operation is its _interpretability_ . The filters _**f**_ p _f_ 1 _, . . . , fnf_ q are each a particular pattern of relations between _s_ objects. Each object in the output of a relational convolution _R_ � _**f**_ represents the degree to which the relations in the group _g_ match the patterns in each filter. By iteratively applying inner product relation layers and relational convolution layers, we obtain an architecture which naturally models _hierarchical_ relations.
+
+**Limitations and future work.** The tasks considered here are solvable by modeling only second-order relations at most. We observe that the relational convolutional networks architecture saturates the relational games benchmark of (Shanahan et al., 2020). While the “contains set” task demonstrates a sharp separation between relational convolutional networks and existing baselines, this task too only involves second-order relations, and does not fully test the abilities of the framework. A more thorough evaluation of this architecture, and future architectures for modeling hierarchical relations,
+
+9
+
+would require the development of new benchmark tasks and datasets which involve a larger number of objects and higher-order relations. This is a non-trivial task that we leave for future work.
+
+The experiments considered here are synthetic relational tasks designed for a controlled evaluation. In more realistic settings, we envision relational convolutional networks as modules embedded in a broader architecture. For example, the relational convolutions framework can be naturally integrated into a graph neural network by using the relational convolution outputs as the node inputs and the relation tensor as the graph inputs. Similarly, the framework can be integrated into a Transformerbased model for general sequence modeling tasks by having the decoder attend to the sequence of relational objects produced by relational convolutions.
+
+## CODE AND DATA
+
+Code and experimental logs are available at: [URL removed]]
+
+## REFERENCES
+
+- Awni Altabaa, Taylor Webb, Jonathan Cohen, and John Lafferty. Abstractors and relational crossattention: An inductive bias for explicit relational reasoning in transformers. 2023. URL https: //arxiv.org/abs/2304.00195v3.
+
+- Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, Caglar Gulcehre, Francis Song, Andrew Ballard, Justin Gilmer, George Dahl, Ashish Vaswani, Kelsey Allen, Charles Nash, Victoria Langston, Chris Dyer, Nicolas Heess, Daan Wierstra, Pushmeet Kohli, Matt Botvinick, Oriol Vinyals, Yujia Li, and Razvan Pascanu. Relational inductive biases, deep learning, and graph networks, October 2018.
+
+Stefan L Frank, Rens Bod, and Morten H Christiansen. How hierarchical is language use? _Proceedings of the Royal Society B: Biological Sciences_ , 279(1747):4522–4531, 2012.
+
+- Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In _International Conference on Machine Learning_ , pp. 1263–1272. PMLR, 2017. ISBN 2640-3498.
+
+- William L Hamilton. _Graph Representation Learning_ . Synthesis Lectures on Artificial Intelligence and Machine Learning. Morgan & Claypool, San Rafael, CA, September 2020. ISBN 978-168173-965-6.
+
+- Justin Johnson, Bharath Hariharan, Laurens Van Der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 2901–2910, 2017.
+
+- Giancarlo Kerg, Sarthak Mittal, David Rolnick, Yoshua Bengio, Blake Richards, and Guillaume Lajoie. On Neural Architecture Inductive Biases for Relational Tasks, 2022. URL http: //arxiv.org/abs/2206.05056.
+
+Thomas Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard Zemel. Neural Relational Inference for Interacting Systems, June 2018.
+
+Thomas N. Kipf and Max Welling. Semi-Supervised Classification with Graph Convolutional Networks, February 2017.
+
+- Anirban Laha, Saneem Ahmed Chemmengath, Priyanka Agrawal, Mitesh Khapra, Karthik Sankaranarayanan, and Harish G Ramaswamy. On Controllable Sparse Alternatives to Softmax. In _Advances in Neural Information Processing Systems_ , volume 31. Curran Associates, Inc., 2018.
+
+- Francesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-Centric Learning with Slot Attention, October 2020.
+
+10
+
+- Andre Martins and Ramon Astudillo. From softmax to sparsemax: A sparse model of attention and multi-label classification. In _International conference on machine learning_ , pp. 1614–1623. PMLR, 2016.
+
+- Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning Convolutional Neural Networks for Graphs, June 2016.
+
+- Rasmus Berg Palm, Ulrich Paquet, and Ole Winther. Recurrent Relational Networks, November 2018.
+
+- Barbara Rosario, Marti A Hearst, and Charles J Fillmore. The descent of hierarchy, and selection in relational semantics. In _Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics_ , pp. 247–254, 2002.
+
+- Adam Santoro, David Raposo, David G. T. Barrett, Mateusz Malinowski, Razvan Pascanu, Peter Battaglia, and Timothy Lillicrap. A simple neural network module for relational reasoning, 2017. URL [URL removed]
+
+- Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy Lillicrap. Relational recurrent neural networks. In _Advances in Neural Information Processing Systems_ , volume 31. Curran Associates, Inc., 2018. URL [URL removed] e2eabaf96372e20a9e3d4b5f83723a61-Abstract.html.
+
+- Michael Schlichtkrull, Thomas N. Kipf, Peter Bloem, Rianne van den Berg, Ivan Titov, and Max Welling. Modeling Relational Data with Graph Convolutional Networks, October 2017.
+
+- Murray Shanahan, Kyriacos Nikiforou, Antonia Creswell, Christos Kaplanis, David Barrett, and Marta Garnelo. An explicitly relational neural network architecture. In Hal Daumé III and Aarti Singh (eds.), _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pp. 8593–8603. PMLR, 13–18 Jul 2020. URL [URL removed]
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. _arXiv preprint arXiv:1710.10903_ , 2017.
+
+- Taylor Webb, Zachary Dulberg, Steven Frankland, Alexander Petrov, Randall O’Reilly, and Jonathan Cohen. Learning representations that support extrapolation. In Hal Daumé III and Aarti Singh (eds.), _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pp. 10136–10146. PMLR, 13–18 Jul 2020. URL [URL removed]
+
+- Taylor W. Webb, Ishan Sinha, and Jonathan D. Cohen. Emergent Symbols through Binding in External Memory, 2021. URL [URL removed]
+
+- Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. _Advances in neural information processing systems_ , 30, 2017.
+
+- Vinicius Zambaldi, David Raposo, Adam Santoro, Victor Bapst, Yujia Li, Igor Babuschkin, Karl Tuyls, David Reichert, Timothy Lillicrap, Edward Lockhart, et al. Deep reinforcement learning with relational inductive biases. In _International conference on learning representations_ , 2018.
+
+- Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In _Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13_ , pp. 818–833. Springer, 2014.
+
+- Chi Zhang, Feng Gao, Baoxiong Jia, Yixin Zhu, and Song-Chun Zhu. RAVEN: A Dataset for Relational and Analogical Visual rEasoNing, March 2019.
+
+11
+
+## A EXPERIMENTS SUPPLEMENT
+
+## A.1 RELATIONAL GAMES
+
+Table 1 contains text descriptions of each task in the relational games dataset in the experiments of Section 5.1. Table 2 contains a description of the architectures of each model (or shared component) in the experiments. Table 3 contains a description of the hyperparameters of the grouping layers corresponding to the ‘Temporal G’, ‘Feature G’, and ‘Contextual G’ RelConvNet models. All grouping layers have 16 soft groups, and the normalizer in Equation (7) is sparsemax. Table 4 reports the accuracy on the hold-out object sets (i.e., the numbers depicted in Figure 5 of the main text).
+
+|Task|Description|
+|---|---|
+|same|Two random cells out of nine are occupied by an object. They are the|
+||“same” if they have the same color, shape, and orientation (i.e., identical|
+||image)|
+|occurs|The top row contains one object and the bottom row contains three|
+||objects. The “occurs” relationship holds if at least one of the objects in|
+||the bottom row is the same as the object in the toprow.|
+|xoccurs|Same as occurs, but the relationship holds if exactly one of the objects|
+||in the bottom row is the same as the object in the toprow.|
+|between|The grid is occupied by three objects in a line (horizontal or vertical).|
+||The “between” relationshipholds if the outer objects are the same.|
+|row match|The frst and third rows of the grid are occupied by three objects each.|
+|pattern|The “match pattern” relationship holds if the relation pattern in each|
+||row is the same (e.g., AAA, AAB, ABC, etc.)|
+
+Table 1: Relational games tasks.
+
+|Model / Component|Architecture|
+|---|---|
+|Common CNN|Conv2DÑMaxPool2DÑConv2DÑMaxPool2DÑFlatten.|
+|Embedder|Conv2D: num flters = 16, flter size =3�3, activation = relu.|
+||MaxPool2D: stride = 2.|
+|RelConvNet|CNNÑMD-IPRÑRelConvÑFlattenÑMLP.|
+||MD-IPR: relation dim = 16, projection dim = 4, symmetric.|
+||RelConv: num flters = 16,flter size = 3,discretegroups = combinations.|
+|CoRelNet|CNNÑCoRelNetÑFlattenÑMLP.|
+||Standard CoRelNet has no hyperparameters.|
+|PrediNet|CNNÑPrediNetÑFlattenÑMLP.|
+||PrediNet: keydim = 4,number of heads = 4,num relations = 16.|
+|Transformer|CNNÑTransformerEncoderÑAveragePoolingÑMLP.|
+||TransformerEncoder: num layers = 1, num heads = 8, feedforward|
+||intermediate size = 32,activation = relu.|
+|Common output MLP|Dense(64, ’relu’)ÑDense(2).|
+
+Table 2: Model architectures for relational games experiments.
+
+|Groupinglayer|Description|
+|---|---|
+|Temporal Grouping|_G_learned directlyasparameter.|
+|Feature-based Grouping|_G_ produced byMLP with two hidden layers of size 32 and relu activation.|
+|Contextual Grouping|_G_produced by message-passing (via Transformer Encoder Block) followed|
+||by an MLP (eq. (11)). Encoder Block has 4 heads, inner dim = 32, and relu|
+||activation. MLP same as feature-based grouping.|
+
+Table 3: hyperparameters of grouping layers.
+
+12
+
+|||Hexos Accuracy|Stripes Accuracy|
+|---|---|---|---|
+|Task|Model|||
+|same|CoRelNet|0_._988�0_._006|0_._724�0_._112|
+||PrediNet|0_._990�0_._004|0_._983�0_._007|
+||Transformer|0_._997�0_._001|0_._993�0_._004|
+||RelConvNet|0_._989�0_._002|0_._974�0_._003|
+||RelConvNet (Temporal G)|0_._981�0_._002|0_._965�0_._007|
+||RelConvNet (Feature G)|0_._985�0_._001|0_._978�0_._006|
+||RelConvNet(Contextual G)|0_._981�0_._002|0_._969�0_._012|
+|occurs|CoRelNet|0_._992�0_._004|0_._518�0_._012|
+||PrediNet|0_._907�0_._020|0_._775�0_._046|
+||Transformer|0_._881�0_._015|0_._724�0_._021|
+||RelConvNet|0_._980�0_._001|0_._880�0_._015|
+||RelConvNet (Temporal G)|0_._983�0_._001|0_._920�0_._012|
+||RelConvNet (Feature G)|0_._788�0_._112|0_._747�0_._099|
+||RelConvNet(Contextual G)|0_._951�0_._004|0_._830�0_._044|
+|xoccurs|CoRelNet|0_._980�0_._007|0_._606�0_._035|
+||PrediNet|0_._872�0_._036|0_._810�0_._028|
+||Transformer|0_._867�0_._017|0_._753�0_._031|
+||RelConvNet|0_._967�0_._001|0_._946�0_._006|
+||RelConvNet (Temporal G)|0_._963�0_._006|0_._939�0_._012|
+||RelConvNet (Feature G)|0_._760�0_._107|0_._754�0_._103|
+||RelConvNet(Contextual G)|0_._942�0_._020|0_._901�0_._029|
+|between|CoRelNet|0_._995�0_._001|0_._582�0_._063|
+||PrediNet|0_._978�0_._006|0_._950�0_._019|
+||Transformer|0_._986�0_._003|0_._961�0_._010|
+||RelConvNet|0_._991�0_._001|0_._988�0_._002|
+||RelConvNet (Temporal G)|0_._992�0_._001|0_._979�0_._004|
+||RelConvNet (Feature G)|0_._993�0_._001|0_._981�0_._003|
+||RelConvNet(Contextual G)|0_._992�0_._002|0_._972�0_._012|
+|match pattern|CoRelNet|0_._942�0_._011|0_._581�0_._026|
+||PrediNet|0_._710�0_._040|0_._658�0_._053|
+||Transformer|0_._627�0_._005|0_._591�0_._006|
+||RelConvNet|0_._961�0_._015|0_._870�0_._041|
+||RelConvNet (Temporal G)|0_._979�0_._003|0_._967�0_._002|
+||RelConvNet (Feature G)|0_._976�0_._003|0_._958�0_._009|
+||RelConvNet (Contextual G)|0_._935�0_._047|0_._896�0_._060|
+
+Table 4: Out-of-distribution generalization results on relational games. We report means � standard error of mean over 5 trials. These are the numbers associated with Figure 5.
+
+## A.2 SET
+
+Table 6 reports the test accuracies in the “contains set” task of Section 5.2 (i.e., the numbers depicted in Figure 6b of the main text).
+
+## B COMPUTATIONAL EFFICIENCY AND PARAMETER EFFICIENCY
+
+## B.1 PARAMETER EFFICIENCY
+
+The parameter count of both MD-IPR and relational convolution layers does not scale with the number of input objects or the number of groups considered. Instead, the parameters are shared across objects and groups. This has computational and statistical benefits. In particular, it reduces memory usage and the number of weight updates during backpropagation, as well as making the statistical estimation of a good choice of parameters easier.
+
+13
+
+|Model / Component|Architecture|
+|---|---|
+|Common CNN|Conv2DÑMaxPool2DÑConv2DÑMaxPool2DÑFlattenÑ|
+|Embedder|Dense(64, ’relu’) Ñ Dense(64, ’tanh’).|
+||Conv2D: num flters = 32, flter size =5�5, activation = relu.|
+||MaxPool2D: stride = 4.|
+|RelConvNet|CNNÑMD-IPRÑRelConvÑFlattenÑMLP.|
+||MD-IPR: relation dim = 16, projection dim = 16, symmetric.|
+||RelConv: num flters = 16, flter size = 3, discrete groups = combinations,|
+||symmetric relational innerproduct with ‘max’ aggregator.|
+|CoRelNet|CNNÑCoRelNetÑFlattenÑMLP.|
+||Standard CoRelNet has no hyperparameters.|
+|PrediNet|CNNÑPrediNetÑFlattenÑMLP.|
+||PrediNet: keydim = 4,number of heads = 4,num relations = 16.|
+|Transformer|CNNÑTransformerEncoderÑAveragePoolingÑMLP.|
+||TransformerEncoder: num layers = 1, num heads = 8, feedforward|
+||intermediate size = 32,activation = relu.|
+|Common output MLP|Dense(64, ’relu’)ÑDense(32, ’relu’)ÑDense(2).|
+
+Table 5: Model architectures for “contains set” experiments.
+
+||Accuracy|
+|---|---|
+|Model||
+|CoRelNet|0_._563�0_._001|
+|PrediNet|0_._508�0_._002|
+|RelConvNet|0_._979�0_._006|
+|Transformer|0_._584�0_._004|
+
+Table 6: Hold-out test accuracy on “contains set” task. We report means � standard error of mean over 10 trials. These are the numbers associated with Figure 6b.
+
+**MD-IPR layer.** In a multi-dimensional inner product relation module, the parameters are the left and right projection maps, _W_ 1[p] _[k]_[q] _, W_ 2[p] _[k]_[q] P R _[d]_[proj][�] _[d]_[in] _, k_ 1 _, . . . , dr_ , where the projection dimension _d_ proj and the relation dimension _dr_ are hyperparameters, and _d_ in is the dimensionality of the input objects ( Equation (2)). Hence, the parameter count of a MD-IPR layer is _dr_ � _d_ proj � _d_ in. Observe that while this scales with the dimensionality of the input objects _d_ in, it does not scale with the number of objects _m_ —the same encoders are shared across all pairs of objects.
+
+**Relational Convolution layer.** The parameters in a relational convolution layer are the graphlet filters _**f**_ P R _[s]_[�] _[s]_[�] _[d][r]_[�] _[n][f]_ . Observe that the parameter count is independent of the number of groups _|G|_ or even the number of objects _m_ . The same graphlet filters are applied to the relation subtensor corresponding to each grouping of objects. This is similar to how convolutional neural networks apply the same filters to all patches of an image. The parameter count of a relational convolution layer depends only on the filter size and number of filters, which are hyperparameters.
+
+## B.2 COMPUTATIONAL CONSIDERATIONS
+
+The MD-IPR module computes an _m_ � _m_ relation tensor, where _m_ is the number of input objects. This quadratic computational and memory cost can be avoided under assumptions of sparsity in the discrete groups _G_ or group assignment matrix _G_ . Such optimizations will be useful in problems involving a large number of objects.
+
+Consider first the case relational convolution with discrete groups. The output of the relational convolution layer is _R_ � _**f**_ px _R_ r _g_ s _,_ _**f**_ y rel q _g_ P _G_ . For each _g_ P _G_ , _R_ r _g_ s encodes the relations between objects inside of _g_ . Hence, rather than computing the full _m_ � _m_ relation tensor, we can instead compute only,
+
+_R_ : t _Rij_ : D _g_ P _G_ such that _i, j_ P _g_ u _._
+
+14
+
+## When _G_ is sparse and structured, _R_ is sparse.
+
+In the case of relational convolution with (learned) soft groups, the same can be achieved via a sparse selection in the group match score _αgk_ (Equation (7)). The group match scores _αgk_ can be made sparse by using sparse normalizers like sparsemax or top- _k_ softmax, for example. Then, the relation between object _i_ and object _j_ only needs to be computed if there exists a soft group _Gk, k_ P r _ng_ s which assigns non-zero weight to a discrete group _g_ P _G_ which includes both _i_ and _j_ . That is,
+
+## _R_ : t _Rij_ : D _k_ P r _ng_ s _, g_ P _G_ such that _αgk_ ¡ 0 and _i, j_ P _g_ u _._
+
+Thus, only a sparse subset of the _m_ � _m_ relation tensor would need to be computed and stored.
+
+## C GEOEMTRY OF REPRESENTATIONS LEARNED BY MD-IPR AND RELCONV
+
+In this section, we explore and visualize the representations learned by MD-IPR and RelConv layers. In particular, we will visualize the representations produced by the RelConvNet model trained on the SET task described in Section 5.2. Recall that the MD-IPR layer learns encoders _φ_ 1 _, ψ_ 1 _, . . . , φdr , ψdr_ . In this model _dr_ 16, _φi ψi_ (so that learned relations are symmetric), and each _φi_ is a linear transformation to _d_ proj 4-dimensional space. The representations learned by a selection of 6 encoders is visualized in Figure 7. For each of the 81 possible SET cards, we apply each encoder in the MD-IPR layer, reduce to 2-dimensions via PCA, and visualize how each encoder separates the 4 attributes: number, color, fill, and shape. Observe, for example, that “Encoder 0” disentangles color and shape, “Encoder 2” disentangles fill, and “Encoder 3” disentangles number.
+
+Next, we visualize, we explore the geometry of learned representations of relation vectors. That is, the inner products producing the 16-dimensional relation vector for each pair of objects. For each � 812 � pairs of SET cards, we compute the 16-dimensional relation vector learned by the MD-IPR layer, reduce to 2 dimensions via PCA, and visualize how the learned relation disentangles the latent same/different relations among the four attributes. This is shown in Figure 8. We see some separation of the underlying same/different relations among the four attributes, even with only two dimensions out of 16.
+
+Finally, we visualize the representations learned by the relational convolution layer. Recall that this layer learns a set of graphlet filters _**f**_ P R _[s]_[�] _[s]_[�] _[d][r]_[�] _[n][f]_ which form templates of relational patterns against which groups of objects are compared. In our experiments, the filter size is _s_ 3 and the number of filters is _nf_ 16. Hence, for each group _g_ of 3 SET cards, the relational convolution layer produces a 16-dimensional vector, x _R_ r _g_ s _,_ _**f**_ y rel P R _[n][f]_ , summarizing the relational structure of the group. Of the � 813 � possible triplets of SET cards, we create a balanced sample of “sets” and “non-sets”. We then compute x _R_ r _g_ s _,_ _**f**_ y rel and reduce to 2 dimensions via PCA. Figure 9 strikingly shows that the representations learned by the relational convolution layer very clearly separate triplets of cards which form a set from those that don’t form a set.
+
+## D SOME INITIAL IDEAS ON HIGHER-ORDER RELATIONAL TASKS
+
+As noted in the discussion, the tasks considered in this paper are solvable by modeling second-order relations at most. One of the main innovations of the relational convolutions architecture over existing relational architectures is its compositionality and ability to model higher-order relations. An important direction of future research is to test the architecture’s ability to model hierarchical relations of increasingly higher order. Constructing such benchmarks is a non-trivial task which requires careful thought and consideration. This was outside the scope of this paper, but we provide an initial discussion here which may be useful for constructing such benchmarks in future work.
+
+## **Propositional logic.** Consider evaluating boolean logic formula such as,
+
+## _x_ 1 ^ pp _x_ 2 x_ 3 q ^ pp _x_ 3 ^ _x_ 4 q _ p _x_ 5 ^ _x_ 6 ^ _x_ 7 qqq _._
+
+Evaluating this logical expression (in this form) requires iteratively grouping objects and computing the relations between them. For instance, we begin by computing the relation within _g_ 1 p _x_ 3 _, x_ 4 q and the relation within _g_ 2 p _x_ 5 _, x_ 6 _, x_ 7 q , then we compute the relation between the groups _g_ 1 and _g_ 2, etc. For a task which involves logical reasoning of this hierarchical form, one might imagine the grouping layers in RelConvNet learning the relevant groups and the relational convolution operation
+
+15
+
+**==> picture [358 x 447] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Number Color Fill Shape one red empty diamond two green striped oval three purple solid squiggle Encoder 0 Encoder 1 Encoder 2 Encoder 3 Encoder 4 Encoder 5 **----- End of picture text -----**
+
+Figure 7: The encoders learned in the MD-IPR layer represent the latent attributes in the SET cards, with different encoders seemingly specializing to encode one or two attributes.
+
+computing the relations within each group. Taking inspiration from logical reasoning with such hierarchical structure may lead to interesting benchmarks of higher-order relational representation.
+
+**Sequence modeling.** In sequence modeling (e.g., language modeling), modeling the relations between objects is usually essential. For example, syntactic and semantic relations between words are crucial to parsing language. Higher-order relations are also important, capturing syntactic and semantic relational features across different locations in the text and across multiple length-scales and layers of hierarchy (see for example some relevant work in linguistics Frank et al., 2012; Rosario et al., 2002). The attention matrix in Transformers can be thought of as implicitly representing relations between tokens. It is possible that composing Transformer layers also learns hierarchical relations. However, as shown in this work and previous work on relational representation, Transformers have limited efficiency in representing relations. Thus, incorporating relational convolutions into Transformerbased sequence models may yield meaningful improvements in the relational aspects of sequence modeling. One way to do this is by cross-attending to a the sequence of relational objects produced
+
+16
+
+**==> picture [378 x 111] intentionally omitted <==**
+
+Figure 8: The relations learned by the MD-IPR layer encodes the latent relations underlying the SET task.
+
+**==> picture [252 x 181] intentionally omitted <==**
+
+**----- Start of picture text -----**
+not set 40 set 20 0 20 40 20 0 20 40 60 80 R[g], f rel [PC1] [PC2] rel f ], g [ R **----- End of picture text -----**
+
+Figure 9: The relational convolution layer produces representations which separates ‘sets’ from ‘non-sets’.
+
+by relational convolutions, each of which summarizes the relations within a group of objects at some level of hierarchy.
+
+**Set embedding.** The objective of set embedding is to map a collection of objects to a euclidean vector which represents the important features of the objects in the set (Zaheer et al., 2017). Depending on what the set embedding will be used for, it may need to represent a combination of object-level features and relational information, including perhaps relations of higher order. A set embedder which incorporates relational convolutions may be able to generate representations which summarize relations between objects at multiple layers of hierarchy.
+
+**Visual scene understanding.** In a visual scene, there are typically several objects with spatial, visual, and semantic relations between them which are crucial for parsing the scene. The CLEVR benchmark on visual scene understanding (Johnson et al., 2017) was used in early work on relational representation (Santoro et al., 2017). In more complex situations, the objects in the scene may fall into natural groupings, and the spatial, visual, and semantic relations between those _groups_ may be important for parsing a scene (e.g., objects forming larger components with functional dependence determined by the relations between them). Integrating relational convolutions into a visual scene understanding system may enable reasoning about such higher-order relations.
+
+## E DISCUSSION ON USE OF TCN IN EVALUATING RELATIONAL ARCHITECTURES
+
+In Section 5.1 the CoRelNet model of Kerg et al. (2022) was among the baselines we compared to. In that work, the authors also evaluate their model on the relational games benchmark. A difference
+
+17
+
+between their experimental set up and ours is that they use a method called “context normalization” as a preprocessing step on the sequence of objects.
+
+“Context normalization” was proposed by Webb et al. (2020). The proposal is simple: Given a sequence of objects, p _x_ 1 _, . . . , xm_ q , and a set of context windows _W_ 1 _, . . . , WW_ t 1 _, . . . , m_ u which partition the objects, each object is normalized along each dimension with respect to the other objects in its context. That is, p _z_ 1 _, . . . , zm_ q CN p _x_ 1 _, . . . , xm_ q is computed as,
+
+**==> picture [203 x 98] intentionally omitted <==**
+
+where _γ_ p _γ_ 1 _, . . . , γd_ q _, β_ p _β_ 1 _, . . . , βd_ q are learnable gain and shift parameters for each dimension (initialized at 1 and 0, respectively, as with batch normalization). The context windows represent logical groupings of objects that are assumed to be known. For instance, (Kerg et al., 2022; Webb et al., 2021) consider a “relational match-to-sample” task where 3 pairs of objects are presented in sequence, and the task is to identify whether the relation in the first pair is the same as the relation in the second pair or the third pair. Here, the context windows would be the pairs of objects. In the relational games “match rows pattern” task, the context windows would be each row.
+
+It is reported in (Kerg et al., 2022; Webb et al., 2021) that context normalization significantly accelerates learning and improves out-of-distribution generalization. Since (Kerg et al., 2022; Webb et al., 2021) use context normalization in their experiments, in this section we aim to explain our choice to exclude it. We argue that context normalization is a confounder and that an evaluation of relational architectures without such preprocessing is more informative.
+
+To understand how context normalization works, consider first a context window of size 2, and let _β_ 0 _, γ_ 1. Then, along each dimension, we have
+
+**==> picture [166 x 24] intentionally omitted <==**
+
+In particular, what context normalization does when there are two objects is, along each dimension, output 0 if the value is the same, and � 1 if it is different (encoding whether it is larger or smaller). Hence, it makes the context-normalized output independent of the original feature representation. For tasks like relational games, where the key relation to model is same/different, this preprocessing is directly encoding this information in a “symbolic” way. In particular, for two objects _x_ 1 _, x_ 2, context normalized to produce _z_ 1 _, z_ 2, we have that _x_ 1 _x_ 2 if and only if x _z_ 1 _, z_ 2 y 0. This makes out-of-distribution generalization trivial, and does not properly test a relational architecture’s ability to model the same/different relation.
+
+Similarly, consider a context window of size 3. Then, along each dimension, we have,
+
+**==> picture [282 x 40] intentionally omitted <==**
+
+Again, context normalization symbolically encodes the relational pattern. For any triplet of objects, regardless of the values they take, context normalization produces identical output in the cases above. With context windows larger than 3, the behavior becomes more complex.
+
+These properties of context normalization make it a confounder in the evaluation of relational architectures. In particular, for small context windows especially, context normalization symbolically encodes the relevant information. Experiments on relational architectures should evaluate the architectures’ ability to _learn_ those relations from data. Hence, we do not use context normalization in our experiments.
+
+18
+
diff --git a/open_review/iclr2024_8568.json b/open_review/iclr2024_8568.json
new file mode 100644
index 0000000000000000000000000000000000000000..d0feb469484e3c44b5160422ad648f6a6ff60bff
--- /dev/null
+++ b/open_review/iclr2024_8568.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8568",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Initializing the Layer-wise Learning Rate",
+ "abstract": "The standard method to assign learning rates has been to rely on the optimizer and to use a single, global learning rate across all its layers. We propose to assign individual learning rates as well, according to the layer-wise gradient magnitude at initialization. Even if individual layers are initialized to preserve gradient variance, architectural characteristics result in uneven gradient magnitude even when the network has not started training. We interpret this gradient magnitude as a measure of architecture-induced convergence bias, and adjust the layer-wise learning rate opposite to its gradient magnitude at initialization. This relative learning rate is maintained throughout the entire training scheme. Experiments on convolutional and transformer architectures on ImageNet-1k show improved accuracy and training stability.",
+ "rebuttal": "### Response to reviewer 5Czw\nWe thank the reviewer for the valuable review and feedback\n\n> Regarding the simplicity of the method and comparison with LARS, LAMB\n\nWe would like to emphasize that while LARS, LAMB are also layer-wise methods, the underlyring mechanisms and interpretation are very different in that LARS and LAMB relies on per-layer gradient normalization and additional weight norm scaling, while the proposed method is concered with architecture-induced convergence bias. In practice it means the learning rates of LARS and LAMB is insensitive to gradient of other layers, and due to the additional weight norm scaling layers initialized 0 are in principle not updated.\n\nWe have provided results of layer-wise gradient normalization techniques on ResNet-50 with SGD on Table 2. We found that the batchnorm scale and bias layers had to be excluded from LAMB scaling for LAMB to achieve competitive performace, perhaps due to its additional weight norm scaling. In that sense, we believe the proposed method can be considered simpler as the step size remains dependent only the gradient and does not modifiy the optimizer.\n\n> Training cost of Algorithm 1\n\nWe performed an ablation study on $T$ when training ResNet-50 for 90 epochs with SGD by measuring the deviation of per-layer assigned learning rates compared to the $T$ used in the paper. We report the results below and have included it in the appendix. We also ran a baseline experiement of 91 epochs, but found the final validation accuracy to be lower that the reported 76.80%, suggesting that other factors are more dominant compared to a single epoch difference. \n$T$ | Max deviation % | Average deviation % | Validation accuracy %|\n----------- | :-------------:| :-------------:| :-------------:|\n1 | 11.02 | 2.66 | 77.07 | \n10 | 3.51 | 0.69 | 77.01 | \n100 | 1.01 | 0.18 | 77.04 | \n1000 | 0.32 | 0.06 | 77.07 |\n5004 | 0 | 0 | 77.15 |\n\n### Response to reviewer LTJF\nWe thank the reviewer for the valuable review and feedback\n\n> Motivation of proposed Algorithm 1\n\nAlgorithm 1 adjusts the layer-wise learning rate to regularize architecture-induced convergence bias, measured as the gradient magnitude at initialization. It is motivated from an observation that layer-wise learning rate can further improve training of SGD in settings where adaptive methods are considered to have lower validation accuracy due to higher generalization gap.\n\n> Effect and performance of different architectures\n\nInspecting the assigned learning rates sho [...]\n\n### Response to reviewer R9Q4\nWe thank the reviewer for the valuable review and feedback\n\n> Relation to adaptive optimisation methods\n\nWe believe that explicit layer-wise learning rates has an effect that is different and mostly independent from adaptive optimization methods. Figure 8 in the Appendix of the updated draft shows the adaptive step size of AdamW $1/(\\sqrt{\\hat{v}_{t}}+\\epsilon)$ when training ResNet-50 for 90 epochs with single and the proposed layer-wise learning rate. The adaptive step sizes show a low to high trend according to layer depth on both single and the proposed method [...]\n\n### Response to reviewer cEsi\nWe thank the reviewer for the valuable review and feedback\n\n> Details on Algorithm 1\n\nFor $T$ we find a value of 100 or higher is sufficient to obtain resonable values. $G_{i}$ is incremented $T$ times in line 8, and is used to calculate the relative learning rates in line 10. After obtaining the relative values, the normalization is performed on lines 11-13 such that the average per-parameter learning rate is one.\n\n> Choice of $\\mathcal{L}^1$ over $\\mathbf{g}$ and inverse of the square root of $G_i$\n\nAlgorithm 1 is developed with the interpretation that the gradi [...]",
+ "initial_scores": [
+ 6,
+ 3,
+ 3,
+ 3
+ ],
+ "score_mean": 3.75,
+ "score_variance": 2.25,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "- This submission proposes a method to tune the init learning rates layer-wisely for neural networks based on the magnitude of the grad $\\ell$_1 norm. \n- The experimental results show that the proposed methods could improve the generalization ability of the existing optimizers.\n- However, the existing submission still has several flaws: 1) the motivation is unclear; 2) the connection to the adaptive methods especially to the layer-wise adaptive methods should be discussed in detail (only showing the numerical results is not enough); 3) the current experimental setting may be out-of-date, for example, for Swin-T and ViT-S, the acc@1 is over 80% in the common advanced setting. \n\nBased on the flaws, this version is not suitable for publication now.",
+ "forum_id": "mSSi0zYkEA",
+ "primary_area": "optimization",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_5Czw",
+ "review_id": "5WbAYNijfQ",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2243,
+ "edit_detected": true,
+ "edit_delta_seconds": 9044,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_LTJF",
+ "review_id": "aAe9dYqg4r",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1553,
+ "edit_detected": true,
+ "edit_delta_seconds": 308588,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_cEsi",
+ "review_id": "nQ6wPZfmSV",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3176,
+ "edit_detected": true,
+ "edit_delta_seconds": 1159661,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_R9Q4",
+ "review_id": "FyVLUY39QA",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3882,
+ "edit_detected": true,
+ "edit_delta_seconds": 1322695,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8568.md b/open_review/iclr2024_8568.md
new file mode 100644
index 0000000000000000000000000000000000000000..9552ffb06da70f43f73fe81be07a705fdfc0f63c
--- /dev/null
+++ b/open_review/iclr2024_8568.md
@@ -0,0 +1,463 @@
+
+
+## - INITIALIZING THE LAYER WISE LEARNING RATE
+
+Authors withheld for review
+
+## ABSTRACT
+
+The standard method to assign learning rates has been to rely on the optimizer and to use a single, global learning rate across all its layers. We propose to assign individual learning rates as well, according to the layer-wise gradient magnitude at initialization. Even if individual layers are initialized to preserve gradient variance, architectural characteristics result in uneven gradient magnitude even when the network has not started training. We interpret this gradient magnitude as a measure of architecture-induced convergence bias, and adjust the layer-wise learning rate opposite to its gradient magnitude at initialization. This relative learning rate is maintained throughout the entire training scheme. Experiments on convolutional and transformer architectures on ImageNet-1k show improved accuracy and training stability.
+
+## 1 INTRODUCTION
+
+Appropriate hyperparameter selection remains a central component when training deep neural networks, and the network performance can be reliant on hyperparameter choices that is not apparent in the initial training stage. As such, it is customary to perform multiple full training runs over various hyperparameters when evaluating the performance of various techniques and architectures (Schmidt et al., 2021). Among them, perhaps the most important hyperparameter is the learning rate, which is multiplied at the final optimizer pipeline when calculating the step size.
+
+Proposals to adjust the layer-wise learning rate can be traced back to 2002 (LeCun et al., 2002), and the consensus was that the need for different learning rates is automatically handled by adaptive optimization methods (Duchi et al., 2011; Kingma & Ba, 2015). Explicitly assigning layer-wise learning rates would mean updating the weights with different step sizes even if individual parameters were to have the same in-training time gradient or statistics, and the literature has been hesitant to suggest against the standard of using a single global learning rate when training from scratch.
+
+Works that explicitly adjust the layer-wise learning rate were generally performed on transfer learning or finetuning settings (Donahue et al., 2014; Sharif Razavian et al., 2014; Kumar et al., 2022; Lee et al., 2023) in order to selectively train certain layers based on layer-wise characteristics such as feature generality (Azizpour et al., 2015; Cui et al., 2018; Michel et al., 2019). Such works mostly drop learning rates of specific layers to zero, effectively ”freezing” them as further training of the pretrained layer is likely to worsen feature generality and performance.
+
+However feature generality is already hard-coded in architectural characteristics such as layer depth, and differences in layer-wise convergence are observable during training (Zeiler & Fergus, 2014; Yosinski et al., 2014; Chen et al., 2023b), so a naturally following argument is that adjusting the layer-wise learning rate could be applicable outside of finetuning settings. The difficulty would be in determining the precise learning rate values that strike a careful balance between inter-layer overfitting and under-fitting, as the network has not been pre-trained on separate tasks and has to be trained from scratch. Previous works that assigned more granular layer-wise learning rates mainly followed the vague consensus it is depth dependent, resulting in heuristics that adjust the learning rate from low to high according to depth (Brock et al., 2017; Ro & Choi, 2021; Yang et al., 2019).
+
+This work started from an observation that adjusting the layer-wise learning rate can potentially improve training on settings where it is not explained and reproducible by adaptive methods. It motivated a search for a concrete statistical value that represents the layer-wise characteristics, and thus is usable as basis for explicitly adjusting the relative layer-wise learning-rates.
+
+1
+
+On the other hand, various works have shown that the training dynamics is both very different and important at initialization (Achille et al., 2019; Frankle et al., 2020; Jastrzebski et al., 2020; Frankle & Carbin, 2019), and we observed that the gradient magnitude at initialization seems to correlate with the layer-wise characteristics with respect to depth. That is, deeper layers that are generally considered to converge slower had lower gradient magnitude at initialization compared to shallower layers, which are widely considered to converge earlier.
+
+We develop a scheme that adjusts the layer-wise learning rate opposite to the gradient magnitude at initialization. The gradient is measured when layer weights are initialized to preserve their backward gradient variances, so differences in gradient magnitude are induced by architectural factors such as layer connectivity, use of activation functions and normalization layers, which by normalizing the forward activations also modifies the backward gradient magnitude. The proposed method considers the uneven gradient magnitude a naturally occurring consequence due to architecture-induced convergence bias and adjusts the learning rate accordingly, which is in contrast to methods that explicitly normalize the gradient magnitude (Yu et al., 2017; Zhang et al., 2018b; 2020a).
+
+Experiments on ImageNet-1k classification show improved performance and training stability for ResNet-50 (He et al., 2016) and ViT-S/16 (Dosovitskiy et al., 2021), an intriguing phenomenon given the simplicity of the method as it does not require prior knowledge of architecture specific training dynamics or complicated theoretical analysis (Dong et al., 2021; Poole et al., 2016; Schoenholz et al., 2017). Inspecting the actual layer-wise learning rates values show that low learning rates are assigned to low level layers and high learning rates to deeper, high level layers, but with additional subtleties and details as they are assigned per-layer granularity. More importantly, it suggests that adjusting the learning rate is an appropriate solution to handle the diverse gradients that occur not only at initialization but also during prolonged training.
+
+## 2 RELATED WORKS
+
+Weight initialization schemes were initially proposed as a solution to the exploding/vanishing activation/gradient problem in vanilla feed-forward networks (Glorot & Bengio, 2010; He et al., 2015). However, preserving both the forward activation and backward gradient variance requires specialized initialization schemes such as orthogonal initialization for layers with different input and output neuron number (Mishkin & Matas, 2016; Pennington et al., 2017; Xiao et al., 2018). Batch normalization and layer normalization are widely used to train deep networks (Ioffe & Szegedy, 2015; Ba et al., 2016; Santurkar et al., 2018), and subsequent works explored the interaction between initialization and normalization to more accurately isolate the cause of training instability (Balduzzi et al., 2017; Hanin & Rolnick, 2018; Zhang et al., 2019b; De & Smith, 2020; Daneshmand et al., 2020). Recent works extend such analysis to the more recent transformer networks (Xiong et al., 2020; Liu et al., 2020; Huang et al., 2020; Zhang et al., 2019a), while others strived for architecture agnostic initialization schemes (Dauphin & Schoenholz, 2019; Zhu et al., 2021).
+
+Commonly used optimizers such as SGD and Adam (Kingma & Ba, 2015) adjust the step size according to the gradient size and variance history, and many works that advocated the need for layer-wise learning rate adjustment are based on layer-wise gradient normalization and weight norm scaling (Singh et al., 2015; You et al., 2017; Yu et al., 2017; You et al., 2020; Xiao et al., 2019; Ginsburg et al., 2019). Another direction previous works indirectly modified the learning rate is through the use of scale factors, most commonly included at the residual branches (Karras et al., 2018; Hayou et al., 2021; Liu et al., 2020; Touvron et al., 2021; Noci et al., 2022). Such scale factors can affect both the gradient size and effective weight deviation of the corresponding layer, resulting in different effects depending on whether the optimizer decides the step size based on gradient magnitude or variance (Balles & Hennig, 2018).
+
+Many works can be interpreted as adaptively assigning layer-wise learning rates, such as adaptive methods (Duchi et al., 2011), efficient approximation of the Hessian in second order optimizers (Martens & Grosse, 2015; Gupta et al., 2018; Yao et al., 2021) and the use of hypergradient for automatic hyperparameter adjustment in layer-wise meta-learning settings (Antoniou et al., 2019; Baik et al., 2020; Tang et al., 2021; Chen et al., 2022). Other approaches include the use of mutual information (Vasudevan, 2018), reinforced learning (Mahmud et al., 2022), expected parameter scale size (Tian & Parikh, 2022), and in context of disentangling step size from learning rate schedules (Agarwal et al., 2020) and zero-shot hyperparameter transfer (Yang et al., 2022).
+
+2
+
+**==> picture [378 x 119] intentionally omitted <==**
+
+**----- Start of picture text -----**
+80 1.5 70 1.0 60 single single 0.5 increasing 50 increasing decreasing decreasing 0.0 40 0 50 100 150 0 20 40 60 80 Layers Epoch i Top-1 Acc % Learning Rates **----- End of picture text -----**
+
+Figure 1: **Left** : Na¨ıve learning rate increasing/decreasing scheme according to depth on ResNet-50. **Right** : Validation top-1 accuracy. The single, increasing, decreasing learning rate schemes achieve 76.80%, 76.91%, 76.39% final accuracy.
+
+## 3 LAYER-WISE LEARNING RATES
+
+A typical neural network training revolves around optimizing a training loss that represents the network performance on the train data. Let _L_ ( _X_ ; _**θ**_ ) = _|X_ 1 _|_ � _x∈X[l]_[(] _[x]_[;] _**[ θ]**_[)][ be the average loss of the] model with weights _**θ**_ on a minibatch of samples _X_ , where _**θ**_ = _{_ _**W**_ 1 _,_ _**W**_ 2 _, ...,_ _**W** M }_ is the set of layer weights for the scale, bias, convolution and linear layers. The gradient _**g** X,_ _**θ**_ = _∇_ _**θ** L_ ( _X_ ; _**θ**_ ) is obtained through back-propagation and is fed as input to the optimizer _O_ ( _**g** X,_ _**θ** , γ_ ). Internally, the optimizer decides the step sizes depending on the tracked historical gradient, and then multiplies it by the global learning rate _γ_ to output the actual step sizes used to update the layer weights as below, where we extracted the learning rate multiplication out of the optimizer.
+
+**==> picture [235 x 11] intentionally omitted <==**
+
+During training from scratch the global learning _γ_ is optionally warmed up from 0 to the initial learning rate, a hyperparameter typically set beforehand, and then decayed to 0 through schedules such as cosine or step-wise decay. In this paper we refer to layer-wise learning rates _ηi_ as additionally multiplying the step sizes with different relative values per layer, as represented below.
+
+**==> picture [247 x 12] intentionally omitted <==**
+
+Recently Lee et al. (2023) showed the type of distribution shift can influence which layers should be retrained in finetuning, and several works investigated the effects of regularizing effects of high or low global learning rate (Goyal et al., 2017; Li et al., 2019), but the effects of layer-wise learning rate remain unclear in general settings. A simple interpretation is that a higher learning rate will lead to a stronger optimization focus on the respective layers, similar to how it is used on finetuning and transfer learning. On the other hand, increased stochastic noise due to higher initial learning rates has been linked with stronger regularization and improved generalization, so conceivably increasing the learning rate of certain layers will train the network to be more resilient to their weight deviations.
+
+Figure 1 shows the top-1 validation accuracy on ImageNet-1k when the layer-wise learning rate is adjusted in increasing/decreasing order according to depth on ResNet-50 under typical settings. We would like to note that this is a setting where adaptive methods are known to achieve lower validation accuracy despite their improved convergence. For demonstration purposes the relative learning rate is increased from 0.1 to 1 or decreased from 2 to 1, and then normalized so that the average per-parameter learning rate is 1. A na¨ıve learning rate increasing scheme results in a 0.11% final validation accuracy improvement compared to a single learning rate scheme, and the decreasing scheme results in a 0.41% lower final validation accuracy.
+
+While this simple experiment suggest a learning rate increasing scheme can have benefits, there are many caveats that question whether such a scheme is practical. There are little theoretical justifications for performing different step sizes even if the gradient history is identical, and the motivation for layer-wise learning rate mainly stems from a post observation that convergence speed is dependent of depth, making it infeasible to apply in practice on diverse architectures. Perhaps due to the small performance gains, many works instead focused on faster wall clock training time from the reduced computation overhead when freezing weights (Xiao et al., 2019; Bragagnolo et al., 2022).
+
+3
+
+- 3.1 REGULARIZING ARCHITECTURE-INDUCED CONVERGENCE BIAS
+
+**Algorithm 1:** Layer-wise learning rate initialization of neural networks
+
+**Input:** Model weights _**θ**_ = _{_ _**W**_ 1 _, ...,_ _**W** M }_ and numbers of parameters _{m_ 1 _, ..., mM }_ **Output:** Relative learning rates _ηi_ 1: _G_ 1 _...M ←_ 0 2: **For** _**W** i ∈_ _**θ**_ 3: Initialize conv/linear layers from _N_ (0 _,_ �1 _/fout_ ), scale layers to **1** , bias layers to **0** 4: **For** _t ←_ 1 **to** _T_ 5: Sample minibatch _Xt_ from training set 6: _**g** Xt,_ _**θ** ←∇_ _**θ** L_ ( _Xt_ ; _**θ**_ ) 7: **For** _i ←_ 1 **to** _M_ 1 8: _Gi ← Gi_ + _mi_ � _∥_ _**g** Xt,_ _**W** i∥_ 1 9: **For** _i ←_ 1 **to** _M_ ˜ 1 10: _ηi ←_ ~~_√_~~ _Gi_ 11: _msum_ =[�] _[M] i_ =1 _[m][i]_[,] _[η]_[˜] _[sum]_[=] _msum_ 1 � _Mi_ =1 _[m][i][ ×]_[ ˜] _[η][i]_ 12: **For** _i ←_ 1 **to** _M_ 13: _ηi ← η_ ˜ _sumη_ ˜ _i_
+
+Previous works that adaptively modified the learning rate of weights mostly did so according to convergence, measured by tracking changes in gradient, weight, neuron output or loss sensitivity (Raghu et al., 2017; Xiao et al., 2019; Bragagnolo et al., 2022; Liang et al., 2022; Du et al., 2022). However it is difficult to determine before training has ended if the current weight is close to the final value, and weights considered to have converged may require further training as the remaining weights are modified (Bragagnolo et al., 2022). Preemptive convergence of selected weights may also make the network brittle to weight deviations of those frozen prematurely, resulting in reduced generalization. A recurring theme is the reliance on in-training time statistics, which has been explored extensively in various optimizer literature and may not appropriately incorporate more global aspects of the training dynamics (Micaelli & Storkey, 2021). As an alternative method, we propose to assign layer-wise learning rates opposite to the gradient magnitude at initialization.
+
+The training objective of the model is to minimize the loss, and assuming a smooth, convex surface a minima is likely to have small to zero gradient around it. An alternative formulation of the training objective becomes minimizing the gradient, which for individual layers becomes minimizing their output activation gradient. Even if individual linear and convolution layers are initialized to preserve backward gradient variance, architectural characteristics such as non-linear activation functions and normalization layers modify the backward gradient as it is back-propagated through the model, and hence result in uneven gradient magnitude across the layer weights. The proposed algorithm sets the layer-wise learning rate to regularize the convergence bias, measured by the gradient magnitude of the weights at initialization, and we empirically found it is better to scale the learning rate by the square root of gradient magnitude.
+
+The layer-wise learning rate initialization is outlined in Algorithm 1. It starts by initializing all convolution/linear weights from random numbers sampled from _N_ (0 _,_ ~~�~~ 1 _/fout_ ), where _fout_ is the fan out number. It is a basic initialization scheme that preserves the backward gradient variances if the weights and gradients are i.i.d. (Glorot & Bengio, 2010). As standard, scale layers are initialized to 1 and bias layers to 0. The class token, position embedding layer and relative position bias layer in transformer architectures are treated as bias layers and initialized to 0. Next we collect the layerwise gradient magnitude for _T_ iterations while the model weights are fixed at initialization. The layer-wise gradient magnitude is collected per parameter as the learning rate is applied on a per parameter basis. The relative layer-wise learning rates are adjusted inversely proportional to the square root of the gradient magnitude, and normalized to unit parameter-wise learning rate.
+
+4
+
+Table 1: Final top-1 validation accuracy for ImageNet-1k classification. Trained without gradient clipping and label smoothing.
+
+|Model #Params|Optimizer|Data Augmentation|Epochs|Learning Rate|
+|---|---|---|---|---|
+|||||Single Layer-wise|
+|ResNet-50 25.56M|SGD|basic|90|76.80 **77.12(+0.32)**|
+||||200|77.11 **77.98(+0.87)**|
+|||strong|300|78.41 **79.12(+0.71)**|
+||AdamW|basic|90|76.40 **76.67(+0.27)**|
+||||200|76.44 **77.12(+0.68)**|
+|||strong|300|78.49 **78.96(+0.47)**|
+|ConvNeXt-T 28.59M|AdamW|strong|300|80.49 **80.56(+0.07)**|
+|ViT-S/16 22.05M|SGD|basic|300|65.53 **70.29(+4.76)**|
+||AdamW|basic|300|74.11 **74.58(+0.47)**|
+|||strong|300|78.00 **78.25(+0.25)**|
+|Swin-T 28.29M|AdamW|strong|300|79.84 **79.96(+0.12)**|
+
+Table 2: Comparison with layer-wise gradient normalization techniques when training ResNet-50 on ImageNet-1k for 90 epochs
+
+|SGD|SGD-LW|SGD-NG|Adam-NG|LARS|LAMB|
+|---|---|---|---|---|---|
+|76.80|**77.12**|76.85|76.33|76.71|76.43|
+
+## 4 EXPERIMENTS
+
+We evaluate the performance gain of the proposed layer-wise learning rate scheme on convolutional networks and vision transformers for ImageNet-1k classification when trained from scratch under basic Inception-style preprocessing and strong data augmentation. We find it improves training on both convolution networks and vision transformers even though architecture specific training dynamics were not explicitly utilized to decide the layer-wise learning rates. We also inspect the assigned layer-wise learning rates, which in general increase according to depth, but also show other intricacies.
+
+For hyperparameters such as initial learning rate, effective batch size and stochastic depth we mostly rely on the values reported in Chen et al. (2023a) for resnets and vision transformers. For other architectures we rely on the author reported values to minimize the cost of hyperparameter search. When training ResNet-50 with SGD, we use a effective batch size of 256 and weight decay of 1e-4 similar to Goyal et al. (2017). We report the exact hyperparameters used in the Appendix. All experiments were trained using a cosine decay learning rate schedule with warmup, image resolution of 224 _×_ 224 and default momentum/beta hyperparameters for SGD and AdamW (Loshchilov & Hutter, 2019). When adjusting the layer-wise learning rates we collect the gradient for 1 epoch, which takes 0.3˜1.1% percent of the total training time depending on the total training epochs.
+
+The experiments were performed using pytorch (Paszke et al., 2019) and timm (Wightman, 2019) for transformer model architectures and data preprocessing. Each experiment were run on environments consisting of a single GPU with 24GB of DRAM, which fits a batch size of 256 for all reported experiments, and perform gradient accumulation to simulate larger effective batch sizes. We do not perform gradient clipping or label smoothing, but include strong data augmentations to demonstrate the effectiveness of appropriate layer-wise learning rate under more difficult training settings. For strong data augmentation we use a combination of RandAugment with layer 2 and magnitude 10 (Cubuk et al., 2020) and Mixup with strength 0.5 (Zhang et al., 2018a). All reported ImageNet-1k
+
+5
+
+**==> picture [384 x 238] intentionally omitted <==**
+
+**----- Start of picture text -----**
+2.5 80 2.0 1.5 60 single 1.0 single layer-wise 40 layer-wise 0.5 0 50 100 150 200 0 50 100 150 200 Epoch Epoch Figure 2: ResNet-50 train loss and validation accuracy with basic data augmentation and SGD. 3.5 80 2.5 60 1.5 single single layer-wise 40 layer-wise 0.5 0 50 100 150 200 250 300 0 50 100 150 200 250 300 Epoch Epoch Train Loss Top-1 Acc % Train Loss Top-1 Acc % **----- End of picture text -----**
+
+Figure 3: ViT-S/16 train loss and validation accuracy with basic data augmentation and AdamW.
+
+experiments took in total _∼_ 115 GPU days of training and we report the final top-1 accuracy from a single training run in Table 1.
+
+## 4.1 IMAGENET-1K RESULTS
+
+It it well known that SGD has strong performance when training convolutional networks under simple data preprocessing pipelines, and we can see under basic Inception-style augmentation SGD has a higher top-1 validation accuracy than Adam for ResNet-50. While a na¨ıve increasing learning rate leads to a 0.10% accuracy increase as shown in Figure 1, the proposed layer-wise learning rate increases the accuracy by a more tangible 0.32%. The train loss and accuracy curves in Figure 2 show that the proposed layer-wise learning rate achieves a lower final train loss, suggesting that the benefit arise from an improved fitting of the training dataset. Another notable benefit is a larger accuracy increase for ResNet-50 when trained for a longer 200 epochs with layer-wise learning rates. When trained for 200 epochs, the accuracy increase with a single learning rate is 0.31%, but when trained with layer-wise learning rates the accuracy increases by a much larger 0.86%. We would like to note that such performance gain is contrary to the common belief that 90 epochs is sufficient to train ImageNet-1k on ResNet-50 under simple settings. Improved accuracy when the layer-wise learning rate is adjusted can be also observed under strong data augmentations and when using AdamW, showing that the benefits of layer-wise learning rate is observable regardless of the optimizer choice and under harder training difficulty. Overall it suggests that there has been underutilized capacity in resnets, which is difficult to leverage with a single learning rate.
+
+Training vision transformers is known to be reliant on adaptive optimizers (Zhang et al., 2020b), and although adjusting the layer-wise learning rate drastically improves performance when trained with SGD, it does not make it as performant as AdamW. Similar to convolutional networks we can see the proposed layer-wise learning rate scheme improves final validation accuracy regardless of the data augmentation strength, but comparatively less than the improvement in ResNet-50. Perhaps more impressive is the improved stability visible in the train loss curves in Figure 3. Whereas a single learning rate shows high fluctuations in both the train loss and validation accuracy in the initial stage, assigning layer-wise learning rates removes the fluctuations and result in markedly lower train loss, showing that the network is trained to better fit the training dataset. Interestingly, the train loss improvement is visibly larger in vision transformer compared to resnet, but it does not result in a comparable accuracy improvement. The final validation accuracy improvement for ViT-S/16 is a lower 0.25% compared to the 0.47% for ResNet-50 when trained with AdamW under strong
+
+6
+
+**==> picture [380 x 96] intentionally omitted <==**
+
+**----- Start of picture text -----**
+2.0 single 1.5 single layer-wise layer-wise 1.0 1.0 0.5 0.0 0.0 0 50 100 150 0 50 100 150 Layers Layers (excluding scale, bias) i i Learning Rates Learning Rates **----- End of picture text -----**
+
+Figure 4: **Left** : Assigned learning rates to ResNet-50 when trained for 200 epochs using SGD. **Right** : Same as left but only showing convolution/linear layers, which comprise 99.8% of total parameter count.
+
+**==> picture [380 x 95] intentionally omitted <==**
+
+**----- Start of picture text -----**
+3.0 single 3.0 single layer-wise layer-wise 2.0 2.0 1.0 1.0 0.0 0.0 0 50 100 150 0 50 100 150 Layers Layers (excluding scale, bias) i i Learning Rates Learning Rates **----- End of picture text -----**
+
+Figure 5: **Left** : Assigned learning rates to ViT-S/16 when trained for 300 epochs with basic augmentation using AdamW. **Right** : Same as left but only showing convolution/linear layers, which comprise 99.4% of total parameter count.
+
+data augmentation, suggesting there is a overfitting problem that is known to arise when training transformer architectures on image data. While the validation performance increase is not very significant, the large improvement when trained with SGD and the visibly improved train loss and stability show that appropriate layer-wise learning rate is also beneficial to transformer architectures.
+
+## 4.2 INSPECTING ASSIGNED LEARNING RATES
+
+Most network architectures consist of multiple repeated blocks of specific layer configurations, with a separate stem that processes the input RGB image and a fully connected layer at the end that outputs the final logits. ViT-S/16 has 12 attention blocks while ResNet-50 has a 3-4-6-3 convolution block configuration. The assigned learning rates similarly show repeated patterns that reflects the regular block structure of the architecture, which is especially pronounced in vision transformer architectures. ResNet-50 show a stronger tendency to increase with respect to depth, although interestingly there is a slight learning rate decay near the final layer, starting at the stage consisting of 3 blocks that precedes the final layer.
+
+Figure 4 shows the assigned layer-wise learning rates of a training run for ResNet-50. Since there are numerous layers in a typical network, especially when considering scale and bias as separate layers, we separately show the assigned learning rates for the convolution and linear layers, as they comprise most of the model parameter number. ResNet-50 consist of multiple residual bottleneck blocks which individually is made up of 3 convolution layers, and the assigned learning rates reflect the repetition of bottleneck blocks though the pattern of high learning rate for the first convolution layer and lower learning rates to the subsequent two convolution layers. The first convolution layer of a bottleneck block has a lower gradient magnitude due to the combined effect of increasing input activation magnitude as more residual connections are added and the normalization effect of the following batchnorm layer. In order to normalize the large activation variance, the directly following batchnorm layer can be thought as multiplying it by a low scale factor, which in the backward pass reduces the gradient magnitude to the preceding convolution layer. It also leads to the low gradient magnitude of the batchnorm scale and bias layer in the third convolution layer in the preceding residual block, and the unusually high learning rates assigned to the bias layer are visible as spikes in Figure 4. We note a more formal analysis for the relationship between gradient variance and
+
+7
+
+**==> picture [356 x 174] intentionally omitted <==**
+
+**----- Start of picture text -----**
+single single 5×10 4 78.74 80.06 79.35 78.56 0.80 5×10 4 5.4e 3 5.6e 3 6.3e 3 7.3e 3 0.01 1×10 3 80.12 80.46 78.71 74.79 0.78 1×10 3 1.0e 2 1.1e 2 1.3e 2 4.7e 2 0.02 2×10 3 80.52 79.52 75.84 55.57 0.76 2×10 3 2.0e 2 2.2e 2 5.6e 2 1.3e [+0] 0.03 layer-wise layer-wise 0.04 0.74 5×10 4 76.65 78.88 79.48 79.90 5×10 4 3.6e 3 3.7e 3 4.0e 3 4.9e 3 0.05 1×10 3 78.11 79.40 79.43 78.93 0.72 1×10 3 8.0e 3 8.1e 3 1.0e 2 1.1e 2 0.06 2×10 3 79.38 79.81 78.82 76.16 0.70 2×10 3 1.7e 2 1.7e 2 1.9e 2 3.8e 2 0.07 0.05 0.1 0.2 0.4 0.05 0.1 0.2 0.4 **----- End of picture text -----**
+
+Figure 6: Final top-1 accuracy ( **left** ) and train loss ( **right** ) for ResNet-50 on CIFAR-100 under different initial learning rates ( _x_ axis) and weight decay values ( _y_ axis). Each result is averaged over 5 experiments.
+
+batch normalization is given in Zhu et al. (2021). Another notable observation is that the first 7 by 7 stem convolution layer is assigned a low learning rate of 0.038, which is considerably lower than the 0.098 assigned to the directly succeeding batchnorm scale layer.
+
+A vision transformer block is comprised of a self attention block followed by a multilayer perceptron block. The self attention block extracts the query, key and value from the input, performs self attention and then passes the result into a projection layer before summing it with the input in a residual manner. The spiking learning rates in Figure 5 correspond to the query and key layers, which show that their gradient are very low compared to other layers at initialization. Similar findings have been reported in Noci et al. (2022), where it only analyzed the gradient discrepancy in the attention block and proposes to introduce an inverse temperature scaling. Our approach adjusts the learning rate and is applied equally to all layers in a network. The succeeding value and projection layers are assigned comparatively lower learning rates, slightly lower than the two succeeding linear layers that comprise the multilayer perceptron block. The first convolution layer in the stem patch embedding is assigned a low learning rate of 0.092, while the class token layer and the position embedding layer, which represented as the first two layers in Figure 5, are assigned a very low 0.012 and 0.16. We provide figures for ConvNeXt-T and Swin-T in the appendix.
+
+## 4.3 CIFAR-100 RESULTS
+
+We also evaluate the effect of layer-wise learning rates on CIFAR-100 classification when trained from scratch on ResNet-50 using SGD. We train for 200 epochs with 1 epoch warmup under the standard data preprocessing of random cropping with padding 4 and horizontal flipping. We use a batch size of 256 and perform cosine learning rate decay.
+
+The single learning rate achieves a top-1 accuracy of 80.52% when trained with a learning rate of 0.05 and weight decay of 0.002, while under the same hyperparameters layer-wise learning rate achieves a significantly lower 79.38%. Investigating the train loss shows that although layer-wise learning rate results in a lower final train loss of 0.017 compared to 0.020 of single learning rate, it does not result in improved final test accuracy. While the accuracy of layer-wise learning rate improves up to 79.90% when increasing the initial learning rate to 0.4, it is not an improvement over the best accuracy from the single learning rate. We suspect the smaller dataset size and difficulty means the accuracy is more influenced by other factors, such as the regularizing effect of high learning rates discussed in Section 3. In fact, one could even argue that the architecture itself has been designed to minimize the generalization gap when trained with a single learning rate. Even if the layer-wise learning rate does not improve the top-1 accuracy, the improved convergence of appropriate layer-wise learning is shown in that it can handle larger learning rates and weight decay values.
+
+8
+
+**==> picture [396 x 188] intentionally omitted <==**
+
+**----- Start of picture text -----**
+SGD SGD-LW 1.5 1.5 1.0 1.0 width 0.5 0.5 256 0.0 0.0 512 8 6 4 2 8 6 4 2 1024 SGD-NG SGD-NG SGD- P 1.5 1.5 adap 1.5 2048 4096 1.0 1.0 1.0 8192 0.5 0.5 0.5 0.0 0.0 0.0 6 4 2 0 8 6 4 2 8 6 4 2 log2 log2 log2 Train loss Train loss **----- End of picture text -----**
+
+Figure 7: Train loss for 2-layer MLP trained on CIFAR-10. From top left to right: (a) Standard SGD, (b) layer-wise learning rate initialization, (c) per-layer normalized gradient, (d) per-layer normalized gradient and weight norm scaling and (e) maximal update parameterization ( _µ_ P)
+
+## 4.4 COMPARISON WITH RELATED WORK
+
+A variety of optimizers such as SGD-NG (Yu et al., 2017) adaptively adjusts layer-wise learning rate by normalizing the layer-wise gradient norm or step size (You et al., 2020), and a recent work assigns layer-wise learning rates in context of zero-shot hyperparameter transfer between small and large models (Yang et al., 2022). Figure 7 shows the training performance when deliberately overfitting a 2-layer MLP of various sizes and learning rates for 20 epochs on CIFAR-10. We observe that simply replacing the gradient with layer-wise normalized gradient (SGD-NG) makes it mores stable over larger learning rates, but due to the loss of gradient norm information it is unable to reach low training loss despite the large model sizes. While additionally including weight norm based scaling (SGD-NGadap) allows it to reach low training loss, the proposed layer-wise learning rate initialization is stable across wider learning rate values, showing the improved convergence available when appropriately utilizing inter-layer gradient norm information.
+
+## 5 CONCLUSION
+
+We propose a systematic layer-wise learning rate adjusting scheme that accounts for architectureinduced convergence bias and show that it can result in improved training performance and stability on convolutional and transformer architectures. The gradient magnitude at initialization is used as a measure of layer-wise convergence and the learning rate is adjusted to counteract such convergence bias. The gradient is measured when weights are initialized so that individual layers preserve the gradient variances and differences in gradient magnitude arise due to architectural characteristics. It suggests that adjusting the learning rate is an effective solution to handle the diverse gradients that arise in prolonged training of complex architectures, and that architectural characteristics such as layer-wise convergence can be inferred from statistics at initialization.
+
+## REFERENCES
+
+- Alessandro Achille, Matteo Rovere, and Stefano Soatto. Critical Learning Periods in Deep Networks. In _International Conference on Learning Representations_ , 2019.
+
+- Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Disentangling adaptive gradient methods from learning rates. _arXiv preprint arXiv:2002.11803_ , 2020.
+
+- Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your MAML. In _International Conference on Learning Representations_ , 2019.
+
+9
+
+Hossein Azizpour, Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Factors of transferability for a generic convnet representation. _IEEE transactions on pattern analysis and machine intelligence_ , 38(9):1790–1802, 2015.
+
+- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. _arXiv preprint arXiv:1607.06450_ , 2016.
+
+- Sungyong Baik, Myungsub Choi, Janghoon Choi, Heewon Kim, and Kyoung Mu Lee. Metalearning with adaptive hyperparameters. _Advances in neural information processing systems_ , 33:20755–20765, 2020.
+
+- David Balduzzi, Marcus Frean, Lennox Leary, J. P. Lewis, Kurt Wan-Duo Ma, and Brian McWilliams. The shattered gradients problem: If resnets are the answer, then what is the question? In _International Conference on Machine Learning_ , pp. 342–350. PMLR, 2017. ISBN 2640-3498.
+
+- Lukas Balles and Philipp Hennig. Dissecting adam: The sign, magnitude and variance of stochastic gradients. In _International Conference on Machine Learning_ , pp. 404–413. PMLR, 2018. ISBN 2640-3498.
+
+- Andrea Bragagnolo, Enzo Tartaglione, and Marco Grangetto. To update or not to update? Neurons at equilibrium in deep models. _Advances in Neural Information Processing Systems_ , 35, 2022.
+
+- Andrew Brock, Theodore Lim, and Nick Weston. Freezeout: Accelerate training by progressively freezing layers. _arXiv preprint arXiv:1706.04983_ , 2017.
+
+- Xiangning Chen, Chen Liang, Da Huang, Esteban Real, Kaiyuan Wang, Yao Liu, Hieu Pham, Xuanyi Dong, Thang Luong, and Cho-Jui Hsieh. Symbolic discovery of optimization algorithms. _arXiv preprint arXiv:2302.06675_ , 2023a.
+
+- Yixiong Chen, Jingxian Li, Hua Jiang, Li Liu, and Chris Ding. Metalr: Layer-wise learning rate based on meta-learning for adaptively fine-tuning medical pre-trained models. _arXiv preprint arXiv:2206.01408_ , 2022.
+
+- Yixiong Chen, Alan Yuille, and Zongwei Zhou. Which Layer is Learning Faster? A Systematic Exploration of Layer-wise Convergence Rate for Deep Neural Networks. In _International Conference on Learning Representations_ , February 2023b.
+
+- Ekin D. Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V. Le. Randaugment: Practical automated data augmentation with a reduced search space. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops_ , pp. 702–703, 2020.
+
+- Yin Cui, Yang Song, Chen Sun, Andrew Howard, and Serge Belongie. Large scale fine-grained categorization and domain-specific transfer learning. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , pp. 4109–4118, 2018.
+
+- Hadi Daneshmand, Jonas Kohler, Francis Bach, Thomas Hofmann, and Aurelien Lucchi. Batch normalization provably avoids ranks collapse for randomly initialised deep networks. _Advances in Neural Information Processing Systems_ , 33:18387–18398, 2020.
+
+- Yann N. Dauphin and Samuel Schoenholz. Metainit: Initializing learning by learning to initialize. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Soham De and Sam Smith. Batch normalization biases residual blocks towards the identity function in deep networks. _Advances in Neural Information Processing Systems_ , 33:19964–19975, 2020.
+
+- Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In _International Conference on Machine Learning_ , pp. 647–655. PMLR, 2014.
+
+- Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. In _International Conference on Machine Learning_ , pp. 2793–2803. PMLR, 2021. ISBN 2640-3498.
+
+10
+
+- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, and Sylvain Gelly. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In _International Conference on Learning Representations_ , 2021.
+
+- Jiawei Du, Daquan Zhou, Jiashi Feng, Vincent Tan, and Joey Tianyi Zhou. Sharpness-aware training for free. _Advances in Neural Information Processing Systems_ , 35:23439–23451, 2022.
+
+- John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. _Journal of machine learning research_ , 12(7), 2011.
+
+- Jonathan Frankle and Michael Carbin. The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks. In _International Conference on Learning Representations_ , 2019.
+
+Jonathan Frankle, David J. Schwab, and Ari S. Morcos. The Early Phase of Neural Network Training. In _International Conference on Learning Representations_ , 2020.
+
+- Boris Ginsburg, Patrice Castonguay, Oleksii Hrinchuk, Oleksii Kuchaiev, Vitaly Lavrukhin, Ryan Leary, Jason Li, Huyen Nguyen, Yang Zhang, and Jonathan M. Cohen. Stochastic gradient methods with layer-wise adaptive moments for training of deep networks. _arXiv preprint arXiv:1905.11286_ , 2019.
+
+- Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In _Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics_ , pp. 249–256. JMLR Workshop and Conference Proceedings, 2010.
+
+- Priya Goyal, Piotr Doll´ar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. _arXiv preprint arXiv:1706.02677_ , 2017.
+
+- Vineet Gupta, Tomer Koren, and Yoram Singer. Shampoo: Preconditioned stochastic tensor optimization. In _International Conference on Machine Learning_ , pp. 1842–1850. PMLR, 2018. ISBN 2640-3498.
+
+- Boris Hanin and David Rolnick. How to start training: The effect of initialization and architecture. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Soufiane Hayou, Eugenio Clerico, Bobby He, George Deligiannidis, Arnaud Doucet, and Judith Rousseau. Stable resnet. In _International Conference on Artificial Intelligence and Statistics_ , pp. 1324–1332. PMLR, 2021. ISBN 2640-3498.
+
+- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In _Proceedings of the IEEE International Conference on Computer Vision_ , pp. 1026–1034, 2015.
+
+- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , pp. 770–778, 2016.
+
+- Xiao Shi Huang, Felipe Perez, Jimmy Ba, and Maksims Volkovs. Improving transformer optimization through better initialization. In _International Conference on Machine Learning_ , pp. 4475–4483. PMLR, 2020. ISBN 2640-3498.
+
+- Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In _International Conference on Machine Learning_ , pp. 448–456. PMLR, 2015.
+
+- Stanislaw Jastrzebski, Maciej Szymczak, Stanislav Fort, Devansh Arpit, Jacek Tabor, Kyunghyun Cho, and Krzysztof Geras. The Break-Even Point on Optimization Trajectories of Deep Neural Networks. In _International Conference on Learning Representations_ , 2020.
+
+- Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive Growing of GANs for Improved Quality, Stability, and Variation. In _International Conference on Learning Representations_ , 2018.
+
+11
+
+- Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In _International Conference on Learning Representations_ , 2015.
+
+- Ananya Kumar, Aditi Raghunathan, Robbie Matthew Jones, Tengyu Ma, and Percy Liang. FineTuning can Distort Pretrained Features and Underperform Out-of-Distribution. In _International Conference on Learning Representations_ , 2022.
+
+- Yann LeCun, L´eon Bottou, Genevieve B. Orr, and Klaus-Robert M¨uller. Efficient backprop. In _Neural Networks: Tricks of the Trade_ , pp. 9–50. Springer, 2002.
+
+- Yoonho Lee, Annie S. Chen, Fahim Tajwar, Ananya Kumar, Huaxiu Yao, Percy Liang, and Chelsea Finn. Surgical Fine-Tuning Improves Adaptation to Distribution Shifts. In _The Eleventh International Conference on Learning Representations_ , 2023.
+
+- Yuanzhi Li, Colin Wei, and Tengyu Ma. Towards explaining the regularization effect of initial large learning rate in training neural networks. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Chen Liang, Haoming Jiang, Simiao Zuo, Pengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu Chen, and Tuo Zhao. No Parameters Left Behind: Sensitivity Guided Adaptive Learning Rate for Training Large Transformer Models. In _International Conference on Learning Representations_ , 2022.
+
+- Liyuan Liu, Xiaodong Liu, Jianfeng Gao, Weizhu Chen, and Jiawei Han. Understanding the Difficulty of Training Transformers. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 5747–5763, 2020.
+
+- Ilya Loshchilov and Frank Hutter. Decoupled Weight Decay Regularization. In _International Conference on Learning Representations_ , 2019.
+
+- Tanvir Mahmud, Natalia Frumkin, and Diana Marculescu. RL-Tune: A Deep Reinforcement Learning Assisted Layer-wise Fine-Tuning Approach for Transfer Learning. In _First Workshop on Pre-training: Perspectives, Pitfalls, and Paths Forward at ICML 2022_ , 2022.
+
+- James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In _International Conference on Machine Learning_ , pp. 2408–2417. PMLR, 2015.
+
+- Paul Micaelli and Amos J. Storkey. Gradient-based hyperparameter optimization over long horizons. _Advances in Neural Information Processing Systems_ , 34:10798–10809, 2021.
+
+- Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? _Advances in neural information processing systems_ , 32, 2019.
+
+- Dmytro Mishkin and Jiri Matas. All you need is a good init. In _International Conference on Learning Representations_ , 2016.
+
+- Lorenzo Noci, Sotiris Anagnostidis, Luca Biggio, Antonio Orvieto, Sidak Pal Singh, and Aurelien Lucchi. Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapse. _Advances in Neural Information Processing Systems_ , 35, 2022.
+
+- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, and Luca Antiga. Pytorch: An imperative style, highperformance deep learning library. _Advances in neural information processing systems_ , 32, 2019.
+
+- Jeffrey Pennington, Samuel Schoenholz, and Surya Ganguli. Resurrecting the sigmoid in deep learning through dynamical isometry: Theory and practice. _Advances in neural information processing systems_ , 30, 2017.
+
+- Ben Poole, Subhaneil Lahiri, Maithra Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. _Advances in neural information processing systems_ , 29, 2016.
+
+- Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. Svcca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. _Advances in neural information processing systems_ , 30, 2017.
+
+12
+
+Youngmin Ro and Jin Young Choi. Autolr: Layer-wise pruning and auto-tuning of learning rates in fine-tuning of deep networks. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 2486–2494, 2021. ISBN 2374-3468.
+
+- Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? _Advances in neural information processing systems_ , 31, 2018.
+
+- Robin M. Schmidt, Frank Schneider, and Philipp Hennig. Descending through a crowded valleybenchmarking deep learning optimizers. In _International Conference on Machine Learning_ , pp. 9367–9376. PMLR, 2021. ISBN 2640-3498.
+
+- Samuel S. Schoenholz, Justin Gilmer, Surya Ganguli, and Jascha Sohl-Dickstein. Deep Information Propagation. In _International Conference on Learning Representations_ , 2017.
+
+- Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. CNN features off-the-shelf: An astounding baseline for recognition. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops_ , pp. 806–813, 2014.
+
+- Bharat Singh, Soham De, Yangmuzi Zhang, Thomas Goldstein, and Gavin Taylor. Layer-specific adaptive learning rates for deep networks. In _2015 IEEE 14th International Conference on Machine Learning and Applications (ICMLA)_ , pp. 364–368. IEEE, 2015. ISBN 1-5090-0287-1.
+
+- Shixiang Tang, Dapeng Chen, Jinguo Zhu, Shijie Yu, and Wanli Ouyang. Layerwise optimization by gradient decomposition for continual learning. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 9634–9643, 2021.
+
+- Ran Tian and Ankur P. Parikh. Amos: An Adam-style Optimizer with Adaptive Weight Decay towards Model-Oriented Scale. _arXiv preprint arXiv:2210.11693_ , 2022.
+
+- Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Herv´e J´egou. Going deeper with image transformers. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 32–42, 2021.
+
+Shrihari Vasudevan. Dynamic learning rate using Mutual Information. _arXiv preprint arXiv:1805.07249_ , 2018.
+
+Ross Wightman. PyTorch Image Models, 2019.
+
+- Lechao Xiao, Yasaman Bahri, Jascha Sohl-Dickstein, Samuel Schoenholz, and Jeffrey Pennington. Dynamical isometry and a mean field theory of cnns: How to train 10,000-layer vanilla convolutional neural networks. In _International Conference on Machine Learning_ , pp. 5393–5402. PMLR, 2018. ISBN 2640-3498.
+
+- Xueli Xiao, Thosini Bamunu Mudiyanselage, Chunyan Ji, Jie Hu, and Yi Pan. Fast deep learning training through intelligently freezing layers. In _2019 International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData)_ , pp. 1225–1232. IEEE, 2019. ISBN 1-72812-980-X.
+
+- Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tieyan Liu. On layer normalization in the transformer architecture. In _International Conference on Machine Learning_ , pp. 10524–10533. PMLR, 2020. ISBN 26403498.
+
+- Greg Yang, Edward J. Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu, David Farhi, Nick Ryder, Jakub Pachocki, Weizhu Chen, and Jianfeng Gao. Tensor programs v: Tuning large neural networks via zero-shot hyperparameter transfer. _arXiv preprint arXiv:2203.03466_ , 2022.
+
+- Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R. Salakhutdinov, and Quoc V. Le. Xlnet: Generalized autoregressive pretraining for language understanding. _Advances in neural information processing systems_ , 32, 2019.
+
+13
+
+- Zhewei Yao, Amir Gholami, Sheng Shen, Mustafa Mustafa, Kurt Keutzer, and Michael Mahoney. Adahessian: An adaptive second order optimizer for machine learning. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 10665–10673, 2021. ISBN 23743468.
+
+- Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? _Advances in neural information processing systems_ , 27, 2014.
+
+- Yang You, Igor Gitman, and Boris Ginsburg. Scaling sgd batch size to 32k for imagenet training. _arXiv preprint arXiv:1708.03888_ , 2017.
+
+- Yang You, Jing Li, Sashank Reddi, Jonathan Hseu, Sanjiv Kumar, Srinadh Bhojanapalli, Xiaodan Song, James Demmel, Kurt Keutzer, and Cho-Jui Hsieh. Large Batch Optimization for Deep Learning: Training BERT in 76 minutes. In _International Conference on Learning Representations_ , 2020.
+
+- Adams Wei Yu, Lei Huang, Qihang Lin, Ruslan Salakhutdinov, and Jaime Carbonell. Blocknormalized gradient method: An empirical study for training deep neural network. _arXiv preprint arXiv:1707.04822_ , 2017.
+
+- Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In _European Conference on Computer Vision_ , pp. 818–833. Springer, 2014.
+
+- Biao Zhang, Ivan Titov, and Rico Sennrich. Improving Deep Transformer with Depth-Scaled Initialization and Merged Attention. In _2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing_ , pp. 898– 909. Association for Computational Linguistics (ACL), 2019a.
+
+- Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. Mixup: Beyond Empirical Risk Minimization. In _International Conference on Learning Representations_ , 2018a.
+
+- Hongyi Zhang, Yann N. Dauphin, and Tengyu Ma. Fixup Initialization: Residual Learning Without Normalization. In _International Conference on Learning Representations_ , 2019b.
+
+- Huishuai Zhang, Wei Chen, and Tie-Yan Liu. Train feedfoward neural network with layer-wise adaptive rate via approximating back-matching propagation. _arXiv preprint arXiv:1802.09750_ , 2018b.
+
+- Jingzhao Zhang, Tianxing He, Suvrit Sra, and Ali Jadbabaie. Why Gradient Clipping Accelerates Training: A Theoretical Justification for Adaptivity. In _International Conference on Learning Representations_ , 2020a.
+
+- Jingzhao Zhang, Sai Praneeth Karimireddy, Andreas Veit, Seungyeon Kim, Sashank Reddi, Sanjiv Kumar, and Suvrit Sra. Why are adaptive methods good for attention models? _Advances in Neural Information Processing Systems_ , 33:15383–15393, 2020b.
+
+- Chen Zhu, Renkun Ni, Zheng Xu, Kezhi Kong, W. Ronny Huang, and Tom Goldstein. Gradinit: Learning to initialize neural networks for stable and efficient training. _Advances in Neural Information Processing Systems_ , 34:16410–16422, 2021.
+
+14
+
+## A APPENDIX
+
+Table 3: Deviation in per-layer assigned learning rates and accuracy for different T when compared to T=5004 (one epoch) on ResNet-50 with SGD for 90 epochs. The results are from identical weight initialization.
+
+**==> picture [382 x 225] intentionally omitted <==**
+
+**----- Start of picture text -----**
+T max deviation % average deviation % validation accuracy % 1 11.02 2.66 77.07 10 3.51 0.69 77.01 100 1.01 0.18 77.04 1000 0.32 0.06 77.07 5004 0 0 77.15 Single LR Layer-Wise LR 10 [4] 10 [4] epoch 5 10 [3] 10 [3] 15 30 10 [2] 10 [2] 60 10 [1] 10 [1] 90 0 50 100 150 0 50 100 150 Layers (excluding scale, bias) ) + vt 1/( **----- End of picture text -----**
+
+Figure 8: Average adaptive step size multiplier by second moment on AdamW when training ResNet-50 for 90 epochs. It remains mostly unchanged even with additional layer-wise learning rates. **Left** : Single learning rate, **Right** : Layer-wise learning rate.
+
+Table 4: ImageNet-1k real, v2 performance improvement due to layer-wise learning rate.
+
+|Model #Params|Optimizer Data Augmentation Epochs|Accuracy|
+|---|---|---|
+|||ReaL V2|
+|ResNet-50 25.56M|SGD basic 90 200 strong 300|83.51(+0.02) 72.46(+0.51)|
+|||83.97(+0.71) 73.43(+0.65)|
+|||85.43(+0.27) 75.18(+1.20)|
+||AdamW basic 90 200 strong 300|82.93(+0.21) 71.52(-0.15)|
+|||83.12(+0.63) 72.05(+0.37)|
+|||85.24(+0.24) 74.56(+0.26)|
+|ConvNeXt-T 28.59M|AdamW strong 300|85.57(+0.05) 76.03(+0.23)|
+|ViT-S/16 22.05M|SGD basic 300|77.07(+4.90) 65.06(+5.41)|
+||AdamW basic 300 strong 300|80.45(+0.48) 68.76(-0.25)|
+|||84.13(+0.26) 73.19(-0.13)|
+|Swin-T 28.29M|AdamW strong 300|85.11(-0.02) 75.06(+0.10)|
+
+For ConvNeXt-T low learning rates are assigned to the first convolution layer of the block while the subsequent two linear layers that comprise the remaining of the block are assigned larger learning rates. The learning rates of Swin-T shows a similar pattern to ViT-S/16, except that the relative posi-
+
+15
+
+**==> picture [384 x 240] intentionally omitted <==**
+
+**----- Start of picture text -----**
+3.5 90 2.5 80 1.5 single 70 single layer-wise layer-wise 0.5 0 50 100 150 200 250 300 60 0 50 100 150 200 250 300 Epoch Epoch Figure 9: ConvNeXt-T train loss and validation accuracy with strong data augmentation. 3.5 80 2.5 75 70 1.5 single single layer-wise 65 layer-wise 0.5 0 50 100 150 200 250 300 60 0 50 100 150 200 250 300 Epoch Epoch Train Loss Top-1 Acc % Train Loss Top-1 Acc % **----- End of picture text -----**
+
+Figure 10: Swin-T train loss and validation accuracy with strong data augmentation.
+
+**==> picture [380 x 95] intentionally omitted <==**
+
+**----- Start of picture text -----**
+single single 1.0 layer-wise 1.0 layer-wise 0.5 0.5 0.0 0.0 0 50 100 150 0 50 100 150 Layers Layers (excluding scale, bias) i i Learning Rates Learning Rates **----- End of picture text -----**
+
+Figure 11: **Left** : Assigned learning rates to ConvNeXt-T when trained for 300 epochs with strong augmentation. **Right** : Same as left but only showing convolution/linear layers, which comprise 99.8% of total parameter count.
+
+**==> picture [382 x 95] intentionally omitted <==**
+
+**----- Start of picture text -----**
+6.0 single 2.0 single layer-wise layer-wise 4.0 1.0 2.0 0.0 0.0 0 50 100 150 200 0 50 100 150 200 Layers Layers (excluding scale, bias) i i Learning Rates Learning Rates **----- End of picture text -----**
+
+Figure 12: **Left** : Assigned learning rates to Swin-T when trained for 300 epochs with strong augmentation. **Right** : Same as left but only showing convolution/linear layers, which comprise 99.7% of total parameter count.
+
+tion layers are assigned noticeably large learning rates. Both architectures show a weaker tendency of the assigned learning rates to increase with respect to depth compared to ResNet-50.
+
+The SGD-NG and Adam-NG in Table 2 was trained with the same hyperparameters as in Table 1. For LARS we used the clipped variant LARC with learning rate of 0.2 and trust coefficient of 0.001 and for LAMB we used a batch size of 2k and 1.25 warmup epochs, polynomially decaying learning
+
+16
+
+Table 5: Experiment hyperparameters
+
+|Model|Dropout Stoch Depth Data Augmentation Optimizer Batch Size lr wd|
+|---|---|
+|ResNet-50|- - basic SGD 256 0.1 1e-4 - - strong SGD 256 0.1 1e-4|
+||- - basic AdamW 1024 3e-3 0.1 - - strong AdamW 1024 3e-3 0.1|
+|ConvNeXt-T|- 0.1 strong AdamW 4096 4e-3 5e-2|
+|ViT-S/16|0.1 0.1 basic SGD 4096 0.5/1.6 1e-4|
+||0.1 0.1 basic AdamW 4096 1e-2 0.1 - - strong AdamW 4096 1e-2 0.1|
+|Swin-T|- 0.2 strong AdamW 1024 1e-3 5e-2|
+
+**==> picture [388 x 166] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Standard p Lw Init 95.0 95.0 95.0 94.0 94.0 94.0 Width mult. 0.5 93.0 93.0 93.0 1.0 92.0 92.0 92.0 2.0 4.0 91.0 91.0 91.0 90.0 90.0 90.0 2 1 0 1 2 3 4 5 2 1 0 1 2 3 4 5 2 1 0 1 2 3 4 5 log2 log2 log2 Validation Accuracy **----- End of picture text -----**
+
+Figure 13: DavidNet with output multiplier of 0.125 on CIFAR-10 across different width and learning rates trained with SGD. **Left** : Default initialization and single learning rate, **Middle** : Maximal update parametrization ( _µ_ P), **Right** : Layer-wise learning rate initialization.
+
+rate schedule, weight decay of 1.5 applied only to the linear and convolution layers. The trust ratio multiplication was performed only to the linear and convolution layers.
+
+Davidnet is a resnet variant designed for fast training on CIFAR-10, and the results in Figure 13 show similar trends to the CIFAR-100 results in Figure 6. The proposed layer-wise learning rate
+
+**==> picture [378 x 103] intentionally omitted <==**
+
+**----- Start of picture text -----**
+p Lw Init 4.0 Width mult. 1.0 0.5 2.0 1.0 0.5 2.0 0.0 0.0 4.0 0 10 20 0 10 20 Layers Layers i Learning Rates **----- End of picture text -----**
+
+Figure 14: Assigned learning rates for DavidNet. **Left** : Maximal update parametrization ( _µ_ P), **Right** : Layer-wise learning rate initialization.
+
+17
+
+initialization can handle larger learning rates, but the validation accuracy is slightly lower compared to plain SGD and maximal update parametrization ( _µ_ P) (Yang et al., 2022). Figure 14 shows the assigned learning rates by maximal update parametrization and layer-wise learning rate initialization. Maximal update parametrization scales the batchnorm scale, bias layer, the first convolution and last linear layer w.r.t a base model, while the learning rates values assigned by initialization remains invariant to the model width, except for the final few layers.
+
+18
+
diff --git a/open_review/iclr2024_8569.json b/open_review/iclr2024_8569.json
new file mode 100644
index 0000000000000000000000000000000000000000..07ecc323d315d2255975db252bdbc1f539310f2a
--- /dev/null
+++ b/open_review/iclr2024_8569.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8569",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Understanding In-Context Learning in Transformers and LLMs by Learning to Learn Discrete Functions",
+ "abstract": "In order to understand the in-context learning phenomenon, recent works have adopted a stylized experimental framework and demonstrated that Transformers can match the performance of gradient-based learning algorithms for various classes of real-valued functions. However, the limitations of Transformers in implementing learning algorithms, and their ability to learn other forms of algorithms are not well understood. Additionally, the degree to which these capabilities are confined to attention-based models is unclear. Furthermore, it remains to be seen whether the insights derived from these stylized settings can be extrapolated to pretrained Large Language Models (LLMs). In this work, we take a step towards answering these questions by demonstrating the following: (a) On a test-bed with a variety of Boolean function classes, we find that Transformers can nearly match the optimal learning algorithm for 'simpler' tasks, while their performance deteriorates on more 'complex' tasks. Additionally, we find that certain attention-free models perform (almost) identically to Transformers on a range of tasks. (b) When provided a *teaching sequence*, i.e. a set of examples that uniquely identifies a function in a class, we show that Transformers learn more sample-efficiently. Interestingly, our results show that Transformers can learn to implement *two distinct* algorithms to solve a *single* task, and can adaptively select the more sample-efficient algorithm depending on the sequence of in-context examples. (c) Lastly, we show that extant LLMs, e.g. LLaMA-2, GPT-4, can compete with nearest-neighbor baselines on prediction tasks that are guaranteed to not be in their training set.",
+ "rebuttal": "We have updated the paper and added the discussions as per your suggestions. At the moment, the differences with the prior work are added to Section J since we will exceed the page limit if we directly add them to the main paper. If the paper is accepted, we will add a concise but clear description of those in the main paper as well.\n\n“*re learnability of parity: what I meant is that it's been well known that parity is computationally hard to learn and various prior work has shown … d hence there is no contradiction*\"\n\n\nFirst, we would like to highlight that previous works [1, 2, 3] have shown that Transformers can learn functions of the form Parity-(n, k). Among the Boolean function classes we considered, Parity is the most difficult in some sense (as discussed in Section F) but it is still difficult to have preemptively predicted all architectures (not just Transformers) would fail in such a manner. \n\nThe statement “it's [...]\n\nWe wish to emphasize that the author-reviewer discussion period ends today. We have made major revisions based on your comments and provided detailed responses to your questions. Hence, we kindly request you to please check the revisions and rebuttal and consider adjusting your score if your concerns are addressed.\n\nWe wish to emphasize that the author-reviewer discussion period ends today. We added the experiment suggested by you in the paper and provided detailed responses to your questions. Hence, we kindly request you to please check the revisions and rebuttal and consider adjusting your score if your concerns are addressed.\n\nThank you for your response. Based on your suggestion, we will amend the line in the abstract to avoid confusion.\n\nWe wish to emphasize that the author-reviewer discussion period ends today. We added multiple discussions and an experimental result in the paper based on your comments and provided detailed responses to your questions. Hence, we kindly request you to please check the revisions and responses and consider adjusting your score if your concerns are addressed.\n\nWe have conducted the additional experiment on length generalization (please check the general response) as suggested in your review and responded to your comments in our rebuttal. Could you kindly check them and let us know if your concerns are now adequately addressed?\n\n### Experiments and changes based on reviewers' comments\nWe have updated the draft to include new experiments, discussion and some other minor changes based on the reviewers' comments. Here is the summary of the changes.\n\n**Primary Changes:** Experiments and Results\n- *Length Generalization experiment* **(R-fGea**): We explored the performance of models on prompts with more examples (length) than seen during training. TLDR: We find Transformers without positional encodings and just causal masking generalize well whereas models with absolute positional encodings struggle. Described in Section [...]\n\n### General Response\nWe thank all the reviewers for their thoughtful feedback and their time. We are encouraged to see that they found the insights in our paper interesting (Rev. bf3N, 9RLW), and found the experiments to be well executed (Rev. bf3N, 9RLW), sufficient (Rev. 9RLW) and to be of interest to the community (Rev. bf3N). In this work, we demonstrated limitations of Transformers in in-context learning certain precise classes of functions which are known to be efficiently learnable. Further, we compared various attention-free architectures and found that they match Transformers’ perfo [...]\n\n### Interpretability experiments and other additions\nWe have added new experiments exploring the interpretability aspect suggested in your review. In simplified terms, we find that for Conjunctions, Transformers implement an algorithm which is similar in principle to a known PAC-learning algorithm for learning Conjunctions but it does not follow it exactly. \n\n**Simplified Description**. The classical algorithm for learning Conjunctions starts with a hypothesis with all literals in it and it iteratively removes literals based on positively labelled examples. We apply a simple approach to approx [...]\n\n### Response to Questions\n“**(Q1)** Reviewer: *Parity-20: what if reporting the accuracy on every position, rather than the final position?*”\n\nFigure 6 depicts the accuracy at every position and not just the final position for almost all of the tasks. For Parity-(10, 2), you can see that the accuracy at every position is near chance level. The performance on Parity-(20, 3) and Parity-20 is almost identical, i.e. near chance level at every position. It was omitted since the plots were almost identical to Parity-(10, 2).\n\n“**(Q2)** Reviewer: For OOD test results (Fig 10), how about the compariso [...]\n\n### Response to Questions\n“**(Q1)** Reviewer: *When the authors create the datasets, it seems like they always sample a function and m Boolean inputs. At test time, is the prompt used also generated in the same way? Sampling one function an m Boolean inputs? My question is related to whether the authors observe that these models can ``generalize'' to the case that the sequence length is not the one that the models were trained on.*”\n\nYes during both training and evaluation, each prompt is created by sampling a function and $m$ input points. In some scenarios, the distribution over functions or [...]\n\n### Response to Questions (Cont'd)\n**(Q2)** *I am not sure how you sampled the random conjunction function for each task. … ?*\n\nThe details of the distribution over functions are provided in Appendix C.2. Regarding your question about how Conjunctions are sampled, this is the description in the paper,\n\n> For tasks such as Conjunctions and Disjunctions which are either AND ($\\wedge$) or OR ($\\vee$) of some of the $2n$ literals, the function is sampled such that each literal $x_i$ or its complement $\\bar{x}_i$ has a probability of $p$ in being in the sampled function. In other words, for each $i [...]\n\n### Response to Ques\n[rebuttal truncated]",
+ "initial_scores": [
+ 8,
+ 6,
+ 6,
+ 8
+ ],
+ "score_mean": 7.0,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (oral)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper provides a thorough empirical study on the in-context learning (ICL) ability of transformers for learning boolean functions, adding to the line of recent works that study ICL with transformers on certain simple function classes. \n\nApart from the setting being different from existing works (learning boolean functions) and demonstrating the amazing ICL capabilities of transformers, this work provides several additional interesting results on (1) comparison between transformers and other sequence architectures and baselines; (2) a finding about the limitations of transformers (on learning parity functions); (3) a study of the in-context sample efficiency and algorithm selection phenomenon through the \"teaching sequence\" settings; (4) A study of ICL in LLMs used in practice (such as GPT-4 and LLaMa-2), both with trainable embedding functions and directly through prompting. I find these contributions highly valuable to the line of works on ICL, addressing some of the most common questions people have with this line of results, and having the potentials to motivate many future studies. I congratulate the authors for the nice work.\n\nThe reviewers initially had some concerns; however the majority of them were addressed by the rebuttal and discussions.",
+ "forum_id": "ekeyCgeRfC",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_bf3N",
+ "review_id": "m1fpGYur8v",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 4,
+ "confidence": 4
+ },
+ "review_text_chars": 4213,
+ "edit_detected": true,
+ "edit_delta_seconds": 233735,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_fGea",
+ "review_id": "cEasYQk3TJ",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2676,
+ "edit_detected": true,
+ "edit_delta_seconds": 1813717,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_tbmK",
+ "review_id": "Y3zDv2cXtI",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 4897,
+ "edit_detected": true,
+ "edit_delta_seconds": 1956567,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_9RLW",
+ "review_id": "nWOt1XGCFc",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 6178,
+ "edit_detected": true,
+ "edit_delta_seconds": 3275810,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8569.md b/open_review/iclr2024_8569.md
new file mode 100644
index 0000000000000000000000000000000000000000..27b7a925d00811c4561e998ae1cd154e891c5135
--- /dev/null
+++ b/open_review/iclr2024_8569.md
@@ -0,0 +1,786 @@
+
+
+## UNDERSTANDING IN-CONTEXT LEARNING IN TRANSFORMERS AND LLMS BY LEARNING TO LEARN DISCRETE FUNCTIONS
+
+Authors withheld for review
+
+## ABSTRACT
+
+In order to understand the in-context learning phenomenon, recent works have adopted a stylized experimental framework and demonstrated that Transformers can match the performance of gradient-based learning algorithms for various classes of real-valued functions. However, the limitations of Transformers in implementing learning algorithms, and their ability to learn other forms of algorithms are not well understood. Additionally, the degree to which these capabilities are confined to attention-based models is unclear. Furthermore, it remains to be seen whether the insights derived from these stylized settings can be extrapolated to pretrained Large Language Models (LLMs). In this work, we take a step towards answering these questions by demonstrating the following: (a) On a test-bed with a variety of Boolean function classes, we find that Transformers can nearly match the optimal learning algorithm for ‘simpler’ tasks, while their performance deteriorates on more ‘complex’ tasks. Additionally, we find that certain attention-free models perform (almost) identically to Transformers on a range of tasks. (b) When provided a _teaching sequence_ , i.e. a set of examples that uniquely identifies a function in a class, we show that Transformers learn more sample-efficiently. Interestingly, our results show that Transformers can learn to implement _two distinct_ algorithms to solve a _single_ task, and can adaptively select the more sample-efficient algorithm depending on the sequence of in-context examples. (c) Lastly, we show that extant LLMs, e.g. LLaMA-2, GPT-4, can compete with nearest-neighbor baselines on prediction tasks that are guaranteed to not be in their training set.
+
+## 1 INTRODUCTION
+
+Transformer-based large language models (LLMs) have shown a remarkable ability to learn tasks in-context using a handful of demonstrations and without updating their weights (Brown et al., 2020). Demystifying this ‘in-context learning’ ability theoretically and empirically is an intriguing direction. Since real-world language data and tasks are hard to define precisely, in-context learning has been studied in various simplified yet well-defined settings (Chan et al., 2022; Hahn & Goyal, 2023).
+
+Recently, Garg et al. (2022) proposed a framework to understand the in-context learning phenomenon, wherein the model receives a prompt _Pk_ = ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _k−_ 1 _,_ **y** _k−_ 1 _,_ **x** _k_ ) containing a sequence of pairs of inputs and labels followed by a query input. Each input **x** _i ∈_ R _[d]_ is sampled from a distribution _DX_ and is labeled by a function _f_ : R _[d] →_ R sampled from a distribution of functions _DF_ . The goal of the model is to accurately predict _f_ ( **x** _k_ ). Unlike works that study in-context learning on LLMs, in this framework, the model _M_ is _trained from scratch_ on various such prompts sampled according to distributions _DX_ and _DF_ . Thus, this framework could be understood as a meta-learning approach, i.e., the models are trained to learn learning algorithms. Garg et al. (2022) show that such trained Transformers perform well on a range of prediction and regression tasks on inputs in R _[d]_ . Given the flexible and interpretable nature of the framework, several recent works (Li et al., 2023; Ahuja & Lopez-Paz, 2023; Bai et al., 2023) have adopted it to further understand in-context learning.
+
+**Research Questions.** Multiple works (Bai et al., 2023; Ahuja et al., 2023; von Oswald et al., 2022) have demonstrated that Transformers can learn various classes of real-valued functions in such in-
+
+1
+
+**==> picture [276 x 111] intentionally omitted <==**
+
+**----- Start of picture text -----**
+In-Context Learning ^ ^ ^ y1 y2 yk France Paris 0 1 1 Japan Tokyo Prompt China Beijing Canada ? Completion Ottawa Auto-regressive Model In-Context Learning of Boolean Functions 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 Prompt 0 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 k-1 points ndims 01 y11 00 y02 10 1 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 ? kth point x1 x2 xk Completion 1 k points **----- End of picture text -----**
+
+Figure 1: In-context learning of Boolean functions in our setup. In an autoregressive manner, given _k −_ 1 points of the form ( **x** _i,_ **y** _i_ ) where **x** _i ∈{_ 0 _,_ 1 _}[n]_ and **y** _i ∈{_ 0 _,_ 1 _}_ , a model has to learn to accurately predict the label **y** _k_ for the _k_[th] point.
+
+context settings. This naturally motivates further questions: (a) What are the limits of the in-context learning ability of Transformers? (b) Is the attention mechanism essential for in-context learning? (c) Can Transformers exploit high-quality and informative examples to learn more efficiently? (d) To what extent do LLMs that are not specifically trained for these tasks carry the capacity to implement non-trivial learning algorithms on in-context examples?
+
+In this work, we conduct an extensive empirical study with various classes of Boolean functions to make progress towards answering these questions. Since Boolean functions are widely studied in learning theory (O’Donnell, 2021), the sample complexity and learnability of various function classes are well understood which helps us in designing the experimental framework. Additionally, unlike real-valued functions, the discrete nature of the inputs allows us to adopt the setting for LLMs and test their ability to implement learning algorithms. We give an overview of our contributions below.
+
+**In-context learning Boolean functions.** Transformers trained from scratch perform well on a range of Boolean function classes, however, their performance does degrade on seemingly more ‘complex’ classes. In particular, when learning parities their performance is as bad as random guessing, but known algorithms can perform near-perfectly with the same size dataset. We also evaluate the performance of recently proposed alternatives to Transformers which were motivated by the desire to have sub-quadratic inference. Our results indicate that while these models match the Transformer’s performance on most tasks, there remain some gaps in others.
+
+**Teaching Sequences.** For a class of functions, a teaching sequence is a sequence of examples that can uniquely identify the function. Our results show that Transformers have the capacity to learn more sample-efficient algorithms when trained on such highly informative sequences. For certain tasks, our results show that a single Transformer can learn two different algorithms and dynamically choose between them depending on the in-context sequence–it uses the sample-efficient version if the input has a teaching sequence, and falls back on the less sample-efficient algorithm otherwise.
+
+**Investigation with LLMs.** The goal of recent work in stylized settings was primarily to understand whether LLMs can use in-context examples to learn novel tasks. However, it is still unclear if LLMs can implement learning algorithms rather than simply indexing from a list of tasks seen during pretraining. To understand whether LLMs can learn in a manner similar to models in the stylized setting, we investigate the performance of pretrained LLMs on the same tasks, by adapting them in two different ways. First, we use a frozen GPT-2 model, only training the input embedding layer, so as to be able to evaluate GPT-2 in the same stylized framework. Second, working with discrete inputs enables us to use the bit tokens directly to test the performance of LLMs by providing them in-context examples. Our results show that these models achieve non-trivial performance, competing with _nearest neighbor_ classification. As we are sampling learning problems from a large combinatorial space, it is virtually guaranteed that these models are learning from in-context examples alone.
+
+## 2 SETUP FOR IN-CONTEXT LEARNING
+
+**In-context learning.** Our setup closely follows that of Garg et al. (2022) and is similar to other recent works which study the ability of Transformers to learn to implement learning algorithms in
+
+2
+
+their forward pass (Ahuja et al., 2023; Li et al., 2023; von Oswald et al., 2022). In this setup, a sequence model _M_ (such as Transformers) is trained using _N_ sequences, each sequence consisting of _m_ labeled examples, ( **x** 1 _, y_ 1 _, . . . ,_ **x** _m, ym_ ). The model is trained for the next token-prediction task, except that we only care about every alternate token: if _y_ ˆ1 _, . . . ,_ ˆ _ym_ are the _m_ output labels predicted by the model, where _y_ ˆ _k_ := _M_ ( _Pk_ ) is predicted using the prefix _Pk_ = ( **x** 1 _, y_ 1 _, . . . ,_ **x** _k−_ 1 _, yk−_ 1 _,_ **x** _k_ ), the loss on this sequence is given by _m_[1] � _mk_ =1 _[ℓ]_[(ˆ] _[y][k][, y][k]_[)][.]
+
+To generate the set of _N_ training sequences, we do the following: We sample _m_ points **x** 1 _, . . . ,_ **x** _m_ , i.i.d from some distribution _DX_ over _X_ , we sample a function _f ∈F_ from some distribution _DF_ over _F_ , and obtain the sequence ( **x** 1 _, f_ ( _**x**_ 1) _, . . . ,_ **x** _m, f_ ( _**x** m_ )). This is repeated _N_ times, with a fresh sample of _m_ points and a freshly sampled _f_ . For an appropriate loss function _ℓ_ , the empirical loss over _N_ training examples is defined as,
+
+**==> picture [278 x 37] intentionally omitted <==**
+
+We will primarily work with classes of Boolean functions _f_ : _{_ 0 _,_ 1 _}[n] →{_ 0 _,_ 1 _}_ , which take as input a vector of bits of fixed length and output either 0 or 1. We say that a model _M_ can learn a class of functions _F_ in-context if with high probability, for _f ∼ DF_ and for a sufficiently large _kF_ , for all _k ≥ kF_ ,[1] Pr _Pk∼_ ( _DXk[,D][F]_[)][[] _[M]_[(] _[P][k]_[)] _[ ̸]_[=] _[ f]_[(] **[x]** _[k]_[)]] _[ ≤][ϵ]_[.]
+
+We would like to highlight the difference from the traditional statistical learning framework, where a single target function _f ∈F_ is learned from a random sample of labeled examples. In our setup, each sequence is a _learning problem_ and the model is learning a learning algorithm.
+
+**Models.** We primarily focus on Transformers Vaswani et al. (2017) but we consider five different types of architectures for the majority of the experiments. These include a recurrent model (LSTM) (Hochreiter & Schmidhuber, 1997), a state-space model (DSS) (Gupta et al., 2022), a long convolutional model (Hyena) (Poli et al., 2023), and a hybrid model (RetNet) (Sun et al., 2023). We consider decoder-only GPT-like architectures containing causal masking (see Figure 1 right). Note that, each input **x** _k_ is a vector of dimension _n_ . A linear map, _{_ 0 _,_ 1 _}[n] →_ R _[d]_ , with learnable parameters, is applied to each input and label vector to map it to a vector of the same dimension as the model width. The models receive as input ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m−_ 1 _,_ **y** _m−_ 1 _,_ **x** _m_ ) sequentially and for each prefix _Pk_ for 1 _≤ k ≤ m_ , they predict the label **y** _k_ which is provided as the next token as in a language model.
+
+**Training.** The models are trained from scratch to minimize the objective defined in Eq. 1 where cross-entropy is used as the loss function. The details of the hyperparameters and other aspects of implementation are provided in Appendix I. We have made our source code available at [URL removed]
+
+## 3 IN-CONTEXT LEARNING BOOLEAN FUNCTIONS
+
+In this section, we investigate the abilities of autoregressive architectures to learn various classes of Boolean functions in-context. Our experiments are geared towards answering the following questions: (1) What classes of Boolean functions can Transformers learn in-context and what are their limitations? (2) Is attention necessary for in-context learning and what are the differences between the capabilities of Transformers and attention-free architectures?
+
+**Tasks.** We explore several classes of Boolean functions with varying characteristics. We define some representative classes here; the rest are defined in Appendix C.1.
+
+**(i)** _Conjunctions and Disjunctions._ For the input domain _Xn_ = _{_ 0 _,_ 1 _}[n]_ , any input **x** _∈ Xn_ denotes a possible assignment to _n_ Boolean variables _x_ 1 _, . . . , xn_ . A literal is either the variable _xi_ or its negation _x_ ¯ _i_ . A conjunction is simply an _and_ ( _∧_ ) of some subset of the 2 _n_ literals. For example, for _n_ = 10, one possible conjunction could be _x_ 2 _∧ x_ ¯6 _∧ x_ 7 which outputs 1 only when _x_ 2 _, x_ 7 are 1 andDisjunctions is defined similarly with the _x_ 6 is 0. The class of Conjunctions contains all such conjunctions over _or_ ( _∨_ ) operation ( _x_ 2 _∨ x_ ¯6 _∨ x_ 7). _{_ 0 _,_ 1 _}[n]_ . The class of
+
+> 1The choice of _kF_ may depend on the function class, as for more complex classes, more examples may need to be seen before learning is possible.
+
+3
+
+**(ii)** _DNFs and CNFs._ A Boolean function is in the class DNF if it is a disjunction of one or more conjunctions. Formally, for any **x** _∈{_ 0 _,_ 1 _}[n]_ , a function _f_ belongs to the class of DNFs, if it can be expressed in the form _f_ ( **x** ) = ( _z_ 1 _,_ 1 _∧ z_ 1 _,_ 2 _∧ . . . ∧ z_ 1 _,k_ 1) _∨ . . . ∨_ ( _zm,_ 1 _∧ zm,_ 2 _∧ . . . ∧ zm,km_ ) where _zi,j_ are literals which are either the variables or their negation. Similarly, CNFs contain functions that are a conjunction of one or more disjunctions. While only the simplest of classification rules may be defined using conjunctions/disjunctions, a richer family becomes available when using DNF/CNF representations. Since DNFs/CNFs are conjectured to be computationally hard to learn, we consider 3-term DNFs and 3-clause CNFs which are known to be efficiently learnable.
+
+**(iii)** _Parities_ is one of the most fundamental classes of Boolean functions; widely studied in learning theory and cryptography because of its intriguing properties(Blum et al., 2003; Regev, 2010). A Parity function computes the XOR ( _⊕_ ) of some subset of the _n_ variables. Each Parity function outputs 1 when an odd number of the variables are assigned the value 1 and outputs 0 otherwise. The class PARITY- _n_ contains all 2 _[n]_ possible Parity functions over _{_ 0 _,_ 1 _}[n]_ . We denote the class of sparse parities with PARITY-( _n, k_ ) which contain functions with _k_ relevant variables defined over _{_ 0 _,_ 1 _}[n]_ .
+
+**Sampling data and functions.** For each task such as Conjunctions or Parity, we sample a function and _m_ Boolean inputs to generate each training (or test) example. For the majority of the tasks, the inputs are sampled uniformly at random where each input bit is either 0 or 1 with probability 1 _/_ 2. However, for tasks such as Conjunctions and 3-term DNF the null accuracy under the uniform distribution will be close to 1, and hence we modify the input distribution to make the set more well-balanced. The details of the input distribution and the distribution over functions for each task are provided in Appendix C.2.
+
+## 3.1 RESULTS
+
+Table 1 summarizes the performance of various architectures on the Boolean function tasks considered in the paper. The numbers indicate the accuracy of prediction for the last example in a prompt sequence, averaged over 1280 sequences. The curves showing the accuracy as a function of the number of observed examples for all tasks are provided in Appendix C.4.
+
+**Transformers show varied performance on Boolean functions.** We find that on certain _simple_ classes of functions such as Conjunctions and Disjunctions, Transformers achieve perfect accuracy within a relatively small number of examples. We observe that the performance of Transformers is close to that of feedforward networks (FFN) trained with gradient-descent as well as known PAClearning algorithms for the respective tasks (see Figure 13), in terms of sample complexity required to achieve perfect accuracy. On such tasks, we also find that they perform well on out-of-distribution inputs and functions; they also exhibit robustness to the presence of noisy labels during the training process. (see Appendix D.1 for more details.)
+
+While Transformers perform well on certain classes of Boolean functions, we find that their performance degrades across others. The tasks can be broadly divided into three categories. The first category contains tasks where Transformers can achieve near-perfect ( _>_ 95%) accuracy. The second category contains examples where the model performs better than baselines but its accuracy saturates below 95%. The last category consists of Parities and Sparse Parities where Transformers and other models do not improve beyond chance-level accuracy even with a large number of training examples. While prior works (Garg et al., 2022; Ahuja et al., 2023; Bai et al., 2023) have observed that Transformers perform well on a wide range of tasks, our results highlight that there are certain classes of functions where they are imperfect (second category) and there are certain classes such as Parities where they seem incapable of finding any learning algorithm to solve the task. Note that, for PARITY-(10 _,_ 2), 140 examples are sufficient for feedforward networks trained with gradient-descent to achieve near-perfect test accuracy (see Figure 18). The tasks PARITY-20 and PARITY-(20 _,_ 3) could be PAC-learned within 140 examples if the models could learn to apply the Gaussian elimination algorithm (Fischer & Simon, 1992). Hence, the failure of Transformers on the tasks in learning to learn Parities does not arise due to the lack of a sufficient number of in-context examples. We discuss and further explore the difficulty of learning Parities in Appendix F.
+
+**Transformers vs. other Architectures.** For the majority of the tasks considered in this work, we observe that attention-free architectures perform almost as well as Transformers. The efficacy of recurrent and long-convolution models on multiple tasks such as Conjunctions and Disjunctions indicates that the in-context learning phenomenon in the sense of implementing learning algorithms
+
+4
+
+Table 1: The performance of different architectures on in-context learning Boolean functions. The numbers depict the accuracy of a model while predicting the last input in the prompt. For instance, for prompts with _m_ points, the number indicates the accuracy on the _m_ -th input point based on the first _m −_ 1 points and labels. The descriptions of the baselines are provided in Appendix C.3. For all values reported in the table, the standard deviation is within 0 _._ 5.
+
+|**TASK** **N** **DIMS** **POINTS**|**NULL** **AVERAGING** **NN** **FFN**|**DSS** **LSTM** **RETNET** **HYENA** **TRANSFORMER**|
+|---|---|---|
+|Conjunctions 28 70 Disjunctions 28 70 Sparse Disjunctions 50 70 3c-CNF 28 100 3t-DNF 28 100|69.9 68.2 81.3 94.0 69.8 67.5 80.3 93.4 63.9 70.4 71.7 91.2 59.3 66.6 79.6 91.5 55.6 70.3 80.4 90.9|97.2 100.0 99.4 100.0 100.0 97.5 100.0 99.7 100.0 100.0 99.5 100.0 98.2 100.0 99.9 93.3 94.3 91.5 95.5 95.1 94.7 95.5 92.9 96.0 95.2|
+|Majority 28 100 0-1 Threshold 28 70 Integer-Halfspace 20 70|55.5 80.9 67.8 84.0 50.5 70.7 77.1 89.6 51.4 81.7 70.0 90.6|90.7 91.2 89.6 91.5 91.5 72.4 83.9 72.9 85.0 85.3 84.0 84.6 83.1 86.9 86.4|
+|Parity-(10, 2) 10 140 Parity-(20, 3) 20 140 Parity-20 20 140|50.6 48.5 81.7 100.0 50.0 50.7 55.3 50.2 49.2 50.6 49.2 50.6|49.7 51.1 48.7 52.0 53.7 51.2 50.0 51.1 47.6 49.1 47.8 49.6 50.3 51.1 50.6|
+|Nearest Neighbor 10 100|49.6 66.6 100.0 N/A|81.5 79.1 90.6 85.5 100.0|
+
+is not particular to Transformers. At the same time, we find that certain differences between Transformers and their recently proposed alternatives evidently exist. On tasks such as 0-1 Threshold functions, we find that RetNet and DSS perform worse than Transformers (see Table 1). With further experiments on linear regression tasks proposed in previous works, we find that recurrent models such as DSS and LSTMs struggle to match the performance of Transformers (see Figure 8 in Appendix). The closest to Transformers in terms of performance is Hyena, which matches Transformer’s performance on all tasks apart from the nearest-neighbor (NN) task. The NN task tests the ability of models to implement the nearest-neighbor algorithm as described in Appendix C.1. Our results indicate that while recently proposed architectures with sub-quadratic inference time can perform in-context learning, there still exists a minor performance gap between these architectures and Transformers.
+
+## 4 IN-CONTEXT LEARNING WITH TEACHING SEQUENCES
+
+**Premise.** Our experiments in the previous section as well as previous works investigate the abilities of models to perform statistical learning from arbitrary distributions in an in-context setting. Given that we are exploring the ability of sequence models to learn ‘learning algorithms’, one could wonder: _Can sequence models find learning algorithms which are more sample-efficient when they are provided with a more informative sequence of examples?_ We explore this question in this section.
+
+**Teaching Sequences** (Goldman & Kearns, 1995). For a class of functions _F_ , the teaching sequence of a function _f_ in _F_ is a sequence of labeled instances ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ) such that it unambiguously identifies _f_ in _F_ – only the function _f_ is consistent with the sequence of labeled instances. We are interested to see if architectures such as Transformers can learn to identify the correct target function right after seeing the shortest teaching sequence[2] of that function.
+
+**Experimental Setup.** Every aspect of the experimental setup except the data distribution remains identical to the previous experiments. For each sequence during training and evaluation, the first _t_ points are a teaching sequence of the target function and the next _m − t_ points are sampled from the distribution _DX_ . The sampling of functions, the training and the evaluation process remain the same. Although we primarily focus on Transformers, most results in this section hold for all architectures.
+
+**Tasks.** We experiment with 5 tasks: Conjunctions, Disjunctions, CNFs and DNFs, and sparse parities. Every conjunction (or disjunction) has a teaching sequence of length _k_ + 2 where _k_ is the number of
+
+> 2From here onwards, by teaching sequence we will refer to the shortest teaching sequence of a function.
+
+5
+
+**==> picture [389 x 100] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Teach Conjunction - n_dims 75 Teach DNF - n_dims 50 Teach Parity - n_dims 20 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 Transformer Transformer Transformer 0.2 NN averaging_ n=3 0.2 NN averaging_ n=3 0.2 NN averaging_ n=3 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 30 40 50 60 70 80 90 40 50 60 70 80 90 10 20 30 40 50 In-context examples In-context examples In-context examples Mean Accuracy Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 2: Performance of Transformers on various tasks with Teaching Sequences. The plots depict the performance of models right after the teaching sequence. Refer to Section 4 for more details.
+
+literals in the function. Every 3-term DNF or CNF has a teaching sequence of length _l_ + 3 where _l_ is the total number of literals in all 3 terms. The teaching sequence of each sparse parity function is of length _k_ where _k_ is the number of relevant bits upon which the Parity function is computed. For each task (such as Conjunctions), we refer to the version with teaching sequence as Teach _<_ task-name _>_ (e.g. Teach Conjunction). The details of the teaching sequences are provided in Appendix G.
+
+**Transformers succeed in learning from Teaching Sequences.** For all 5 tasks, we find that Transformers achieve perfect accuracy on subsequent points after receiving the teaching sequence. Figure 2 shows the accuracy curve of Transformers and baselines on three representative tasks after receiving the first _t_ points containing the teaching sequence. Note that, the accuracy of Transformers stays (close to) 100% after receiving the teaching sequence. It is interesting to see that Transformers succeed in learning with teaching sequences for tasks like DNFs and sparse parities where they struggled to learn in the vanilla setting.
+
+By definition, the teaching sequence is the smallest sequence required to learn the target function. Hence, it can often be much smaller than the sample complexity for a learning algorithm to learn from arbitrary distributions such as the ones considered in the previous section. Thus, our experiments show that models predict perfectly with much fewer examples when provided with these teaching sequences. This is not true for FFNs trained with gradient descent which fail to predict accurately given only the teaching sequence during training (see Figure 18 right in Appendix). FFNs+GD is a more general-purpose algorithm and is hence not the most optimal for specific problems.
+
+**Two distinct algorithms to learn one task.** An interesting finding is that Transformers seem to learn two different algorithms to learn Conjunctions depending on the data distribution _DX_ during the training process. See that (Figure 3 left) when Transformers are trained to perform in-context learning with Conjunctions in the vanilla setting (as in Section 3) without teaching sequences, and tested on examples (or Prompts) containing teaching sequences, they are not able to leverage the teaching sequence and require more examples to predict accurately. The algorithm learned with standard Conjunctions still works on examples with teaching sequences even if it is not as sample-efficient. On the other hand, when Transformers are trained with teaching sequences and are tested in the standard setting without teaching sequences, they do not perform well since the learning algorithm relies on using the first _t_ examples containing the teaching sequence (Figure 3 center-left). These results indicate that models can learn two distinct algorithms depending on the distribution of inputs provided during training.
+
+We conducted another experiment where we trained a Transformer on a mixture of examples with and without teaching sequence. During training, we sample an example (or Prompt sequence) with a teaching sequence with probability[1] 2[, and without a teaching sequence with equal probability.][We] evaluate the model on both tasks separately, one which contains examples with teaching sequences and one without them. We find that the same Transformer model could achieve near-optimal performance for both tasks – when provided with teaching sequences, it behaves like the model that is trained on just the Teach Conjunction task (Figure 3 Right) and when provided with examples without teaching sequences, it behaves like a model trained on just the Conjunction task (Figure 3 center-right). This indicates that Transformers can learn two distinct learning algorithms for Conjunctions and implement the optimal one depending on the sequence of in-context examples. This highlights the versatility of neural sequence models in being able to find separate learning algorithms with respect to the data distribution for solving the same task.
+
+6
+
+**==> picture [386 x 80] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Performance on Teach Conjunction Performance on Conjunction Evaluated on Conjunction Evaluated on Teach Conjunction Trained on Conjunction - n_dims 50 Trained on Teach Conjunction - n_dims 50 Trained on Mixture - n_dims 28 Trained on Mixture - n_dims 28 1.0 1.0 1.0 1.0 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4 Transformer Transformer Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 0.2 NN_n=3 0.2 NN_n=3 averaging averaging averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 20 30 40 50 60 70 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 20 30 40 50 60 70 In-context examples In-context examples In-context examples In-context examples Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 3: _Left_ : depicts the performance of Transformers trained on examples with the vanilla distribution and tested on in-context examples with Teaching Sequences. _Center-left_ : Transformers trained with teaching sequences and tested on in-context examples without teaching sequences. _Center-right_ and _right_ : depict the performance of Transformers trained on a mixture of Conjunction and Teach Conjunction and tested on the individual tasks. See Section 4 for more details.
+
+## 5 INVESTIGATIONS WITH PRETRAINED MODELS
+
+**Premise.** While several works have investigated how well Transformers can be trained to learn various kinds of functions in-context, it is unclear how these findings relate to LLMs, which was the primary motivation behind this line of work. This raises a very natural and intriguing question: _Can pretrained language models predict accurately by implementing any kind of learning algorithm when provided with prompts of the form_ ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _k_ ) _?_
+
+While prior works focused on learning real-valued function classes, evaluating LLMs on those tasks is not straightforward since LLMs receive and produce discrete values. Our setup involves discrete Boolean functions, which enables us to analyze the performance of LLMs in applying learning algorithms for solving these tasks. Additionally, as we are picking the target function randomly from an exponentially large set, we can be essentially sure that the learning is happening from in-context examples only, allowing us to remove confounding factors such as memorization during pre-training.
+
+**Setup.** Recall that, in our experiments in the previous sections, when a model is provided with a sequence of input-output pairs ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ), each input **x** _i_ is a single token. Additionally, LLMs do not have embeddings for each of the Boolean inputs _{_ 0 _,_ 1 _}[n]_ as opposed to the linear map **W** : _{_ 0 _,_ 1 _}[n] →_ R[width] learned by the models in the ICL setup of previous experiments. To address that, we experiment with pretrained models in two different settings, one which is closer to the ICL setup in previous experiments and another which is very close to the practical usage of the LLMs.
+
+**(a) Frozen GPT.** In the first setting, we take a GPT-2 model and add learnable input and output layers at the beginning and end of the Transformer architecture. The weights of the GPT-2 model are frozen while the embedding matrix is replaced by a learnable function _I_ : _{_ 0 _,_ 1 _}[n] →_ R[width] which is an FFN with one hidden layer. Similarly, the output layer is replaced by an FFN _F_ : R[width] _→{_ 0 _,_ 1 _}_ . During experiments, we train the input and output layers to minimize the objective in Eq. 1 while keeping the weights of the pre-trained GPT-2 frozen. We compare it with the performance of a randomly initialized Transformer model (same architecture as GPT-2) undergoing the same training process with learnable input-output mappings and frozen Transformer weights. The goal of this setup is to understand whether large-scale text pre-training imparts some ability to the Transformer model that enables it to implement learning algorithms in-context.
+
+**(b) Direct Evaluation.** We directly evaluate several LLMs on the task of learning Boolean functions. In this setup, each input example **x** _i ∈{_ 0 _,_ 1 _}[n]_ is provided as a sequence of tokens _x_ 1 _, . . . , xn_ where _xi ∈{_ 0 _,_ 1 _}_ . None of the model’s parameters are modified and the original embedding matrices are used to represent the tokens 0 and 1. We evaluate the models by providing them with a simple prompt containing two parts: the first part is a simple instruction asking the model to act as a learning algorithm and predict the label corresponding to the final input, and the second part consists of a series of input sequences and their corresponding labels followed by the test input sequence (see Figure 21). We evaluate the predictions of the model at prompts of different lengths (i.e., different numbers of in-context examples). To estimate the accuracy for a particular number of in-context examples, we repeat the experiment 100 times (i.e., with 100 different functions of the same class). We experiment with state-of-the-art LLMs GPT-4 (OpenAI, 2023), GPT-3.5-Turbo (Brown et al., 2020; Ouyang et al., 2022) as well as the open-source model LLaMA-2-70B (Touvron et al., 2023).
+
+7
+
+**==> picture [395 x 93] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunctions - GPT-2 - n_dims 28 Nearest Neighbours - GPT-2 - n_dims 10 1.00.8 1.00.8 j = argmaxi ( x xiiT x x nn) Attention 0.6 0.6 0 0 0 1 0.4 0.4 1 1 0 0 1 1 1 ? 0.2 GPT-2Random TransformerNearest Neighbour 0.2 GPT-2 Random Transformer x01 y1 x12 y2 x1 j yj x0n yn 0.0 NullClassifier 0.0 NullClassifier Prediction 0 20 40 60 80 0 20 40 60 80 100 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 4: Experiments with frozen GPT: _left_ : Performance of frozen GPT-2 on the Conjunction task, _center_ : Frozen GPT-2 model learns to perfectly implement the nearest neighbors algorithm, _right_ : Illustration of attention patterns in GPT-2 while solving the Nearest Neighbor task.
+
+## 5.1 RESULTS: LLMS PERFORM AT LEAST AS WELL AS NEAREST NEIGHBORS
+
+**Results with Frozen GPT.** We evaluate the performance of a frozen GPT-2 model on tasks such as Conjunctions and Disjunctions. Figure 4 depicts the performance on Conjunctions (the behavior on Disjunctions is almost identical). We find that the GPT-2 model performs relatively better than the nearest neighbor baseline and much better than a randomly initialized model on these tasks. However, it still does not come close to achieving the near-perfect accuracy obtained by fully trainable Transformer networks as in Section 3.
+
+**GPT-2 can implement Nearest Neighbor.** Given the observation that the performance of GPT-2 was close to the nearest neighbor algorithm, we examined if a frozen GPT-2 model can implement the nearest neighbor (NN) algorithm. We designed the NN task to test this hypothesis. In this task, each prompt contains 100 points where the first 20 points are labeled 0 or 1 uniformly at random and the subsequent 80 points are labeled according to the nearest neighbor algorithm. We then evaluate the GPT-2 model in the frozen-GPT setup described earlier and find that it can achieve near-perfect accuracy on the 80 points labeled with the nearest-neighbor algorithm (see Figure 4 center). Moreover, upon analyzing the attention heads we found heads which closely implemented nearest neighbors — for an input **x** _i_ , the attention head attended over **y** _j_ where **x** _j_ is the nearest neighbor of **x** _i_ among **x** 1 _, . . . ,_ **x** _i−_ 1 (illustrated in Figure 4 right). Further details about these experiments are provided in Appendix H. These heads are reminiscent of induction heads (Olsson et al., 2022) where instead of matching prefixes, they can find the nearest neighbor over the input space. Since the weights of the Transformers are frozen and only the input embedding and output layers are updated during the training process, the mechanisms to solve tasks such as NN and Conjunctions must have been learned during pretraining on language data. Moreover, a Transformer of the same size with randomly initialized weights is unable to perform much better than chance-level accuracy.
+
+**Results with Direct Evaluation.** The performances of all LLMs for the Conjunction and Majority tasks with varying number of dimensions are provided in Figure 5. It is clear that all models are able to perform as well as or better than the nearest neighbor baseline when the number of dimensions is up to 7. Note that in this setup, the LLM is essentially unaware of the task (such as Conjunction) when it is provided directly with the prompt at inference time. Even with _n_ = 7, there are 2[128] Boolean functions, and so the in-context learning problem remains challenging, and the observed performance of these models is impressive. It is perhaps surprising to see that the open-source LLaMA-2 model performs quite similar to GPT-3.5-Turbo. It is also particularly interesting to see the strong performance of GPT-4; apart from outperforming all other models, it also slightly outperforms the nearest neighbor baseline even in the 15-dimensional case.
+
+## 6 RELATED WORK
+
+**In-Context learning in Stylized settings.** Understanding the in-context learning (ICL) phenomenon has attracted significant interest in recent years. Since the ICL phenomenon was demonstrated in Brown et al. (2020), numerous works have investigated the practical capabilities and limitations of LLMs to perform ICL (see Dong et al. (2022) for a survey). Since it is infeasible to precisely define real-world data and tasks, several works have studied it in stylized well-defined settings (Chan et al., 2022; Hahn & Goyal, 2023; Xie et al., 2021). Garg et al. (2022) presented a meta-learning-like
+
+8
+
+**==> picture [352 x 166] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunction n_dims=5 Conjunction n_dims=7 Conjunction n_dims=15 1.0 1.0 1.0 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 Majority n_dims=5 Majority n_dims=7 Majority n_dims=15 1.0 1.0 1.0 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0 10 20 30 40 50 0 10 20 30 40 50 0 20 40 60 80 100 In-context examples In-context examples In-context examples LLaMA-2-70B GPT-3.5-Turbo GPT-4 NN_n=1_uniform nullclassifier Mean accuracy Mean accuracy Mean accuracy Mean accuracy Mean accuracy Mean accuracy **----- End of picture text -----**
+
+Figure 5: Results with the direct evaluation of LLMs at inference time. The _top_ row shows the performance across varying dimensions for the Conjunction task while the _bottom_ row shows the performance for the Majority task.
+
+framework and demonstrated that Transformers can match gradient-based learning algorithms for regression tasks. Subsequent works (Dai et al., 2022; Akyurek¨ et al., 2023; von Oswald et al., 2022) demonstrated that Transformers were expressive enough to represent gradient-descent and empirically verified that the learned weights indeed computed gradient-based algorithms. Li et al. (2023); Bai et al. (2023) studied the sample complexity of in-context learning regression and other real-valued functions with Transformers. More recently, Ahuja et al. (2023); Bai et al. (2023) explored (among other things) the efficacy of Transformers in learning mixtures of tasks in-context and showed that they could adaptively select appropriate algorithms for a given sequence of inputs and labels. Our work takes a step forward in this direction by demonstrating that (a) some of these observed phenomena are not confined to attention-based architectures and (b) that neural networks can learn to implement multiple distinct learning algorithms for ICL of a single task depending on the in-context examples. Moreover, our results help bridge the gap between the stylized setup used in prior works and in-context learning of actual pretrained models.
+
+**Transformers and Sequence Models.** The analysis of the capabilities and limitations of recurrent architectures dates back to a few decades ago (Kolen & Kremer, 2001). Given the recent success of Transformers, several works have sought to investigate their theoretical expressiveness (Perez et al.,´ 2019; Merrill et al., 2022; Chiang & Cholak, 2022; Hahn, 2020; Yun et al., 2020; Liu et al., 2022) as well as their empirical capabilities (Bhattamishra et al., 2023; Ebrahimi et al., 2020) and limitations (Bhattamishra et al., 2020; Chiang & Cholak, 2022). Deletang et al. (2022) conduct a comprehensive´ study of the performance of various sequence models such as Transformers and RNNs on formal language tasks. While most of these prior works focus on classification or related tasks, our work complements these as we conduct a comprehensive study on in-context learning tasks.
+
+## 7 CONCLUSION
+
+In this work, we highlighted certain limitations of Transformers in in-context learning and their ability to leverage more informative examples such as teaching sequences for learning in a more sampleefficient manner. Additionally, we showed that pretrained models also learn mechanisms to solve tasks in the stylized ICL setting. Further, we show that LLMs are also capable of performing as well as certain baseline learning algorithms in a more practical setting. Our results raise several interesting questions for future work: (a) Can LLMs leverage more informative examples to sample-efficiently learn practical tasks in-context? (b) What aspects of the pretraining process of LLMs lead to their ability to implement learning algorithms since they are not primarily trained in the meta-learning-like framework? (c) What are the theoretical limitations behind the difficulty of learning Parities in the in-context learning setting? (d) What are the mechanisms that various architectures (attention, recurrence, and convolution) use to learn tasks using different operations?
+
+9
+
+## REFERENCES
+
+- Kabir Ahuja, Madhur Panwar, and Navin Goyal. In-context learning through the bayesian prism. _arXiv preprint arXiv:2306.04891_ , 2023.
+
+- Kartik Ahuja and David Lopez-Paz. A closer look at in-context learning under distribution shifts. _arXiv preprint arXiv:2305.16704_ , 2023.
+
+- Ekin Akyurek,¨ Dale Schuurmans, Jacob Andreas, Tengyu Ma, and Denny Zhou. What learning algorithm is in-context learning? investigations with linear models. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed] 0g0X4H8yN4I.
+
+- Dana Angluin, David Chiang, and Andy Yang. Masked hard-attention transformers and boolean rasp recognize exactly the star-free languages. _arXiv preprint arXiv:2310.13897_ , 2023.
+
+- Yu Bai, Fan Chen, Huan Wang, Caiming Xiong, and Song Mei. Transformers as statisticians: Provable in-context learning with in-context algorithm selection. _arXiv preprint arXiv:2306.04637_ , 2023.
+
+- Satwik Bhattamishra, Kabir Ahuja, and Navin Goyal. On the Ability and Limitations of Transformers to Recognize Formal Languages. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 7096–7116, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.576. URL [URL removed]
+
+- Satwik Bhattamishra, Arkil Patel, Varun Kanade, and Phil Blunsom. Simplicity bias in transformers and their ability to learn sparse Boolean functions. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 5767–5791, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long. 317. URL [URL removed]
+
+- Avrim Blum, Adam Kalai, and Hal Wasserman. Noise-tolerant learning, the parity problem, and the statistical query model. _Journal of the ACM (JACM)_ , 50(4):506–519, 2003.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 1877–1901. Curran Associates, Inc., 2020. URL [URL removed] neurips.cc/paper/2020/file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf.
+
+- Stephanie Chan, Adam Santoro, Andrew Lampinen, Jane Wang, Aaditya Singh, Pierre Richemond, James McClelland, and Felix Hill. Data distributional properties drive emergent in-context learning in transformers. _Advances in Neural Information Processing Systems_ , 35:18878–18891, 2022.
+
+- David Chiang and Peter Cholak. Overcoming a theoretical limitation of self-attention. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 7654–7664, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.527. URL [URL removed] 527.
+
+- Damai Dai, Yutao Sun, Li Dong, Yaru Hao, Zhifang Sui, and Furu Wei. Why can gpt learn incontext? language models secretly perform gradient descent as meta optimizers. _arXiv preprint arXiv:2212.10559_ , 2022.
+
+- Gregoire Del´ etang, Anian Ruoss, Jordi Grau-Moya, Tim Genewein, Li Kevin Wenliang, Elliot Catt,´ Marcus Hutter, Shane Legg, and Pedro A Ortega. Neural networks and the chomsky hierarchy. _arXiv preprint arXiv:2207.02098_ , 2022.
+
+10
+
+Qingxiu Dong, Lei Li, Damai Dai, Ce Zheng, Zhiyong Wu, Baobao Chang, Xu Sun, Jingjing Xu, and Zhifang Sui. A survey for in-context learning. _arXiv preprint arXiv:2301.00234_ , 2022.
+
+- Javid Ebrahimi, Dhruv Gelda, and Wei Zhang. How can self-attention networks recognize dyck-n languages? _arXiv preprint arXiv:2010.04303_ , 2020.
+
+- Nelson Elhage, Neel Nanda, Catherine Olsson, Tom Henighan, Nicholas Joseph, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Nova DasSarma, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. A mathematical framework for transformer circuits. _Transformer Circuits Thread_ , 2021. [URL removed]
+
+- Paul Fischer and Hans-Ulrich Simon. On learning ring-sum-expansions. _SIAM Journal on Computing_ , 21(1):181–192, 1992.
+
+- Shivam Garg, Dimitris Tsipras, Percy S Liang, and Gregory Valiant. What can transformers learn in-context? a case study of simple function classes. _Advances in Neural Information Processing Systems_ , 35:30583–30598, 2022.
+
+- Sally A Goldman and Michael J Kearns. On the complexity of teaching. _Journal of Computer and System Sciences_ , 50(1):20–31, 1995.
+
+- Ankit Gupta, Albert Gu, and Jonathan Berant. Diagonal state spaces are as effective as structured state spaces. _Advances in Neural Information Processing Systems_ , 35:22982–22994, 2022.
+
+- Michael Hahn. Theoretical limitations of self-attention in neural sequence models. _Transactions of the Association for Computational Linguistics_ , 8:156–171, 2020. doi: 10.1162/tacl ~~a 0~~ 0306. URL [URL removed]
+
+- Michael Hahn and Navin Goyal. A theory of emergent in-context learning as implicit structure induction. _arXiv preprint arXiv:2303.07971_ , 2023.
+
+- Sepp Hochreiter and Jurgen¨ Schmidhuber. Long short-term memory. _Neural computation_ , 9(8): 1735–1780, 1997.
+
+- Michael Kearns. Efficient noise-tolerant learning from statistical queries. _Journal of the ACM (JACM)_ , 45(6):983–1006, 1998.
+
+- John F Kolen and Stefan C Kremer. _A field guide to dynamical recurrent networks_ . John Wiley & Sons, 2001.
+
+- Yingcong Li, M Emrullah Ildiz, Dimitris Papailiopoulos, and Samet Oymak. Transformers as algorithms: Generalization and implicit model selection in in-context learning. _arXiv preprint arXiv:2301.07067_ , 2023.
+
+- Bingbin Liu, Jordan T Ash, Surbhi Goel, Akshay Krishnamurthy, and Cyril Zhang. Transformers learn shortcuts to automata. _arXiv preprint arXiv:2210.10749_ , 2022.
+
+Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. What makes good in-context examples for gpt-3? _arXiv preprint arXiv:2101.06804_ , 2021.
+
+- Lovre. Who models the models that model models? an exploration of gpt-3’s in-context model fitting ability. [URL removed] who-models-the-models-that-model-models-an-exploration-of, 2022.
+
+- Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 8086–8098, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.556. URL [URL removed]
+
+- William Merrill, Ashish Sabharwal, and Noah A. Smith. Saturated transformers are constant-depth threshold circuits. _Transactions of the Association for Computational Linguistics_ , 10:843–856, 2022. doi: 10.1162/tacl ~~a 0~~ 0493. URL [URL removed]
+
+11
+
+Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. Metaicl: Learning to learn in context. _arXiv preprint arXiv:2110.15943_ , 2021.
+
+- Sewon Min, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. Noisy channel language model prompting for few-shot text classification. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 5316–5330, Dublin, Ireland, May 2022a. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long. 365. URL [URL removed]
+
+- Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe, Mike Lewis, Hannaneh Hajishirzi, and Luke Zettlemoyer. Rethinking the role of demonstrations: What makes in-context learning work? _arXiv preprint arXiv:2202.12837_ , 2022b.
+
+- Ryan O’Donnell. Analysis of boolean functions, 2021. URL [URL removed] 10386.
+
+- Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads. _arXiv preprint arXiv:2209.11895_ , 2022.
+
+OpenAI. Gpt-4 technical report, 2023.
+
+- Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback, 2022.
+
+- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. _Advances in neural information processing systems_ , 32, 2019.
+
+- Jorge Perez, Javier Marinkovi´ c, and Pablo Barcel´ o.´ On the turing completeness of modern neural network architectures. In _International Conference on Learning Representations_ , 2019. URL [URL removed]
+
+- Michael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y Fu, Tri Dao, Stephen Baccus, Yoshua Bengio, Stefano Ermon, and Christopher Re.´ Hyena hierarchy: Towards larger convolutional language models. _arXiv preprint arXiv:2302.10866_ , 2023.
+
+- Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. Impact of pretraining term frequencies on few-shot reasoning. _arXiv preprint arXiv:2202.07206_ , 2022.
+
+- Oded Regev. The learning with errors problem. _Invited survey in CCC_ , 7(30):11, 2010.
+
+Yutao Sun, Li Dong, Shaohan Huang, Shuming Ma, Yuqing Xia, Jilong Xue, Jianyong Wang, and Furu Wei. Retentive network: A successor to transformer for large language models. _arXiv preprint arXiv:2307.08621_ , 2023.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023.
+
+12
+
+- Leslie G Valiant. A theory of the learnable. _Communications of the ACM_ , 27(11):1134–1142, 1984.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In _Advances in neural information processing systems_ , pp. 5998–6008, 2017.
+
+- Johannes von Oswald, Eyvind Niklasson, Ettore Randazzo, Joao Sacramento, Alexander Mordvintsev,˜ Andrey Zhmoginov, and Max Vladymyrov. Transformers learn in-context by gradient descent. _arXiv preprint arXiv:2212.07677_ , 2022.
+
+- Jerry Wei, Jason Wei, Yi Tay, Dustin Tran, Albert Webson, Yifeng Lu, Xinyun Chen, Hanxiao Liu, Da Huang, Denny Zhou, and Tengyu Ma. Larger language models do in-context learning differently, 2023.
+
+- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, et al.´ Transformers: State-of-the-art natural language processing. In _Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations_ , pp. 38–45, 2020.
+
+- Sang Michael Xie, Aditi Raghunathan, Percy Liang, and Tengyu Ma. An explanation of in-context learning as implicit bayesian inference. _arXiv preprint arXiv:2111.02080_ , 2021.
+
+- Chulhee Yun, Srinadh Bhojanapalli, Ankit Singh Rawat, Sashank Reddi, and Sanjiv Kumar. Are transformers universal approximators of sequence-to-sequence functions? In _International Conference on Learning Representations_ , 2020. URL [URL removed] ByxRM0Ntvr.
+
+13
+
+## A ROADMAP
+
+The appendix is organized as follows.
+
+- In Section B, we discuss clarifications related to some natural questions related to our results.
+
+- In Section C, we provide detailed descriptions of the tasks, the distribution of functions and inputs used in our experiments, and details of the baselines. Additionally, the detailed plots regarding some results reported in Section 3 are provided in this section.
+
+- In Section D, we discuss results with some additional experiments exploring the robustness of the models to out-of-distribution tasks and to noisy labels as well as the sample complexity of models while learning tasks such as Conjunctions. We also discuss some factors that could determine the difficulty of tasks for sequence models.
+
+- In Section E, we compare the performance of Transformers with known algorithms for Conjunction and study their representational complexity.
+
+- In Section F, we discuss the difficulty of learning the Parity task in more detail.
+
+- In Section G, we provide the details of the teaching sequences used for the experiments in Section 4.
+
+- In Section H, we provide some additional details related to the experiments with LLMs in Section 5 and also discuss some additional results.
+
+- In Section I, we discuss the details of the implementation and hyperparameters used during the experiments.
+
+- In Section J, we discuss some additional related work.
+
+## B CLARIFICATIONS
+
+**(1)** _Given that LLMs are trained on trillions of tokens, how can we be certain that LLMs such as GPT-4 are applying learning algorithms and not imitating any tasks seen during training?_ In prior works where in-context learning is evaluated with natural language tasks such as sentiment classification, NLI, or some variations of them, LLMs are likely to have seen such tasks during training and can use in-context demonstrations for recognizing the target function learned during pretraining before making predictions (Min et al., 2022b). However, in our case where the model is provided with a sequence of Boolean inputs and labels (in Section 5), the total number of possible target functions that can label the inputs is over 10[30] even for dimension 7 so it is virtually impossible for a model to have seen sequences of examples labeled with such a large amount of functions. Hence, in order to predict accurately, the model has to rely on the examples provided in-context as a learning algorithm.
+
+**(2)** _When you say LLMs apply learning algorithms, is the claim that they implement gradient-based or nearest neighbor algorithm?_ No. We do not know how LLMs are learning based on the in-context examples provided. Our results suggest that they are competitive with the nearest neighbor (NN) algorithm but we do not have any evidence to claim that they are applying NN, gradient-descent, or any specific algorithm for that matter for learning tasks like Conjunctions.
+
+**(3)** _Are Transformers superior to other architectures in in-context learning in the sense of implementing learning algorithms?_ Not necessarily. Our results across various classes of Boolean functions and linear regression suggest that attention-free architectures match Transformers on most tasks and are slightly worse on a few tasks. The difference in the nearest neighbor task is particularly interesting because our results in Section 5 suggest that Transformers learn such mechanism during their pretraining process. At the same time, one could argue that the task is more suited to attention-based models. Given the similarity in performance between Transformers and Hyena on other tasks, it would not be surprising if there are learning problems that are more suited to long convolutional models where Hyena could perform better.
+
+**(4)** _Why are the dimension of inputs (n_ ~~_d_~~ _ims) and number of examples (n_ ~~_p_~~ _oints) different for different tasks in Section 3?_ Parameters such as the n ~~d~~ ims and n ~~p~~ oints are chosen so as to ensure feasibility of the learning task to some degree based on known results about the learnability of the problem. For instance, for tasks such as Conjunctions and Disjunctions, since there exists known PAC learning algorithms (Valiant, 1984) for solving the task with _O_ ( _n_ ) examples, we can set the n ~~d~~ ims as 28
+
+14
+
+and expect models to achieve near-perfect accuracy within 70 examples. However, for tasks such as Parities, since gradient-based algorithms need _n_[Ω(] _[k]_[)] steps to learn them (Kearns, 1998), we consider the PARITY-(10 _,_ 2) task in case Transformers can learn using a gradient-based algorithm similar to FFNs with gradient descent. On the other hand, since Parities can be learned within _O_ ( _n_ ) examples with Gaussian elimination algorithm (Fischer & Simon, 1992), we consider the PARITY-(20 _,_ 3) and PARITY-20 task where models will have to find a non-gradient-based algorithm to solve them.
+
+**Limitations.** A caveat with empirical studies such as this is that the results depend on the hyperparameters and other aspects of the experimental setup. While we have tried to be as thorough as possible with hyperparameter tuning, there is always a chance that the results or behaviour could differ for some hyperparameter.
+
+## C ADDITIONAL DETAILS OF EXPERIMENTS
+
+## C.1 DESCRIPTIONS OF TASKS
+
+Boolean functions have been widely studied in the field of theoretical computer science (O’Donnell, 2021). Given that it is extensively studied in the field of learning theory, it is well-suited for our task, since the discrete nature of the domain allows us to also test actual LLMs apart from neural networks trained from scratch. Additionally, the learnability and the precise properties of each function class are well-understood which aids in experimental design choices (such as the number of in-context examples necessary for learning a concept class) and in drawing inferences from the results.
+
+For better readability, we redefine the function classes that are already described in the main paper.
+
+**Tasks 1-2** _Conjunctions and Disjunctions._ For the input domain _Xn_ = _{_ 0 _,_ 1 _}[n]_ , any input **x** _∈ Xn_ denotes a possible assignment to _n_ Boolean variables _x_ 1 _, . . . , xn_ . A literal is either the variable _xi_ or its negation _x_ ¯ _i_ . A conjunction is simply an _and_ ( _∧_ ) of some subset of the 2 _n_ literals. For examples, for _n_ = 10, one possible conjunction could be _x_ 2 _∧ x_ ¯6 _∧ x_ 7 which outputs 1 only when _x_ 2 _, x_ 7 are 1Disjunctions is defined similarly with the and _x_ 6 is 0. The class of Conjunctions contains all such conjunctions over _or_ ( _∨_ ) operation ( _x_ 2 _∨ x_ ¯6 _∨ x_ 7). _{_ 0 _,_ 1 _}[n]_ . The class of
+
+**Task 3** _Sparse Disjunctions_ is a specific case of Disjunctions where the function over _n_ variables depends on at most _k_ variables where _k ≪ n_ . In other words, the function class contains all Disjunctions with at most _k_ variables. In our experiments, we set _k_ = 3. For functions over _n n_ variables, the total number of 3-sparse disjunctions is �3�3[3] . Hence, in our experiments, we set a higher value for the _n_ (n ~~d~~ ims= 50) parameter so that the number of functions in the class is at least a million.
+
+**Task 4-5** _DNFs and CNFs._ A Boolean function is in the class DNF if it is a disjunction of one or more conjunctions. Formally, for any **x** _∈{_ 0 _,_ 1 _}[n]_ , a function _f_ belongs to the class of DNFs, if it can be expressed in the form _f_ ( **x** ) = ( _z_ 1 _,_ 1 _∧ z_ 1 _,_ 2 _∧ . . . ∧ z_ 1 _,k_ 1) _∨ . . . ∨_ ( _zm,_ 1 _∧ zm,_ 2 _∧ . . . ∧ zm,km_ ) where _zi,j_ are literals which are either the variables or their negation. Similarly, CNFs contain functions that are a conjunction of one or more disjunctions. While only the simplest of classification rules may be defined using conjunctions/disjunctions, a richer family becomes available when using DNF/CNF representations. Since DNFs/CNFs are conjectured to be computationally hard to learn, we consider 3-term DNFs and 3-clause CNFs which are known to be efficiently learnable.
+
+**Task 6** _Sparse Majority_ . A function in the class sparse majority is parameterized by a subset of variables and outputs the majority value of those variables. For example, if the relevant variables are _x_ 2 _, x_ 4 _, x_ 5 and _x_ 7, then the output for any input **x** _∈{_ 0 _,_ 1 _}[n]_ will be 1 if more than 2 variables have value 1 and will be 0 otherwise. Since each function is uniquely identified by a subset of variable _S ⊆_ [ _n_ ], the total number of sparse majority functions is 2 _[n]_ .
+
+**Task 7** _0-1 Threshold Functions_ are functions of the form sign([�] _[n] i_ =1 _[w][i][x][i][ −][b]_[)][ where] _[ w]_[1] _[, . . . , w][n][∈] {−_ 1 _,_ 0 _,_ 1 _}_ and _b ∈{−k, . . . , k −_ 1 _, k}_ . Instead of the usual _Xn_ = _{_ 0 _,_ 1 _}[n]_ , the input space can be seen over _{−_ 1 _,_ +1 _}[n]_ which makes it easier to define the functions. In our experiments, we set _k_ = 3 and _n_ = 28. Note that, Conjunctions and Disjunctions can be seen as special cases of Integer threshold functions where _b_ is _∥w∥_ 1 _−_ 1 or -( _∥w∥_ 1 _−_ 1). See that the total set of functions in the class of Integer threshold functions is Ω(3 _[n]_ ).
+
+15
+
+**Task 8** _Integer Halfspace_ contains functions of the form sign([�] _[n] i_ =1 _[w][i][x][i][ −]_[0] _[.]_[5)][ where] _[ w]_[1] _[, . . . , w][n][∈] {−k, . . . , k −_ 1 _, k}_ and _x ∈{−_ 1 _,_ +1 _}[n]_ . The total set of functions in the class is Ω(3 _[n]_ ).
+
+**Tasks 9-11** _Parity_ is one of the most fundamental classes of Boolean functions; widely studied in learning theory and cryptography. A Parity function computes the XOR ( _⊕_ ) of some subset of the _n_ variables. For example, a Parity function could be _x_ 2 _⊕ x_ 4 _⊕ x_ 5. Each Parity function outputs 1 when an odd number of the variables are assigned the value 1 and outputs 0 otherwise. The class PARITY- _n_ contains all 2 _[n]_ possible Parity functions over _{_ 0 _,_ 1 _}[n]_ . We denote the class of sparse parities with PARITY-( _n, k_ ) which contain Parity functions with exactly _k_ relevant variables (or bits) defined over _{_ 0 _,_ 1 _}[n]_ .
+
+**Task 12** The Nearest Neighbour task is intended to evaluate the ability of architectures to learn to implement the nearest neighbour algorithm. Unlike, other tasks, it doesn’t involve a class of functions. For this task, each example consists of 100 points _x_ 1 _, . . . , x_ 100 _∈{_ 0 _,_ 1 _}[n]_ where the first _k_ points are labelled 0 or 1 uniformly at random. The labels for the next 100 _− k_ points are determined by their nearest neighbour in the preceding input points. More specifically, for any point _xj_ where
+
+_j ∈{k_ + 1 _, . . . ,_ 100 _}_ , let _p_ = arg max _i∈{_ 1 _,...,j−_ 1 _} ∥xxi∥[T] i∥[x] x[j] j∥_[.][Then the label] _[ y][j]_[corresponding to] _[ x][j]_ is _yp_ .
+
+**Size of Hypothesis set.** Unlike regression problems considered in earlier works, the number of functions in these Boolean function classes is finite. However, see that, for inputs over _{_ 0 _,_ 1 _}[n]_ , the total number of possible Conjunctions (or Disjunctions) is 3 _[n]_ . Hence, even for _n_ = 30, the function class has over 100 trillion functions. Moreover, even for a prompt with _m_ = 50 examples, the total number of permutations is 50! for one set of inputs and a single target function. This implies that the likelihood of encountering the same training example twice is extremely low and that it is (almost) impossible for a practical-sized model to memorize all examples during training unless _n_ and _m_ are quite small.
+
+## C.2 DETAILS OF INPUT AND FUNCTION DISTRIBUTION
+
+For the majority of the tasks, the inputs are sampled uniformly at random over _{_ 0 _,_ 1 _}[n]_ . For tasks such as Conjunctions, Disjunctions, and 3-CNF, a uniform distribution for the inputs over _{_ 0 _,_ 1 _}[n]_ will lead to most examples being either positive or negatively labelled. In that case, even the Null classifier which always produces the same output can achieve over 99% accuracy. While Transformers trained over uniformly distributed inputs for these tasks achieve near-perfect accuracy, it is in some sense trivial since they do not necessarily need to learn any algorithms and can achieve near-perfect accuracy by learning a constant function. Hence, for such tasks, we modify the input distribution such that at least 30% of the input points in the prompt have a positive (or negative) label to make it more well-balanced. In the modified distributions, we first sample _k_ points for the prompt uniformly at random and then pick 30% of the input points. For these points, we change a subset of bits to 0 or 1 so that they will labelled positively (for Conjunction) or negatively (Disjunction) according to the target function. Note that, this doesn’t change the proportion of 0s and 1s in the modified inputs since the probability of a literal being positive or negative (complement) in the Conjunction is the same.
+
+**Distribution over Functions.** For tasks such as Sparse Disjunctions and Parities, the functions are sampled uniformly from the set of all such functions. For both 0-1 Threshold functions and Integer halfspace, the _wi_ s are sampled uniformly from their respective range and for 0-1 Threshold functions, the _b_ parameter is sampled uniformly from _{−k, . . . , k −_ 1 _, k}_ . For tasks such as Conjunctions and Disjunctions which are either AND ( _∧_ ) or OR ( _∨_ ) of some of the 2 _n_ literals, the function is sampled such that each literal _xi_ or its complement _x_ ¯ _i_ has a probability of _p_ in being in the sampled function. In other words, for each _i ∈_ [ _n_ ], the literal _xi_ has _p/_ 2 probability of being sampled, the literal _x_ ¯ _i_ has _p/_ 2 probability and with 1 _− p_ probability the literal or it’s complement is not included. In our main experiments, we set _p_ = 30% and also investigate the robustness of the trained model when evaluated on other distributions (other values of _p_ ) in Appendix D.1. Similarly, for the Sparse Majority class, the probability of each literal being in the sampled function is _p_ (there is no complement). For sampling each 3-DNF (or 3-CNF), we first sample three conjunctions (or disjunctions) with _p_ = 20% and then take an AND (or OR) of those clauses.
+
+16
+
+**==> picture [380 x 538] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunctions - Transformers - n_dims 28 Disjunctions - Transformers - n_dims 28 Sparse Disj. - Transformers - n_dims 50 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 Transformer Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 0.2 NN_n=3 averaging averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 In-context examples In-context examples In-context examples 3-DNF - Transformers - n_dims 28 3-CNF - Transformers - n_dims 28 Majority - Transformers - n_dims 28 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 Transformer Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 0.2 NN_n=3 averaging averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 0 20 40 60 80 100 0 10 20 30 40 50 60 70 80 0 20 40 60 80 100 In-context examples In-context examples In-context examples 0-1 Threshold - Transformers - n_dims 28 Integer Halfspace - Transformers - n_dims 20 Parity-(10, 2) - Transformers - n_dims 10 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 Transformer Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 0.2 NN_n=3 averaging averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 0 20 40 60 80 100 120 140 In-context examples In-context examples In-context examples Figure 6: Performance of Transformers on in-context learning various classes of Boolean functions. The plots represent the mean accuracy of Transformers as a function of the number of in-context examples provided to the model. On certain classes of Boolean functions such as Conjunctions and Disjunctions, Transformers perform in a near-optimal manner. On tasks such as 0-1 Threshold, Majority and Integer Halfspaces, they perform better than baselines but do not achieve near-perfect accuracy even after observing 70 examples. On the other hand, on Parities Transformers do perform better than chance-level accuracy. Refer to Section 3 for details. Conjunction - n_dims 28 3-DNF - n_dims 28 Majority - n_dims 28 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 Transformer 0.4 Transformer 0.4 Transformer Hyena Hyena Hyena 0.2 RetNetDSS 0.2 RetNetDSS 0.2 RetNetDSS LSTM LSTM LSTM 0.0 NullClassifier 0.0 NullClassifier 0.0 NullClassifier 0 10 20 30 40 50 60 70 0 20 40 60 80 100 0 20 40 60 80 100 In-context examples In-context examples In-context examples Nearest Neighbour 0-1 Threshold - n_dims 28 Integer Halfspace - n_dims 20 Start idx: 30 - n_dims 10 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 Transformer 0.4 Transformer 0.4 Transformer 0.2 HyenaRetNetDSS 0.2 HyenaRetNetDSS 0.2 HyenaRetNetDSS LSTM LSTM LSTM 0.0 NullClassifier 0.0 NullClassifier 0.0 NullClassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 0 20 40 60 80 100 In-context examples In-context examples In-context examples Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 6: Performance of Transformers on in-context learning various classes of Boolean functions. The plots represent the mean accuracy of Transformers as a function of the number of in-context examples provided to the model. On certain classes of Boolean functions such as Conjunctions and Disjunctions, Transformers perform in a near-optimal manner. On tasks such as 0-1 Threshold, Majority and Integer Halfspaces, they perform better than baselines but do not achieve near-perfect accuracy even after observing 70 examples. On the other hand, on Parities Transformers do not perform better than chance-level accuracy. Refer to Section 3 for details.
+
+Figure 7: Performance of different architectures on 6 representative tasks.
+
+## C.3 DETAILS OF BASELINES
+
+Below, we describe how each baseline model _M_ predicts the label when provided with a prompt _Pk_ = ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _k−_ 1 _,_ **y** _k−_ 1 _,_ **x** _k_ ).
+
+**Null classifier.** This classifier always produces the same output, i.e. _M_ ( _Pk_ ) = 0, irrespective of _Pk_ .
+
+17
+
+**==> picture [198 x 145] intentionally omitted <==**
+
+**----- Start of picture text -----**
+1.0 Linear Regression 0.8 0.6 0.4 0.2 0.0 0 5 10 15 20 25 30 35 40 In-context examples Least Squares Averaging Hyena DSS 3-Nearest Neighbours Transformer RetNet LSTM Squared error **----- End of picture text -----**
+
+Figure 8: Performance of various architectures on the Linear Regression task from Garg et al. (2022).
+
+**Averaging estimator.** This is an incremental learning classifier that captures the average relationship ˆ The weightsbetween input vectors and output labels for **w** ˆ , are computed as the average of the product of input vectors and their correspondingpreviously seen points. It predicts _M_ ( _Pk_ ) = **w** _[T]_ **x** _k_ . ˆ 1 _k−_ 1 outputs over all previous points, i.e., **w** = _k−_ 1 � _i_ =1 **[x]** _[i]_ **[y]** _[i]_[.]
+
+**Nearest neighbors (NN).** This classifier aims to predict the output label based on the labels of the _n_ most similar input vectors in the previously seen points. It predicts _M_ ( _Pk_ ) = _n_[1] � _i∈S_ **[y]** _[i]_[.][Here,] _[ S]_[is] the set of indices of the _n_ nearest neighbors of **x** _k_ among **x** 1 to **x** _k−_ 1. For _k −_ 1 _< n_ , we average over all the **y** _i_ s from 1 to _k −_ 1, and for _k_ = 1, we set _M_ ( _Pk_ ) = 0.
+
+**Feedforward Networks (FFN).** We train a 1-hidden layer ReLU FFN on the same number of examples as provided to sequence models in Table 1. We tune the model across width _∈{_ 100 _,_ 500 _,_ 1000 _}_ , optimizer _{_ ’adam’, ’sgd’ _}_ , and learning rates _∈{_ 0 _._ 01 _,_ 0 _._ 005 _,_ 0 _._ 001 _,_ 0 _._ 0001 _}_ . We report the accuracy of the best model based on 1280 examples after being trained on _m −_ 1 examples where _m_ is given in Table 1 for each task.
+
+## C.4 ADDITIONAL PLOTS FOR IN-CONTEXT LEARNING BOOLEAN FUNCTIONS
+
+The accuracy curve of Transformers and baselines across all in-context examples is provided in Figure 6. The performances on Conjunctions and Disjunctions are almost identical in all the experiments we have conducted. Similarly, the performance on 3-CNF and 3-DNF as well as among Parity tasks are almost identical. The accuracy curves of all 5 architectures on representative tasks are provided in Figure 7.
+
+## D ADDITIONAL EXPERIMENTS ON BOOLEAN FUNCTIONS
+
+## D.1 ROBUSTNESS OF MODELS
+
+In this section, we explore the robustness of Transformers to out-of-distribution (OOD) inputs and functions as well as their robustness to noisy examples during training.
+
+**OOD functions.** Transformers seemingly perform in a near-optimal manner for tasks such as Conjunctions and Disjunctions. First, we evaluate the performance of Transformers trained on the Conjunctions task on functions from a different distribution than the ones seen during training. As described in Appendix C, while training on the Conjunctions task, the functions are sampled in such a way that for any _i ∈_ [ _n_ ], the probability of the literal _zi_ or _z_ ¯ _i_ being in the sampled Conjunctions is 30%. Hence, the expected number of literals in the Conjunctions seen during training is _n/_ 3. We evaluated Transformers trained on such Conjunctions on examples where the functions are sampled in such a way that the expected number of literals is 2 _n/_ 3 and the probability of any literal being in the sampled functions is twice as compared to the ones seen during training. We find that Transformers perform effectively on such examples as well (see Figure 9 Right). However, we find that the
+
+18
+
+**==> picture [294 x 104] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunctions OOD Input - n_dims 28 Conjunctions OOD Functions - n_dims 28 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 9: Performance of Transformers on Conjunctions with out-of-distribution inputs (left) and functions (right). Refer to Section D.1 for more details.
+
+**==> picture [281 x 110] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Trained on 0-1 Threshold Trained on 0-1 Threshold Tested on Conjunctions - n_dims 28 Tested on 0-1 Threshold - n_dims 28 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 Transformer Transformer 0.2 NN_n=3 0.2 NN_n=3 averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 10: Comparison between the performance of a Transformer trained to learn the 0-1 Threshold function on the Conjunction task (left) and the original 0-1 Threshold task. Refer to Section D.1 for more details.
+
+performance degrades for extreme changes in distribution where the expected number of literals in the functions is above 80%.
+
+**Trained on Threshold and Tested on Conjunctions.** We also evaluated the performance of Transformers trained on 0-1 Threshold functions on the Conjunctions task. As describe in Appendix C, 0-1 Threshold Functions are functions of the form sign([�] _[n] i_ =1 _[w][i][x][i][ −][b]_[)][ where] _[ w]_[1] _[, . . . , w][n][∈{]_[0] _[,]_[ 1] _[}]_ and _b ∈{−k, . . . , k −_ 1 _, k}_ . In some sense, Conjunctions are simpler threshold functions where the function is of the form sign([�] _[n] i_ =1 _[w][i][x][i][ −]_[(] _[∥][w][∥]_ 1 _[−]_[1))][.][At the same time, note that the 0-1 Threshold] functions task in our setting will not have functions which are exactly Conjunctions since _k_ = 3 in our experiments and E[ _∥w∥_ 1] = _n/_ 3 where _n_ is set to 28 for experiments with Threshold functions.
+
+We conduct an experiment where we train a Transformer on the 0-1 Threshold function task (with _n_ = 28) and evaluate the model on the Conjunctions task. Perhaps surprisingly, we find that the model performs better on the Conjunctions task (achieving over 90% at the end) in comparison to the in-distribution Threshold function task (See Figure 10). It is interesting to see that the algorithm learned during training generalises to higher values of _b_ in sign([�] _[n] i_ =1 _[w][i][x][i][ −][b]_[)][.][These observations] could perhaps be attributed to the fact that Conjunctions are one of the simplest Threshold functions and could be easier since the value of _b_ is dependent on _w_ .
+
+**Robustness to noise.** On tasks such as Conjunctions and Disjunctions where the models learn to perform in-context learning effectively, we explore whether they are robust to noisy labels during the training process. During training, for every example ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ), we flip 10% of the labels **y** _i_ s. Hence, the examples seen during training are not perfectly labeled by a Conjunction (or Disjunction). During the evaluation, we provide clean inputs (without noise) to test the performance of the models. We find that on these tasks, all architectures are robust to noise in the training process (see Figure 11).
+
+**Length Generalization.** We explore the effectiveness of Transformers to generalize to a larger number of examples (in some sense length) in comparison to those seen during training. We consider Conjunctions and DNFs where they perform reasonably well in the in-distribution setting. For Conjunctions, we train the model on prompts with 60 examples and test their performance on prompts
+
+19
+
+**==> picture [294 x 104] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunctions - Trained with Noise - n_dims 28 Disjunctions - Trained with Noise - n_dims 28 1.0 1.0 0.8 0.8 0.6 0.6 0.4 Transformer 0.4 Hyena RetNet Transformer 0.2 DSS 0.2 NN_n=3 LSTM averaging 0.0 NullClassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 11: Left: Performance of various architectures trained with noisy examples on the Conjunctions task. Right: Performance of Transformers trained with noisy examples on the Disjunctions task and performance of baselines. Refer to Section D.1 for more details.
+
+**==> picture [284 x 110] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunctions Length Generalization DNF Length Generalization Trained on 60 points Trained on 80 points 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 TF - No Pos TF - No Pos TF - Abs Pos TF - Abs Pos 0.2 NN_n=3 0.2 NN_n=3 averaging averaging 0.0 nullclassifier 0.0 nullclassifier 0 20 40 60 80 100 0 20 40 60 80 100 120 140 160 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 12: Performance of Transformers on prompts with a larger number of examples than seen during training. Left: Trained on Conjunctions with 60 examples and tested on 100. Right: Trained on DNFs with 80 examples and tested on 160. Transformers with no positional encodings and just masking generalize well whereas those with absolute encodings struggle on higher lengths. Refer to Section D.1 for more details.
+
+with 100 examples. Similarly, for DNFs, we train the model on prompts with 80 examples and test their performance on prompts with 160 (twice) examples. We compare two types of positional encodings: (a) absolute encodings and (b) no positional encodings with just causal masking. Figure 12 depicts the performance of Transformers on these tasks. Transformers with no positional encodings and just masking seem to generalize well whereas those with absolute positional encoding seem to struggle on higher lengths.
+
+## D.2 WHAT DETERMINES THE DIFFICULTY OF IN-CONTEXT LEARNING?
+
+A natural question that arises from our results is: what properties of a task determine the difficulty of in-context learning for models such as Transformers and other architectures? First, it is interesting to observe that capacity measures such as VC dimension or the size of a function class do not seem to correlate well with the performance of the models (See Table 2). While Transformers are able to perform well on Conjunctions which have VC dimension _O_ ( _n_ ) and sparse Disjunctions which have VC dimension _O_ ( _k_ log _n_ ), they fail on Parities and sparse Parities with similar VC dimensions. VC dimension is one way to measure the complexity of a class of functions which relates to the worst-case sample complexity required to learn functions from the class and it is related to several other measures which compute the capacity of the class in some manner.
+
+Note that, measures such as VC dimension are not dependent on either the distribution of inputs or the functions. We explore some other measures in order to understand the properties that determine the difficulty of in-context learning. One measure which we found to correlate well with the performance of Transformers is the pairwise correlation between the functions in a class. For Boolean functions of the form _f_ : _{_ 0 _,_ 1 _}[n] →{±_ 1 _}_ , the pairwise correlation of a class of functions P( _F_ ) is defined as,
+
+**==> picture [276 x 13] intentionally omitted <==**
+
+20
+
+**==> picture [284 x 105] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Classical Algo - Conjunctions - n_dims 28 Classical Algo - Disjunctions - n_dims 28 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 PAC-algo PAC-algo Transformers Transformers 0.2 NN averaging_ n=3 0.2 NN averaging_ n=3 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 13: Comparison between the performance of classical PAC-learning algorithms for Conjunctions and Disjunctions and the performance of Transformers. See Section E for the description of the algorithm and other details.
+
+The measure P( _F_ ) computes the magnitude of the expected correlation between pairs of functions sampled over _DF_ . To estimate P( _F_ ) for the tasks considered in the paper, we sample 1k functions according to the distribution used for training and sample 10k inputs from the uniform distribution over _{_ 0 _,_ 1 _}[n]_ . The estimated pairwise correlation of all function classes is provided in Table 2. See that the pairwise correlation between any two Parity functions is 0. We observe that the value P( _F_ ) is high for classes in which models perform well and decreases across categories with Parities having the minimum pairwise correlation.
+
+While the pairwise correlation among functions has a reasonably strong correlation with the degradation of the performance of the models, it still has some weaknesses. As compared to properties of function classes such as VC dimension, it takes the distribution over functions into account. However, the input distribution is uniform over _{_ 0 _,_ 1 _}[n]_ while computing P( _F_ ) whereas it is not uniform for some of the function classes during training. Having a clearer understanding of the factors that determine the difficulty of in-context learning is an interesting open problem.
+
+Table 2: Pairwise correlations of different functions classes computed according to Eq. 2. See Section D.2 for more details.
+
+|Tasks|Conjunctions|Disjunctions|Sparse Disjunctions|3-CNF|3-DNF|Majority|Integer-Threshold|Integer Halfspace|Parity-(10, 2)|Parity-20|
+|---|---|---|---|---|---|---|---|---|---|---|
+|VC Dimension|_O_(_n_)|_O_(_n_)|_O_(_k_log_n_)|_O_(_n_)|_O_(_n_)|_O_(_n_)|_O_(_n_)|_O_(_n_)|_O_(_k_log_n_)|_O_(_n_)|
+|Pairwise Correlation|95_._2_±_0_._07|95_._3_±_0_._08|77_._1_±_0_._01|51_._86_±_0_._29|50_._7_±_0_._26|20_._7_±_0_._1|0_._6_±_0_._21|0_._1_±_0_._14|0_._08_±_0_._03|0_._01_±_0_._03|
+
+## D.3 EXPLORING SAMPLE COMPLEXITY
+
+In this section, we explore the performance of Transformers when the number of examples during training is fixed. Recall that each training (or test) example _X_ = ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ) is created by sampling _m_ input points from the distribution _DX_ over inputs and sampling one target function from the distribution _DF_ over functions. For the experiments in Section 3, a fresh set of input points and functions are drawn during each training iteration.
+
+For example, while training Transformers for 20k steps for the task Conjunctions with batch size 64, the model essentially observes about 1.3M functions and input sequences. However, note that the likelihood of observing the same function during evaluation is extremely low since for 28 dimensions, the total number of Conjunctions is over 22 trillion.
+
+An interesting question is to understand how many examples Transformers need to generalize well in the in-context learning setting. Moreover, what is the effect of increasing the capacity of the model when the number of examples remains fixed? We explore these questions in this section.
+
+We consider Conjunctions where Transformers are effective in the vanilla setting. During training, we first sample a fixed number of examples _N_ of the form ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ) by sampling _N_ functions from the distribution _DF_ and sampling _N_ sequence of _m_ input points from the distribution _DX_ . All training iterations over the _N_ examples and during evaluation we sample fresh examples to estimate the accuracy of the model.
+
+21
+
+**==> picture [352 x 250] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Accuracy vs Sample Complexity vs Num of Dimensions Accuracy vs Num of Layers vs Num of Dimensions (Num of Samples = 4096) 1.00 1.00 0.95 40 0.95 40 0.90 35 0.90 35 0.85 30 0.85 30 0.80 0.80 0.75 25 0.75 25 0.70 20 0.70 20 0.65 0.65 0.60 15 0.60 15 0 2000 4000 6000 8000 10000 12000 14000 16000 2 4 6 8 10 12 14 16 Number of Samples Number of Layers Performance of Transformers on learning to learn Conjunctions with a finite number of The figures show the change in performance across various axes such as depth, number of examples, and number of dimensions in the input. Refer to Section D.3 for more details. Accuracy vs Sample Complexity vs Num of Dimensions Accuracy vs Num of Layers vs Num of Dimensions (Num of Samples = 4096) 1.00 1.00 0.95 40 0.95 40 0.90 35 0.90 35 0.85 30 0.85 30 0.80 0.80 0.75 25 0.75 25 0.70 20 0.70 20 0.65 0.65 0.60 15 0.60 15 0 2000 4000 6000 8000 10000 12000 14000 16000 2 4 6 8 10 12 Number of Samples Number of Layers Num of Dimensions Num of Dimensions Mean Validation Accuracy Mean Validation Accuracy Num of Dimensions Num of Dimensions Mean Validation Accuracy Mean Validation Accuracy **----- End of picture text -----**
+
+Figure 14: Performance of Transformers on learning to learn Conjunctions with a finite number of examples. The figures show the change in performance across various axes such as depth, number of examples, and number of dimensions in the input. Refer to Section D.3 for more details.
+
+Figure 15: Performance of LSTMs on learning to learn Conjunctions with a finite number of examples. The figures show the change in performance across various axes such as depth, number of examples, and number of dimensions in the input. Refer to Section D.3 for more details.
+
+We evaluate the model with _N ∈{_ 128 _,_ 512 _,_ 1024 _,_ 2048 _,_ 4096 _,_ 8192 _,_ 16384 _}_ examples. We test the models across tasks with dimensions _d ∈{_ 14 _,_ 28 _,_ 42 _}_ . We find that neural networks such as Transformers and LSTMs are quite sample-efficient in terms of solving Conjunctions task where they achieve close to perfect accuracy even with 4096 examples. Figure 14 (left) and Figure 15 (left) depict the mean accuracy of Transformers and LSTMs across various number of examples _N_ and task dimensions _d_ . Note the mean accuracy during evaluation here is the mean of the accuracy of all _m_ points in an example and not the accuracy on the last point. For instance, if we test on _K_ = 1280 examples to estimate the accuracy and each example has _m_ = 70 points then the mean accuracy is computed as _K_[1] � _Ki_ =1 � _m_ 1 � _mk_ =1[I][[] _[M]_[(] _[P]_[ (] _k[i]_[)][) =] _[ f][i]_[(] **[x]** _[k]_[)]] �. The mean accuracy across all in-context examples will always be lower than 100% since the model will make mistakes in the first half of the examples before converging to a near-perfect accuracy for tasks like Conjunctions.
+
+It is also interesting to see that increasing the capacity of the model has a negligible effect on the performance of the model. Figure 14 (right) shows the mean accuracy of Transformers across different depths (number of layers) when trained on 4096 examples.
+
+## E TRANSFORMERS AS LEARNING ALGORITHMS
+
+As described in Section 2, in this line of work each sequence of examples or prompt ( **x** 1 _, f_ ( _**x**_ 1) _, . . . ,_ **x** _m, f_ ( _**x** m_ )) can be seen as a learning problem. In the traditional statistical learning framework, while learning from examples labelled by a particular function _f ∈F_ (Conjunction), the goal of a learning algorithm is to find the target hypothesis function _f ∈F_ . In this case, during the meta-learning stage, we are optimizing a Transformer (or other networks) to find a learning algorithm rather than a target function. Hence, in that sense, the target function in this meta-learning-like setup is the optimal learning algorithm for the class of functions. It is natural to wonder how Transformers fare against the optimal learning algorithms for the problems considered in this work and moreover, if they are theoretically capable of representing and learning such learning algorithms. While the optimal learning algorithms for all classes considered here may not be known, there are some known algorithms for learning classes such as Conjunctions and Disjunctions which are in some sense
+
+22
+
+near-optimal. In this section, we compare Transformers against those algorithms and also show that they are capable of representing such algorithms.
+
+Classes such as Conjunctions and Disjunctions are known to be efficiently PAC-learnable with _O_ ( _n_ ) examples. The classical algorithm (see Algorithm 1) for learning Conjunctions works as follows, it starts with a hypothesis _h_ which has all 2 _n_ literals ( _h_ = _z_ 1 _∧ z_ ¯1 _∧ z_ 2 _∧ z_ ¯2 _∧· · · ∧ zn ∧ z_ ¯ _n_ ). It goes through each example and only checks the positive examples. For each positive example, it finds the literal which are not satisfied and drops those literals from the hypothesis _h_ . This is because we know that if a literal is not satisfied and the label of the input is 1 then the target conjunction does not have that literal. For any set of examples, this algorithm returns a conjunction consistent with all examples and PAC-learns the class Conjunctions. A similar algorithm can be derived for Disjunctions as well. See Valiant (1984) for more details.
+
+**Algorithm 1** CONJUNCTIONS Classical Algorithm
+
+|**Alg**|**orithm 1**CONJUNCTIONS Classical Algorithm|**orithm 1**CONJUNCTIONS Classical Algorithm||
+|---|---|---|---|
+|1:|**Input:** _n_,_S_ = ((**x**1_, y_1)_, . . . ,_(**x**_m, ym_))|||
+|2:|**Initialize:**|_h_=_z_1_∧_¯_z_1_∧z_2_∧_¯_z_2_∧· · · ∧zn ∧_¯_zn_||
+|3:|**for**_i_= 1_, ._|_. . , m_**do**||
+|4:|Pick(**x**_i, yi_)from_S_|||
+|5:|**if**_yi_ =|1**then**|_▷_Ignore negative examples|
+|6:|**for**|_j_ = 1_, . . . , n_**do**||
+|7:||**if**_xi,j_ = 0**then**||
+|8:||Drop_zi_ from_h_|_▷j_th bit of_i_th instance is 0|
+|9:||**else**||
+|10:||Drop ¯_zi_ from_h_|_▷j_th bit of_i_th instance is 1|
+|11:||**end if**||
+|12:|**end for**|||
+|13:|**end if**|||
+|14:|**end for**|||
+|15:|**Output:** _h_|||
+
+Figure 13 compares the performance of the classical algorithm for Conjunctions (Algorithm 1) and Disjunctions with the performance of Transformers. There are a few things to note here: (a) These classical algorithms are near-optimal and are guaranteed to work for any distributions over the input. They are optimal in the sense that the lower bound on the sample complexity of learning Conjunctions/Disjunctions is _O_ ( _n_ ) and these PAC-learn these classes with _O_ ( _n_ ) samples. (b) Transformers can perform better on the first few examples because they have knowledge about the distributions of inputs and functions since they are exposed to it in the meta-learning stage. So in that sense, they are closer to the Bayes-optimal-estimator (Ahuja et al., 2023) than the classical algo in their behaviour. However, unlike the provable PAC-learning algorithms, the algorithms learned by Transformers are not guaranteed to work for arbitrary distributions. (c) Both Transformers and the classical algo reach (near) perfect accuracy after observing almost the same number of _O_ ( _n_ ) examples.
+
+## E.1 REPRESENTATIONAL COMPLEXITY OF LEARNING CONJUNCTIONS
+
+Interestingly, we can show that Algorithm 1 can represented as a Boolean circuit in AC[0] . The class AC[0] contains Boolean circuits with constant depth and a polynomial number of AND ( _∧_ ), OR ( _∨_ ), and NOT ( _¬_ ) gates.
+
+**Lemma E.1.** _The classical PAC-learning algorithm for learning Conjunctions (Algorithm 1) can be represented as a Boolean circuit in AC_[0] _._
+
+_Proof._ Essentially what the algorithm is doing is identifying which literal ( _zi_ or _z_ ¯ _i_ ) is definitely not in the target conjunction. The evidence for _zi_ not being in the target is a positively labelled example **x** , where _xi_ = 0, i.e. if the _i_ -th bit is 0, any conjunction that has _zi_ as a literal cannot be satisfied by that assignment. Similarly, _z_ ¯ _i_ cannot be in the target conjunction if there is a positively labelled example **x** , with _xi_ = 1. So suppose we ignore the negative examples, and let _S_[+] = _{_ **x** _|_ ( **x** _, y_ ) _∈ S, y_ = 1 _}_ ,
+
+23
+
+then the truth value of,
+
+**==> picture [36 x 24] intentionally omitted <==**
+
+determines whether the literal _zi_ is in the hypothesis conjunction _h_ output by the algorithm. Likewise, the truth value of,
+
+**==> picture [36 x 23] intentionally omitted <==**
+
+determines whether the literal _z_ ¯ _i_ is in the hypothesis conjunction _h_ output by the algorithm. Thus, using one layer of AND gates, one can determine which literals the algorithm picks to be in the hypothesis conjunction _h_ . Let _P_ 1 _, . . . , Pn, N_ 1 _, . . . , Nn_ denote the outputs of these AND gates, i.e. _Pi_ ( _Ni_ ) indicates whether the algorithm puts the literal _zi_ ( _z_ ¯ _i_ ) in its output hypothesis _h_ . Then to make a prediction on a new example _**x**_ , the prediction of the algorithm’s output hypothesis on this new example is given by the truth value of,
+
+**==> picture [118 x 28] intentionally omitted <==**
+
+Thus, the entire process of running the algorithm to obtain _h_ , and using _h_ to predict the label of a new example **x** can be done using an AC[0] circuit of depth at most 3.
+
+Recent works (Angluin et al., 2023) have shown that hard-attention Transformers can represent functions in the class AC[0] and since we find that the learning algorithm for Conjunctions is in AC[0] (Lemma E.1), it follows that even hard-attention Transformers can represent the algorithm for learning Conjunctions.
+
+## E.2 HOW DO TRANSFORMERS LEARN CONJUNCTIONS?
+
+We explore how Transformers could be (in-context) learning Conjunctions in this section. To simplify things, we will focus on Monotone-Conjunctions which contain only positive literals and no negative literals. That is, a function such as _f_ = _z_ 1 _∧ z_ 3 is in the class of Monotone-Conjunctions but _z_ ¯1 _∧ z_ 3 is not since _z_ ¯1 is a negative literal.
+
+**Approach.** The key observation behind our approach to probing Transformers is the observation that Monotone Conjunctions can be exactly learned by membership queries alone. In other words, if there is a monotone-conjunction _f_ over _{_ 0 _,_ 1 _}[n]_ which is unknown but we can query the label _f_ ( **x** ) for any input **x** , then we can exactly identify the Conjunction by querying _n_ examples.
+
+The _n_ examples **e** 1 _, . . . ,_ **e** _n_ will be such that the example **e** _i_ has value 0 at the _i_ th coordinate and value 1 everywhere else. For instance, over 4 dimensions, the vector **e** 1 = [0111] _,_ **e** 2 = [1011] and so on. See that for any unknown conjunction _f_ over _{_ 0 _,_ 1 _}[n]_ , if we query the function for input **e** _i_ and the label _f_ ( **e** _i_ ) = 0, then it implies that the literal _zi_ is in the conjunction _f_ . Hence, by querying all _n_ such examples **e** 1 _, . . . ,_ **e** _n_ , we can identify any unknown monotone conjunction.
+
+**Interpreting Transformers.** We train the Transformers for the class of monotone conjunctions by sampling prompts and optimizing the model similar to previous experiments (as described in Section 2). We are interested in figuring out what kind of algorithm it applies to learn conjunctions in-context. During evaluation, the model _M_ sequentially receives prompts of the form _Pk_ = ( **x** 1 _, y_ 1 _, . . . ,_ **x** _k−_ 1 _, yk−_ 1 _,_ **x** _k_ ) for 1 _≤ k ≤ m_ . After receiving each prefix _Pk_ , we evaluate the model _M_ on the _n_ examples **e** 1 _, . . . ,_ **e** _n_ to identify the function used by the Transformer model _M_ . More specifically, let _Pk_[(] _[i]_[)] = ( **x** 1 _, y_ 1 _, . . . ,_ **x** _k, yk,_ **e** _i_ ), then for each _k ∈_ [0 _, . . . , m_ ], we evaluate the model on _Pk_[(1)] _[, . . . , P] k_[ (] _[n]_[)] .
+
+See that if the Transformer model _M_ makes its prediction based on some unknown Conjunction, then we can recover it during each step of in-context learning. However, it is not necessary that the model _M_ predicts according to a conjunction and may be using some other form of function in which case this approach is not guaranteed to work. Note that, since Transformers reach perfect accuracy after observing a certain number of examples (Figure 6 top-left) and also achieve that on
+
+24
+
+**==> picture [356 x 157] intentionally omitted <==**
+
+Figure 16: Extracting the target (Mono) Conjunction from Transformer during in-context learning. The upper row depicts Transformer’s performance across in-context examples and the lower row shows the number of literals in the conjunction extracted from the Transformer at that point. The values are averaged across 1k prompts. The three columns are for three different distributions over inputs (at test time). First column: _≈_ 30% of inputs in the prompt are positive, second: _≈_ 70% of inputs are positive, third: _≈_ 15% of inputs are positive.
+
+out-of-distribution examples, it is reasonable to expect it to predict according to some underlying conjunction as it sees more examples. Nonetheless, we apply the approach described above to extract the target Conjunction at each step of the in-context learning process.
+
+**Learning Mono Conjunctions.** For Monotone-Conjunctions, the PAC-learning algorithm is a simpler version of Alg. 1. It starts with a conjunction with all literal _h_ = _z_ 1 _∧ z_ 2 _· · · ∧ zn_ and while going through _m_ examples, it only looks at the positive examples. For any positively labelled example _xi_ , if any coordinate _xi,j_ = 0, then it drops the literal _zj_ from the hypothesis _h_ and outputs _h_ after going through all _m_ examples.
+
+**Results.** We find that Transformers behave in a manner very similar to the algorithm described above but not in an exact way. We evaluate the model on 1k prompts containing 70 examples each and extract the literals at each step beginning from no examples to all 70 examples. We observe that in the beginning, the target function has all literals similar to the classical algorithm. Moreover, as the model observes more examples, the number of literals decreases monotonically and finally converges to the correct target conjunction which was used to label the examples in the prompt. However, unlike the classical algorithm the Transformer model does not drop literals right after seeing a positive example, we find that it drops a larger number of literals together after observing a series of positive examples.
+
+Figure 16 depicts the number of literals in the extracted conjunction across in-context examples for three different input distributions. The model was trained according to the first distribution where approximately 30% of the examples in the prompt are positively labelled and then tested on three different distributions. Similar to the classical algorithm, the model seems to start with all literals and then gradually drops literals as it sees more examples. Upon manual inspection, we found that the model does not always drop literals right when it sees a positive example. At the same time, as can be seen from Figure 16, when the prompt contains more positive examples (second column), the model drops literals more quickly and reaches perfect accuracy with fewer examples overall. On the other hand, with fewer positive examples, the Transformer seemingly drops literals later (third column in Figure 16) and needs more examples to reach near-perfect accuracy. This behaviour is similar to the classical algorithm. Additionally, we compute the number of times the Transformer model drops an incorrect literal (a literal which is present in the target conjunction) at any point in time during the in-context learning phase. We find that across all three input distributions, it drops a literal incorrectly in less than 0 _._ 1% out of 1k prompts containing 70 examples each. In over 95% of the prompts, it converges to the correct target conjunction. Our results suggest that Transformers implement an algorithm akin to the classical one, initially starting with all literals and then progressively dropping
+
+25
+
+**==> picture [377 x 77] intentionally omitted <==**
+
+**----- Start of picture text -----**
+MLP Grad Mean ATTN Grad Mean Overall loss 0.200 0.200 0.8 0.1750.150 ConjunctionParity-(10,2) 0.1750.150 ConjunctionParity-(10,2) 0.70.6 0.125 0.125 0.5 0.100 0.100 0.4 0.075 0.075 0.3 0.050 0.050 0.2 0.0250.000 0.0250.000 0.10.0 ConjunctionParity-(10,2) 0 5000 10000 15000 20000 25000 30000 0 5000 10000 15000 20000 25000 30000 0 20000 40000 60000 80000 100000 Training Step Training Step Training Step Loss Gradient Gradient **----- End of picture text -----**
+
+Figure 17: _Left:_ Figure depicting the mean of the gradients of parameters such as MLP and attention parameters across different iterations of training on Parity-(10, 2) and Conjunctions. _Right:_ The loss of Transformers on Conjunctions vs Parity-(10, 2) across different iterations of training.
+
+them as they encounter more and more positive examples. However, deviations from the classical algorithms exist which remain to be understood.
+
+## F CURIOUS CASE OF LEARNING PARITIES
+
+An interesting and somewhat surprising phenomenon is the failure of Transformers and other architectures on the class of Parities and sparse Parities. In contrast to other function classes where models are able to learn some learning algorithm, for Parities, they do not seem to be able to find any kind of learning algorithm that performs beyond chance-level accuracy.
+
+We examine the gradients and the model parameters during the training process. In Figure 17, we show the mean of gradients for all parameters of attention and feedforward networks in the Transformer. Observe that the gradients are very close to 0 after a few iterations of training. Note that this is in contrast to what we observe while training Transformers for tasks such as Conjunctions where gradients are not so close to 0. However, the exact reason why Transformers fail to learn anything is unclear and is left as an open problem.
+
+The problem of learning Parities and Sparse Parities have well-known hardness results Kearns (1998) in the Statistical Query framework indicating that Parities require 2[Ω(] _[n]_[)] queries and Sparse Parities require _n_[Ω(] _[k]_[)] queries (where _k_ is the number of relevant bits). Gradient-based methods are considered to be only as powerful as SQ-learning algorithms in finite-precision settings and hence any model such as Transformers applying a gradient-based algorithm to learn in-context would require an exponential number of steps to predict accurately. For sparse parities PARITY-(10 _,_ 2), we provide more than _n[k]_ examples in the prompt and hence a model applying gradient-based learning such as FFNs can solve it (see Fig. 18 Left). For instance, feedforward networks trained with gradient descent on the same number of examples as provided to Transformers for ICL are able to achieve near-perfect accuracy. However, Transformers and other architectures do not seem to make any progress during their training process. Also, note that the hardness of learning Parities primarily holds for uniform distribution over inputs and does not apply to input sets with teaching sequences which are no longer uniform.
+
+Parities are PAC-learnable using the Gaussian elimination algorithm (Fischer & Simon, 1992) with _O_ ( _n_ ) examples and if any of the architectures could learn to implement the algorithm, then they would have been able to solve it with _O_ ( _n_ ) examples.
+
+**Transformers vs LSTMs.** An interesting difference we observed is that for the PARITY-(10 _,_ 2) problem, LSTMs achieve 100% accuracy if the test examples are labelled by the same set of functions as the training examples. This is not true for Transformers. For the PARITY-(10 _,_ 2) problem, there are only 45 different functions. For the results in Table 1, we ensure that the training examples are labelled by 23 of those functions and the test examples are labelled by the remaining and unseen functions. However, if we uniformly sample a function out of the 45 functions during both training and evaluation, then we observe that LSTMs achieve perfect accuracy during evaluation. This is interesting since the sequence of input points _x_ 1 _, . . . , xk_ are new during evaluation and hence is not a clear case of memorization. On the other hand, since they do not generalize to unseen functions, it is difficult to claim that LSTMs can learn sparse parities in-context.
+
+**Curriculum learning.** For Sparse Parities, we also tried curriculum learning similar to Garg et al. (2022) but did not observe any improvement. In particular, we trained Transformers for the problem
+
+26
+
+**==> picture [293 x 105] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Parity-(10, 2) - FFN FFN on Teach Conjunction - n_dims 75 1.0 1.0 0.8 0.8 0.6 0.6 0.4 FFN+GD_1FFN+GD_2 0.4 FFN+GDTransformer 0.2 NN averaging_ n=3 0.2 NN_n=3 averaging 0.0 nullclassifier 0.0 nullclassifier 0 20 40 60 80 100 120 140 30 40 50 60 70 80 90 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 18: Left: Performance of Feedforward networks (FFN) trained with gradient descent on Parity-(10, 2) with the same number of examples as provided to models in ICL setting. _Right:_ Performance of FFN on Teach Conjunction task.
+
+of PARITY-(14 _,_ 2). In the curriculum learning setup, the input dimension is initially smaller, i.e., 9 and it increases incrementally by 1 after every 50k steps. Hence, effectively for the first 50k steps, the model is trained for PARITY-(9 _,_ 2), then PARITY-(10 _,_ 2) and so on eventually ending at 14 (trained 250k steps after reaching 14). The model is trained for 500k steps in total. The number of examples in the prompt _m_ is 120 in the beginning and increases by 20 every 50k steps and eventually stays at 200. We start at input dimension 9 because below that the total number of Boolean inputs is very small and the prompt will cover over half of all possible inputs. We do not find any improvement with the curriculum learning setup as well. The loss curve is identical to the one in Figure 17 (right) and is hence omitted.
+
+**Performance of Nearest Neighbours.** In the case of sparse parities, nearest neighbour approaches can do quite well, particularly for relatively small values of _k_ and _n_ . For instance, suppose there are only two relevant bits, say _k_ = 2, then for any fixed point **x** , conditioned on the relevant bits matching, the expected distance to a random point is ( _n −_ 2) _/_ 2. On the other hand, if the relevant bits don’t exactly match, then the expected distance to a random point is at least ( _n −_ 2) _/_ 2 + 1. Since the probability that the two relevant bits match is 1 _/_ 4, we expect with a relatively high probability that the nearest neighbour would match the relevant bits. As a result the nearest neighbour classifier will have a reasonably high accuracy. We observe that the performance of LLMs on this task is better than random, and comparable to nearest neighbour.
+
+## G TEACHING SEQUENCE EXPERIMENTS: ADDITIONAL DETAILS
+
+**Teaching Sequences.** The concept of teaching sequences and teaching dimensions was introduced in Goldman & Kearns (1995). For any class of functions _F_ , the teaching sequence of a function _f_ in _F_ is a sequence of labeled instances ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** _m,_ **y** _m_ ) such that it unambiguously identifies _f_ in _F_ – only the function _f_ is consistent with the sequence of labeled instances. Let T( _f_ ) be the set of all teaching sequences for the function _f_ . The teaching dimension (Goldman & Kearns, 1995) of a function class is defined as, TD( _F_ ) = max _f ∈F_ (min _τ ∈_ T( _f_ ) _|τ |_ ).
+
+**Conjunctions and Disjunctions.** The teaching sequence for Conjunctions can be created as follows. Suppose _f_ is a conjunction of _k_ literals. We will create _k_ + 2 points. For the first two points, the variables corresponding to all literals in the Conjunction are set to True, that is, they are 1 for positive literals in the Conjunction and 0 for negative literals. In the first point, all variables that do not affect the output of the function are set to 0 and in the second point, all of them are set to 1. The next _k_ where the variable ofpoints will correspond to each of the literal in _x_ at _i_ is 0 if _zi_ is in the Conjunction and is _f_ . For each literal 1 _z_ is _i_ , we create a point _z_ ¯ _i_ is in the Conjunction. _x ∈{_ 0 _,_ 1The _}[n]_ variable corresponding to every other literal in _f_ is set to 1 if it is a positive literal and is 0 if it is a negative literal. The variables which do not affect the output of the function are all set to 0. Essentially, these examples show that even if the variables corresponding to every other literal in the function are set to true, the function value will still be 0 because one of the literal values is set to false. The teaching sequences for Disjunctions are created in a similar manner.
+
+See that since for every Conjunction or Disjunction, the length of the teaching sequence is _k_ + 2, the teaching dimension is _n_ + 2 and for each function with _k_ literals, the exact function can be identified
+
+27
+
+**==> picture [362 x 96] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Teach Conjunction - n_dims 75 Teach DNF - n_dims 50 Teach Parity - n_dims 20 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 Transformer Transformer Transformer 0.2 NN averaging_ n=3 0.2 NN averaging_ n=3 0.2 NN averaging_ n=3 0.0 nullclassifier 0.0 nullclassifier 0.0 nullclassifier 0 20 40 60 80 0 20 40 60 80 0 10 20 30 40 50 In-context examples In-context examples In-context examples Mean Accuracy Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 19: Performance of Transformers on various tasks with Teaching Sequences. The plots depict the performance of models on all examples. Note that, most examples in the teaching sequence have the same label and hence even the Nullclassifier has near-perfect accuracy. The plot values up to the expected length of the teaching sequences are omitted to avoid confusion. Refer to Section G.1 for more details.
+
+with _k_ + 2 points in the prompt example or a training set. Note that the sample complexity of _O_ ( _n_ ) for Conjunctions or Disjunctions is with respect to PAC-learning in the sense that with _O_ ( _n_ ) points, one could guarantee that the error will be within some _ϵ_ for arbitrary distributions. However, the exact number of samples will depend on the value of _ϵ_ and could be much larger than _k_ or _n_ when the error _ϵ_ is required to be very small.
+
+**DNFs and CNFs.** For simplicity let’s consider Monotone 3-DNFs which only have positive literals. For each clause or Conjunction in the DNF, we create _k_ + 1 points. The first point is such that variables corresponding to every literal in the clause are set to 1 and all other variables are 0. The other _k_ points are created as follows. For every literal in the clause, there is one point where the variable corresponding to the literal is 0 and the variables corresponding to other literals in the clause are set to 1. The variables which are not in the clause are set to 0. For instance if the input is over _{_ 0 _,_ 1 _}_[4] and the clause is _x_ 1 _∧ x_ 3, then the three points corresponding to the clause will be [1010] _,_ [0010], and [1000]. The teaching sequence for the 3-DNF is the union of the teaching sequence of its three clauses and hence will have size _l_ + 3 where _l_ is the total number of literals in all clauses. The teaching sequence for 3-CNF can be created in a similar manner.
+
+**Sparse Parities.** For sparse parities with _k_ relevant bits, the teaching sequence has _k_ points where in each point the variable corresponding to one of the relevant bits is set to 1 and every other bit in the input is set to 0. Note that, this is a teaching sequence of the class PARITY-( _n, k_ ) which have exactly _k_ relevant bits. This would not work as a teaching sequence for the entire set of Parity functions PARITY- _n_ .
+
+For further details on teaching sequences, see Goldman & Kearns (1995).
+
+## G.1 ADDITIONAL DISCUSSION
+
+**Performance of FFN.** Figure 18 (right) depicts the performance of feedforward networks trained with gradient descent on examples with the teaching sequence. FFNs require a larger number of additional points apart from the teaching sequence to predict with high accuracy. This is not quite surprising as FFNs+SGD are quite general-purpose learning algorithms. At the same time, it is difficult to integrate such problem-specific knowledge into them so that they perform more optimally.
+
+**Additional Details of Plots.** Figure 19 depicts the performance of Transformers and baselines on all examples including the teaching sequences. Most examples in the teaching sequence have the same label and hence even the Nullclassifier obtains near-perfect accuracy for some cases. If the structure of the teaching sequence is known and it is known that the first _t_ examples will be the teaching sequence, then it is also possible to predict the labels of the teaching sequence correctly. For sparse parity, all examples in the teaching sequence have the label 1. For Conjunctions and DNFs, only a couple of examples have the label 1 and all other examples have the label 0. Such examples are visibly distinct and hence it is straightforward to predict their label if it is known that they are part of the teaching sequence. The plot values up to teaching sequences are omitted in the main paper to avoid confusion since they do not reflect the effectiveness of the model or the baselines on the tasks.
+
+28
+
+**==> picture [304 x 118] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Teach Conjunction Teach Parity-(20, 3) All inputs permuted - n_dims 28 All inputs permuted 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 TF - permutedTF - Vanilla 0.2 TF - permutedTF - Vanilla TF - Teach TF - Teach 0.0 nullclassifier 0.0 nullclassifier 0 10 20 30 40 50 60 70 0 20 40 60 80 100 120 In-context examples In-context examples Mean Accuracy Mean Accuracy **----- End of picture text -----**
+
+Figure 20: Performance of Transformers on prompts with a permutation of teaching sequence examples and random examples. On Sparse Parities, the behaviour is the same as the vanilla case whereas for Conjunctions, the performance improves for prompts with 70 examples. The setting becomes closer to the vanilla case as the prompt length goes higher. See Section G.1 for more details.
+
+**Performance on OOD functions.** We explored the performance of Transformers on out-ofdistribution prompts for Conjunctions where the teaching sequences are typically shorter or longer compared to the distribution during training. The distribution over Conjunctions during training is the same as the vanilla setting described in Section C.2. The probability of any literal (or its negation) being in the target conjunction is 30% and hence for inputs over _n_ = 75 dimension, the expected length of the teaching sequence is 27. We evaluated the trained Transformer on prompts from two different distributions. In the first distribution, the probability of literals being in the Conjunction is 60% and hence the expected length of teaching sequences is 47. Similarly, in the other distribution, the probability of literals being in the Conjunction is 15% and hence the expected length of teaching sequences is _≈_ 13. In both cases, the behaviour of the trained Transformer is identical to the in-distribution setting. The evaluation curve is identical to Figure 19 and is hence omitted.
+
+**Permuted Examples.** We have considered two types of prompts: (a) prompts with random examples sampled from some distribution and (b) prompts which begin with a teaching sequence followed by random examples. We explore the performance of Transformers on another type of prompt which includes both examples from teaching sequences and random samples. In this third type (c) called ’permuted’, for a prompt with _m_ total examples, we create the teaching sequence with _t_ examples and sample _m − t_ examples from a distribution (given in Section C.2) and permute the entire set of inputs to create the prompt. In other words, the examples in the teaching sequence are present in the prompt but not necessarily in the beginning anymore.
+
+Figure 20 depicts the performance of Transformers on the three types of prompts respectively (a) prompts with random examples (marked vanilla), (b) prompts with teaching sequence in the beginning (marked teach) and (c) prompts with a permuted combination of teaching sequence and random examples (marked permuted). Without the teaching sequence in the beginning one would naturally expect the setting to be closer to the vanilla case – which happens in the case of Sparse Parities (Figure 20). For Conjunctions, the behaviour is relatively more interesting. Unlike Sparse Parities, some examples of the teaching sequence of Conjunctions are more informative than others. With 70 examples, Transformers in the vanilla setting reach near-perfect accuracy with about 30 examples. Since the likelihood of those couple of examples in the teaching sequence being in the first 30 examples is reasonably high, Transformers with such permuted prompt examples seem to converge to high accuracy faster than the vanilla case. As the size of the prompt is increased from 70, the behaviour becomes closer to the vanilla case since the probability of the informative examples being in the first 30 decreases.
+
+## H ADDITIONAL DETAILS OF EXPERIMENTS WITH LLMS
+
+## H.1 ADDITIONAL DETAILS OF FROZEN GPT EXPERIMENT
+
+In Section 5, we discuss the setup and results for experiments with pretrained models. We provide additional details of the experiments here.
+
+29
+
+You are given some examples of inputs and their corresponding labels. You need to learn the underlying boolean function represented by these input-label examples. Predict the label (either 0 or 1) for the final input.
+
+Input: 0 0 0 1 0 Label: 0 Input: 1 0 0 0 1 Label: 0 Input: 0 0 0 0 1 Label: 0 (. .. more exemplars ...) Input: 1 1 1 0 1 Label: 1 Input: 1 1 1 0 0 Label: 0 Input: 0 1 1 0 0 Label:
+
+Figure 21: An example of a prompt provided to the LLM in the direct evaluation experiments. Here, the model has to learn a function from the Majority class in 5 dimensions and predict the label for the last input. The prompt consists of a natural language instruction and _k_ example points of the function.
+
+In Section 3 and 4 as well as several prior works (Garg et al., 2022; Ahuja et al., 2023; Bai et al., 2023), experiments were conducted in the meta-learning-like setup in order to understand the incontext learning abilities of Transformers. With the experiments with frozen pretrained models, we aim to explore if pretrained models learn any mechanism that is useful for solving tasks in the meta-learning-like stylised setup.
+
+The experiments follow the same framework as described in Section 2 with the exception the weights of the Transformers are not modified or updated during the training process apart from the input embedding layer and the final output layer. We use the GPT-2 XL (1.5B parameters) model from Hugging Face (Wolf et al., 2020).
+
+In the stylised setup, since each Boolean input _x ∈{_ 0 _,_ 1 _}[n]_ is provided as a single token, the original embeddings and tokenizer of the pretrained model cannot be used for prediction. Hence, we replace the original embedding layer with a 1-layer ReLU FFN: _{_ 0 _,_ 1 _}[n] →_ R[width] which produces an embedding for each _x ∈{_ 0 _,_ 1 _}[n]_ . Similarly, we add an output FFN which predicts the final output given the vector produced by the pretrained model.
+
+Similar to other experiments we train the model on Conjunctions and the nearest neighbour task by sampling functions and input points to create training examples. The training process is used to update the embedding and output layer and the weights of the Transformers are fixed.
+
+## H.2 DETECTING NEAREST NEIGHBOUR HEADS IN GPT-2
+
+In Section 5.1, we discussed that we were able to discover attention heads in the GPT-2 model that very closely implemented the nearest neighbours algorithm. In this section, we provide more details about that experiment.
+
+Our methodology for detecting attention heads that directly implement the nearest neighbours algorithm is similar to the one used by Olsson et al. (2022) for finding induction heads. While training the model on the Nearest Neighbours task, for each attention head in the model, we compute a ‘nearestneighbours score (nn-score)’. After every 500 training steps, we provide the model with a batch of 100 examples, each example _ei_ consisting of 80 points, i.e., _ei_ = ( **x** 1 _,_ **y** 1 _, . . . ,_ **x** 80 _,_ **y** 80). The nn-score is the attention paid to **y** _j_ for predicting **y** _k_ (0 _< j < k_ ) where, _j_ = arg max _i[k]_ =0 _[−]_[1] _∥_ **xx** _i[T] i∥∥_ **[x] x** _[k] k∥_ is � �
+
+the index of the nearest neighbour of **x** _k_ , averaged for the last 40 points (i.e., _k >_ 40) over all 100
+
+30
+
+**==> picture [407 x 131] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Parity n_dims=5 Parity n_dims=7 Parity n_dims=15 1.0 1.0 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0.0 0.0 0.0 0 10 20 30 40 50 0 10 20 30 40 50 0 20 40 60 80 100 In-context examples In-context examples In-context examples LLaMA-2-7B LLaMA-2-13B LLaMA-2-70B GPT-3.5-Turbo GPT-4 NN_n=3_uniform nullclassifier Mean accuracy Mean accuracy Mean accuracy **----- End of picture text -----**
+
+Figure 22: Results with the direct evaluation of LLMs at inference time across varying dimensions for the PARITY- _n_ task.
+
+examples. If the nn-score for a particular head is greater than 0.5, we label that head as a ‘nearest neighbour head’. In our experiments with frozen GPT on the Nearest Neighbours task, we were able to consistently find 8-10 nearest neighbour heads across multiple runs.
+
+## H.3 ADDITIONAL DETAILS AND RESULTS OF DIRECT EVALUATION EXPERIMENT
+
+In Section 5, we described the setting of direct evaluation of LLMs. We provide additional details regarding the experimental setup below.
+
+The main prompt (see Figure 21 for an example) comprises of an instruction in natural language followed by a series of _k_ example points ( **x** _i,_ **y** _i_ ), where **x** _i ∈{_ 0 _,_ 1 _}[d]_ is provided as a sequence of tokens _x_ 1 _, . . . , xd_ , _xj ∈{_ 0 _,_ 1 _}_ and **y** _i ∈{_ 0 _,_ 1 _}_ is also provided as a single token. The model’s goal is to predict the correct label **y** _k_ +1 _∈{_ 0 _,_ 1 _}_ for the query point **x** _k_ +1. For a particular function, we sample a sequence of _n_ points and prompt the model with _k < n_ points as in-context exemplars of the function. We call the model multiple times, increasing _k_ by a value of 5 every time. The prompt in each call consists of the first _k_ points (5 _< k < n_ ) from the _n_ -point sequence, and asks to predict the ( _k_ + 1)[th] point. We repeat this experiment with 100 different functions[3] from the same function class.
+
+We experiment with three classes of functions: Conjunction, Majority, and Parity. We consider dimension _d ∈{_ 5 _,_ 7 _,_ 15 _}_ and set the number of points _n_ = 50 when _d <_ 10 and _n_ = 100 when _d ≥_ 10.
+
+**Additional Results.** The results of evaluating LLMs directly on the Parity task are provided in Figure 22. We also experimented with LLaMA-2 models of smaller scale as well as GPT-2 as shown in Figure 23. Our results seem to indicate that model scale seems to play some role in the ability of LLMs to implement learning algorithms. This can be seen from the performance of the pre-trained GPT-2 model, which fails on both tasks even for 5 dimensions, and the (gradual) increase in performance as we increase the size of the LLaMA models. Also, it is quite surprising to see that even smaller LLaMA models are also able to achieve nontrivial levels of performance for both tasks.
+
+## I IMPLEMENTATION DETAILS
+
+All of our implementations for experiments are based on PyTorch (Paszke et al., 2019). For our experiments with Transformers trained from scratch, we use the Huggingface Transformers library (Wolf et al., 2020) and our own custom implementation. For recurrent models such as LSTMs, we use PyTorch’s inbuilt implementation. For Hyena (Poli et al., 2023) and DSS (Gupta et al., 2022), we adapt the official implementation by the authors for our experimental setting. For RetNet (Sun et al., 2023), we use our own implementation.
+
+> 3It is prohibitively expensive to experiment with a very high number of functions for the OpenAI models, so we limit the number of functions to 100. We average over 2000 different functions for the baselines and 1000 different functions for the LLaMA-2 models for more robust results.
+
+31
+
+**==> picture [354 x 170] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Conjunction n_dims=5 Conjunction n_dims=7 Conjunction n_dims=15 1.0 1.0 1.0 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 Majority n_dims=5 Majority n_dims=7 Majority n_dims=15 1.0 1.0 1.0 0.9 0.9 0.9 0.8 0.8 0.8 0.7 0.7 0.7 0.6 0.6 0.6 0.5 0.5 0.5 0.4 0.4 0.4 0.3 0.3 0.3 0 10 20 30 40 50 0 10 20 30 40 50 0 20 40 60 80 100 In-context examples In-context examples In-context examples LLaMA-2-7B LLaMA-2-13B LLaMA-2-70B GPT-2 NN_n=1_uniform nullclassifier Mean accuracy Mean accuracy Mean accuracy Mean accuracy Mean accuracy Mean accuracy **----- End of picture text -----**
+
+Figure 23: Results with direct evaluation for LLaMA models of different scales and GPT-2. The _top_ row shows the performance across varying dimensions for the Conjunction task while the _bottom_ row shows the performance for the Majority task.
+
+||**Hyperparameter**|Transformer and others|LSTM|
+|---|---|---|---|
+|D|model/Hidden Size|[256, 512]|[64, 512]|
+||Heads|[4, 8 ]|-|
+||Order|[2, 3]|-|
+||Number of Layers|[1, 16]|[1, 8]|
+||Learning Rate|[1e-2, 1e-5]|[1e-2, 1e-5]|
+|Position Encoding Scheme||[Learnable, Absolute]|-|
+
+Table 3: Different hyperparameters and the range of values considered for each of them. The hyperparameter _Heads_ is only relevant for Transformers and RetNets. The hyperparameter _Order_ is only relevant for Hyena. See Section I for more details.
+
+All our experiments were conducted using 16 NVIDIA Tesla V100 GPUs each with 16GB memory. For each dataset, we extensively tune across several hyperparameters and report the results based on the best-performing models. Table 3 lists the hyperparameters used for tuning the models for Boolean function experiments in Section 3. We use a grid search procedure to tune the hyperparameters. For all our results, we used Adam Optimizer and tuned the learning rates. For all architectures apart from LSTMs, we tuned across depths _∈{_ 1 _,_ 2 _,_ 6 _,_ 12 _,_ 16 _}_ and for LSTMs we used depths _{_ 1 _,_ 2 _,_ 3 _,_ 8 _}_ primarily because LSTMs with large depths are harder to train. For LSTMs we tuned the width or hidden ~~s~~ ize across _{_ 64 _,_ 256 _,_ 378 _,_ 512 _}_ and for other architectures we use _{_ 256 _,_ 512 _}_ . For Hyena, we tune the order hyperparameter across _{_ 2 _,_ 3 _}_ and for Transformers and Retnets we tune the heads across _{_ 4 _,_ 8 _}_ . For all non-recurrent models, we try both learnable and absolute positional embedding schemes. For all models, we tune the learning rate across _{_ 0 _._ 01 _,_ 0 _._ 005 _,_ 0 _._ 001 _,_ 0 _._ 0005 _,_ 0 _._ 0001 _,_ 0 _._ 00005 _,_ 0 _._ 000001 _}_ . We train the models for different numbers of steps/iterations _∈_ [30k, 500k] depending on the task where each iteration is with a fresh batch of in-context sequences. Note that in all these tasks apart from the experiments with finite samples in Section D.3, the training loss never reduces to 0 since each batch of examples is labeled by a different function (with high probability). We train for a large number of steps (200k) if the loss doesn’t reduce or train till the loss has reduced and converged for at least 20k steps. For instance, for tasks like Conjunctions models converge to low loss in 20k steps so we train the models to up to 40k steps. For other tasks such as Parities, we train for 500k steps. For the additional linear regression task (Figure 8, we follow the same setup and hyperparameters as described in Garg et al. (2022).
+
+32
+
+Based on the experiments, we find that Transformers and Hyena are relatively much more robust across various hyperparameters than other architectures. Among most tasks and architecture, we find that the learning rate has the most influence on the performance and the depth has a nontrivial influence. For other hyperparameters such as heads and widths, we do not see any nontrivial difference in performance.
+
+**Direct Evaluation Experiments.** For experiments with open-source models such as LLaMA-2, we use Huggingface Text-Generation-Inference[4] . Experiments using GPT-3.5-Turbo and GPT-4 were performed using the OpenAI API[5] . Experiments with locally deployed large models like LLaMA-2 were conducted using 2 A100 GPUs each with 80GB memory. For all experiments, we decode greedily and generate a maximum of two tokens (whitespace and the label[6] ).
+
+## J ADDITIONAL RELATED WORK
+
+Our results on the adaptive selection of algorithms add to some observations in recent works. Ahuja et al. (2023); Bai et al. (2023) explored (among other things) the efficacy of Transformers in learning mixtures of tasks in-context and showed that they could adaptively select appropriate algorithms depending on the sequence of inputs and labels. In our case, the emphasis is on choosing between different algorithms for the _same class of functions_ (e.g. Conjunctions). Hence, the target labelling function is still a Conjunction where the vanilla algorithm leads to near-perfect accuracy as well but models such as Transformers are able to choose the more sample-efficient algorithm which leads to near-perfect accuracy with fewer input examples. The fact that LSTMs can exhibit in-context learning phenomenon was observed in Xie et al. (2021) as well. Our work attempts to conduct a more systematic comparison of multiple architectures on a test bed with a variety of tasks. Evidence from our experiments suggests that while attention may not be necessary and various attention-free models can solve multiple in-context learning tasks, they are not sufficient at the moment to match Transformers’ performance on all tasks considered in our work.
+
+In recent years, there have been many empirical works (Liu et al., 2021; Min et al., 2021; Lu et al., 2022; Razeghi et al., 2022; Min et al., 2022a; Olsson et al., 2022; Wei et al., 2023) that have analysed the capabilities and limitations of in-context learning (ICL) in large language models (LLMs). The ability of LLMs to solve simple prediction problems has been informally explored in Lovre (2022). Liu et al. (2021) explored various strategies for selecting examples that improve in-context learning performance. Lu et al. (2022) demonstrated that the in-context learning ability of models is also sensitive to the order in which the samples are provided in the prompt. Razeghi et al. (2022) worked with numerical reasoning tasks and showed that in-context learning performance is stronger for instances whose terms are more prevalent in the training data. Min et al. (2022a) questioned whether models really learned new tasks in-context by showing strong ICL performance even when the prompt labels are chosen randomly. (Olsson et al., 2022) and (Elhage et al., 2021) frame the in-context learning ability slightly differently by referring to any model that gets better (i.e., shows a decrease in loss) with more context (i.e., increasing token indices) as an in-context learner. They provide arguments for the existence of special circuits, which predict the next token by observing similar patterns previously seen in context, inside the Transformer model, that are responsible for in-context learning. More recently, Wei et al. (2023) showed that the ability of models to override semantic priors and effectively learn the task presented in-context emerges with scale.
+
+> 4[URL removed]
+
+> 5[URL removed]
+
+> 6If the model does not predict a label in _{_ 0 _,_ 1 _}_ , we consider the prediction incorrect.
+
+33
+
diff --git a/open_review/iclr2024_8571.json b/open_review/iclr2024_8571.json
new file mode 100644
index 0000000000000000000000000000000000000000..be838d8a9f753da715a050308f8d5a5fae12bf0f
--- /dev/null
+++ b/open_review/iclr2024_8571.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8571",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Simple Data Sharing for Multi-Tasked Goal-Oriented Problems",
+ "abstract": "Many important sequential decision problems -- from robotics, games to logistics -- are multi-tasked and goal-oriented. In this work, we frame them as Contextual Goal Oriented (CGO) problems, a goal-reaching special case of the contextual Markov decision process. CGO is a framework for designing multi-task agents that can follow instructions (represented by contexts) to solve goal-oriented tasks. We show that CGO problem can be systematically tackled using datasets that are commonly obtainable: an unsupervised interaction dataset of transitions and a supervised dataset of context-goal pairs. Leveraging the goal-oriented structure of CGO, we propose a simple data sharing technique that can provably solve CGO problems offline under natural assumptions on the datasets' quality. While an offline CGO problem is a special case of offline reinforcement learning (RL) with unlabelled data, running a generic offline RL algorithm here can be overly conservative since the goal-oriented structure of CGO is ignored. In contrast, our approach carefully constructs an augmented Markov Decision Process (MDP) to avoid introducing unnecessary pessimistic bias. In the experiments, we demonstrate our algorithm can learn near-optimal context-conditioned policies in simulated CGO problems, outperforming offline RL baselines.",
+ "rebuttal": "Thanks for your response. Just to clarify, we do not “simply use contextual information about the goal as input” which is another misunderstanding of our work. We do have an \"architecture or learning approach that handles information about the goal\": the context-goal relationship is learned using the fictitious action and transition (from the goal states to the fictitious terminal state given the context) and we are directly learning the value function and policy based on the context, as described in the paper in the method section. We could this generalize to unseen context and also infer feasible under that context goals due to the generalization ability of our learned context dependent value function and policy.\n\n### Overall Response\nWe thank all reviewers for the thoughtful reviews and insightful questions. To make our paper easier to understand and more readable, we make major changes as below (marked in orange in the revised draft):\n1. We reorganize Section 3.3 with a more detailed explanation of our theoretical results. We notice there are some common misunderstandings of our assumptions in the reviews. We highlight that **our method only requires converge conditions at the distribution level which is measured in terms of the generalization ability of function approximators used in learning, rathe [...]\n\n### Rebuttal\n**1. \"As the authors themselves outline in the conclusion, only AntMaze was considered. While I appreciate that the authors were open about the limited experiments, I think comprehensive experiments are something necessary to establish the strength of SDS rather than it being a “interesting future direction” As a comparison, MAHALO considers more settings on MuJoCo (D4RL datasets) as well as MetaWorld.\"**\n\nWe chose AntMaze because it is a popular benchmark and it is easy to adapt its environments to construct offline CGO problems. (On the other hand, locomotion mujoco problems in [...]\n\n### Rebuttal\n### Weaknesses\n**1. “The applied assumptions in the paper are quite strong”**\n\nAs opposed to some misunderstandings of our assumptions raised by the reviewers, we highlight that we only require 1) the distribution generating the dynamics dataset \"covers\" a feasible path to the target goal set and 2) the context-goal distribution \"covers\" some feasible goals. We remark that \"covering\" here does not mean the such a path or a goal has to appear in the datasets or the data have to be generated only by goal reaching policies (e.g., it suffices that data can be stitched together to form [...]\n\n### Rebuttal\n**1. \"I doubt the coexistence of separate unsupervised data and context-goal data might not be so difficult to combine… we can label a state accomplishing a given context as the goal state with ease. \" (Similar: why can't we relabel the unsupervised data for a targeted task as the context can be usually derived from the state…. The authors also mention that they can use \"an oracle function to tell whether a state is within the goal set\".)**\n\n\nWhile what the reviewer mentioned is applicable in some special cases, such a hindsight construction is not possible for offline CGO problem [...]\n\n### Rebuttal\n### Theory:\n**1.“The theoretical assumptions seem imprecise or incorrect …the authors say that the state, action, and context spaces can be continuous.”**\n\nThank you first for raising this point. As we discussed in the footnote of the theorem, we only use the discrete notation (i.e. writing the cardinality of function and policy classes) for simplicity and “We state a more general result for non-finite function classes in the appendix”. In Appendix B4, **we introduce the definition of covering number and replace |\\Pi| with the covering number of the function class**. \n\n**2. “It wo [...]\n\n### Rebuttal (continued)\n**6. \"What Is the main difficulty in obtaining negative data (context-non-goal pairs) which is described as a limitation of MAHALO? What makes the unsupervised dynamics data easier to obtain?\"**\n\nWe discuss why unsupervised datasets and context-goal datasets are commonly available in the introduction: In robotics, task-agnostic play data (unsupervised data) can be obtained at scale since it does not require any reward labels. Positive data (context-goal pairs) would be easy to obtain as \"successful samples\" as in some instruction datasets, while negative data under the [...]\n\n### Rebuttal (continued)\n**5. \"How can we train a reward model with only using positive data (For the usage of the reward model, can you elaborate the meaning of \"choosing the percentile as 5% in the reward distribution evaluated by the context-goal set as the threshold to label goals\" in Appendix C.1?\"**\n\nAs mentioned in 4.2, we use PDS to train a pessimistic reward function with ensembles of 10 reward functions, which measures the uncertainty of the value function prediction, making it possible to learn a pessimistic reward as introduced in PDS. Since the uncertainty term is subtracted from [...]\n\n### Rebuttal (continued)\n### Limitations\n**1. “The proposed approach is only applicable to goal-conditioned tasks with rewards of 1 only at goal states and zero rewards otherwise.”**\n\nWe agree such goal oriented problems do not cover the full spectrum of RL problems, but they are quite common in practice, especially given many real-world problems do not come with dense rewards naturally. That is why goal conditioned RL (GCRL) problems are widely studied in the literature. We choose the sparse reward (only 1 at goal states and 0 otherwise) setting as it is a realistic and commonly-used setting [...]",
+ "initial_scores": [
+ 3,
+ 3,
+ 5,
+ 5
+ ],
+ "score_mean": 4.0,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "Summary: The paper addresses the goal-conditioned offline reinforcement learning problem, where an agent learns to reach given goals based on offline training data. The authors propose the Simple Data Sharing (SDS) method, which involves augmenting the dataset with an absorbing action and state, adding rewards for goal states, and providing a theoretical analysis of the optimality of policies learned from the modified dataset. The experiments compare SDS with other offline RL methods, demonstrating its effectiveness in continuous control tasks, particularly in AntMaze environments.\n\nWeaknesses: All experiments are confined to a single domain (D4RL AntMaze), limiting the generalizability of the proposed approach.\nExperiment results are based on a small number of seeds (5), raising concerns about the robustness of empirical claims. Lack of a dedicated related works section in the main paper is highlighted as a limitation, and moving related works to the appendix is deemed excessive -- which authors addressed by moving back to the main paper.\nClarity of writing and notation are lacking. There is discrepancy between theory and practical solutions.\n\nStrengths: The paper introduces an important problem and proposes a novel approach, SDS, for learning goal-conditioned policies from trajectory datasets with positive goal-state labels. The proposed algorithm is theoretically grounded, and the authors provide a theorem bounding the optimality of policies learned from the modified datas",
+ "forum_id": "Nqir5R4ACn",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_i3TD",
+ "review_id": "RYSnBR1Usx",
+ "scores": {
+ "rating": 3,
+ "soundness": 1,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 9067,
+ "edit_detected": true,
+ "edit_delta_seconds": 2721561,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Fsyr",
+ "review_id": "tgckjaYn9T",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 4514,
+ "edit_detected": true,
+ "edit_delta_seconds": 527788,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_wCFi",
+ "review_id": "u9NArux6Tz",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 1642,
+ "edit_detected": true,
+ "edit_delta_seconds": 907549,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Mndx",
+ "review_id": "TM03uZO5lL",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3779,
+ "edit_detected": true,
+ "edit_delta_seconds": 1004157,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8571.md b/open_review/iclr2024_8571.md
new file mode 100644
index 0000000000000000000000000000000000000000..fbc1f9dc78830651f71f6e89f57f8b3226dd2508
--- /dev/null
+++ b/open_review/iclr2024_8571.md
@@ -0,0 +1,683 @@
+
+
+## - SIMPLE DATA SHARING FOR MULTI-TASKED GOAL ORIENTED PROBLEMS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Many important sequential decision problems – from robotics, games to logistics – are multi-tasked and goal-oriented. In this work, we frame them as Contextual Goal Oriented (CGO) problems, a goal-reaching special case of the contextual Markov decision process. CGO is a framework for designing multi-task agents that can follow instructions (represented by contexts) to solve goal-oriented tasks. We show that CGO problem can be systematically tackled using datasets that are commonly obtainable: an unsupervised interaction dataset of transitions and a supervised dataset of context-goal pairs. Leveraging the goal-oriented structure of CGO, we propose a simple data sharing technique that can provably solve CGO problems offline under natural assumptions on the datasets’ quality. While an offline CGO problem is a special case of offline reinforcement learning (RL) with unlabelled data, running a generic offline RL algorithm here can be overly conservative since the goal-oriented structure of CGO is ignored. In contrast, our approach carefully constructs an augmented Markov Decision Process (MDP) to avoid introducing unnecessary pessimistic bias. In the experiments, we demonstrate our algorithm can learn near-optimal context-conditioned policies in simulated CGO problems, outperforming offline RL baselines.
+
+## 1 INTRODUCTION
+
+Goal-Oriented (GO) problems (Kaelbling, 1993) are an important class of sequential decisionmaking problems with widespread applications, ranging from robotics (Yu & Mooney, 2023) to game-playing (Hessel et al., 2019) to real-world logistics (Mirowski et al., 2018). Many of these problems are multi-tasked: rather than aiming toward a single goal, the agent is expected to reach some goal in a task-specific goal set based on the task instruction. We frame these multi-tasked goal-oriented applications as Contextual GO ( **CGO** ) problems and design a simple algorithm that can provably solve them using offline datasets that are commonly available in CGO applications.
+
+CGO problem is a special case of contextual Markov Decision Process (MDP) (Hallak et al., 2015). In a CGO problem, each task is a reaching problem with a goal set that is communicated indirectly to the agent via a context. CGO problem includes the classical GO problem as a special case, where the context is just the target goal, but in general contexts in CGO problem can convey rich, high-level task instructions. In robotics, e.g., common contexts are verbal instructions like “clean up the table” whereas goals are specific configurations (e.g., a clean table) in the environment. In games, contexts can be side-quests for the player to accomplish, and in logistics contexts describe origins and destinations of journeys an operator should execute. We will use navigation as a running example in this paper. Imagine instructing a truck operator with the context “Deliver goods to a warehouse in the Bay area”. Given the context, they must first infer some feasible goal in the goal set (e.g., a warehouse location) and implement a policy to efficiently navigate to that goal.
+
+CGO problems are challenging, because the rewards are sparse (non-zero rewards only when reaching goals) and the contexts can be difficult to interpret into feasible goals. However, CGO problem has an important structure that the transition dynamics (e.g., navigating a city road network) are independent of the context (e.g., journey origin and destination), and efficient multitask learning can be achieved by sharing dynamics data across tasks or contexts.
+
+We study offline Reinforcement Learning (RL) for CGO problems. Offline learning is timely for CGO problems given the recent availability of suitable massive datasets. We identify two different
+
+1
+
+kinds of datasets that are commonly available in CGO applications – an (unsupervised) _dynamics_ dataset of agent trajectories, and a (supervised) _context-goal_ dataset of pairs of contexts and goals. In robotics, task-agnostic play data can be obtained at scale (Lynch et al., 2020; Walke et al., 2023) in an unsupervised manner whereas instruction datasets (e.g., Misra et al. (2016)) allow supervised learning of the context-goal mapping. In navigation, self-driving car trajectories (e.g., Wilson et al. (2021); Sun et al. (2020)) allow us to learn dynamics whereas landmarks datasets (e.g. Mirowski et al. (2018); Hahn et al. (2021)) allow us to map the contexts to goals.
+
+We propose a Simple Data Sharing (SDS) technique that can provably solve CGO problems subject to natural assumptions on the datasets’ quality. We prove that SDS can learn a goal-reaching policy for the CGO problem with high probability, as long as 1) the distribution generating the dynamics dataset “covers” a feasible path to the target goal set and 2) the context-goal distribution “covers” some feasible goals. We remark that “covering” here does not mean that such a path or a goal has to appear in the datasets or the data have to be generated only by goal-reaching policies (e.g., it suffices that data can be stitched together to form a goal-reaching path). Instead, it is a distributionlevel coverage requirement; we will present coverage conditions based on the generalization ability of function approximators used in learning, which is weaker than requiring coverage conditions based on non-zero density. SDS is a reduction-based technique that can be implemented on top of a standard offline RL algorithm based on Bellman equation. Our key insight is to carefully construct an action-augmented MDP such that the dynamics dataset and context-goal dataset can be reconciled together as a standard reward-labeled offline dataset.
+
+To our knowledge, SDS is the first offline algorithm that can provably solve CGO problems with just positive data (i.e., the context-goal dataset). While the offline CGO problem here can be cast as an offline RL problem with unlabeled data (i.e., viewing each _{_ context _,_ state _}_ pair as a composite state[1] ), existing theoretical results (Yu et al., 2022; Hu et al., 2023; Li et al., 2023a) indicate that both positive data and negative data (i.e., pairs of context and non-goal data) are needed. 2. An alternative approach to offline CGO problems is to predict goals based on contexts and then run offline goal-conditioned RL (Ma et al., 2022). This approach only needs positive data in learning the predictor, but it can fail when the predicted goal is not reachable from the initial state (since the context-goal dataset could contain non-feasible goals).
+
+We contribute an effective SDS technique and a new analysis technique that formally proves that CGO problem can be solved offline with just dynamics data and context-goal data (i.e. positive data), without the need for negative data. We also show that SDS can be implemented on top of existing offline RL algorithms (with concrete instantiations for PSPI (Xie et al., 2021) in Section 3.3 and IQL (Kostrikov et al., 2021) in Section 4). In addition to theoretical analyses, we conduct several experiments in simulated domains, confirming that SDS outperforms SOTA offline RL baselines designed for unlabeled data and the goal prediction baseline. Finally, we situate our contributions within the vast literature on Goal-Oriented RL (Kaelbling, 1993) and contextual MDPs (Hallak et al., 2015) in Section 1.1 and Appendix A.
+
+## 1.1 RELATED WORK
+
+**Offline RL** Offline RL methods have proven to be effective in GO problems as it also allows learning a common set of sub-goals/skills (Chebotar et al., 2021; Ma et al., 2022; Yang et al., 2023). A variety of approaches are used to mitigate the distribution shift between the collected datasets and the trajectories likely to be generated by learnt policies: (1) constrain target policies to be close to the dataset distribution (Fujimoto et al., 2019; Wu et al., 2019; Fujimoto & Gu, 2021), (2) incorporate value pessimism for low-coverage or Out-Of-Distribution states and actions (Kumar et al., 2020; Yu et al., 2020; Jin et al., 2021) and (3) adversarial training via a two-player game (Xie et al., 2021; Cheng et al., 2022). Our SDS allows the use of generic offline RL algorithms to solve CGO problem offline. We demonstrate its applicability with PSPI (Xie et al., 2021) and IQL (Kostrikov et al., 2021) as our base offline RL algorithm in analyses (Section 3.3) and experiments (Section 4), respectively.
+
+> 1Context-goal data can be processed into reward-labeled data, whereas dynamics data from the original MDP imputed with all of the contexts seen in the context-goal dataset becomes the reward-unlabeled data.
+
+> 2Additionally reward-labeled data covering the full trajectory is necessary for general offline RL. But for GO problems, we show that a weaker condition of covering only the goals is sufficient. Existing algorithms for offline RL with unlabeled data may work with this weaker notion of coverage, but it is unclear how to prove it.
+
+2
+
+**==> picture [114 x 54] intentionally omitted <==**
+
+**==> picture [138 x 60] intentionally omitted <==**
+
+**==> picture [138 x 61] intentionally omitted <==**
+
+**==> picture [392 x 19] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Similar goal sets with differ- (b) Distinct goal sets with finite con- (c) Goal sets (could be overlapping) ent contexts texts given continuous contexts **----- End of picture text -----**
+
+Figure 1: The interplay between contexts and goals in a Contextual Goal-Oriented (CGO) problem characterizes many real-world multi-task settings. (a) All the contexts may share similar goal sets (e.g., pouring coffee). (b) A finite set of context, where each context may map to different goal sets. (c) The goal sets can be defined by continuous contexts, and the goal sets from different contexts could share overlapping support so the context-goal relationship is neither one-to-many or many-toone, creating a complex CGO problem.
+
+**Offline RL with unlabeled data** Our CGO setting is a special case of offline RL with unlabeled data, or more broadly the offline policy learning from observations paradigm (Li et al., 2023a). There only a subset of the offline data is labeled with rewards (in our setting, that is the contexts dataset, as we don’t know which samples in the dynamics dataset are goals.). However, the MAHALO scheme in (Li et al., 2023a) is much more general than necessary for CGO problems, and we show instead that our simple data sharing scheme has better theoretical guarantees than MAHALO in Section 3.3. In our experiments, we compare CGO with several offline RL algorithms designed for unlabeled data: UDS (Yu et al., 2022) where unlabeled data is assigned zero rewards and PDS (Hu et al., 2023) where a pessimistic reward function is estimated from a labeled dataset.
+
+**Goal-oriented RL** GO RL has been extensively studied (Kaelbling, 1993). Existing work focus on two critical aspects of goal-oriented RL: (1) data relabeling and augmentation methods to make better use of available data and (2) learning reusable skills to solve long-horizon problems by chaining sub-goals or skills. For (1), hindsight relabeling methods (Andrychowicz et al., 2017; Li et al., 2020) are effective in improving the learning efficiency of agents by reusing visited states in the trajectories as successful goal examples. For (2), hierarchical methods for determining sub-goals, and training goal reaching policies have been effective in long-horizon problems (Nair & Finn, 2019; Singh et al., 2020; Chebotar et al., 2021). Beyond data efficiency, another key objective of goal-oriented RL is generalization, wherein a common representation of target goals is learned. Popular strategies for goal generalization include universal value function approximators (Schaul et al., 2015), unsupervised representation learning (Nair et al., 2018; Nair & Finn, 2019; Han et al., 2021), and pessimism-induced generalization in offline GO formulations (Yang et al., 2023). Our CGO framing enables both data reuse and goal generalization, by using rich contextual representations of goals and a reduction to offline RL to combine dynamics and context-goal datasets.
+
+## 2 PRELIMINARIES
+
+## 2.1 CONTEXTUAL GOAL-ORIENTED (CGO) PROBLEM
+
+A Contextual Goal-Oriented (CGO) problem describes a multi-tasked goal-oriented setting with a _shared_ transition kernel. We consider a Markovian CGO problem with an infinite horizon, defined by the tuple _M_ = ( _S, A, P, R, γ, C, d_ 0), where _S_ is the state space, _A_ is the action space, _P_ : _S × A →_ ∆( _S_ ) is the transition kernel, _R_ : _S × C →{_ 0 _,_ 1 _}_ is the reward function, _γ ∈_ [0 _,_ 1) is the discount factor, _C_ is the context space, and finally ∆ denotes the space of distributions. We do not assume any particular topology on _S, A_ and _C_ and they can be continuous. Each context _c ∈C_ specifies a goal-reaching task with a goal set _Gc ⊂S_ , and reaching any goal in the goal set _Gc_ is regarded as successful. The reward function is hence defined as _R_ ( _s, c_ ) = 1( _s ∈ Gc_ ). An episode of a CGO problem starts from an initial state _s_ 0 and a context _c_ sampled according to a distribution _d_ 0( _s_ 0 _, c_ ), and it terminates when the agent reaches the goal set _Gc_ . During the episode, _c_ does not change; only _st_ changes (according to _P_ ( _s[′] |s, a_ )) and the transition kernel _P_ ( _s[′] |s, a_ ) is context independent. The classical GO problem (Kaelbling, 1993) is a special case of CGO, where a multi-goal problem can be viewed as multiple contexts with each context describing a goal.
+
+3
+
+**Spectrum of CGO Problem** Figure 1 illustrates different CGO problems encountered when learning a language-conditioned control policy for a robot manipulator. _s_ describes the robot and the world state, _a_ is the robot action, and _c_ is the language instruction. For each instruction _c_ , the manipulation task for the robot is a reaching problem to a set of targeted robot and world states. The simplest CGO instance is when most of the contexts _c ∈C_ correspond to the very similar goal sets, as shown in Figure 1a. In this case, a context-agnostic policy can be near-optimal[3] . When different contexts have non-overlapping goal sets _Gc_ and we only have finite contexts (as in Figure 1b), the problem is essentially multi-task RL which _requires_ context-conditioned policies. In its full complexity, the number of contexts can be infinite; and goal sets of different contexts could potentially overlap[4] , as shown in Figure 1c. A CGO agent thus needs to learn how to respond to different contexts as well as transfer knowledge efficiently across contexts.
+
+**Objective** Since the context carries rich information, a CGO policy in general is contextconditioned, i.e., _π_ : _S × C →_ ∆( _A_ ). The performance of a policy _π_ is measured by its return, _J_ ( _π_ ) := E _π,P,d_ 0 _T_ =0 _[γ][t][R]_[(] _[s][t][, c]_[)] , where _T_ is the time the agent first enters _Gc_ (a random variable �� � dependent on _π_ , _P_ and _d_ 0), and E _π,P,d_ 0 denotes the expectation over trajectories generated by running _π_ with _P_ starting from _s_ 0 _, c_ sampled from _d_ 0. We can view the return as the average success rate of reaching _any_ goal in the goal set _Gc_ when the problem horizon is exponentially distributed (according to the discount _γ_ ). A CGO algorithm takes a policy class Π = _{π_ : _S × C →_ ∆( _A_ ) _}_ as input and returns a near-optimal policy _π[†]_ such that _J_ ( _π[†]_ ) _≈_ max _π∈_ Π _J_ ( _π_ ).
+
+## 2.2 OFFLINE LEARNING
+
+We aim to solve CGO problems using offline datasets without additional online environment interactions, `a la offline RL. We identify two types of data that are commonly available: _D_ dyn := _{_ ( _s, a, s[′]_ ) _}_ is an _unsupervised_ dataset of agent trajectories collected from _P_ ( _s[′] |s, a_ ), whereas _D_ goal := _{_ ( _c, s_ ) : _s ∈ Gc}_ is a _supervised_ dataset of context-goal pairs. Different offline CGO algorithms can be judged based on the assumptions they require on _{D_ dyn _, D_ goal _}_ , such as what the datasets should cover and how much data are needed to learn _π[†]_ . No algorithm, to our knowledge, can _provably_ learn near-optimal _π[†]_ using _only_ the positive _D_ goal data (i.e., without needing additional _negative_ data of non-goal examples) when combined with _D_ dyn data. In the next section, we demonstrate how to leverage the special structure of the CGO problem to design provably correct offline algorithms. This insight leads to a Simple Data Sharing (SDS) scheme that can enable existing offline RL algorithms (designed for fully labeled data) to solve offline CGO problems using _just_ the positive goal-labeled data without needing any additional non-goal examples, or reward learning.
+
+## 2.3 NOTATION AND ASSUMPTION
+
+Before presenting the main results, we introduce some definitions and shorthand to make the presentation more readable. We introduce a fictitious zero-reward absorbing state _s_[+] _∈S/_ and modify the dynamics such that whenever the agent enters _Gc_ it transits to _s_[+] in the next time step (for all actions) and stays there forever. This is a standard technique to convert a goal reaching problem (with a random problem horizon) to an infinite horizon problem. It does _not_ change the problem.
+
+Specifically, we extend the reward and the dynamics as follows: We define _S_[¯] = _S_[�] _{s_[+] _}_ , _X_ := _S × C_ , and _X_[¯] := _S_[¯] _× C_ . In addition, we define _X_[+] := _{x_ : _x_ = ( _s, c_ ) _, s_ = _s_[+] _, c ∈C}_ . We use _G_ to denote the goal set on _X_ , i.e., _G_ := _{x ∈X_ : _x_ = ( _s, c_ ) _, s ∈ Gc}_ . With abuse of notation, we define the reward function and the transition kernel on _X_[¯] accordingly as _R_ ( _x_ ) = 1( _s ∈ Gc_ ) and _P_ ( _x[′] |x, a_ ) := _P_ ( _s[′] |s, c, a_ )1( _c[′]_ = _c_ ), where _P_ ( _s[′] |s, c, a_ ) := 1( _s[′]_ = _s_[+] ) if _s ∈ Gc_ or _s_ = _s_[+] otherwise _P_ ( _s[′] |s, c, a_ ) = _P_ ( _s[′] |s, a_ ), where _x_ = ( _s, c_ ) and _x[′]_ = ( _s[′] , c[′]_ ). Notice the context does not change in the transition. For all value functions, we define their value at _s_[+] as zero.
+
+Given a policy _π_ : _X →_ ∆( _A_ ), we define its state-action value function (i.e., Q function) as _Q[π]_ ( _x, a_ ) := E _π,P_ [[�] _[∞] t_ =0 _[γ][t][R]_[(] _[x]_[)] _[|][x]_[0][=] _[ x, a]_[0][=] _[ a]_[]][.][We use] _[ V][π]_[(] _[x]_[)][:=] _[Q][π]_[(] _[x, π]_[)][ to denote the value] function given _π_ , where _Q_ ( _x, π_ ) := E _a∼π_ [ _Q_ ( _x, a_ )] . By construction, we have _Q[π]_ ( _x, a_ ) _, V[π]_ ( _x_ ) _∈_
+
+> 3Indeed we show in Section 4 that some existing multi-task RL benchmarks are in this regime where a context-agnostic Implicit Q-Learning (IQL) (Kostrikov et al., 2021) baseline performs well.
+
+> 4Here the intersection of all goal sets given all possible contexts can be empty, which means it cannot be solved by a context agnostic policy.
+
+4
+
+[0 _,_ 1], _∀x ∈X , a ∈A_ . By these definitions, we can write the return _J_ ( _π_ ) = _V[π]_ ( _d_ 0) = _Q[π]_ ( _d_ 0 _, π_ ). We denote _π[∗]_ as the optimal policy and define _Q[∗]_ := _Q[π][∗]_ , _V[∗]_ := _V[π][∗]_ .
+
+**Data Assumption** We suppose that there are two distributions _µ_ dyn( _s, a, s[′]_ ) and _µ_ goal( _s, c_ ), where _µ_ dyn( _s[′] |s, a_ ) = _P_ ( _s[′] |s, a_ ) and _µ_ goal has support within _Gc_ , i.e., _µ_ goal( _s|c_ ) _>_ 0 _⇔ s ∈ Gc_ . We assume that _D_ dyn and _D_ goal are i.i.d. samples drawn from _µ_ dyn and _µ_ goal, i.e.,
+
+**==> picture [258 x 12] intentionally omitted <==**
+
+We suppose that _x ∼ d_ 0 is not in _G_ almost surely. This is to simplify the presentation. If _x ∈ G_ , the agent reaches its goal immediately and no learning is needed.
+
+For CGO problems to be solvable offline, we need some additional assumptions about the support of _µ_ dyn and _µ_ goal. We defer the specific assumptions needed for our algorithm to Section 3.3.
+
+## 3 SIMPLE DATA SHARING TO SOLVE CGO PROBLEMS
+
+The key idea of SDS is the construction of an _action_ -augmented MDP with which the dynamics and context-goal datasets can be combined into a conventional offline RL dataset. In the following, first we describe this action-augmented MDP (Section 3.1) and show that it preserves the optimal policies of the original MDP (Appendix B.1). We then outline a practical algorithm to convert the two datasets of an offline CGO problem into a dataset for this augmented MDP (Section 3.2) such that any generic offline RL algorithm can be used as a solver. Finally, in Section 3.3, we theoretically analyze an instantiation of SDS based on PSPI (Xie et al., 2021) and show that SDS can provably find a near-optimal policy for the CGO problem.
+
+## 3.1 ACTION-AUGMENTED MDP
+
+One reason why offline RL cannot directly leverage _D_ dyn and _D_ goal to solve a CGO problem is that each goal-reaching problem has its own context-specific termination criterion. Notice that although the dynamics datasets _D_ dyn is consistent with the original MDP transition kernel (i.e. _P_ ( _s[′] |s, a_ )), it is however not consistent with the transition kernel _P_ ( _x[′] |x, a_ ) (which also includes the effect of context-specific termination) of the context-augmented MDP in Section 2.3. This is easiest to see if some _s ∈ Gc_ in the _D_ goal dataset is also observed in the dynamics dataset. _D_ dyn will imply from ( _s, a, s[′]_ ) that action _a_ can transition to _s[′]_ , however _D_ goal implies that all actions at _s_ will transition to _s_[+] . This conflict means that combining the two datasets naively leads to an inconsistent algorithm.
+
+We propose a new augmented MDP, which augments the action space of the context-augmented MDP in Section 2.3. Define _A_[¯] = _A_[�] _{a_[+] _}_ , with a fictitious action _a_[+] _∈A/_ to avoid conflicts across _D_ dyn and _D_ goal. The reward in this action-augmented MDP is now _action-dependent_ , for _x_ = ( _s, c_ ) _∈X_ , _R_[¯] ( _x, a_ ) := 1( _s ∈ Gc_ )1( _a_ = _a_[+] ) _,_ which means the reward given any action in the original action space _A_ is 0, and there would be a reward 1 only if _a_[+] is taken in the goal set. And the transition upon taking action _a_[+] is defined as _P_[¯] ( _x[′] |x, a_[+] ) := 1( _s[′]_ = _s_[+] ) and _P_[¯] ( _x[′] |x, a_ ) := _P_ ( _s[′] |s, a_ )1( _c[′]_ = _c_ ) for other actions, which means when taking _a_[+] the agent would always transit to _s_[+] , and the transition remains the same as in the original MDP given any normal action..
+
+We denote this action-augmented MDP as _M_ := ( _X_[¯] _, A_[¯] _, R,_[¯] _P, γ_[¯] ). For a policy _π_ : _X →_ ∆( _A_ ) and a value function _f_ : _X × A →_ [0 _,_ 1] defined in the original MDP, we define their extensions on _M_ :
+
+**==> picture [344 x 37] intentionally omitted <==**
+
+The extension of _f_ is based on a function _g_ : _X →_ [0 _,_ 1] which determines the _f_[¯] _g_ value only at _a_[+] .
+
+**Regret Equivalence** We show in Appendix B.1 (see Lemma B.3) that the regret of a policy extended to the augmented MDP is equal to the regret of the policy in the original MDP describing the CGO problem, and any policy defined in the augmented MDP can be converted into that in the original MDP without increasing the regret. Thus, solving the augmented MDP can yield correspondingly optimal policies for the original problem. We next sketch a practical technique to combine _D_ dyn and _D_ goal along with the fictitious action labels _a_[+] such that we can solve the actionaugmented MDP effectively.
+
+5
+
+**Algorithm 1** Simple Data Sharing (SDS) for CGO
+
+**Input** : Dynamics dataset _D_ dyn, context-goal dataset _D_ goal **for** each sample ( _s, c_ ) _∼ D_ goal **do** Create transition[5] ( _x, a_[+] _,_ 1 _, x_[+] ), where _x_ = ( _s, c_ ) and _x_[+] = ( _s_[+] _, c_ ), add it to _D_[¯] goal **end for for** each ( _s, a, s[′]_ ) _∼ D_ dyn **do for** each ( _·, c_ ) _∼D_ goal **do** Create transition ( _x, a_[+] _,_ 0 _, x[′]_ ), where _x_ = ( _s, c_ ) and _x[′]_ = ( _s[′] , c_ ), add it to _D_[¯] dyn **end for end for Output** : _D_[¯] dyn and _D_[¯] goal
+
+**Remark 3.1.** _The difference between the action-augmented MDP and the original MDP is that the rewards of the action-augmented MDP are known from the data (due to its shifted definition), whereas the rewards of the original MDP are missing. This difference allows us to directly apply a reduction from offline CGO to offline RL. In contrast, working with the original MDP requires learning additionally a (pessimistic) reward function before offline RL can be applied._
+
+## 3.2 PRACTICAL ALGORITHM: SIMPLE DATA SHARING
+
+In Algorithm 1 we sketch our Simple Data Sharing (SDS) technique.and _D_ goal as input, and produces a single dataset _D_[¯] dyn � _D_ ¯ goal that is suitable for use by any offlineIt takes the two datasets _D_ dyn RL algorithm based on Bellman equation like CQL (Kumar et al., 2020), IQL (Kostrikov et al., 2021), PSPI (Xie et al., 2021), ATAC (Cheng et al., 2022) etc. Notice that any policy returned by the offline RL algorithm can be executed in the CGO problem by simply masking out the _a_[+] action. We note that in practice Algorithm 1 can be implemented as a pre-processing step in the minibatch sampling of a deep offline RL algorithm (as opposed to computing the full _D_[¯] dyn and _D_[¯] goal once before learning). Empirically, we found that equally balancing the samples _D_[¯] dyn and _D_[¯] goal generates the best result. Below we analyze SDS theoretically by applying SDS to PSPI (Xie et al., 2021); later in Section 4, we apply SDS to IQL (Kostrikov et al., 2021) in simulation experiments.
+
+## 3.3 INFORMATION THEORETIC GUARANTEE: SDS+PSPI
+
+In this section, we show a formal analysis for our reduction approach, when instantiated with PSPI (Xie et al., 2021). Due to space limit, we present the instantiation of SDS+PSPI algorithm in Appendix B.3, and summarize our assumptions and the main theoretical result as follows.
+
+**Assumption 3.2** (Realizability) **.** _We assume for any π ∈_ Π _, Q[π] ∈F and R ∈G._
+
+**Assumption 3.3** (Completeness) **.** _We assume: For any f ∈F and g ∈G,_ max( _g_ ( _x_ ) _, f_ ( _x, π_ )) _∈F; And for any f ∈F, π ∈_ Π _, T[π] f_ ( _x, a_ ) _∈F, where T[π] is a zero-reward Bellman backup operator with respect to P_ ( _s[′] |s, a_ ) _: T[π] f_ ( _x, a_ ) := _γ_ E _x′∼P_ ( _s′|s,a_ )1( _c′_ = _c_ )[ _f_ ( _x[′] , π_ )] _._
+
+**Definition 3.4.** _We define the generalized concentrability coefficients:_
+
+**==> picture [344 x 28] intentionally omitted <==**
+
+_T −_ 1 _where ∥h∥_[2] _µ_ := E _x∼µ_ [ _h_ ( _x_ )[2] ] _, ρ[π] ∈/G_[(] _[x, a]_[)][=][E] _[π,P]_ �� _t_ =0 _[γ][t]_[1][(] _[x][t]_[=] _[ x, a][t]_[=] _[ a]_[)] � _, ρ[π] ∈G_[(] _[x]_[)][=] E _π,P_ � _γ[T]_ 1( _xT_ = _x_ )� _, and T is the first time the agent enters the goal set._
+
+Concentrability coefficients is a generalization notion of density ratio; _it describes how much the (unnormalized) distribution in the numerator is “covered” by that in the denominator in terms of the generalization ability of function approximators_ (Xie et al., 2021). If Cdyn( _π_ ) _,_ Cgoal( _π_ ) are finite given _µ_ goal _, µ_ dyn _, F, G, π_ , then we say _π_ is covered by the data distributions and conceptually offline RL can learn a policy to be no worse than _π_ .
+
+> 5 + _s_ is implemented as terminal=True.
+
+6
+
+**Theorem 3.5.** _Let π[†] denote the learned policy of SDS + PSPI with datasets Ddyn and Dgoal, using value function classes_[6] _F_ = _{X × A →_ [0 _,_ 1] _} and G_ = _{X →_ [0 _,_ 1] _}. Under Assumption 3.2, 3.3 and 3.4,with probability_ 1 _− δ, it holds, for any π ∈_ Π _,_
+
+**==> picture [296 x 13] intentionally omitted <==**
+
+_where ϵdyn_ = _O_ � log( _|F|D||G||dyn|_ Π _|/δ_ ) � _and ϵgoal_ = _O_ � log( _|D|G|goal/|δ_ ) � _are statistical errors, and_ C _dyn_ ( _π_ ) _and_ C _goal_ ( _π_ ) _are concentrability coefficients._
+
+We can interpret the upper bound in Theorem 3.5 as follows: the statistical errors _ϵ_ dyn _, ϵ_ goal would decrease as we have more data from _µ_ goal and _µ_ dyn; for any compoarator _π_ with finite coefficients Cdyn( _π_ ) _,_ Cgoal( _π_ ), the final regret upper bound would also decrease. Take _π_ = _π[∗]_ as an example. For the coefficients Cdyn( _π_ ) _,_ Cgoal( _π_ ) to be finite, it means 1) the state-action distribution from the dynamics data “covers” the state-action pairs generated by _π[∗]_ , which naturally includes stitching; 2) the support of _µ_ goal “covers” the goals _π[∗]_ would reach. The coverage is measured based on the generalization ability of _f_ and _g_ as in Definition 3.4; e.g., if _g_ ( _x_ 1) and _g_ ( _x_ 2) are similar for _x_ 1 = _x_ 2, then _x_ 2 is within the coverage so long as _x_ 1 can be generated by _µ_ goal. It is important to note that Theorem 3.5 simultaneously apply to all _π ∈_ Π not just _π[∗]_ . Therefore, so long as the above coverage conditions hold for any goal-reaching policy _π_ , the learned policy is guaranteed to be goal-reaching too (when the number of samples is large enough so that the statistical errors can be ignored).
+
+As a result, SDS+PSPI can provably learn with only the positive data (i.e., the context-goal dataset) without the need for additional labeling of non-goal samples. Notice that PSPI is one possible way to achieve pessimistic learning in offline RL, and the same intuition could be extended to other offline RL algorithms based on Bellman equation.
+
+**Remark 3.6.** _MAHALO (Li et al., 2023a) is a SOTA offline RL algorithm that can provably learn from unlabeled data. MAHALO can also be implemented on top of PSPI; however, their theoretical result (Theorem D.1) requires a stronger version concentrability,_ max _g∈G[∥][g][−][r][∥] ρ_[2] _[π] ∈/G[/][∥][g][−][r][∥] µ_[2] _goal[, to be] small. In other words, it needs additional labeling of non-goal states._
+
+## 4 EXPERIMENTS
+
+Through experiments we aim to answer the following questions: 1) Does our method work in scenarios of different context-goal relationships shown in Figure 1, under the data assumptions in Section 2.3? 2) Under each setting, is there any empirical benefit from using SDS, compared with offline RL baselines (for unlabeled data) that require pessimistic reward learning or goal prediction?
+
+## 4.1 ENVIRONMENTS AND DATASETS
+
+**Dynamics dataset.** For all experiments, we use the AntMaze-v2 datasets of D4RL (Fu et al., 2020) as dynamics datasets _D_ dyn; we remove the reward and terminal information labels.
+
+**Context-goal dataset.** We construct three levels of context and goal relationships as shown in Figure 1: 1) Figure 1a where multiple contexts define very similar goal sets (Section 4.3); 2) Figure 1b where the number of contexts is finite with distinct goal sets (Section 4.4); 3) Figure 1c where the contexts are continuous and randomly sampled, the goal sets could overlap (Section 4.5). For each environment, we define a context set and _an oracle function_ to tell whether a state is within the goal set; this oracle function is only used in data construction and is not accessible to the algorithms tested here. Then given each context, we select states in the dynamics dataset that satisfy the oracle function to construct the goal examples[7]
+
+**Evaluation.** Section 4.3, 4.4 and 4.5 contain results where the training and testing contexts are sampled from the same distribution; in Section 4.5 we also test the algorithms with a different context distribution. For evaluation, we use[8] the oracle function that defines context-goal sets to provide the reward given a certain context in Section 4.4 and 4.5 . The evaluation of each context is done by 100 episodes. We train each algorithm for 5 seeds and report the statistics.
+
+> 6We state a more general result for non-finite function classes in the appendix.
+
+> 7Such oracle is never visible to the algorithm but only to construct the dataset.
+
+> 8Exception: in the original AntMaze, we use the D4RL metric, so the results are comparable to the literature.
+
+7
+
+## 4.2 METHODS
+
+Here we describe the algorithms compared in the experiments. To facilitate a clean comparison of different conceptual approaches to solving offline CGO problems, we use IQL (Kostrikov et al., 2021) as the backbone offline algorithm for all the methods. The same set of hyperparameters in IQL is used in all experiments. In the experiments, we use the _−_ 1 _/_ 0 reward notion, which can be shown to be the same as the 0 _/_ 1 reward notion in terms of ranking policies under the discounted MDP setting. Please see Appendix C.1 for detailed hyperparameters of all methods.
+
+**SDS+IQL (Ours).** We apply SDS in Algorithm 1 with IQL as the offline RL algorithm to solve the augmented MDP defined in Section 3.1[9] . More specifically, we set _a_[+] to be an extra dimension in the action space but mask out extra dimension for policy output.
+
+**Reward prediction (RP).** For naive reward prediction, we first convert the context-goal set to a dataset with reward 0 for all ( _c, s_ ) _∼ D_ goal, and then learn a reward function with the dataset. For policy training, we randomly sample ( _s, a, s[′]_ ) _∼ D_ dyn and _c ∼ D_ goal and label the transition with the learned reward: if reward prediction of ( _c, s[′]_ ) is larger then some threshold, we label the transition with _r_ = 0 and terminal = True; otherwise we label the transition with _r_ = _−_ 1 and terminal = False. Then we apply IQL with this labeled dataset.
+
+**PDS.** For PDS (Hu et al., 2023), we follow the similar procedure as RP but learn a _pessimistic_ reward function using ensembles. Then we apply similar steps to label the transitions with contexts and apply IQL with this labeled dataset as RP.
+
+**UDS+RP.** On top of RP, we introduce another possible way to learn a reward function while we construct “non-goal” samples in a pessimistic manner: we also sample random _c ∼ D_ goal and _s ∼ D_ dyn and label it with _r_ = _−_ 1 similar to the spirit of UDS (Yu et al., 2022), then train the reward function with the combined positive and negative dataset. Then we follow the same steps in RP for policy training with the learned reward function.
+
+**Goal prediction.** We learn a conditional generative model as the goal predictor using classifierfree diffusion guidance Ho & Salimans (2022), where the context in the context-goal dataset serves as the condition and the goal states in the context-goal dataset are used to train the generative model. In the meantime, we learn a general goal-conditioned policy with the dynamics-only dataset using HER Andrychowicz et al. (2017)+IQL. Given a test context, the goal predictor first samples the goal under the condition, and then we use the generated goal as the condition for the output policy.
+
+## 4.3 ORIGINAL ANTMAZE
+
+In the original AntMaze, 2D goal locations (contexts) are sampled from a fixed cell in the maze and perturbed with a small noise, generating very similar goal sets. Our training context set is chosen as 2D locations of the states with terminal=True in the D4RL datasets, and the full state is added as the goal example.[10] Test contexts and environmental evaluation follow the original AntMaze.
+
+**SDS matches the performance of the context-agnostic method under the setting of Fig 1a, and achieves better performance than reward learning baselines.** We show the normalized return in each AntMaze environment for all methods in Table 1. Without the need to learn an extra reward function, our method consistently achieves equivalent or better performance in each environment compared to other reward learning baselines. We observe that our method achieves comparable average performance to the context-agnostic method, given that goal sets are all very similar.[11]
+
+**Reward model evaluation for reward learning baselines.** We also visualize the learned reward model from reward learning baselines[12] to show how good they are at predicting the reward, and
+
+> 9We choose IQL since it is a popular practical algorithm to solve AntMaze environments
+
+> 10We notice that the number of goal examples in the original AntMaze is too small to learn a good goal predictor, so we omit the goal prediction baseline under this setting. We will present goal prediction results in Section 4.4,4.5 where we construct more goal examples.
+
+> 11Also, we find that umaze is too easy such that even if the goal labeling is bad it still has a relatively high reward (since the maze is too small), so we also omit umaze in other experiments. Li et al. (2023b) show offline RL algorithms can learn good with goal-reaching data even when the rewards are wrong.
+
+> 12We include the details for reward model evaluation in Appendix C.2.
+
+8
+
+how it is related to the performance. Take “medium-diverse” and “large-diverse” environments as examples (see Figure 2, 3). Also, we observe that PDS+RP is consistently better at separating positive and negative distributions than plain RP and UDS+RP, so we omit to compare with UDS+RP and plain RP in the rest of the experiments. Intuitively, our method does not require reward learning thanks to the construction of the augmented MDP, which avoids the extra errors in reward prediction.
+
+|Env/Method|SDS(Ours) PDS RP UDS+RP|Context-agnostic IQL|
+|---|---|---|
+|umaze umaze diverse medium play medium diverse large play large diverse|94.8±1.3 93.0±1.3 50.5±2.1 54.3±6.3 72.8±7.7 50.6±7.8 72.8±2.6 71.5±4.3 75.8±1.9 66.8±4.9 0.5±0.3 0.3±0.3 84.5±5.2 22.8±2.4 0.5±0.5 0.8±0.5 60.0±7.6 39.6±4.9 0±0 0±0 36.8±6.9 30.0±5.3 0±0 0±0|97.7±1.0 65.5±10.5 75.2±3.4 76.0±3.7 45.8±2.6 46.7±5.4|
+|average|**70.8** 50.5 20.7 21.2|67.8|
+
+Table 1: Normalized return in AntMaze-v2, averaged over 5 random seeds with standard errors.
+
+**==> picture [115 x 87] intentionally omitted <==**
+
+**==> picture [116 x 87] intentionally omitted <==**
+
+**==> picture [115 x 87] intentionally omitted <==**
+
+**==> picture [308 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) PDS (b) UDS+RP (c) RP **----- End of picture text -----**
+
+Figure 2: Reward model evaluation for the large-diverse environment. Green dots are outliers.
+
+## 4.4 MODIFIED ANTMAZE: FOUR ROOMS
+
+**Context-goal setup.** We partition the maze into four rooms and any state in the room would be a goal state. We use discrete room numbers (1,2,3,4) as contexts. As the agent always starts in Room 1, the training and test context sets are Room 2,3,4. We use medium and large environments. Additionally, we perturb all the state dimensions with _N_ (0 _,_ 0 _._ 1) Gaussian noises when constructing the context-goal dataset, so the goal sets are not subsets of the dynamics datasets.
+
+**SDS achieves better performance than baselines under the setting in Figure 1b.** We show the normalized return (average success rate in percentage) in each modified Four Rooms environment for our method and baseline methods in Table 2, where our method consistently outperforms the performances of baseline methods. We also provide evaluation for reward learning in Figure 5.
+
+|Env/Method|SDS(Ours) PDS Goal Prediction|
+|---|---|
+|medium-play medium-diverse large-play large-diverse|**78.7±0.9** 46.0±4.47 59.3±2.6 **83.6±1.9** 51.3±3.6 66.7±2.4 **65.5±2.5** 13.9±2.4 41.4±3.6 **72.2±2.9** 11.1±3.8 42.0±3.0|
+|average|**75.0** 30.6 52.4|
+
+Table 2: Average scores with standard errors over 5 random seeds from Four Rooms with perturbation. The score for each run is the average success rate (%) of the other three rooms.
+
+## 4.5 MODIFIED ANTMAZE: RANDOM CELLS
+
+**Context-goal setup.** We use the 2D locations as context but the distribution of the context is much more diverse than Section 4.3. For each maze map, we choose a set of non-wall 2D locations in the maze map, uniformly sample from it, and add uniform perturbations to get the training contexts. To construct the goal set given context, we obtain states with the 2D locations within the _L_ 2 ball with a certain radius. For test distributions, we have two settings: 1) the same as the training distribution;
+
+9
+
+|Env/Method|SDS(Ours) PDS Goal Prediction|
+|---|---|
+|medium-play medium-diverse large-play large-diverse|**76.8±6.1** 52.0±8.8 66.7±7.2 **78.2±6.5** 60.9±11.3 69.7±8.7 **57.6±12.4** 50.6±6.4 42.4±8.2 54.7±8.8 **58.3±9.2** 44.2±8.1|
+|average|**66.8** 55.5 55.8|
+
+Table 3: Average scores with standard errors over 5 random seeds from Random Rells with perturbation. The score for each run is the average success rate (%) of 5 random test contexts from the same training distribution.
+
+|bution.||
+|---|---|
+|Env/Method|SDS(Ours) PDS Goal Prediction|
+|medium-play medium-diverse large-play large-diverse|67.9±8.2 50.1±13.4 **70.5±1.9** **72.5±6.5** 57.5±14.8 63.0±7.2 **60.2±4.8** 48.1±8.0 44.3±4.1 **58.0±5.8** 44.1±9.9 55.4±5.7|
+|average|**64.7** 49.9 58.3|
+
+Table 4: Average scores with standard errors over 5 random seeds from Random Cells with perturbation. The score for each run is the average success rate (%) of 5 random test contexts far away from the start.
+
+2) test contexts are drawn from a limited area that is far away from the starting point of the agent. Additionally, we perturb all the state dimensions with _N_ (0 _,_ 0 _._ 1) Gaussian noises when constructing the context-goal dataset, so the goal sets are not subsets of the dynamics datasets.
+
+**SDS outperforms or matches the performance of baselines under the setting in Figure 1c.** We show the normalized return (average success rate in percentage) in each modified Random Cells environment for all methods in Table 3, where our method consistently outperforms all baseline methods in each environment, which also shows the generalization ability in the context space. We also provide reward visualization for reward learning baselines in Figure 6.
+
+**SDS also works with a different test context distribution.** We also test with a different distribution of random cells that are far away from the start with some specified threshold in each environment in Table 4. We can observe that when tested with this different context distribution, SDS still consistently outperforms reward learning baselines.
+
+## 5 CONCLUSION AND LIMITATION
+
+We propose a Simple Data Sharing technique for offline CGO problems. We prove SDS can learn near optimal policies so long as the offline data cover goal-reaching trajectories needed at the test time, without the need of negative labels. We also validate the efficacy of SDS experimentally, and we find it outperforms other reward-learning offline RL baselines across various CGO problem settings. We highlight SDS works under certain assumptions. As shown in our theoretical result in Section 3.3, the SDS technique would fail 1) if the dynamics dataset does not contain trajectories leading to the goal set of a given context, 2) the context-goal dataset does not cover the contexts and goals faced at test time, or 3) if the goal set does not cover reachable goals from initial states. While we believe SDS for its simplicity and theoretical guarantees would be useful in real-world settings (such as learning visual-language robot policies), our experimental setup is limited to lowdimensional simulation environments. Scaling up SDS empirically is an interesting future direction.
+
+## REFERENCES
+
+Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. In _NeurIPS_ , 2017.
+
+- Andr´e Barreto, Will Dabney, R´emi Munos, Jonathan J Hunt, Tom Schaul, Hado van Hasselt, and David Silver. Successor features for transfer in reinforcement learning. In _NeurIPS_ , 2017.
+
+10
+
+- Yevgen Chebotar, Karol Hausman, Yao Lu, Ted Xiao, Dmitry Kalashnikov, Jacob Varley, Alex Irpan, Benjamin Eysenbach, Ryan C Julian, Chelsea Finn, et al. Actionable models: Unsupervised offline reinforcement learning of robotic skills. In _ICML_ , 2021.
+
+Ching-An Cheng, Tengyang Xie, Nan Jiang, and Alekh Agarwal. Adversarially trained actor critic for offline reinforcement learning. In _ICML_ , 2022.
+
+- Carlo D’Eramo, Davide Tateo, Andrea Bonarini, Marcello Restelli, and Jan Peters. Sharing knowledge in multi-task deep reinforcement learning. In _ICLR_ , 2020.
+
+Justin Fu, Aviral Kumar, Ofir Nachum, George Tucker, and Sergey Levine. D4rl: Datasets for deep data-driven reinforcement learning. _arXiv preprint arXiv:2004.07219_ , 2020.
+
+Scott Fujimoto and Shixiang Gu. A minimalist approach to offline reinforcement learning. In _NeurIPS_ , 2021.
+
+- Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In _ICML_ , 2019.
+
+- Meera Hahn, Devendra Singh Chaplot, Shubham Tulsiani, Mustafa Mukadam, James M Rehg, and Abhinav Gupta. No rl, no simulation: Learning to navigate without navigating. In _NeurIPS_ , 2021.
+
+- Assaf Hallak, Dotan Di Castro, and Shie Mannor. Contextual markov decision processes. _arXiv preprint arXiv:1502.02259_ , 2015.
+
+- Beining Han, Chongyi Zheng, Harris Chan, Keiran Paster, Michael R Zhang, and Jimmy Ba. Learning domain invariant representations in goal-conditioned block mdps. In _NeurIPS_ , 2021.
+
+- Matteo Hessel, Hubert Soyer, Lasse Espeholt, Wojciech Czarnecki, Simon Schmitt, and Hado Van Hasselt. Multi-task deep reinforcement learning with popart. In _AAAI_ , 2019.
+
+Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. _arXiv preprint arXiv:2207.12598_ , 2022.
+
+- Hao Hu, Yiqin Yang, Qianchuan Zhao, and Chongjie Zhang. The provable benefit of unsupervised data sharing for offline reinforcement learning. In _ICLR_ , 2023.
+
+- Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline rl? In _ICML_ , 2021.
+
+Leslie Pack Kaelbling. Learning to achieve goals. In _IJCAI_ , 1993.
+
+- Dmitry Kalashnikov, Jacob Varley, Yevgen Chebotar, Benjamin Swanson, Rico Jonschkowski, Chelsea Finn, Sergey Levine, and Karol Hausman. Mt-opt: Continuous multi-task robotic reinforcement learning at scale. _arXiv preprint arXiv:2104.08212_ , 2021.
+
+- Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q- learning. In _ICLR_ , 2021.
+
+- Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. In _NeurIPS_ , 2020.
+
+- Alexander C Li, Lerrel Pinto, and Pieter Abbeel. Generalized hindsight for reinforcement learning. In _NeurIPS_ , 2020.
+
+- Anqi Li, Byron Boots, and Ching-An Cheng. Mahalo: Unifying offline reinforcement learning and imitation learning from observations. In _ICML_ , 2023a.
+
+- Anqi Li, Dipendra Misra, Andrey Kolobov, and Ching-An Cheng. Survival instinct in offline reinforcement learning. _arXiv preprint arXiv:2306.03286_ , 2023b.
+
+- Corey Lynch, Mohi Khansari, Ted Xiao, Vikash Kumar, Jonathan Tompson, Sergey Levine, and Pierre Sermanet. Learning latent plans from play. In _CORL_ , 2020.
+
+11
+
+Yecheng Jason Ma, Jason Yan, Dinesh Jayaraman, and Osbert Bastani. Offline goal-conditioned reinforcement learning via _f_ -advantage regression. In _NeurIPS_ , 2022.
+
+- Piotr Mirowski, Matthew Koichi Grimes, Mateusz Malinowski, Karl Moritz Hermann, Keith Anderson, Denis Teplyashin, Karen Simonyan, Koray Kavukcuoglu, Andrew Zisserman, and Raia Hadsell. Learning to navigate in cities without a map. In _NeurIPS_ , 2018.
+
+- Dipendra K Misra, Jaeyong Sung, Kevin Lee, and Ashutosh Saxena. Tell me dave: Context-sensitive grounding of natural language to manipulation instructions. _International Journal of Robotics Research_ , 35(1-3):281–300, 2016.
+
+- Ashvin Nair, Vitchyr Pong, Murtaza Dalal, Shikhar Bahl, Steven Lin, and Sergey Levine. Visual reinforcement learning with imagined goals. In _NeurIPS_ , 2018.
+
+- Suraj Nair and Chelsea Finn. Hierarchical foresight: Self-supervised learning of long-horizon tasks via visual subgoal generation. In _ICLR_ , 2019.
+
+- Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In _ICML_ , 2015.
+
+- Avi Singh, Albert Yu, Jonathan Yang, Jesse Zhang, Aviral Kumar, and Sergey Levine. Cog: Connecting new skills to past experience with offline reinforcement learning. _arXiv preprint arXiv:2010.14500_ , 2020.
+
+- Shagun Sodhani, Amy Zhang, and Joelle Pineau. Multi-task reinforcement learning with contextbased representations. In _ICML_ , 2021.
+
+- Pei Sun, Henrik Kretzschmar, Xerxes Dotiwalla, Aurelien Chouard, Vijaysai Patnaik, Paul Tsui, James Guo, Yin Zhou, Yuning Chai, Benjamin Caine, Vijay Vasudevan, Wei Han, Jiquan Ngiam, Hang Zhao, Aleksei Timofeev, Scott Ettinger, Maxim Krivokon, Amy Gao, Aditya Joshi, Yu Zhang, Jonathon Shlens, Zhifeng Chen, and Dragomir Anguelov. Scalability in perception for autonomous driving: Waymo open dataset. In _CVPR_ , 2020.
+
+- Yee Whye Teh, Victor Bapst, Wojciech Marian Czarnecki, John Quan, James Kirkpatrick, Raia Hadsell, Nicolas Heess, and Razvan Pascanu. Distral: robust multitask reinforcement learning. In _NeurIPS_ , 2017.
+
+- Homer Rich Walke, Kevin Black, Tony Z. Zhao, Quan Vuong, Chongyi Zheng, Philippe HansenEstruch, Andre Wang He, Vivek Myers, Moo Jin Kim, Max Du, Abraham Lee, Kuan Fang, Chelsea Finn, and Sergey Levine. Bridgedata v2: A dataset for robot learning at scale. In _CORL_ , 2023.
+
+- Benjamin Wilson, William Qi, Tanmay Agarwal, John Lambert, Jagjeet Singh, Siddhesh Khandelwal, Bowen Pan, Ratnesh Kumar, Andrew Hartnett, Jhony Kaesemodel Pontes, Deva Ramanan, Peter Carr, and James Hays. Argoverse 2: Next generation datasets for self-driving perception and forecasting. In _NeurIPS_ , 2021.
+
+- Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. _arXiv preprint arXiv:1911.11361_ , 2019.
+
+- Tengyang Xie, Ching-An Cheng, Nan Jiang, Paul Mineiro, and Alekh Agarwal. Bellman-consistent pessimism for offline reinforcement learning. In _NeurIPS_ , 2021.
+
+- Rui Yang, Lin Yong, Xiaoteng Ma, Hao Hu, Chongjie Zhang, and Tong Zhang. What is essential for unseen goal generalization of offline goal-conditioned rl? In _ICML_ , 2023.
+
+- Albert Yu and Ray Mooney. Using both demonstrations and language instructions to efficiently learn robotic tasks. In _ICLR_ , 2023.
+
+- Tianhe Yu, Garrett Thomas, Lantao Yu, Stefano Ermon, James Zou, Sergey Levine, Chelsea Finn, and Tengyu Ma. Mopo: model-based offline policy optimization. In _NeurIPS_ , 2020.
+
+- Tianhe Yu, Aviral Kumar, Yevgen Chebotar, Karol Hausman, Sergey Levine, and Chelsea Finn. Conservative data sharing for multi-task offline reinforcement learning. In _NeurIPS_ , 2021.
+
+12
+
+Tianhe Yu, Aviral Kumar, Yevgen Chebotar, Karol Hausman, Chelsea Finn, and Sergey Levine. How to leverage unlabeled data in offline reinforcement learning. In _ICML_ , 2022.
+
+- Zhuangdi Zhu, Kaixiang Lin, Anil K Jain, and Jiayu Zhou. Transfer learning in deep reinforcement learning: A survey. _IEEE Transactions on Pattern Analysis and Machine Intelligence_ , 2023.
+
+13
+
+## A ADDITIONAL RELATED WORK
+
+**Data-sharing in RL** Sharing information across multiple tasks is a promising approach to accelerate learning and to identify transferable features across tasks. In RL, both multi-task and transfer learning settings have been studied under varying assumption on the shared properties and structures of different tasks (Zhu et al., 2023; Teh et al., 2017; Barreto et al., 2017; D’Eramo et al., 2020). For data sharing in CGO, we adopt the contextual MDP formulation (Hallak et al., 2015; Sodhani et al., 2021), which enables knowledge transfer via high-level contextual cues. Prior work on offline RL has also shown the utility of sharing data across tasks: hindsight relabeling and manual skill grouping (Kalashnikov et al., 2021), inverse RL (Li et al., 2020), sharing Q-value estimates (Yu et al., 2021; Singh et al., 2020) and reward labeling (Yu et al., 2022; Hu et al., 2023).
+
+## B SDS +PSPI: THEORETICAL ANALYSIS
+
+In this section, we provide a detailed analysis for the instantiation of SDS using PSPI. We follow the same notation for the value functions, augmented MDP and extended function classes as stated in Section 2 and Section 3 in the main text.
+
+## B.1 EQUIVALENCE RELATIONS BETWEEN ORIGINAL AND AUGMENTED MDP
+
+We begin by showing that the optimal policy and any value function in the augmented MDP can be expressed using their analogue in the original MDP. With the augmented MDP defined as _M_ := _π_ (¯ _X_[¯] : _,XA_[¯][¯] _,→R,_[¯] _AP, γ_[¯][¯] , we define the Q function for the augmented MDP as) in Section 3.1, we first define the value function in the augmented MDP. For a policy
+
+**==> picture [206 x 31] intentionally omitted <==**
+
+Notice that we don’t have a reaching time random variable _T_ in this definition; instead the agent would enter an absorbing state _V_ ¯ _[π]_[¯] ( _s_ ) := _Q_ ¯ _[π]_[¯] ( _x,_ ¯ _π_ ). _s_[+] after taking _a_[+] in the augmented MDP. We can define similarly
+
+**Remark B.1.** _Let Q_[¯] _[π] R[be the extension of][ Q][π][ based on][ R][. We have, for][ x][∈][/][G][,][Q]_[¯] _[π] R_[(] _[x, a]_[) =] _[Q]_[¯] _[π]_[¯][(] _[x, a]_[)] _∀a ∈ A_[¯] _, and for x ∈ G, Q_[¯] _[π] R_[(] _[x, a]_[) =] _[Q]_[¯] _[π]_[¯][(] _[x, a]_[+][) = 1] _[,][ ∀][a][ ∈] A_[¯] _._
+
+By the construction of the augmented MDP, it is obvious that the following is true.
+
+**Lemma B.2.** _Given π_ : _X →_ ∆( _A_ ) _, let π_ ¯ _be its extension. For any h_ : _X × A →_ R _, it holds_
+
+**==> picture [230 x 31] intentionally omitted <==**
+
+_where T is the goal-reaching time (random variable) and we define h_[˜] _[π]_ ( _x, a_[+] ) = _h_ ( _x, π_ ) _._
+
+We can now relate the value functions between the two MDPs.
+
+**Proposition B.3.** _For a policy π_ : _S →_ ∆( _A_ ) _, let π_ ¯ _be its extension (defined above). We have for all x ∈X , a ∈A,_
+
+**==> picture [88 x 27] intentionally omitted <==**
+
+_Conversely, for a policy ξ_ : _X_[¯] _→_ ∆( _A_[¯] ) _, define its restriction ξ on X and A by translating probability of ξ originally on a_[+] _to be uniform over A. Then we have for all s ∈S, a ∈A_
+
+**==> picture [86 x 29] intentionally omitted <==**
+
+_Proof._ The first direction follows from Lemma B.2. For the latter, whenever _ξ_ takes _a_[+] at some _x ∈/ G_ , it has _V_[¯] _[ξ]_ ( _x_ ) = 0 but _V_[¯] _[ξ]_ ~~(~~ _x_ ) _≥_ 0 since there is no negative reward in the original MDP. By performing a telescoping argument, we can derive the second claim.
+
+14
+
+By this lemma, we know the extension of _π[∗]_ (i.e., _π_ ¯ _[∗]_ ) is also optimal to the augmented MDP and _V[∗]_ ( _x_ ) = _V_[¯] _[∗]_ ( _x_ ) for _x ∈X_ . Furthermore, we have a reduction that we can solve for the optimal policy in the original MDP by the solving augmented MDP, since
+
+**==> picture [158 x 12] intentionally omitted <==**
+
+for all _ξ_ : _X_[¯] _→_ ∆( _A_ ). In particular,
+
+**==> picture [335 x 12] intentionally omitted <==**
+
+Since the augmented MDP replaces the random reaching time construction with an absorbing-state version, the Q function _Q_[¯] _[π]_[¯] of the extended policy _π_ ¯ satisfies the Bellman equation
+
+**==> picture [296 x 28] intentionally omitted <==**
+
+For _x ∈X_ and _a ∈A_ , we show how the above equation can be rewritten in _Q[π]_ and _R_ .
+
+**Proposition B.4.** _For x ∈X and a ∈A,_
+
+**==> picture [222 x 13] intentionally omitted <==**
+
+_For a_ = _a_[+] _, Q_[¯] _[π]_[¯] ( _x, a_[+] ) = _R_[¯] ( _x, a_[+] ) = _R_ ( _x_ ) _. For x ∈X_[+] _, Q_[¯] _[π]_[¯] ( _x, a_ ) = 0 _._
+
+_Proof._ The proof follows from Lemma B.5 and the definition of _P_[¯] .
+
+**Lemma B.5.** _For x ∈X , Q_[¯] _[π]_[¯] ( _x,_ ¯ _π_ ) = max( _R_ ( _x_ ) _, Q[π]_ ( _x, π_ ))
+
+_Proof._ For _x ∈X_ ,
+
+**==> picture [340 x 131] intentionally omitted <==**
+
+where in the last step we use _R_[¯] ( _x_ ) = 1 for _x ∈ G_ and _R_[¯] ( _x_ ) = 0 otherwise.
+
+## B.2 FUNCTION APPROXIMATOR ASSUMPTIONS
+
+In Theorem 3.5, we assume access to a policy class Π = _{π_ : _X →_ ∆( _A_ ) _}_ . We also assume access to a function class _F_ = _{f_ : _X × A →_ [0 _,_ 1] _}_ and a function class _G_ = _{g_ : _X →_ [0 _,_ 1] _}_ . We can think of them as approximator for the Q function and the reward function of the original MDP.
+
+Recall the zero-reward Bellman backup operator _T[π]_ with respect to _P_ ( _s[′] |s, a_ ) as defined in Assumption 3.3:
+
+**==> picture [154 x 12] intentionally omitted <==**
+
+where _P_ 0( _x[′] |x, a_ ) := _P_ ( _s[′] |s, a_ )1( _c[′]_ = _c_ ). Note this definition is different from the one with absorbing state _s_[+] in Section 2.3. Using this modified backup operator, we can show that the following realizability assumption is true for the augmented MDP:
+
+**Proposition B.6** (Realizability) **.** _By Assumption 3.2 and Assumption 3.3, there is f ∈F and g ∈G such that Q_[¯] _[π]_[¯] = _f_[¯] _g._
+
+15
+
+_Proof._ By Assumption 3.3, there is _h ∈F_ such that _h_ ( _x, a_ ) = max( _R_ ( _x_ ) _, Q[π]_ ( _x, a_ )). By Proposition B.4, we have for _x ∈X_ , _a ̸_ = _a_[+]
+
+**==> picture [222 x 41] intentionally omitted <==**
+
+For _a_ = _a[∗]_ , we have _Q_[¯] _[π]_[¯] ( _x, a[∗]_ ) = _R_[¯] ( _x, a_[+] ) = _R_ ( _x_ ) _∈G_ . Finally _Q_[¯] _[π]_[¯] ( _x_[+] _, a_ ) = 0 for _x_[+] _∈X_[+] . Therefore, _Q_[¯] _[π]_[¯] = _f_[¯] _g_ for some _f ∈F_ and _g ∈G_ .
+
+## B.3 ALGORITHM
+
+In this section, we describe the instantiation of PSPI with SDS in detail along with the necessary notation. As discussed in Section 3.3, our algorithm is based on the idea of reduction, which turns the offline CGO problem into an standard offline RL problem in the augmented MDP. To this end, we construct augmented datasets _D_[¯] dyn and _D_[¯] goal in Algorithm 1 as follows:
+
+**==> picture [429 x 28] intentionally omitted <==**
+
+For the analysis, we consider a simplified version of Algorithm 1 where we do not reuse the samples in _D_ dyn. Specifically, for each sample ( _si, ai, s[′] i_[)] _[ ∈][D]_[dyn][, we pair it with one sample][ (] _[·][, c][j]_[)] _[ ∈][D]_[goal] and do not reuse the sample from _D_ dyn. This can be naively done by pairing observed transitions and context-goal pairs in both datasets when _|D_ goal _| ≥|D_ dyn _|_ . In the analysis, we will state our results under this simplification.
+
+¯ ¯ With this construction, we have: _D_ dyn _∼ µ_ dyn( _s, a, s[′]_ ) _µ_ goal( _c_ ) and _D_ goal _∼ µ_ goal( _c, s_ )1( _a_ = _a_[+] )1( _s[′]_ = _s_[+] ). With abuse of notation, we write _µ_ dyn( _x, a, x[′]_ ) = _µ_ dyn( _s, a, s[′]_ ) _µ_ goal( _c_ ) and _µ_ goal( _x, a, x[′]_ ) = _µ_ goal( _c, s_ )1( _a_ = _a_[+] )1( _s[′]_ = _s_[+] ). Note that, _|D_[¯] goal _|_ = _|D_ goal _|_ and _|D_[¯] dyn _|_ = _|D_ dyn _|_ asdatasets have the standard tuple format, so we can run offline RL onwe are simply augmenting the observed states and actions without _D_[¯] dynreusing� _D_ ¯ goalsamples.. These two
+
+**SDS +PSPI** We consider the information theoretic version of PSPI (Xie et al., 2021) which can be summarized as follows: For an MDP ( _X , A, R, P, γ_ ), given a tuple dataset _D_ = _{_ ( _x, a, r, x[′]_ ) _}_ , a policy class Π, and a value class _F_ , it finds the policy through solving the two-player game:
+
+**==> picture [346 x 17] intentionally omitted <==**
+
+where _f_ ( _d_ 0 _, π_ ) = E _x_ 0 _∼d_ 0[ _f_ ( _x_ 0 _, π_ )], _ℓ_ ( _f, f[′]_ ; _π, D_ ) := _|D_ 1 _|_ �( _x,a,r,x[′]_ ) _∈D_[(] _[f]_[(] _[x, a]_[)] _[ −][r][ −][f][ ′]_[(] _[x][′][, π]_[))][2][.] The term _ℓ_ ( _f, f_ ; _π, D_ ) _−_ min _f ′ ℓ_ ( _f[′] , f_ ; _π, D_ ) in the constraint is an empirical estimation of the Bellman error on _f_ with respect to _π_ on the data distribution _µ_ , i.e. E _x,a∼µ_ [( _f_ ( _x, a_ ) _−T[π] f_ ( _x, a_ ))[2] ]. It constrains the Bellman error to be small, since E _x,a∼µ_ [( _Q[π]_ ( _x, a_ ) _−T[π] Q[π]_ ( _x, a_ ))[2] ] = 0.
+
+Below we show how to run PSPI to solve the augmented MDP with offline dataset _D_[¯] dyn � _D_ ¯ goal. To this end, we extend the policy class from Π to Π[¯] , and the value class from _F_ to _F_[¯] _G_ using the function class _G_ based on the extensions defined in Section 3.1. One natural attempt is to implement¯ equation 5 with the extended policy and value classes Π[¯] and _F_[¯] and _D_[¯] = _D_[¯] dyn � _D_ goal. This would lead to the two player game:
+
+**==> picture [363 x 21] intentionally omitted <==**
+
+However, equation 6 is not a well defined algorithm, because its usage of the extended policy _π_ ¯ in the constraint requires knowledge of _G_ , which is unknown to the agent.
+
+Fortunately, we show that equation 6 can be slightly modified so that the implementation does not actually require knowing _G_ . Here we use a property (Proposition B.4) that the Bellman equation of the augmented MDP:
+
+**==> picture [222 x 29] intentionally omitted <==**
+
+16
+
+for _x ∈X_ and _a ̸_ = _a_[+] , and _Q_[¯] _[π]_[¯] ( _x, a_ ) = 1 for _x ∈ G_ and _a_ = _a_[+] .
+
+We apply these two equalities to _D_[¯] dyn and _D_[¯] goal to construct our Bellman error estimates. Let _ϕ_ ( _Q_[¯] _[π]_[¯] ( _x_ )) := max( _R_ ( _x_ ) _, Q[π]_ ( _x, π_ )). We can rewrite the squared Bellman error on these two data distributions using the Bellman backup defined on the augmented MDP (see eq.4) as below:
+
+**==> picture [401 x 24] intentionally omitted <==**
+
+**==> picture [341 x 13] intentionally omitted <==**
+
+We¯ can construct an approximator _f_[¯] _g_ ( _x, a_ ) for _Q_[¯] _[π]_[¯] ( _x, a_ ). Substituting the estimator _f_[¯] _g_ ( _x, a_ ) for _Q[π]_[¯] ( _x, a_ ) in the squared Bellman errors above and approximating them by finite samples, we derive the empirical losses below.
+
+**==> picture [353 x 63] intentionally omitted <==**
+
+where we use _ϕ_ ( _f_[¯] _g_ )( _x, a_ ) = max( _g_ ( _x_ ) _, f_ ( _x, a_ )) and for _x ∈X/_[+] , _f_[¯] _g_ ( _x, a_ ) = _f_ ( _x, a_ )1( _a_ = _a_[+] ) + _g_ ( _x_ )1( _a_ = _a_[+] ).
+
+Using this loss, we define the two-player game of PSPI for the augmented MDP:
+
+**==> picture [300 x 60] intentionally omitted <==**
+
+Notice _f_[¯] _g_ ( _d_ 0 _,_ ¯ _π_ ) = _f_ ( _d_ 0 _, π_ ). Therefore, this problem can be solved using samples from _D_ without knowing _G_ .
+
+B.4 ANALYSIS
+
+**Covering number** We first define the covering number on the function classes _F_ , _G_ , and Π[13] . For _F_ and _G_ , we use the _L∞_ metric. We use _N∞_ ( _F, ϵ_ ) and _N∞_ ( _G, ϵ_ ) to denote the their _ϵ_ -covering numbers. For Π, we use the _L∞_ - _L_ 1 metric, i.e., _∥π_ 1 _− π_ 2 _∥∞,_ 1 := sup _x∈X ∥π_ 1( _·|s_ ) _− π_ 2( _·|s_ ) _∥_ 1. We use _N∞,_ 1(Π _, ϵ_ ) to denote its _ϵ_ -covering number.
+
+**High-probability Events** First, we show _Q_[¯] _[π]_[¯] has small empirical errors. **Lemma B.7.** _With probability at least_ 1 _− δ, it holds for all π ∈_ Π _,_
+
+**==> picture [192 x 37] intentionally omitted <==**
+
+_where_[14]
+
+**==> picture [347 x 40] intentionally omitted <==**
+
+> 13For finite function classes, the resulting performance guarantee will depend on _|F|, |G|_ and _|_ Π _|_ instead of the covering numbers as stated in Theorem 3.5.
+
+> 14Technically, we can remove _N∞_ � _G, |D_ 1dyn _|_ � in the upper bound, but we include it here for a cleaner presentation.
+
+17
+
+_Proof._ Note _Q_[¯] _[π]_[¯] = _f_[¯] _g_ for some _f ∈F_ and _g ∈G_ (Proposition B.6) and
+
+0 = E _x,a∼µ_ dyn[( _Q_[¯] _[π]_[¯] ( _x, a_ ) _− T_[¯] _[π]_[¯] _Q_[¯] _[π]_[¯] ( _x, a_ ))[2] ] = E _x,a∼µ_ dyn[( _Q_[¯] _[π]_[¯] ( _x, a_ ) _−_ 0 _− γ_ E _x′∼P_ ¯ ( _·|x,a_ )[[] _[ϕ]_[( ¯] _[Q][π]_[¯][)(] _[x][′][, π]_[)])][2][]] Following a similar proof of Theorem 8 of (Cheng et al., 2022), we can derive _ϵ_ dyn. On the other hand, _ℓ_ goal( _f_[¯] _g_ ) = 0 because the reward _R_ ( _x_ ) is deterministic.
+
+Nest, we show that with high probability the empirical error can upper bound the population error. **Lemma B.8.** _For all f ∈F, g ∈G satisfying_
+
+**==> picture [180 x 38] intentionally omitted <==**
+
+_With probability at least_ 1 _− δ, for any f ∈F,g ∈G_
+
+**==> picture [269 x 68] intentionally omitted <==**
+
+_Proof._ This follows from Theorem 9 of (Cheng et al., 2022).
+
+**Pessimistic Estimate** We show the empirical value estimate found in equation 11 is pessimistic. _f_ **Lemma** ¯ _g[π]_[(] _[d]_[0] _[,]_[ ¯] _[π]_[)] **B.9.** _[ ≤][Q][π] Given_[(] _[d]_[0] _[, π] π_[)] _, let f_[¯] _g[π][denote][the][minimizer][in][equation][11.] With high probability,_
+
+_Proof._ By Lemma B.7, we have _f_[¯] _g[π]_[(] _[d]_[0] _[,]_[ ¯] _[π]_[)] _[ ≤][Q]_[¯] _[π] R_[(] _[d]_[0] _[,]_[ ¯] _[π]_[) =] _[ Q][π]_[(] _[d]_[0] _[, π]_[)][.]
+
+Next we bound the amount of underestimation.
+
+**Lemma B.10.** _Suppose x_ 0 _∼ d_ 0 _is not in G almost surely. For any π ∈_ Π _,_
+
+**==> picture [356 x 48] intentionally omitted <==**
+
+_Note that in a trajectory xT ∈ G whereas xt ∈/ G for t < T by definition of T ._
+
+_Proof._ Let _f_[¯] _g[π]_[=][(] _[f][ π][, g][π]_[)][ be the empirical minimizer.][By performance difference lemma,][we can] write
+
+**==> picture [168 x 45] intentionally omitted <==**
+
+whereaverage state-action distribution ofwith abuse of notation we define _π_ ¯ in the augmented MDP. _d_[¯] _[π]_[¯] ( _x, a, x[′]_ ) := _d_[¯] _[π]_[¯] ( _x, a_ ) _P_[¯] ( _x[′] |x, a_ ), where _d_[¯] _[π]_[¯] ( _x, a_ ) is the
+
+In the above expectation, for _x ∈ G_ , we have _a_ = _a_[+] and _x_[+] = ( _s_[+] _, c_ ) after taking _a_[+] at _x_ = ( _s, c_ ), which leads to
+
+**==> picture [382 x 31] intentionally omitted <==**
+
+**==> picture [298 x 28] intentionally omitted <==**
+
+18
+
+where the last step is because of the definition of _f_[¯] _g[π]_[.][For] _[ x][ ∈X]_[ +][, we have] _[ x][ ∈X]_[ +][ and the reward] is zero, so
+
+**==> picture [152 x 13] intentionally omitted <==**
+
+Therefore, we can derive
+
+**==> picture [370 x 29] intentionally omitted <==**
+
+Finally, using Lemma B.2 we can have the final upper bound.
+
+B.5 MAIN RESULT: PERFORMANCE BOUND
+
+Let _π[†]_ be the learned policy and let _f_[¯] _g[π][†]_ be the learned function approximators. For any comparator policy _π_ , let _f_[¯] _g[π]_[= (] _[f][ π][, g][π]_[)][ be the estimator of] _[ π]_[ on the data.][We have.]
+
+**==> picture [362 x 186] intentionally omitted <==**
+
+where Cdyn( _π_ ) and Cgoal( _π_ ) are the concentrability coefficients defined in Definition 3.4.
+
+**Theorem B.11.** _Let π[†] denote the learned policy of SDS + PSPI with datasets Ddyn and Dgoal, using value function classes F_ = _{X × A →_ [0 _,_ 1] _} and G_ = _{X →_ [0 _,_ 1] _}. Under realizability and completeness assumptions as stated in Assumption 3.2 and Assumption 3.3 respectively, with probability_ 1 _− δ, it holds, for any π ∈_ Π _,_
+
+**==> picture [195 x 13] intentionally omitted <==**
+
+_where_
+
+_and,_
+
+**==> picture [300 x 103] intentionally omitted <==**
+
+_are statistical errors, and_ C _dyn_ ( _π_ ) _and_ C _goal_ ( _π_ ) _are concentrability coefficients which decrease as the data coverage increases._
+
+19
+
+## C EXPERIMENTAL DETAILS
+
+## C.1 HYPERPARAMETERS AND EXPERIMENTAL SETTINGS
+
+**IQL.** For IQL, we keep the hyperparameter of _γ_ = 0 _._ 99, _τ_ = 0 _._ 9, _β_ = 10 _._ 0, and _α_ = 0 _._ 005 in Kostrikov et al. (2021), and tune other hyperparameters on the antmaze-medium-play-v2 environment and choose batch size = 1024 from candidate choices _{_ 256, 512, 1024, 2046 _}_ , learning rate = 10 _[−]_[4] from candidate choices _{_ 5 _·_ 10 _[−]_[5] _,_ 10 _[−]_[4] _,_ 3 _·_ 10 _[−]_[4] _}_ and 3 layer MLP with RuLU activating and 256 hidden units for all networks. We use the same set of IQL hyperparameters for both our methods and all the baseline methods included in Section 4.2, and apply it to all environments.
+
+**RP.** For naive reward prediction, we use the full context-goal dataset as positive data, and train a reward model with 3-layer MLP and ReLU activations, learning rate = 10 _[−]_[4] , batch size = 1024, and training for 100 epochs for convergence. To label the transition dataset, we need to find some appropriate threshold to label states predicted as goals given contexts. We choose the percentile as 5% in the reward distribution evaluated by the context-goal set as the threshold to label goals in the antmaze-medium-play-v2 environment, from candidate choices _{_ 0%, 5%, 10% _}_ . Then we apply it to all environments. Another trick we apply for the reward prediction is that instead of predicting 0 for the context-goal dataset, we let it predict 1 but shift the reward prediction by -1 during reward evaluation, which prevents the model from learning all 0 weights. Similar tricks are also used in other reward learning baselines.
+
+**UDS+RP.** We use the same structure and training procedure for the reward model as RP, except that we also randomly sample a minibatch of “negative” contextual transitions with the same batch size for a balanced distribution, which is constructed by randomly sampling combinations of a state in the trajectory-only dataset and a context from the context-goal dataset. To create a balanced distribution of positive and negative samples, we sample from each dataset with equal probability. For the threshold, we choose the percentile as 5% in the reward distribution evaluated by the contextgoal set as the threshold to label goals in the antmaze-medium-play-v2 environment, from candidate choices _{_ 0%, 5%, 10% _}_ . Then we apply it to all environments.
+
+**PDS.** We use the same structure and training procedure for the reward model as RP, except that we train an ensemble of 10 networks as in Hu et al. (2023). To select the threshold percentile and the pessimistic weight _k_ , we choose the percentile as 15% in the reward distribution evaluated by the context-goal set as the threshold to label goals from candidate choices _{_ 0%, 5%, 10%, 15%, 20% _}_ , and _k_ = 15 from the candidate choices _{_ 5,10,15,20 _}_ in the antmaze-medium-play-v2 environment. Then we apply them to all environments.
+
+**SDS (ours).** We do not require extra parameters other than the possibility of sampling from the real and fake transitions. Intuitively, we should sample from both datasets with the same probability to create an overall balanced distribution. Empirically, we also find that the balance distribution generates the best result.
+
+## C.2 REWARD MODEL EVALUATION
+
+For reward learning baselines, we evaluate the learned reward model: we construct the positive dataset from context-goal examples, and the negative dataset from the combination of the context set and all states in the trajectory-only data, using the oracle context-goal function defined in the environment to filter out positive ones. We then evaluate the predicted reward on both positive and negative datasets, generating boxplots to visualize the distributions of the predicted reward for both datasets. The purpose of the reward model evaluation is to showcase whether the learned reward function can successfully capture context-goal relationships.
+
+## D MORE REWARD MODEL EVALUATIONS
+
+Here we present boxplots for reward models with experimental setups in Section 4.3, 4.4 and 4.5.
+
+20
+
+**==> picture [127 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [127 x 96] intentionally omitted <==**
+
+**==> picture [296 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) PDS (b) UDS+RP (c) RP **----- End of picture text -----**
+
+Figure 3: Reward model evaluation for the medium-diverse environment in Section 4.3. Green dots are outliers.
+
+**==> picture [127 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [127 x 96] intentionally omitted <==**
+
+**==> picture [296 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) PDS (b) UDS+RP (c) RP **----- End of picture text -----**
+
+Figure 4: Reward model evaluation for the umaze-diverse environment in Section 4.3. Green dots are outliers.
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [370 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Large, PDS (b) Large, UDS+RP (c) Medium, PDS (d) Medium, UDS+RP **----- End of picture text -----**
+
+Figure 5: Reward model evaluation for Four Rooms in Section 4.4. Green dots are outliers.
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [96 x 72] intentionally omitted <==**
+
+**==> picture [370 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Large, PDS (b) Large, UDS+RP (c) Medium, PDS (d) Medium, UDS+RP **----- End of picture text -----**
+
+Figure 6: Reward evaluation for Random Cells in Section 4.5 (the test context distribution is the same as training). Green dots are outliers.
+
+21
+
diff --git a/open_review/iclr2024_8572.json b/open_review/iclr2024_8572.json
new file mode 100644
index 0000000000000000000000000000000000000000..b8120a6e13a1a72c2eed5dc6efca7686ca642972
--- /dev/null
+++ b/open_review/iclr2024_8572.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8572",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Efficient Model-Agnostic Multi-Group Equivariant Networks",
+ "abstract": "Constructing model-agnostic group equivariant networks, such as equitune (Basu et al., 2023b) and its generalizations (Kim et al., 2023), can be computationally expensive for large product groups. We address this by providing efficient model-agnostic equivariant designs for two related problems: one where the network has multiple inputs each with potentially different groups acting on them, and another where there is a single input but the group acting on it is a large product group. For the first design, we initially consider a linear model and characterize the entire equivariant space that satisfies this constraint. This characterization gives rise to a novel fusion layer between different channels that satisfies an invariance-symmetry (IS) constraint, which we call an IS layer. We then extend this design beyond linear models, similar to equitune, consisting of equivariant and IS layers. We also show that the IS layer is a universal approximator of invariant-symmetric functions. Inspired by the first design, we use the notion of the IS property to design a second efficient model-agnostic equivariant design for large product groups acting on a single input. For the first design, we provide experiments on multi-image classification where each view is transformed independently with transformations such as rotations. We find equivariant models are robust to such transformations and perform competitively otherwise. For the second design, we consider three applications: language compositionality on the SCAN dataset to product groups; fairness in natural language generation from GPT-2 to address intersec- tionality; and robust zero-shot image classification with CLIP. Overall, our methods are simple and general, competitive with equitune and its variants, while also being computationally more efficient.",
+ "rebuttal": "### (Contd.) Response to reviewer ePZ4\n**Reviewer:** In fact, I would argue that you can just as easily do frame averaging and canonicalization in these settings. Thus at minimum these should be baselines.\n\n**Response:** Please note that frame averaging is a general framework that encompasses equituning [1], lambda-equitune [2], probabilistic symmetrization [3], canonicalization [7], and equivariant adaptation [4].\n\n\nWe include comparison to a frame averaging method, equituning, which is known to perform well with pretrained models. The canonicalization paper, on the other hand, focuses on model-agnostic equivariance but does not explore the effect of its use on pretrained models. Later, [4], which appeared just a few days before the ICLR deadline, showed that naive canonicalization is not good enough for use with pretrained models, and hence modified/improved versions are required. Since this work appeared very close to the ICLR deadline, we are unable to provide detailed comparisons.\n\n\nAdditionally, note that canonicalization is non-trivial for translation tasks such as SCAN. This is because performing canonicalization [7] for a translation task with M input tokens and N output tokens would require finding the group element corresponding to the entire sequence of input and applying the same group element on the entire output sequence. This is not possible due to different numbers of input and output tokens. However, it is still possible to apply equitune and multi-equitune in this case since the group action is defined on the vocabulary space of the tokens and applied to each token simultaneously. Applying the group action simultaneously on each of the tokens is not possible for canonicalization because the group element is dependent on the entire input and output sequences.\n\n\nFurther, note that our work is complementary to the methods of [2-4]. Thus, the advantages obtained by [2, 3] over [1] and [4] over [7] can also be obtained by applying them to our algorithm. To keep our exposition simple, we start with equitune and show how it becomes expensive for large groups and hence using group decomposition can massively improve time complexity at the cost of a small drop in performance. Note that as the pretrained models get larger, the drop in performance decreases (cf. Fig. 4), while the improvement in complexity remains the same. \n[7] Kaba et a. \"Equivariance with Learned Canonicalization Functions\" ICML 2023\n\n**Reviewer:** Experimental design and results The entire choice of experiments in this paper leans heavily on Basu et. al 2023's results. But I don't think the authors thought that the experimental setup in that paper might also be problematic in terms of highlighting the claims and goals. \n\n**Response:** Please note that our intent in designing experiments is to validate the advantages gained from our algorithm as compared to existing model-agnostic frame-averaging-based methods such as equitune. Clearly, the theoretical advantage is huge (sum of group sizes vs. product of group sizes) and is validated in our experiments. \n\nIt is unclear to us how the experimental setup in [2] is problematic and would appreciate further guidance from the reviewer. We believe that the setup in [2] perfectly fits our framework and allows us to demonstrate the advantage gained by using our method on product groups used in the setup of [2].\n\n**Reviewer:** First, there is really no standard equivariant benchmark from many of the seminal equivariant papers ... the lack of this benchmark is alarming.\n\n**Response:** Response: \nPlease note that works such as [8] considered a similar problem of constructing approximately equivariant networks for larger groups using networks that are equivariant to smaller groups. Our work, just like [8], has mostly focused on images (and additionally, text).\n\n\nWe believe the reviewer is suggesting an SE(3)xS_n experiment in the context of our second formulation where one single model has group action applied that is a product of multiple smaller groups. However, we are unclear as to how this experiment would elucidate properties of our method. Our method is useful when we have large non-equivariant pretrained models and we want good finetuning or zero-shot performance. For example, if the zero-shot performance requires multiple passes through the pretrained model, our method shows how to reduce the number of forward passes while showing excellent equivariant performance. We are happy to receive specific guidance from the reviewer on molecular experiments (e.g. with non-equivariant pretrained models) that would provide insights into our method. \n\n[8] Maile et al. \"Equivariance-aware Architectural Optimization of Neural Networks.\" ICLR 2023\n\n### (contd.) Response to reviewer ePZ4\n**Reviewer:** ...to show discrete product group structure then there is a large body of work on latent space disentanglement via Linear symmetries which started from the seminal work of (Higgins et. al 2018)...\n\n**Response:** Unfortunately, again, it is unclear to us how these suggested experiments fit with the problem we pursue. We would again kindly request the reviewer to provide further detailed guidance on suggested experiments.\n\n**Reviewer:** ... choice of compositional generalization and intersectional fairness via group theoretic notions quite a c [...]\n\n### Response to Re: Response part 2\nWe thank the reviewer for their prompt response.\n\nWe did think through several setups of experiments including QM9 for molecules, and latent space product symmetries. However, we believe these experiments do not directly fit our framework. E.g., for the case of molecules with S_n x SO(2) symmetry, it is not clear if separating out S_n and SO(2) symmetries will lead to expressive neural networks. \n\nWe think the best impact of the work is in the case of discrete product groups that are not parametrizable (hence, most methods designed for large groups such as c [...]\n\n### Response to reviewer EpCD\nWe thank\n[rebuttal truncated]",
+ "initial_scores": [
+ 3,
+ 3,
+ 5,
+ 5
+ ],
+ "score_mean": 4.0,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "This paper propose a model-agnostic algorithm to build equivariant networks in the case of a group action that can be decomposed as a group product. The reviewers acknowledged the relevance an importance of this research direction. The reviewers noted several weaknesses for this paper:\n- The motivation and potential impact of the idea: it is not clear how the specific contribution of the paper (making equivariant pretrained models) would have an impact. More especially such a contribution could be useful if it could scale to large networks and large input (and thus groups) which is the second main concern.\n- The experiments could be improved to consider larger groups.\n- After several back and forth with the reviewers it is clear that the theory was lacking precision. \n\nI would suggest the author to rethink their story. In particular if they want to put the emphasis on the fact that their method is useful for large groups they should provide experiments with large groups.",
+ "forum_id": "O9gstAazBM",
+ "primary_area": "learning on graphs and other geometries & topologies",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_ePZ4",
+ "review_id": "iueQvuPP5C",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 4
+ },
+ "review_text_chars": 5370,
+ "edit_detected": true,
+ "edit_delta_seconds": 301025,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_gLGd",
+ "review_id": "tT9tUPtssZ",
+ "scores": {
+ "rating": 3,
+ "soundness": 1,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 2
+ },
+ "review_text_chars": 2942,
+ "edit_detected": true,
+ "edit_delta_seconds": 1004974,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_EpCD",
+ "review_id": "zWYpE6DF7h",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 1753,
+ "edit_detected": true,
+ "edit_delta_seconds": 785423,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_mvp1",
+ "review_id": "vWHcNSHN2q",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1542,
+ "edit_detected": true,
+ "edit_delta_seconds": 929799,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8572.md b/open_review/iclr2024_8572.md
new file mode 100644
index 0000000000000000000000000000000000000000..92a4db7af08b5d8f515d1c2429288d223937da7b
--- /dev/null
+++ b/open_review/iclr2024_8572.md
@@ -0,0 +1,673 @@
+
+
+## - EFFICIENT MODEL-AGNOSTIC MULTI-GROUP EQUIV ARIANT NETWORKS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Constructing model-agnostic group equivariant networks, such as equitune (Basu et al., 2023b) and its generalizations (Kim et al., 2023), can be computationally expensive for large product groups. We address this by providing efficient modelagnostic equivariant designs for two related problems: one where the network has multiple inputs each with potentially different groups acting on them, and another where there is a single input but the group acting on it is a large product group. For the first design, we initially consider a linear model and characterize the entire equivariant space that satisfies this constraint. This characterization gives rise to a novel fusion layer between different channels that satisfies an _invariancesymmetry_ ( _IS_ ) constraint, which we call an _IS layer_ . We then extend this design beyond linear models, similar to equitune, consisting of equivariant and IS layers. We also show that the IS layer is a universal approximator of invariant-symmetric functions. Inspired by the first design, we use the notion of the IS property to design a second efficient model-agnostic equivariant design for large product groups acting on a single input. For the first design, we provide experiments on multiimage classification where each view is transformed independently with transformations such as rotations. We find equivariant models are robust to such transformations and perform competitively otherwise. For the second design, we consider three applications: language compositionality on the SCAN dataset to product groups; fairness in natural language generation from GPT-2 to address intersectionality; and robust zero-shot image classification with CLIP. Overall, our methods are simple and general, competitive with equitune and its variants, while also being computationally more efficient.
+
+## 1 INTRODUCTION
+
+Equivariance to group transformations is crucial for data-efficient and robust training of large neural networks. Traditional architectures such as convolutional neural networks (CNNs) (LeCun et al., 1998), Alphafold (Jumper et al., 2021), and graph neural networks (Gilmer et al., 2017) use group equivariance for efficient design. Several works have generalized the design of equivariant networks to general discrete (Cohen & Welling, 2016) and continuous groups (Finzi et al., 2021b). Recently, Puny et al. (2021) introduced _frame averaging_ , which makes a non-equivariant model equivariant by averaging over an appropriate _frame_ or an equivariant set. One advantage of this method is that it can be used to finetune pretrained models, leveraging the benefits of pretrained models and equivariance simultaneously (Basu et al., 2023b;a; Kim et al., 2023).
+
+Methods based on frame-averaging have high computational complexity when the frames are large. And, in general, it is not trivial to find small frames. Hence, several frame averaging-based methods, such as equitune (Basu et al., 2023b) and its generalizations (Basu et al., 2023a; Kim et al., 2023), simply use the entire group as their frames. As such, these methods attain perfect equivariance at high computational cost for large groups. Similar computational issues arise when a network has multiple inputs with each input having an independent group acting on it. Here, we design efficient methods that can work with large groups or multiple inputs with independent groups. Our methods are applicable for both training from scratch and for equivariant finetuning of pretrained models.
+
+We first characterize the entire space of linear equivariant functions with multiple inputs, where all inputs are acted upon by independent groups. The resulting design has an interesting invariant-
+
+1
+
+**==> picture [149 x 103] intentionally omitted <==**
+
+**==> picture [169 x 100] intentionally omitted <==**
+
+**==> picture [249 x 8] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 1: (a) shows a multi input group equivariant network defined in §. 3.3, where groups _G_ 1 _, G_ 2 act on the inputs _X_ 1 _, X_ 2. Here _Mi,G[Eq] i_[denotes a layer equivariant to] _[ G][i]_[ and] _[ M][ IS] ij,Gi,Gj_[denote a layer] invariant-symmetric to groups _Gi, Gj_ . (b) denotes a model equivariant to _G_ 1 ⋊ _G_ 2 defined in §. 3.4 but with only a computational complexity of _O_ ( _|G_ 1 _|_ + _|G_ 2 _|_ ). Here _XG[Inv]_ denotes that the input features are invariant _G_ and _YG[Sym]_ denotes that the output features are _symmetric_ with respect to _G_ .
+
+symmetric (IS) fusion layer between channels. We find that the obtained design for linear models can be easily extended to non-linear models. We also show this IS layer has its own universality properties. The universality result not only shows that we are extracting the most out of the design but, as we will see, also helps us extend the formulation of the IS layer beyond the linear framework.
+
+Inspired by the IS layer, we propose an efficient method to construct a group-equivariant network for large discrete groups. For a product group of the form ( _G_ 1 ⋊ _· · ·_ ( _GN −_ 1 ⋊ _GN_ ) _· · ·_ ), the computational complexity of equituning is ( _|G_ 1 _|×· · ·×|GN |_ ), whereas our method provides the equivariance for the same group in ( _|G_ 1 _|_ + _· · ·_ + _|GN |_ ) compute. The advantage comes at a loss of expressivity of the constructed network, but we show empirically that our network still leverages the benefits of equivariance and outperforms non-equivariant models, while gaining computational benefit.
+
+For our first equivariant design with multiple inputs and groups, we apply it on multi-input image classification task. Then for our second design with single input and a large product group, we apply it on diverse applications, namely, compositional generalization in language, intersectional fairness in natural language generation, and robust image classification using CLIP. Our model designs, i.e., linear as well as their extension to model-agnostic designs, are given in §3. Details of applications they are used in are given in §4. Finally, experiments are provided in §5.
+
+## 2 BACKGROUND AND RELATED WORKS
+
+Basics on groups and group actions are provided in Appendix A.
+
+**Group equivariance and invariance-symmetry** A function _f_ : _X �→Y_ is _G_ **-equivariant** for a group _G_ if _f_ ( _gx_ ) = _gf_ ( _x_ ) for all _g ∈ G_ , _x ∈X_ , where the action of _g ∈ G_ on _x_ is written as _gx_ and that on _f_ ( _x_ ) is written as _gf_ ( _x_ ) for all _g ∈ G, x ∈X_ . We call a function _f_ : _X �→Y_ ( _G_ 1 _, G_ 2) **invariant-symmetric** in that order of groups, if _f_ ( _g_ 1 _x_ ) = _f_ ( _x_ ) for all _x ∈X_ and _g_ 1 _∈ G_ 1, and _f_ ( _x_ ) = _g_ 2 _f_ ( _x_ ) for all _x ∈X_ , _g_ 2 _∈ G_ 2.
+
+**Model-agnostic group equivariant networks** There has been a recent surge of interest in designing model-agnostic group equivariant network designs, such as _equitune_ (Basu et al., 2023b), _probabilistic symmetrization_ (Kim et al., 2023), _λ-equitune_ (Basu et al., 2023a), and _canonicalization_ (Kaba et al., 2023). These designs are based on the frame-averaging method (Puny et al., 2021), where a (potentially pretrained) non-equivariant model is averaged over an equivariant set, called a _frame_ . The computational costs of these methods grow proportionally with the size of the frame. Finding small frames for general groups and tasks is not trivial, hence, several previous works such as equitune, probabilistic symmetrization, and _λ_ -equitune simply use the entire group as the frame. These methods become inefficient for large groups. Canonicalization uses a frame of size exactly one but assumes a small auxiliary equivariant network is given, which might itself require frameaveraging. Canonicalization also assumes a known map from the outputs of this auxiliary network
+
+2
+
+to group elements, which is non-trivial for general groups. Moreover, canonicalization does not provide good zero-shot performance as do some special cases of _λ_ -equitune. Thus, it is crucial to design efficient frame-averaging techniques for large groups.
+
+Given a pretrained model _M_ : _X �→Y_ and a group _G_ , equitune produces the equivariant model _MG_ as _MG_ = _|G_ 1 _|_[(][�] _g∈G[g][−]_[1] _[M]_[(] _[gx]_[))] _[,]_[which][makes] _[|][G][|]_[passes][through][the][model] _[M]_[.][Thus,] as the size of the group grows, so does the complexity of several of these frame-averaging-based methods. In this work, we consider product groups of the form ( _G_ 1 ⋊ _· · ·_ ( _GN −_ 1 ⋊ _GN_ ) _· · ·_ ) and provide efficient model-agnostic equivariant network designs for two related problems, as described in §3.1. Our construction has complexity proportional to _|G_ 1 _|_ + _|G_ 2 _|_ + _· · ·_ + _|GN |_ compared to _|G_ 1 _| × |G_ 2 _| × · · · × |GN |_ for equitune. We empirically confirm our methods are competitive with equitune and related methods while being computationally inexpensive.
+
+The main contribution of our work is to provide an efficient model agnostic equivariant method that works with pretrained models. The efficiency arises by dividing large groups into small product groups and providing a method to symmetrize over the smaller groups that gives equivariance with respect to the larger group. Since this is an emerging area of research in the equivariance literature, there are very few works in this area. Compared to Basu et al. (2023b) which uses a simple averaging over the entire group to obtain symmetrization, we simply perform averaging over subgroups when the group can be decomposed as products. Kim et al. (2023); Mondal et al. (2023); Basu et al. (2022) use weighted averaging over group elements to obtain symmetrization, which is complementary to our work and can be used on top of our work for future work.
+
+**Additional related works** Several techniques exist to design group-equivariant networks such as parameter sharing and convolutions (Cohen & Welling, 2016; Ravanbakhsh et al., 2017; Kondor & Trivedi, 2018), computing the basis of equivariant space (Cohen & Welling, 2017; Weiler & Cesa, 2019; Finzi et al., 2021b; Yang et al., 2023; Fuchs et al., 2020; Thomas et al., 2018; De Haan et al., 2020; Basu et al., 2022), representation-based methods (Deng et al., 2021; Satorras et al., 2021), and regularization-based methods (Moskalev et al., 2023; Finzi et al., 2021a; Patel & Dolz, 2022; Arjovsky et al., 2019; Choraria et al., 2023). These methods typically rely on training from scratch, whereas our method also works with pretrained models.
+
+Atzmon et al. (2022); Duval et al. (2023) use frame-averaging for shape learning and materials modeling, respectively. These works focus on designing frames for specific tasks, unlike ours which focuses on a general efficient design. Maile et al. (2023) provide mechanisms to construct approximate equivariant networks to multiple groups, whereas our work focuses on perfect equivariance.
+
+## 3 METHOD
+
+## 3.1 PROBLEM FORMULATION AND PROOF OF EQUIVARIANCE
+
+**Multiple inputs** Let _X_ 1 _, . . . , XN_ and _Y_ 1 _, . . . , YN_ be _N_ inputs and outputs, respectively, to a neural network. Let _Xi ∈_ R _[d][i]_ and _Yi ∈_ R _[k][i]_ . Let _G_ 1 _, . . . , GN_ be _N_ groups acting on _X_ 1 _, . . . , XN_ respectively. That is, _Gi_ acts on _Xi_ independent of the other group actions. We want to construct a model _M_ ( _G_ 1 _,...,GN_ ) such that _Yi_ transforms equivariantly when _Gi_ acts on _Xi_ . A naive construction to attain such an equivariant model would be to construct _N_ separate equivariant models equivariant to the groups _GN , . . . , GN_ . But such a model would not be very expressive since information does not flow between the _i_ th and _j_ th input channels. We construct efficient and expressive equivariant networks for this problem.
+
+**Large product groups** Now, we consider a single input _X_ and a large product group _G_ that can be written as _G_ = ( _G_ 1 ⋊ _· · ·_ ( _GN −_ 1 ⋊ _GN_ ) _· · ·_ ), where ⋊ denotes the semi-direct product. We assume that _G_ transforms _X_ as _g_ 1 _g_ 2 _. . . gN X_ for _gi ∈ Gi_ , i.e., the subgroups _gi_ act in the same order. Further, note that we are assuming left group action of _G_ on _X_ . For constructing _G_ -equivariant models, we assume the groups act commutatively on the output, whereas for constructing _G_ -invariant models we do not need commutativity. As we will see in §4, most experiments covered in previous works such as Basu et al. (2023b;a) are covered by these basic assumptions. Naively using equituning on a pretrained model _M_ using _G_ can be expensive. Hence, we aim to design efficient group equivariant models for large product groups.
+
+3
+
+## 3.2 CHARACTERIZATION OF THE LINEAR EQUIVARIANT SPACE
+
+We first start with the problem of group equivariance for multiple inputs _X_ 1 _, . . . , XN_ being acted upon by groups _G_ 1 _, . . . , GN_ , respectively. Given this setup, we first want to characterize the entire space of linear equivariant layers. This simple linear layer characterization can help build equivariant deep neural networks by stacking a number of these layers along with pointwise nonlinearities (with discrete groups) as done by Cohen & Welling (2016). Further, this characterization will give us an intuition on how to construct model agnostic equivariant layers similar to equituning (Basu et al., 2023b) for the concerned group action. We take _N_ = 2 for simplicity, but the obtained results can be easily extended to general _N_ as discussed in Appendix C.1.
+
+Let _L[Eq] G_ be a _G_ -equivariant linear matrix, i.e. _L[Eq] G_[(] _[aX]_[)][=] _[aL][Eq] G_[(] _[X]_[)][for][all] _[a][∈][G]_[.][And][let] _L[IS] G_ 1 _,G_ 2[(] _[x]_[)][be][a][(] _[G]_[1] _[, G]_[2][)][-invariant-symmetric][linear][matrix,][i.e.,] _[L][IS] G_ 1 _,G_ 2[(] _[ax]_[)][=] _[L][IS] G_ 1 _,G_ 2[(] _[x]_[)][=] _bL[IS] G_ 1 _,G_ 2[(] _[ax]_[)][ for all] _[ a][ ∈][G]_[1][,] _[ b][ ∈][G]_[2][.][Then, we define multi-group equivariant linear layer as]
+
+**==> picture [349 x 14] intentionally omitted <==**
+
+where [ _,_ ] denotes concatenation. In Thm. 1, we prove that _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) is equivariant to ( _G_ 1 _, G_ 2) applied to _X_ 1 and _X_ 2, respectively. More precisely, for any _a ∈ G_ 1 _, b ∈ G_ 2, we show that
+
+**==> picture [369 x 14] intentionally omitted <==**
+
+**Theorem 1.** _The multi-group equivariant layer LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) _defined in equation 1 is equivariant to_ ( _G_ 1 _, G_ 2) _applied to_ ( _X_ 1 _, X_ 2) _, respectively._
+
+All proofs are provided in Appendix B. Now we show that _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) characterizes the entire linear equivariant space under the given equivariant constraint. First, recall from Maron et al. (2020) that the dimension of linear equivariant space for a discrete group _G_ is given by
+
+**==> picture [259 x 28] intentionally omitted <==**
+
+where _G_ is a subgroup of a permutation group and let _P_ ( _g_ ) is the permutation group element corresponding to _g ∈ G_ and _Tr_ ( _·_ ) denotes the trace of the _P_ ( _g_ ) matrix. Here, for simplicity, it is assumed that the linear space is represented by a matrix of same input and output dimensions. Hence _P_ ( _g_ ) has the same dimensions as the matrix. Now we compute the dimension of the linear invariantsymmetric space for groups _G_ 1 _, G_ 2 in Lem. 1, where _G_ 1 acts on the input and _G_ 2 acts on the output. The proof closely follows the method for computing the dimension of the equivariant space in Maron et al. (2020).
+
+**Lemma 1.** _The dimension of a linear invariant-symmetric space corresponding to groups (G_ 1 _, G_ 2 _) is given by_
+
+**==> picture [327 x 28] intentionally omitted <==**
+
+Now, in Thm. 2, we show that _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) in equation 1 characterizes the entire space of linear weight matrices that satisfies the equivariant constraint in equation 2.
+
+**Theorem 2.** _The linear equivariant matrix LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) _in equation 1 characterizes the entire space of linear weight matrices that satisfies the equivariant constraint in equation 2._
+
+Thus, in Thm. 1, we first show that the construction in equation 1 is equivariant to the product group ( _G_ 1 _, G_ 2). Then, in Thm. 2, we show that the equation in equation 1 characterizes the entire linear space of equivariant networks for the given input and output dimensions. It is easy to construct the equivariant and invariant-symmetric layers given some weight matrix _L_ . A linear layer, equivariant to _G_ can be obtained as _L[Eq] G_[(] _[X]_[)][=] _|G_ 1 _|_ � _g∈G[g][−]_[1] _[L]_[(] _[gX]_[)][,][the][same][as][equituning][(Basu][et][al.,] 2023b). Similarly, a linear invariant-symmetric layer with respect to ( _G_ 1 _, G_ 2) can be obtained as _L[IS] G_ 1 _,G_ 2[(] _[X]_[) =] _|G_ 1 _||_ 1 _G_ 2 _|_ � _g_ 2 _∈G_ 2 _[g]_[2][(][�] _g_ 1 _∈G_ 1 _[L]_[(] _[g]_[1] _[X]_[))][.]
+
+4
+
+## 3.3 BEYOND LINEAR EQUIVARIANT SPACE
+
+Now we show that the linear expression in equation 1 can be easily extended to general non-linear models. That is, given models _M_ 1 _, M_ 2 _, M_ 12 _, M_ 21, we can construct _MG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) = [ _M_ 1 _[Eq] ,G_ 1[(] _[X]_[1][) +] _[ M][ IS]_ 21 _,G_ 2 _,G_ 1[(] _[X]_[2][)] _[, M] G[ Eq]_ 2[(2] _[, X]_[2][) +] _[ M][ IS]_ 12 _,G_ 1 _,G_ 2[(] _[X]_[1][)]] _[,]_[that][satis-] fies the equivariant constraint in equation 2.
+
+Suppose the output is [ _Y_ 1 _, Y_ 2], then _Mi,G[Eq] i_[(] _[X][i]_[)] goes from _Xi_ to _Yi_ , whereas the cross-layer _Mij,G[IS] i,Gj_[(] _[X][i]_[)] goes from _Xi_ to _Yj_ . It is easy to construct as _Mi,G[Eq] i_[(] _[X][i]_[) =] _|G_ 1 _i|_ � _gi∈Gi[g] i[−]_[1] _Mi_ ( _giXi_ ) since we know from previous works such as equituning (Basu et al., 2023b) and frame averaging (Puny et al., 2021) that this averaging leads to a universal approximator of equivariant functions, hence is an expressive equivariant design. The interesting design is of _Mij,G[IS] i,Gj_[(] _[X][i]_[)][.][We define the cross-layer] _[ M][ IS] ij,Gi,Gj_[(] _[X][i]_[)][ as]
+
+**==> picture [308 x 28] intentionally omitted <==**
+
+where _M_ is the pre-trained model. One can verify _Mij,G[IS] i,Gj_[(] _[X][i]_[)][is][invariant-symmetric][with][re-] spect to ( _Gi, Gj_ ). The design of the model _MG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) is illustrated in Fig. 1a.
+
+**Universality** Thm. 3 shows that _Mij,G[IS] i,Gj_[(] _[X][i]_[)][ is a universal approximator of invariant-symmetric] functions. Note that there are alternate choices of designs for this layer that are equivariant but do not provide the same universality guarantees, hence, are not as expressive. One such design is _M_[ˆ] _ij,G[IS] i,Gj_[(] _[X][i]_[) =] _|Gi||_ 1 _Gj |_ � _gj ∈Gj[g][j][M]_[(][�] _gi∈Gi[g][i][X][i]_[)][, which is equivalent to] _[ M][ IS] ij,Gi,Gj_[(] _[X][i]_[)][ if] _M_ is a linear layer. Hence, going beyond linear layers requires additional design choices. Hence, Thm. 3 confirms that our choice of the invariant-symmetric layer is expressive.
+
+We use the definition of universality used by Yarotsky (2022) as stated in Def. 1.
+
+**Definition 1.** _A function_ M : _X �→Y is a universal approximator of a continuous function f_ : _X �→Y if for any compact set K ∈X , ϵ >_ 0 _, there exists a choice of parameters of_ M _such that ∥f_ ( _x_ ) _−_ M( _x_ ) _∥ < ϵ for all x ∈K._
+
+**Theorem 3.** _Let fG[IS]_ 1 _,G_ 2[:] _[X][�→Y][be][any][continuous][function][that][is][invariant-symmetric][to]_ ( _G_ 1 _, G_ 2) _. Let_ M : _X �→Y be a universal approximator of fIS. Here X , Y are such that if x ∈X , y ∈Y, then g_ 1 _x ∈X , g_ 2 _y ∈Y for all g_ 1 _, g_ 2 _∈ G_ 1 _, G_ 2 _, so that the invariant-symmetric property is well-defined. Then, we claim that_ M _[IS] G_ 1 _,G_ 2 _[is a universal approximator of][ f] G[ IS]_ 1 _,G_ 2 _[.]_
+
+**Computational complexity** Assuming M is a large model, the bottleneck of computation of M _[IS]_ ( _G_ 1 _,G_ 2)[is][proportional][to][the][number][of][forwarded][passes][done][through][M][.][Thus,][the][compu-] tational complexity of M _[IS]_ ( _G_ 1 _,G_ 2)[is] _[O]_[(] _[|][G]_[1] _[|]_[ +] _[ |][G]_[2] _[|]_[)][.][This][is][in][comparison][to][equituning][that][has] _O_ ( _|G_ 1 _| × |G_ 2 _|_ ) computational complexity for the same task.
+
+3.4 EQUIVARIANT NETWORK FOR LARGE DISCRETE PRODUCT GROUPS
+
+Given a product group of the form _G_ = _G_ 1 ⋊ _G_ 2, we design the _G_ -equivariant model M _[Eq] G_ 1⋊ _G_ 2[as]
+
+**==> picture [313 x 19] intentionally omitted <==**
+
+where [,] represents the concatenation of two elements, M _[Eq] Gi_[is][any][model][equivariant][to] _[G][i]_[,][e.g.] equizero (Basu et al., 2023a) applied to some pretrained model M for zeroshot equivariant performance. Note that [,] can be replaced by other operations such as summation that preserves the equivariance of the individual elements being summed. For the rest of the work, we restrict ourselves to summation even though the general formulation is more general. The ( _·_ ) _[Inv] Gi_[and][ (] _[·]_[)] _G[Sym] i_ operations are inspired from the invariant-symmetric layers obtained in §3.2. Here, _XG[Inv] i_ denotes _Gi_ -invariant feature of _X_ , i.e., ( _g_ 1 _g_ 2 _X_ 0) _[Inv] G_ 2[=] _[ g]_[1] _[X]_[0][, and][ (] _[g]_[1] _[g]_[2] _[X]_[0][)] _G[Inv]_ 1[=] _[ g]_[2] _[X]_[0][ for all] _[ g]_[1] _[∈][G]_[1] _[, g]_[2] _[∈][G]_[2][, where] _X_ 0 is the canonical representation of _X_ with respect to _G_ . ( _Y_ ) _[Sym] Gi_ denotes the symmetrization of
+
+5
+
+_Y_ with respect to _Gi_ , i.e. ( _Y_ ) _[Sym] Gi_ = _gi_ ( _Y_ ) _[Sym] Gi_ , for all _gi ∈ Gi_ . E.g., ( _Y_ ) _[Sym] Gi_ = _|G_ 1 _i|_ � _gi∈Gi[g][i][Y]_ is a valid symmetrization of _Y_ .
+
+_Sym_ Intuitively, M _[Eq] G_ 1⋊ _G_ 2[works][as][follows:][the][first][term][(M] _[Eq] G_ 2[(] _[X] G[Inv]_ 1[))] _G_ 1 captures the _G_ 1-invariant and _G_ 2-equivariant features of _X_ and the second term captures the _G_ 2-invariant and _G_ 1-equivariant features of _X_ . Combining the two features gives an output that is equivariant to both _G_ 1 and _G_ 2. Note that combining these two features requires the commutativity assumption in §3.1. Discussion on generalizing this design to the product of _N_ groups is given in Appendix C.2. We now prove that M _[Eq] G_ 1⋊ _G_ 2[is equivariant to] _[ G]_[1][ ⋊] _[G]_[2][.]
+
+**Theorem 4.** M _[Eq] G_ 1⋊ _G_ 2[(] _[X]_[)] _[defined][in][equation][6][is][equivariant][to][G]_[1][⋊] _[G]_[2] _[.] That is,_ M _[Eq] G_ 1⋊ _G_ 2[(] _[g]_[1] _[g]_[2] _[X]_[) =] _[ g]_[1] _[g]_[2][M] _G[Eq]_ 1⋊ _G_ 2[(] _[X]_[)] _[.]_
+
+**Computational complexity** Note that the computational complexity of equation 6 is _O_ ( _|G_ 1 _|_ + _|G_ 2 _|_ ) when the bottleneck is the forward pass through M, e.g., when M is a large pretrained model.
+
+## 4 APPLICATIONS
+
+We first look at multi-image classification in §4.1 as an application of the first design. The rest of the applications focus on the second design, where the goal is to design equivariant networks for large product groups on a single input from pretrained models. Please note that the semi-direct product between the groups is equivalent to direct product for the experiments based on language generation and compositional generalization because the groups are acting on disjoint sets.
+
+## 4.1 MULTI-IMAGE CLASSIFICATION
+
+Here we consider the multi-image classification problem, where the input consists of multiple images and the output is a label, which is invariant to certain transformations, such as rotations, made to the input images. We perform experiments using two datasets: Caltech101 (Li et al., 2022) and 15Scene (Fei-Fei & Perona, 2005).
+
+We construct our equivariant CNN using the first design in §3.3, which we call multi-GCNN, and compare its performance to a non-equivariant CNN. Multi-GCNN first passes each image in the input through equivariant convolution followed by densely connected blocks constructed using group averaging like in equitune. Additionally, features from different blocks are fused via the invariant symmetric channels while maintaining necessary equivariance properties. Finally, invariant outputs are taken in the final layer.
+
+## 4.2 COMPOSITIONAL GENERALIZATION IN LANGUAGES
+
+Compositionality in natural language processing (Dankers et al., 2022) is often thought to aid linguistic generalization (Baroni, 2020). Language models, unlike humans, are poor at compositional generalization, as demonstrated by several datasets such as SCAN (Lake & Baroni, 2018). SCAN is a command-to-action translation dataset that tests compositional generalization in language models. Previous works (Gordon et al., 2020; Basu et al., 2023b;a) have considered two splits _Add Jump_ and _Around Right_ that can be solved using group equivariance. But each of these splits only required groups of size two. Hence, we extend the SCAN dataset using the context-free grammar (CFG) of the dataset. We add production rules for _up_ and _down_ taken as an additional dimension to the original dataset. We refer to the extended dataset as SCAN-II, which has splits that require slightly larger groups of sizes up to eight to solve the compositional generalization task. More background on the original SCAN dataset, extended version SCAN-II, and approaches to solve it are discussed in Appendix D.1.
+
+## 4.3 INTERSECTIONAL FAIRNESS IN NATURAL LANGUAGE GENERATION
+
+We consider the problem of inherent bias present in natural language generation (NLG), specifically, for GPT-2 Radford et al. (2019). We consider the framework of Sheng et al. (2019) to test biases present in language models. We aim to design one single model that reduces social biases amongst
+
+6
+
+each pair of the demographics [“man”, “woman”], [“Black”, “White”], and [“straight”, “gay”] and their intersections. This is important since even though we reduce bias amongst two pairs of demographics such as [“man”, “woman”] and [“Black”, “White”], it does not guarantee fairness for demographics at the intersection such as “Black woman”. This is the _intersectionality problem_ of fairness (Ovalle et al., 2023; Wang et al., 2022) that arises since numerous social dimensions form identity (Akerlof & Kranton, 2010).
+
+Group-theoretic fairness for the intersections can be guaranteed by extending the framework of Basu et al. (2023b) using products of groups. This extends the solution to fairness by Basu et al. (2023b) from using separate groups to attain fairness for each pair of demographics to using one single product group that addresses the intersectionality problem in addition to providing fairness to individual pairs of demographics. Using this product group with multi-equitune gives a complexity proportional to the sum of group sizes rather than their products, making our method very scalable. For designing our equivariant models, we use the same group actions as Basu et al. (2023b), provided in Appendix D.2 for completeness.
+
+Similar to Basu et al. (2023b), we evaluate our method using the _regard classifier_ of Sheng et al. (2019). A regard classifier is similar to a sentiment classifier but designed specifically for fairness studies by finetuning BERT (Kenton & Toutanova, 2019) on a human-curated fairness dataset. Sheng et al. (2019) provide two different sets of five contexts to generate text, called the _respect_ task and _occupation_ task. The respect context is concerned with the respect of the demographic in general, e.g., it has context such as “The X was known for”, where X is replaced by the name of the demographic. Similarly, the occupation context is concerned with the occupation corresponding to these demographics.
+
+## 4.4 ROBUST IMAGE CLASSIFICATION USING CLIP
+
+Here we perform robust image classification using pretrained CLIP (Radford et al., 2021) models for 90 _[◦]_ rotations and flips. Previous work of Basu et al. (2023a) design separate robust models for these transformations. Here, we provide a single model that is robust to both using our multi-group design from §3.4 applied to both equitune and equizero. We consider the Imagenet-V2 (Recht et al., 2019) and CIFAR100 (Krizhevsky et al.) image classification datasets. The application of our method from §3.4 to CLIP is pretty straightforward and is described in Appendix D.3.
+
+## 5 EXPERIMENTS AND RESULTS
+
+## 5.1 MULTI-IMAGE CLASSIFICATION
+
+**Experimental setting** We use the Caltech-101 and 15-Scene datasets. For a multi-input network with _N_ inputs, we partition the train and test datasets for each label in tuples of _N_ . We add random 90 _[◦]_ rotations to the test images, and for training, we report results both with and without the transformations. This tests the efficiency gained from equivariance and the robustness of models, similar to Basu et al. (2023b). For each dataset, we report results on multi-input image classification with _N_ inputs, where _N_ = _{_ 2 _,_ 3 _,_ 4 _}_ . We call the multi-input equivariant CNN based on the design from §3.3 as multi-GCNNs. Further details on the model design are given in Appendix E.1. We train each model for 100 epochs with a learning rate of 0 _._ 01, a batch size of 64.
+
+**Results and observations** Tab. 1 and 6 show the test accuracies and Caltech-101 and 15Scene datasets, respectively. Clearly, multi-GCNN outperforms CNN across both datasets as well as the number of inputs used. Moreover, we find that the models using the invariant symmetric layer described in §3.3 generally outperform the ones without. This illustrates the benefits of early fusion using the invariant symmetric layers.
+
+## 5.2 COMPOSITIONAL GENERALIZATION IN LANGUAGE
+
+**Experimental setting** We work on the SCAN-II dataset where we have one train dataset and three different test dataset splits. The train dataset is such that each of the test splits requires equivariance to different product groups. The product groups are made of three smaller each of size two, and the largest product group considered is of size eight. Hence, performance on these splits shows
+
+7
+
+Table 1: Test accuracies for multi-image classification on the Caltech-101 dataset. _N_ denotes the number of images present as input. Train augmentations corresponding to each of the _N_ inputs are shown as an ordered sequence. Here R means random 90 _[◦]_ rotations and I means no transformation. Fusion denotes the use of invariant-symmetric layers.
+
+|**Model**|CNN|Multi-GCNN|
+|---|---|---|
+|**Fusion**|_×_ ✓|_×_ ✓|
+|**Dataset** _N_ **Train Aug.**|||
+|_Caltech101_ 2 II RR 3 III RRR 4 IIII RRRR|0.417 0.447 0.527 0.56|0.656 **0.688** 0.649 **0.695**|
+||0.465 0.489 0.593 0.632|0.705 **0.736** 0.72 **0.743**|
+||0.502 0.522 0.63 0.672|0.72 **0.74** 0.698 **0.741**|
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 2: Multi-Equituning for SCAN for (a) LSTM (b) GRU (c) RNN Models. Models were finetuned for 10K iterations with relevant groups for each task. Comparisons are done with pretrained and equi-tuned models. Results are over three random seeds.
+
+benefits from equivariance to different product groups. Details of the dataset construction are given in Appendix D.1. We consider the same architectures as Basu et al. (2023b;a), i.e., LSTMs, GRUs, and RNNs, each with a single layer with 64 hidden units. Each model was pretrained on the train set for 200k iterations using Adam optimizer (Kingma & Ba, 2015) with a learning rate of 10 _[−]_[4] and teacher-forcing ration 0.5 (Williams & Zipser, 1989). We test the non-equivariant pretrained models, along with equituned and multi-equituned models, where equitune and multi-equitune use further 10k iterations of training on the train set. For both equitune and multi-equitune, we use the largest product group of size eight for construction.
+
+**Results and observations** Fig. 2 shows the results of pretrained models, and finetuning results of equitune and multi-equitune on the various test splits. We find that pretrained models fail miserably on the test sets even with excellent performance on the train set, confirming that compositional generalization is not trivial to achieve for these models. We note that multi-equitune performs competitively to equitune and clearly outperforms non-equivariant models.
+
+## 5.3 INTERSECTIONAL FAIRNESS IN NLG
+
+**Experimental setting** We closely follow the experimental setup of Basu et al. (2023b) and Sheng et al. (2019). There are two tasks provided by Sheng et al. (2019): respect task and occupation task. Each task consists of five contexts shown in Tab. 5. For each context and each model, such as GPT-2, and GPT-2 with equitune (EquiGPT2) or multi-equitune (MultiEquiGPT2), we generate 100 sentences. We use both equitune and multi-equitune with the product group corresponding to the product of the demographics [“man”, “woman”], [“Black”, “White”], and [“straight”, “gay”]. Here, we focus on debiasing for all the demographic pairs with one single model each for equitune and multi-equitune. Quite directly, it also addresses the problem of intersectionality. These sentences are classified as positive, negative, neutral, or other by the regard classifier of Sheng et al. (2019).
+
+8
+
+**==> picture [132 x 8] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 3: The plots (a), (b), and (c) show the distribution of regard scores for the respect task for the set of demographic groups gender, race, and an intersection of gender, race, and sexual orientation respectively. For GPT2 we observe clear disparity in regard scores amongst different demographic groups. Each bar in the plots correspond to 500 generated samples. Equitune and Multi-Equitune reduces the disparity in the regard scores.
+
+Table 2: Perplexity Scores for GPT2, EquiGPT2, and MultiEquiGPT2. Equi- and MultiEqui-GPT2 show negligible performance drops on Wikitext-2 and Wikitext-103 test sets compared to GPT2
+
+|Dataset|GPT2|EquiGPT2|MultiEquiGPT2|
+|---|---|---|---|
+|Wikitext-103|28.23|29.29|29.56|
+|Wikitext-2|23.86|24.64|24.88|
+
+**Results and observations** Fig. 3 and 5 show some results corresponding to the respect task and occupation task, respectively, for various demographics and their intersections. The rest of the plots are provided in Fig. 6, 7, and 8. We find that EquiGPT2 and MultiEquiGPT2 both reduce the bias present across the various demographics and their demographics with one single product group of all the demographic pairs. In Tab. 7, we show the benefits in memory obtained from using MultiEquiGPt2 compared to EquiGPT2, which is close to the difference in the sum and product of the sizes of the smaller groups. Further, in Tab. 2, we verify that MultiEquiGPT2 has a negligible drop in perplexity on the test sets of WikiText-2 and WikiText-103 compared to GPT2 and close to EquiGPT2.
+
+## 5.4 ROBUST IMAGE CLASSIFICATION USING CLIP
+
+**Experimental setting** We use the CLIP models with various Resnet and ViT encoders, namely, RN50, RN101, ViT-B/32, and ViT-B/16. We test the robustness of the zero-shot performance of these models on the Imagenet-V2 and CIFAR100 datasets for the combined transformations of rot90 (random 90 _[◦]_ rotations) and flips. We make comparisons in performance amongst original CLIP, and equitune, equizero, multi-equitune, and multi-equizero applied to CLIP.
+
+**Results and observations** Fig. 4a and 9a show that the CLIP models are vulnerable to simple transformations such as random rotations and flips as was also observed in Basu et al. (2023a). Fig. 4b, Fig. 4c, Fig. 9b, and Fig. 9c show the robustness results for RN101, ViT-B/16, RN50, and ViT-B/32, respectively. We find that across all models and datasets, multi-equitune and multiequizero perform competitively to equitune and equizero respectively. Moreover, in Tab. 8 we find that multi-equitune take less memory compared to equitune as expected from theory. That is, multiequitune consumes memory approximately proportional to _|G_ 1 _|_ + _|G_ 2 _|_ = 6, whereas equitune consumes memory proportional to _|G_ 1 _| × |G_ 2 _|_ = 8, where _|G_ 1 _|_ = 4 for 90 _[◦]_ rotations and _|G_ 2 _|_ = 2 for flips.
+
+9
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 4: (a) shows that CLIP is not robust to the transformations of 90 _[◦]_ rotations (rot90) and flips. (b) and (c) show that multi-equitune and multi-equizero are competitive with equitune and equizero, respectively, for zero-shot classification using RN101 and ViT-B/16 encoders of CLIP for the product of the transformations rot90 and flips, even with much lesser compute.
+
+## 6 CONCLUSION
+
+We introduce two efficient model-agnostic multi-group equivariant network designs. The first design aims at neural networks with multiple inputs with independent group actions applied to them. We first characterize the entire linear equivariant space for this design, which gives rise to invariantsymmetric layers as its sub-component. Then we generalize this to non-linear layers. We validate its working by testing it on multi-input image classification. Finally, inspired by this invariantsymmetric design, we introduce a second design for single input with large product groups applied to it. This design is provably much more efficient than naive model agnostic designs. We apply this design to several important applications including compositional generalization in language, intersectional fairness in NLG, and robust classification using CLIP.
+
+**Ethics statement** Our fairness algorithm provides intersectional fairness in a group-theoretic sense as defined in §D.2. It aims to reduce bias in natural language generation. But our algorithm is dependent on equality and neutral sets taken from Basu et al. (2023b;a), which are constructed by people. Hence, these constructions of sets need to be constructed responsibly if deployed for public use. Our evaluation for fairness is based on regard scores computed using the methods of Sheng et al. (2019). Basu et al. (2023b) show that the regard classifier itself may contain bias. Hence, even though the regard classifier acts as a great evaluation metric for academic purposes, a better evaluation metric needs to be constructed if it is deployed for evaluating sentences in practice.
+
+**Reproducibility statement** All proofs to our theoretical claims are provided in §B. Details of dataset constructed for compositional generalization experiments are given in §D. Detailed experimental settings for each experiment is provided in §5 and §E.
+
+## REFERENCES
+
+George A. Akerlof and Rachel E. Kranton. _Identity Economics_ . Princeton University Press, 2010.
+
+- Ekin Akyurek and Jacob Andreas. Lexicon learning for few shot sequence modeling. In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pp. 4934–4946, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/ 2021.acl-long.382. URL [URL removed]
+
+- Jacob Andreas. Good-enough compositional data augmentation. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pp. 7556–7566, 2020.
+
+- Martin Arjovsky, L´eon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. _arXiv preprint arXiv:1907.02893_ , 2019.
+
+10
+
+- Matan Atzmon, Koki Nagano, Sanja Fidler, Sameh Khamis, and Yaron Lipman. Frame averaging for equivariant shape space learning. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 631–641, 2022.
+
+Marco Baroni. Linguistic generalization and compositionality in modern artificial neural networks. _Philosophical Transactions of the Royal Society B_ , 375(1791):20190307, February 2020.
+
+- Sourya Basu, Jose Gallego-Posada, Francesco Vigan`o, James Rowbottom, and Taco Cohen. Equivariant mesh attention networks. _Transactions on Machine Learning Research_ , 2022.
+
+- Sourya Basu, Pulkit Katdare, Prasanna Sattigeri, Vijil Chenthamarakshan, Katherine DriggsCampbell, Payel Das, and Lav R Varshney. Equivariant few-shot learning from pretrained models. _arXiv preprint arXiv:2305.09900_ , 2023a.
+
+- Sourya Basu, Prasanna Sattigeri, Karthikeyan Natesan Ramamurthy, Vijil Chenthamarakshan, Kush R Varshney, Lav R Varshney, and Payel Das. Equi-tuning: Group equivariant fine-tuning of pretrained models. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , 2023b.
+
+- Moulik Choraria, Ibtihal Ferwana, Ankur Mani, and Lav R Varshney. Learning optimal features via partial invariance. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , 2023.
+
+- Taco Cohen and Max Welling. Group equivariant convolutional networks. In _International conference on machine learning_ , pp. 2990–2999. PMLR, 2016.
+
+- Taco S Cohen and Max Welling. Steerable cnns. In _International Conference on Learning Representations_ , 2017.
+
+- Verna Dankers, Elia Bruni, and Dieuwke Hupkes. The paradox of the compositionality of natural language: A neural machine translation case study. In _Proc. 60th Annu. Meeting of the Association for Computational Linguistics (ACL)_ , pp. 4154–4175, May 2022.
+
+- Pim De Haan, Maurice Weiler, Taco Cohen, and Max Welling. Gauge equivariant mesh cnns: Anisotropic convolutions on geometric graphs. In _International Conference on Learning Representations_ , 2020.
+
+- Congyue Deng, Or Litany, Yueqi Duan, Adrien Poulenard, Andrea Tagliasacchi, and Leonidas J Guibas. Vector neurons: A general framework for so (3)-equivariant networks. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 12200–12209, 2021.
+
+- Alexandre Agm Duval, Victor Schmidt, Alex Hernandez-Garcia, Santiago Miret, Fragkiskos D Malliaros, Yoshua Bengio, and David Rolnick. Faenet: Frame averaging equivariant gnn for materials modeling. In _International Conference on Machine Learning_ , pp. 9013–9033. PMLR, 2023.
+
+- Li Fei-Fei and Pietro Perona. A bayesian hierarchical model for learning natural scene categories. In _2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05)_ , volume 2, pp. 524–531. IEEE, 2005.
+
+- Marc Finzi, Gregory Benton, and Andrew G Wilson. Residual pathway priors for soft equivariance constraints. _Advances in Neural Information Processing Systems_ , 34:30037–30049, 2021a.
+
+- Marc Finzi, Max Welling, and Andrew Gordon Wilson. A practical method for constructing equivariant multilayer perceptrons for arbitrary matrix groups. In _International conference on machine learning_ , pp. 3318–3328. PMLR, 2021b.
+
+- Fabian Fuchs, Daniel Worrall, Volker Fischer, and Max Welling. SE(3)-transformers: 3D rototranslation equivariant attention networks. _Advances in neural information processing systems_ , 33:1970–1981, 2020.
+
+- Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In _International conference on machine learning_ , pp. 1263–1272. PMLR, 2017.
+
+11
+
+Jonathan Gordon, David Lopez-Paz, Marco Baroni, and Diane Bouchacourt. Permutation equivariant models for compositional generalization in language. In _International Conference on Learning Representations_ , 2020. URL [URL removed]
+
+- Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In _International conference on machine learning_ , pp. 448–456. pmlr, 2015.
+
+- Yichen Jiang, Xiang Zhou, and Mohit Bansal. Mutual exclusivity training and primitive augmentation to induce compositionality. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , 2022.
+
+- John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Z´ıdek, Anna Potapenko, et al.[ˇ] Highly accurate protein structure prediction with alphafold. _Nature_ , 596(7873):583–589, 2021.
+
+- S´ekou-Oumar Kaba, Arnab Kumar Mondal, Yan Zhang, Yoshua Bengio, and Siamak Ravanbakhsh. Equivariance with learned canonicalization functions. In _International Conference on Machine Learning_ , pp. 15546–15566. PMLR, 2023.
+
+- Jacob Devlin Ming-Wei Chang Kenton and Lee Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In _Proceedings of NAACL-HLT_ , pp. 4171– 4186, 2019.
+
+- Jinwoo Kim, Tien Dat Nguyen, Ayhan Suleymanzade, Hyeokjun An, and Seunghoon Hong. Learning probabilistic symmetrization for architecture agnostic equivariance. _arXiv preprint arXiv:2306.02866_ , 2023.
+
+- Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In _International Conference on Learning Representations_ , 2015.
+
+- Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In _International Conference on Machine Learning_ , pp. 2747–2755. PMLR, 2018.
+
+- Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-100 (canadian institute for advanced research). URL [URL removed]
+
+- Brenden Lake and Marco Baroni. Generalization without systematicity: On the compositional skills of sequence-to-sequence recurrent networks. In _International conference on machine learning_ , pp. 2873–2882. PMLR, 2018.
+
+Yann LeCun, L´eon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. _Proceedings of the IEEE_ , 86(11):2278–2324, 1998.
+
+Fei-Fei Li, Marco Andreeto, Marc’Aurelio Ranzato, and Pietro Perona. Caltech 101, Apr 2022.
+
+- Zhaoyi Li, Ying Wei, and Defu Lian. Learning to substitute spans towards improving compositional generalization. _arXiv preprint arXiv:2306.02840_ , 2023.
+
+- Kaitlin Maile, Dennis George Wilson, and Patrick Forr´e. Equivariance-aware architectural optimization of neural networks. In _International Conference on Learning Representations_ , 2023.
+
+- Haggai Maron, Or Litany, Gal Chechik, and Ethan Fetaya. On learning sets of symmetric elements. In _International conference on machine learning_ , pp. 6734–6744. PMLR, 2020.
+
+- Arnab Kumar Mondal, Siba Smarak Panigrahi, S´ekou-Oumar Kaba, Sai Rajeswar, and Siamak Ravanbakhsh. Equivariant adaptation of large pre-trained models. _arXiv preprint arXiv:2310.01647_ , 2023.
+
+- Artem Moskalev, Anna Sepliarskaia, Erik J Bekkers, and Arnold Smeulders. On genuine invariance learning without weight-tying. In _International Conference on Machine Learning_ . PMLR, 2023.
+
+12
+
+- Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In _Proceedings of the 27th international conference on machine learning (ICML-10)_ , pp. 807–814, 2010.
+
+- Anaelia Ovalle, Arjun Subramonian, Vagrant Gautam, Gilbert Gee, and Kai-Wei Chang. Factoring the matrix of domination: A critical review and reimagination of intersectionality in ai fairness. _arXiv preprint arXiv:2303.17555_ , 2023.
+
+- Gaurav Patel and Jose Dolz. Weakly supervised segmentation with cross-modality equivariant constraints. _Medical Image Analysis_ , 77:102374, 2022.
+
+- Omri Puny, Matan Atzmon, Edward J Smith, Ishan Misra, Aditya Grover, Heli Ben-Hamu, and Yaron Lipman. Frame averaging for invariant and equivariant network design. In _International Conference on Learning Representations_ , 2021.
+
+- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. _OpenAI blog_ , 1(8):9, 2019.
+
+- Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In _International conference on machine learning_ , pp. 8748–8763. PMLR, 2021.
+
+- Siamak Ravanbakhsh, Jeff Schneider, and Barnabas Poczos. Equivariance through parametersharing. In _International conference on machine learning_ , pp. 2892–2901. PMLR, 2017.
+
+- Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In _International conference on machine learning_ , pp. 5389–5400. PMLR, 2019.
+
+- Vıctor Garcia Satorras, Emiel Hoogeboom, and Max Welling. E (N) equivariant graph neural networks. In _International conference on machine learning_ , pp. 9323–9332. PMLR, 2021.
+
+- Emily Sheng, Kai-Wei Chang, Prem Natarajan, and Nanyun Peng. The woman worked as a babysitter: On biases in language generation. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pp. 3407–3412, 2019.
+
+- Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. _The journal of machine learning research_ , 15(1):1929–1958, 2014.
+
+- Nathaniel Thomas, Tess Smidt, Steven Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor field networks: Rotation-and translation-equivariant neural networks for 3D point clouds. _arXiv preprint arXiv:1802.08219_ , 2018.
+
+- Angelina Wang, Vikram V. Ramaswamy, and Olga Russakovsky. Towards intersectionality in machine learning: Including more identities, handling underrepresentation, and performing evaluation. In _Proc. 2022 ACM Conf. Fairness, Accountability, and Transparency (FAccT ’22)_ , pp. 336–349, June 2022.
+
+- Maurice Weiler and Gabriele Cesa. General E (2)-equivariant steerable cnns. _Advances in neural information processing systems_ , 32, 2019.
+
+- Ronald J Williams and David Zipser. A learning algorithm for continually running fully recurrent neural networks. _Neural computation_ , 1(2):270–280, 1989.
+
+- Jianke Yang, Robin Walters, Nima Dehmamy, and Rose Yu. Generative adversarial symmetry discovery. In _International Conference on Machine Learning_ , 2023.
+
+- Jingfeng Yang, Le Zhang, and Diyi Yang. Subs: Subtree substitution for compositional semantic parsing. In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 169–174, 2022.
+
+- Dmitry Yarotsky. Universal approximations of invariant maps by neural networks. _Constructive Approximation_ , 55(1):407–474, 2022.
+
+13
+
+## A ADDITIONAL DEFINITIONS
+
+**Groups and group actions** A **group** is set _G_ accompanied by a binary operation _·_ such that the four axioms of a group are satisfied, which are a) closure: _g_ 1 _· g_ 2 _∈ G_ for every _g_ 1 _, g_ 2 _∈ G_ , b) identity: there exists _e ∈ G_ such that _e · g_ = _g · e_ = _g_ , c) associativity: ( _g_ 1 _· g_ 2) _· g_ 3 = _g_ 1 _·_ ( _g_ 2 _· g_ 3) and d) inverse: for every _g ∈ G_ , there exists _g[−]_[1] such that _g · g[−]_[1] = _g[−]_[1] _· g_ = _e_ . When clear from context, we write _g_ 1 _· g_ 2 simply as _g_ 1 _g_ 2.
+
+A **group action** of a group _G_ on a space _X_ , is given as _α_ : _G ×X �→X_ such that a) _α_ ( _e, x_ ) = _x_ for all _x ∈X_ and b) _α_ ( _g_ 1 _, α_ ( _g_ 2 _, x_ )) = _α_ ( _g_ 1 _· g_ 2 _, x_ ) for all _g_ 1 _, g_ 2 _∈ G_ , _x ∈X_ , where _e_ is the identity element of _G_ . When clear from context, we write _α_ ( _g, x_ ) simply as _gx_ .
+
+## B PROOFS
+
+_Proof to Thm. 1._ To prove the equivariance property, we want _LG_ 1 _,G_ 2([ _aX_ 1 _, bX_ 2]) = [ _a_ ( _L[Eq] G_ 1[(] _[X]_[1][) +] _[ L] G[IS]_ 2 _,G_ 1[(] _[bX]_[2][))] _[, b]_[(] _[L] G[Eq]_ 2[(] _[X]_[2][) +] _[ L] G[IS]_ 1 _,G_ 2[(] _[aX]_[1][))]][ for any] _[ a][ ∈][G]_[1] _[, b][ ∈][G]_[2][.][Recall from] definitions of equivariance and invariance-symmetry the following equalities.
+
+**==> picture [260 x 65] intentionally omitted <==**
+
+for any _a ∈ G_ 1, _b ∈ G_ 2. Here, equation 7 and equation 8 hold by definition of these equivariant layers.
+
+It follows _L[Eq] G_ 1[(] _[aX]_[1][) +] _[ L] G[IS]_ 2 _,G_ 1[(] _[bX]_[2][)] = _a_ ( _L[Eq] G_ 1[(] _[X]_[1][) +] _[ L] G[IS]_ 2 _,G_ 1[(] _[bX]_[2][))][,][since] _[L][Eq] G_ 1[(] _[aX]_[1][)] = _aL[Eq] G_ 1[(] _[X]_[1][)][ from equation 7 and] _[ L] G[IS]_ 2 _,G_ 1[(] _[bX]_[2][)][=] _[aL][IS] G_ 2 _,G_ 1[(] _[bX]_[2][)][ from equation 9.][Similarly, it fol-] lows _L[Eq] G_ 2[(] _[bX]_[2][) +] _[ L] G[IS]_ 1 _,G_ 2[(] _[aX]_[1][) =] _[ b]_[(] _[L] G[Eq]_ 2[(] _[X]_[2][) +] _[ L] G[IS]_ 1 _,G_ 2[(] _[aX]_[1][))][, which concludes the proof.]
+
+_Proof to Lem. 1._ Let _L_ be a _d × d_ matrix and we want to find the dimension of the space of matrices _L_ such that the fixed point equation _P_ ( _g_ 2) _× L × P_ ( _g_ 1) = _L_ holds for all _g_ 1 _∈ G_ 1 and _g_ 2 _∈ G_ 2, where _P_ ( _gi_ ) denotes the permutation matrix corresponding to _gi_ . Thus, we want to compute the dimension of the null space of this fixed point equation. From Maron et al. (2020), the dimension of this null space can be obtained by computing the trace of the projector function onto this space. One can verify the projector here is given by _πGInv_ 1 _,G[Sym]_ 2 = _|G_ 1 _||_ 1 _G_ 2 _|_ � _g_ 1 _∈G_ 1 � _g_ 2 _∈G_ 2 _[P]_[(] _[g]_[1][)] _[⊗] P_ ( _g_ 2), where _⊗_ is the Kronecker product. From the properties of the trace function, we know _Tr_ ( _P_ ( _g_ 1) _⊗ P_ ( _g_ 2)) = _Tr_ ( _P_ ( _g_ 1)) _× Tr_ ( _P_ ( _g_ 2)), which concludes the proof.
+
+_Proof to Thm. 2._ The dimension of the linear layer _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) = _E_ ( _G_ 1) + _E_ ( _G_ 2) + _IS_ ( _G_ 1 _, G_ 2) + _IS_ ( _G_ 2 _, G_ 1), since we have two equivariant layers that have dimensions _E_ ( _G_ 1) and _E_ ( _G_ 2), respectively, and two invariant-symmetric layers, which have dimensions _IS_ ( _G_ 1 _, G_ 2) and _IS_ ( _G_ 2 _, G_ 1), respectively. Recall the definitions of _E_ ( _·_ ) and _IS_ ( _·, ·_ ) from equation 3 and equation 4, respectively.
+
+Now we compute the dimension of any linear layer satisfying the equivariant constraint in equation 2 and show it matches the dimension of _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]). To that end, first note that the projector onto this equivariant space is _|G_ 1 _||_ 1 _G_ 2 _|_ � _g_ 1 _∈G_ 1 � _g_ 2 _∈G_ 2[(] _[P]_[(] _[g]_[1][)] _[⊕][P]_[(] _[g]_[2][))] _[⊗]_[(] _[P]_[(] _[g]_[1][)] _[⊕][P]_[(] _[g]_[2][))][, where] _⊕, ⊗_ denote the Kronecker sum and Kronecker product, respectively. Further, we know from Maron et al. (2020) that the dimension of the equivariant space, say _E_ ( _G_ 1 _, G_ 2), is given by the trace of the
+
+14
+
+projector onto this space. Thus,
+
+**==> picture [458 x 199] intentionally omitted <==**
+
+where equation 12 holds because the trace of the Kronecker sum of two matrices is the sum of the traces of the two matrices, equation 11 holds because the trace of the Kronecker product of two matrices is the product of the traces of the two matrices. Finally, equation 13 follows from the definitions of _E_ ( _·_ ) and _IS_ ( _·, ·_ ).
+
+Thus, we have proved that _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) is equivariant, hence, lies in the space of linear equivariant functions for the constraint in equation 2. Further, _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) has the exact same dimension as the linear equivariant space of equation 2. Hence, _LG_ 1 _,G_ 2([ _X_ 1 _, X_ 2]) characterizes the entire linear equivariant space of equation 2.
+
+_Proof to Thm. 3._ We know M is a universal approximator of _fG[IS]_ 1 _,G_ 2[.][Hence, for any] _[ K ∈X]_[,] _[ ϵ >]_[ 0][,] there exists a choice of parameters of M such that _∥_ M( _x_ ) _− fG[IS]_ 1 _,G_ 2[(] _[x]_[)] _[∥≤][ϵ]_[ for all] _[ x][ ∈K]_[.]
+
+Define _KSym_ =[�] _g_ 1 _∈G_ 1 _[g]_[1] _[K]_[, which is also a compact set.][Thus, there exists a choice of parameters] for M such that _∥_ M( _x_ ) _− fG[IS]_ 1 _,G_ 2[(] _[x]_[)] _[∥≤][ϵ]_[ for all] _[ x][ ∈K][Sym]_[.]
+
+For the same _ϵ >_ 0, _KSym_ defined above, we now compute _∥_ M _[IS] G_ 1 _,G_ 2[(] _[x]_[)] _[ −][f] G[ IS]_ 1 _,G_ 2[(] _[x]_[)] _[∥]_[using][the] definition of M _[IS] G_ 1 _,G_ 2[(] _[x]_[)][ from equation 5 and show that it is less than or equal to] _[ ϵ]_[, concluding the] proof. We have _∥_ M _[IS] G_ 1 _,G_ 2[(] _[x]_[)] _[ −][f] G[ IS]_ 1 _,G_ 2[(] _[x]_[)] _[∥]_
+
+**==> picture [355 x 122] intentionally omitted <==**
+
+**==> picture [355 x 10] intentionally omitted <==**
+
+where equation 14 follows from the definition of equation 5, equation 15 follows because _f_ ( _[IS] G_ 1 _,G_ 2)[(] _[x]_[)][=] _[g]_[2] _[f]_ ( _[ IS] G_ 1 _,G_ 2)[(] _[g]_[1] _[x]_[)][for][all] _[g]_[1] _[∈][G]_[1] _[, g]_[2] _[∈][G]_[2][,][equation][16][follows][from][the][trian-] gle inequality and the assumption _∥g_ 2 _∥_ = 1 for all _g_ 2 _∈ G_ 2. Finally, equation 17 follows because _∥_ M( _g_ 1 _x_ ) _− fG[IS]_ 1 _,G_ 2[(] _[g]_[1] _[x]_[)] _[∥≤][ϵ]_[ for all] _[ x][ ∈K][Sym]_[.]
+
+15
+
+_Sym Sym Proof to Thm. 4._ We first prove (M _[Eq] G_ 2[((] _[g]_[1] _[g]_[2] _[X]_[)] _G[Inv]_ 1[))] _G_ 1 = _g_ 1 _g_ 2(M _[Eq] G_ 2[((] _[X]_[)] _G[Inv]_ 1[))] _G_ 1[.][We][have] _Sym_ (M _[Eq] G_ 2[((] _[g]_[1] _[g]_[2] _[X]_[)] _G[Inv]_ 1[))] _G_ 1
+
+**==> picture [251 x 171] intentionally omitted <==**
+
+where equation 19 follows from the definition of the invariant operator in §3.4, equation 20 follows from the _G_ 2-equivariance of M _[Eq] G_ 2[,][equation 21 follows from the definition of symmetric output in] §3.4. Finally, equation 22 follows from the commutativity assumption in §3.1.
+
+## C GENERAL DESIGN FOR A PRODUCT OF _N_ GROUPS
+
+Here we provide extensions of our two designs in §3.3 and §3.4 to a product of _N_ groups in §C.1 and §C.2, respectively.
+
+## C.1 _N_ -INPUT GROUP EQUIVARIANT MODELS
+
+We extend the design in §3.3 to _N_ inputs _X_ 1 _, . . . , XN_ with group _Gi_ acting independently on _Xi_ , respectively. Suppose the outputs are _Y_ 1 _, . . . , YN_ and given models _Mi, Mij_ processing _Xi_ and contributing to _Yi, Yj_ , respectively. Then, the equivariant model using _Mi_ s _Mij_ s for _i, j ∈ {_ 1 _, . . . , N }_ consists of an equivariant and an invariant-symmetric component.
+
+The equivariant component remains the same as for _N_ = 2, i.e., for input _i_ , we have _Mi,G[Eq] i_[(] _[X][i]_[)][,] which is equivariant to _Gi_ . Additionally, _Yi_ has _N_ -1 invariant-symmetric components, where the invariant-symmetric component is _Mji,G[IS] j Gi_[(] _[X][j]_[)][.][It][is][trivial][to][see][that] _[Y][i]_[is][equivariant][with] respect to _Gi_ acting on _Xi_ since the equivariant component _Mi,G[Eq] i_[(] _[X][i]_[)][and] _[M][ IS] ji,Gj Gi_[(] _[X][j]_[)][are][all] equivariant. Hence, the sum/concatenation of equivariant functions gives an equivariant function.
+
+## C.2 LARGE PRODUCT GROUP EQUIVARIANT MODELS
+
+Extension to _N_ product groups for the model design in equation 6 is trivial and described next. Given a product group of the form _G_ = ( _G_ 1 ⋊ _· · ·_ ( _GN −_ 1 ⋊ _GN_ ) _· · ·_ ), we design the _G_ -equivariant model M _[Eq]_ ( _G_ 1⋊ _···_ ( _GN −_ 1⋊ _GN_ ) _···_ )[as]
+
+**==> picture [324 x 27] intentionally omitted <==**
+
+where M _[Eq] Gi_[is][any][model][equivariant][to] _[G][i]_[,][e.g.][equizero][(Basu][et][al.,][2023a)][applied][to][some] pretrained model M for zeroshot equivariant performance, and _G\Gi_ represents the product of all the smaller groups except _Gi_ . It is easy to check that M _[Eq]_ ( _G_ 1⋊ _···_ ( _GN −_ 1⋊ _GN_ ) _···_ )[(] _[X]_[)][ is equivariant to] ( _G_ 1 ⋊ _· · ·_ ( _GN −_ 1 ⋊ _GN_ ) _· · ·_ ). The intuition for this design is the same for _G_ = _G_ 1 ⋊ _G_ 2, i.e., _Sym_ (M _[Eq] Gi_[(] _[X] G[Inv] \Gi_[))] _G\Gi_[preserves][the][equivariant][features][with][respect][to] _[G][i]_[and][invariant][features]
+
+16
+
+with respect to the rest of the product, which is finally merged with other equivariant features by taking features symmetric with respect to _G\Gi_ . Here, obviously, the summation over _i_ can be replaced by any other permutation invariant/equivariant functions such as max or concatenation.
+
+## D ADDITIONAL DETAILS ON APPLICATIONS
+
+## D.1 COMPOSITIONAL GENERALIZATION IN LANGUAGE
+
+**Original SCAN splits** The original SCAN split considered in works related to group equivariance primarily dealt with the _Add Jump_ and the _Around Right_ splits. The _Add Jump_ split consists of command-action pairs such that the command “jump” never appears in the sentences in the training set except for the word “jump” itself. However, similar verbs such as “walk” or “run” appear in the dataset. But the test set does contain sentences with “jump” in them. Thus, to be able to generalize to the test set, a language model should be able to understand the similarity between the words “jump” and “walk”. Gordon et al. (2020) showed that this can be achieved using group equivariance and that group equivariance can help in compositional generalization. Similarly, the _Around Right_ split has a train set without the phrase “around right” in any of its sentences, but the phrase is contained in its test set. Moreover, the train set also contains phrases like “around left”, thus, to perform well on the test set, the models must understand the similarity between “left” and “right”. Thus, like _Add Jump_ , the _Around Right_ task can also be solved using group equivariance. Note that in both these cases, the groups of interest are size two each. Thus, to better illustrate the benefits of our multi-group equivariant networks and to use group equivariance in more practical compositional generalization task, we extend the dataset to a larger group of size eight. This new extended dataset, SCAN-II, is constructed using similar context-free grammar (CFG) as SCAN. Before discussing the construction of SCAN-II, we review some different methods used in the literature to solve SCAN and how they differ from our multi-group approach.
+
+**More related works** Several works have explored solving the compositional generalization task of SCAN using data augmentation such as Andreas (2020); Yang et al. (2022); Jiang et al. (2022); Akyurek & Andreas (2021); Li et al. (2023). Equivariance, as we know, provides the benefits of augmentations while also providing guarantees of generalization. Hence, several works have also explored group equivariance to perform the compositional generalization task on SCAN such as Gordon et al. (2020); Basu et al. (2023b;a). Here the method of Gordon et al. (2020) only works when trained from scratch, whereas the methods of Basu et al. (2023b;a) work with pretrained models but use a frame equal to the size of the entire group. Hence, group equivariant methods for finetuning pretrained models for compositional generalization have been restricted to small groups. We use our efficient multi-equitune design with larger groups to achieve competitive performance to equitune in terms of compositional generalization on our new splits of SCAN, while being computationally efficient.
+
+**SCAN-II splits** Tab. 3 and Tab. 4 show the context-free grammar and commands-to-action conversions for SCAN-II. Note “turn up” and “turn down” are new commands added to SCAN-II useful for testing compositionality to larger product groups. In SCAN-II, we have a single train dataset and four splits of test datasets: **jump, turn** ~~**l**~~ **eft, turn** ~~**u**~~ **p, and turn** ~~**u**~~ **p** ~~**j**~~ **ump** ~~**t**~~ **urn** ~~**l**~~ **eft** . Here, jump, turn ~~l~~ eft, and turn ~~u~~ p require equivariance to the pair of commands [“jump”, “walk”], [“up”, “down”], and [“left”, “right”], respectively, along with equivariance in the corresponding actions to perform well on the test sets. turn ~~u~~ p ~~j~~ ump ~~t~~ urn ~~l~~ eft requires equivariance to the product of the groups required for the other test sets.
+
+## D.2 INTERSECTIONAL FAIRNESS IN NLG
+
+Here we define the group-theoretic fairness framework of Basu et al. (2023b) used with language models (LM) such as GPT2. Then, we discuss how the framework changes upon extension to product groups. First, for each list of demographic groups, we define a set of list of words _E_ called the equality words set, and a set of words _N_ called the neutral words sets. The equality set _E_ represents the words corresponding to each demographic, e.g., for the list of demographic groups [“man”, “woman”], the equality words set can be [[“man”, “woman”], [“boy”, “girl”], [“king”, “queen”]]. The neutral set _N_ represents the words that are neutral with respect to any demographic,
+
+17
+
+Table 3: Phrase-structure grammar generating generating SCAN-II commands. The indexing notation allows infixing: D[ _i_ ] is to be read as the _i_ th element directly dominated by category D
+
+|C→S and S|V→D|D→turn up|
+|---|---|---|
+|C→S after S|V→U|D→turn down|
+|C→S|D→U left|U→walk|
+|S→V twice|D→U right|U→look|
+|S→V thrice|D→U up|U→run|
+|S→V|D→U down|U→jump|
+|V→D[1] opposite D[2]|D→turn left||
+|V→D[1] around D[2]|D→turn right||
+
+Table 4: Double brackets �� denote the function translating SCAN-II linguistic commands into sequences of actions. Symbols x and u denote variables limited to the set _{_ walk, look, run, jump _}_ . The linear order of actions reflects their temporal sequence
+
+|�walk�= WALK|�u opposite left�=�turn opposite left��u�|
+|---|---|
+|�look�= LOOK|�u opposite right�=�turn opposite right��u�|
+|�run�= RUN|�u opposite up�=�turn opposite up��u�|
+|�jump�= JUMP|�u opposite down�=�turn opposite down��u�|
+|�turn left�= LTURN|�turn around left�= LTURN LTURN LTURN LTURN|
+|�turn right�= RTURN|�turn around right�= RTURN RTURN RTURN RTURN|
+|�turn up�= UTURN|�turn around up�= UTURN UTURN UTURN UTURN|
+|�turn down�= DTURN|�turn around down�= DTURN DTURN DTURN DTURN|
+|�u left�= LTURN�u�|�u around left�= LTURN�u�LTURN�u�LTURN�u�LTURN�u�|
+|�u right�= RTURN�u�|�u around right�= RTURN�u�RTURN�u�RTURN�u�RTURN�u�|
+|�u up�= UTURN�u�|�u around up�= UTURN�u�UTURN�u�UTURN�u�UTURN�u�|
+|�u down�= DTURN�u�|�u around down�= DTURN�u�DTURN�u�DTURN�u�DTURN�u�|
+|�turn opposite left�= LTURN LTURN|�x twice�=�x��x�|
+|�turn opposite right�= RTURN RTURN|�x thrice�=�x��x��x�|
+|�turn opposite up�= UTURN UTURN|�x1 and x2�=�x1��x2�|
+|�turn opposite down�= DTURN DTURN|�x1 after x2�=�x2��x1�|
+
+e.g. [“doctor”, “nurse”, “student”]. Given a vocabulary _V_ of the LM, the words are partitioned between _E_ and _N_ in this setting. There is a more general setting called relaxed-equitune in Basu et al. (2023b) where the words in the vocabulary are distributed into three sets _E_ , _N_ , and _G_ . Here, _E_ and _N_ are defined the same as in equitune, but _G_ consists of all the words that do not obviously belong to either _E_ or _N_ . In this work we focus on equitune since all the methods developed for large product groups here trivially carry over to the implementation of relaxed-equitune.
+
+Now we review the group actions in equitune for a single list of demographics of length _d_ , such as [“man”, “woman”] has length _d_ = 2. Given a cyclic group of length _d_ , _G_ = _{e, g, g_[2] _, · · · , g[d][−]_[1] _}_ , it acts on the vocabulary _V_ as follows. The group action of a cyclic group is completely defined by the group action of its generator, in this case, the element _g ∈ G_ simply makes a cyclic shift of size one in the equality set _E_ and leaves the neutral set _N_ invariant. For example, if _G_ = _{e, g}_ and _E_ = [[“man”, “woman”], [“boy”, “girl”], [“king”, “queen”]], then _gE_ = [[“man”, “woman”], [“boy”, “girl”], [“king”, “queen”]].
+
+Previous works such as equitune and _λ_ -equitune have only focused on debiasing one list of demographic groups, but debiasing demographics at the intersection remains to be addressed. For example, debiasing the marginal demographics [“man”, “woman”] and [“Black”, “White”] does not guarantee debiasing for demographics at the intersection such as “Black woman”. Debiasing at the intersection is possible if we provide equivariance to product groups corresponding to the two lists of demographics. Thus, using multi-equitune, we aim to provide debiasing corresponding to the product group, but using significantly lesser compute compared to an implementation for the same product group using equitune.
+
+The implementation of multi-equitune here is very simple since all the group actions are on the vocabulary space and are disjoint. That is, the first step of canonicalization can be performed in-
+
+18
+
+Table 5: The contexts corresponding to the respect task and occupation task by Sheng et al. (2019). Here X is replaced by some specific demographic, e.g., “man”, “woman”, “Black man”, etc.
+
+|Respect task|Occupation task|
+|---|---|
+|The X was known for The X was described as The X was regarded as The X was thought of as The X was well-known for|The X worked as The X had a job as The X had a part-time job as The X earned money by The X started working as|
+
+dependently for each group, which are then passed through respective equivariant architectures. Finally, the outputs are symmetrized on disjoint output vocabulary before they are averaged.
+
+## D.3 ROBUST IMAGE CLASSIFICATION USING CLIP
+
+As mentioned in §3.4, for two groups _G_ 1 _, G_ 2, the multi-group architecture is given by _Sym Sym_ M _[Eq] G_ 1⋊ _G_ 2[(] _[X]_[)][=][(M] _[Eq] G_ 2[(] _[X] G[Inv]_ 1[))] _G_ 1 + (M _[Eq] G_ 1[(] _[X] G[Inv]_ 2[))] _G_ 2[.][Suppose] _[G]_[1][is][the][group][of][90] _[◦]_[rota-] tions and _G_ 2 is the group of flips. Then, for a given image _X_ first, we compute _XG[Inv] i_ for _i ∈{_ 1 _,_ 2 _}_ , which is computed by appropriately canonicalizing _X_ with respect to _Gi_ using the technique of Kaba et al. (2023). Kaba et al. (2023) also requires a small auxiliary network equivariant to _Gi_ , which is constructed by equituning a small randomly initialized matrix. M _[Eq] Gi_[is constructed by di-] rectly using the equitune transform (without any finetuning) on the vision encoder of CLIP. Further, since we just need invariant features from CLIP, we simply obtain invariant features from the output of M _[Eq] Gi_[by][pooling][along][the][orbit][of] _[G][i]_[.][Moreover,][since][the][features][obtained][are][invariant,][the] () _[Sym] Gi_ operator leaves the output unchanged. Finally, for equitune, we simply average the outputs _Sym_ from (M _[Eq] Gj_[(] _[X] G[Inv] i_[))] _Gi_ .
+
+Whereas for equizero there are two minor modifications to the method described above: a) M _[Eq] Gi_ is obtained by applying the equizero transform instead, i.e., a max is taken over the outputs with respect to the inner product with CLIP text embeddings, b) another max is taken over outputs _Sym_ (M _[Eq] Gj_[(] _[X] G[Inv] i_[))] _Gi_ with respect to the inner product with CLIP text embeddings.
+
+## E ADDITIONAL DETAILS ON EXPERIMENTAL SETTINGS
+
+## E.1 MULTI-IMAGE CLASSIFICATION
+
+The 15Scene dataset contains a wide range of scene environments of 13 categories. Each category includes 200 to 400 images with an average size of 300 _×_ 250 pixels. Similarly, Caltech101 contains pictures of objects from 101 categories. Each category includes 40 to 800 images of 300 _×_ 200 pixels.
+
+The multi-GCNN consists of three components: an equivariant Siamese block, an invariantsymmetric fusion block, and finally a linear block. The Siamese block is a Siamese network made of two convolutional layers, each with kernel size 5, and channel dimension 16. Each convolution is followed by a ReLU (Nair & Hinton, 2010), max pool, and a batch norm (Ioffe & Szegedy, 2015). It is followed by a fully connected layer with a hidden size computed by flattening the output of the convolutional layers and output size 64. The output is passed through ReLU, dropout (Srivastava et al., 2014), and batch norm. Finally, this block is made equivariant using the equitune transform (Basu et al., 2023b). The _N_ inputs are passed through this Siamese layer parallelly. The fusion block is built identically to the Siamese block, except, we make it invariant instead of equivariant. The fusion block also takes the inputs parallelly. Fusion is performed by adding the output of the fusion layer corresponding to input _i_ multiplied by a learnable weight to all the features corresponding to the other inputs. Following this, we perform invariant pooling and pass it through the linear
+
+19
+
+Table 6: Test accuracies for multi-image classification on the 15-Scene dataset. _N_ denotes the number of images present as input. Train augmentations corresponding to each of the _N_ inputs are shown as an ordered sequence. Here R means random 90 _[◦]_ rotations and I means no transformation. Fusion denotes the use of invariant-symmetric layers.
+
+|**Model**|CNN|Multi-GCNN|
+|---|---|---|
+|**Fusion**|_×_ ✓|_×_ ✓|
+|**Dataset** _N_ **Train Aug.**|||
+|_15-Scene_ 2 II RR 3 III RRR 4 IIII RRRR|0.417 0.428 0.56 0.597|**0.716** 0.706 0.7 **0.705**|
+||0.466 0.464 0.603 0.658|0.722 **0.739** 0.732 **0.751**|
+||0.484 0.469 0.667 0.641|**0.786** 0.78 0.779 **0.785**|
+
+Table 7: Memory consumption between equitune and multi-equitune and GPT2 for a product group of the form _G_ 1 ⋊ _G_ 2 ⋊ _G_ 3, where _|Gi|_ = 2 for _i ∈{_ 1 _,_ 2 _,_ 3 _}_ . Note that ideally, equitune would consume memory proportional to _|G_ 1 _| × |G_ 2 _| × |G_ 3 _|_ = 8 and multi-equitune would consume memory proportional to _|G_ 1 _|_ + _|G_ 2 _|_ + _|G_ 3 _|_ = 6. Our results show slightly more memory consumed by equitune compared to multi-equitune as expected for these groups. We use a batch size of 1 for the following measurements.
+
+|Model|GPT2|Equitune|Multi-Equitune|
+|---|---|---|---|
+|Memory Consumption (MiB)|1875|2753|2345|
+
+block to get the final output. The linear block consists of two densely connected layers with a hidden size of 64. Further, we use ReLU and dropout between the two densely connected layers. The non-equivariant CNN is constructed exactly as the multi-GCNN network except that no equituning operation is performed anywhere for equivariance or invariance.
+
+## F ADDITIONAL RESULTS
+
+This section gives some additional results that are referred to in the main text.
+
+**==> picture [132 x 8] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 5: The plots (a), (b), and (c) show the distribution of regard scores for the occupation task for the set of demographic groups gender, race, and an intersection of gender, race, and sexual orientation respectively. For GPT2 we observe clear disparity in regard scores amongst different demographic groups. Each bar in the plots correspond to 500 generated samples. Equitune and Multi-Equitune reduces the disparity in the regard scores.
+
+20
+
+**==> picture [132 x 7] intentionally omitted <==**
+
+**==> picture [191 x 144] intentionally omitted <==**
+
+**==> picture [192 x 144] intentionally omitted <==**
+
+**==> picture [202 x 8] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 6: The plots (a) and (b) show the distribution of regard scores for the respect task and the occupation task respectively. For GPT2 we observe clear disparity in regard scores amongst different demographic groups. Each bar in the plots correspond to 500 generated samples. Equitune and Multi-Equitune reduces the disparity in the regard scores.
+
+**==> picture [132 x 7] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 7: The plots (a), (b), and (c) show the distribution of regard scores for the respect task for three different intersectional demographics of gender, race, and the intersection of gender, race, and sexual orientation. For GPT2 we observe clear disparity in regard scores amongst different demographic groups. Each bar in the plots correspond to 500 generated samples. Equitune and Multi-Equitune reduces the disparity in the regard scores.
+
+**==> picture [132 x 7] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 8] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 8: The plots (a), (b), and (c) show the distribution of regard scores for the occupation task for three different intersectional demographics of gender, race, and the intersection of gender, race, and sexual orientation. For GPT2 we observe clear disparity in regard scores amongst different demographic groups. Each bar in the plots correspond to 500 generated samples. Equitune and Multi-Equitune reduces the disparity in the regard scores.
+
+21
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [132 x 99] intentionally omitted <==**
+
+**==> picture [272 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 9: (a) shows that CLIP is not robust to the transformations of 90 _[◦]_ rotations (rot90) and flips. (b) and (c) show that multi-equitune and multi-equizero are competitive with equitune and equizero, respectively, for zero-shot classification using RN50 and ViT-B/32 encoders of CLIP for the product of the transformations rot90 and flips, even with much lesser compute.
+
+Table 8: Memory consumption (in MiB) between equitune and multi-equitune for the group of random 90 _[◦]_ rotations and flips. Here the product group is of the form _G_ 1 ⋊ _G_ 2, where _|G_ 1 _|_ = 4 _, |G_ 2 _|_ = 2. Note that ideally, equitune would consume memory proportional to _|G_ 1 _| × |G_ 2 _|_ = 8 and multi-equitune would consume memory proportional to _|G_ 1 _|_ + _|G_ 2 _|_ = 6. Our results show slightly more memory consumed by equitune compared to multi-equitune as expected for these groups. We use a batch size of 32 for the following measurements.
+
+|Method_\_Dataset|RN50|RN101|ViT-B/32|ViT-B/16|
+|---|---|---|---|---|
+|Equitune|5161|5199|2853|4633|
+|Multi-Equitune|4389|4425|2663|4023|
+
+## G EFFICIENCY VS. PERFORMANCE TRADE-OFF
+
+Here, we discuss the trade-off between efficiency and performance between equitune and our multiequitune algorithm in equation 6. That is, for a product group of the form _G_ 1 ⋊ _G_ 2, we provide better intuition how we reduce the computational complexity from _O_ ( _|G_ 1 _|×|G_ 2 _|_ ) to _O_ ( _|G_ 1 _|_ + _|G_ 2 _|_ ). At the same time, we explain how exactly we get some drop in performance of the network with benefits in computational complexity.
+
+For simplicity, here we focus on the invariance case with commutative group actions here. Recall the formulation for multi-equitune for a product group of the form of _G_ 1 ⋊ _G_ 2 as M _[Eq] G_ 1⋊ _G_ 2[(] _[X]_[)][=] _Sym Sym_ (M _[Eq] G_ 2[(] _[X] G[Inv]_ 1[))] _G_ 1 + (M _[Eq] G_ 1[(] _[X] G[Inv]_ 2[))] _G_ 2[.][For][the][invariance][case,][the][expression][simply][becomes] M _[Inv] G_ 1⋊ _G_ 2[(] _[X]_[) = M] _G[Inv]_ 2[(] _[X] G[Inv]_ 1[)+M] _G[Inv]_ 1[(] _[X] G[Inv]_ 2[)][. From Sec. 3.4, recall that] _[ X] G[Inv] i_[denotes] _[ G][i]_[-invariant] feature of _X_ . Thus, one way of writing _XG[Inv] i_ is _XG[Inv] i_ = _|G_ 1 _i|_ � _gi∈Gi[g][i][X]_[.][Using this definition of] _XG[Inv] i_[, we have]
+
+**==> picture [380 x 28] intentionally omitted <==**
+
+Now, if M is linear, we can write equation 24 as
+
+**==> picture [298 x 28] intentionally omitted <==**
+
+First note that equation 24 has a computational complexity of _O_ ( _|G_ 1 _|_ + _|G_ 2 _|_ ), and that of equation 24 is _O_ ( _|G_ 1 _| × |G_ 2 _|_ ), where computational complexity here refers to the number of forward passes of the model M. On the other hand, equation 25 is the exact expression for equitune operation for the product group _G_ 1 ⋊ _G_ 2, when M is generalized to general functions. Further, we know that equitune is a universal approximator of equivariant functions Basu et al. (2023b). However, even though the invariant-symmetric layer in equation 5 is universal approximators of invariant-symmetric functions,
+
+22
+
+multi-equitune is not a universal approximator of equivariant functions. Thus, even though equation 24 and equation 25 are exactly identical when M is linear, they provide different expressivity when M is not linear, which is the general case we consider.
+
+Finally, we emphasize that this drop in expressivity of equation 24 is negligible when M itself is a large pretrained model as seen in Fig. 4 and 9. Moreover, equation 24 provides computational benefits over equation 25 for product groups.
+
+23
+
diff --git a/open_review/iclr2024_8574.json b/open_review/iclr2024_8574.json
new file mode 100644
index 0000000000000000000000000000000000000000..24c77b133edfb79c9b56aecf42d96c1bb9e238fd
--- /dev/null
+++ b/open_review/iclr2024_8574.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8574",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Can adversarial samples benefit few-shot unsupervised implicit neural shape representation learning ?",
+ "abstract": "Implicit Neural Representations have gained prominence as a powerful framework for capturing complex data modalities, encompassing a wide range from 3D shapes to images and audio. Within the realm of 3D shape representation, Neural Signed Distance Functions (SDF) have demonstrated remarkable potential in faithfully encoding intricate shape geometry. However, learning SDFs from 3D point clouds in the absence of ground truth supervision remains a very challenging task. While recent methods rely on smoothness priors to regularize the learning, our method introduces a regularization term that leverages adversarial samples around the shape to improve the learned SDFs. Through extensive experiments and evaluations, we illustrate the efficacy of our proposed method, highlighting its capacity to improve SDF learning with respect to baselines and the state-of-the-art using synthetic and real data.",
+ "rebuttal": "We would like to thank the reviewers for their valuable feedback. Based on the discussion with the reviewers, we summarize bellow the main changes in our revised version of the Paper and the supplementary material:\n\n### PU6C\n\n- we include a visual analysis of overfitting in Introduction (shape hallucinations, shape missing, bumps)\n- for lack of space in the paper, we join the video showing visual examples of overfitting in the SRB and 3D Scenes Benchmarks in the suplemantary material.\n- we include a clearer explanation of the reasons for our improved performance in introduction (Regularization+informative samples)\n- we add a zoom effects for better visualization in Figure 5\n- we increase the size of the text in Figure 1\n- we precise “Chamfer values for unit box normalized meshes” in caption Figure 1 \n- we clarify that all eval models are picked with chamfer to input in Results.\n\n### AkZJ\n\n- we clarify why our strategy is effective with sparsity and not just noise in introduction (both sparsity and noise result in noisy peudo-labels for us)\n- In Table 1 (Shapenet benchmark), we add method GridPull (Chen et al. 2023) \n- In Table 2 (Faust benchmark), we add methods GridPull (Chen et al. 2023), NKSR (Huang et al. 2023), POCO (Boutch et al. 2022), CONet (Peng et al. 2020), On-Surf. Priors (Ma et al. 2022).\n- In Table 5 (Sparse SRB benchmark), we add methods DIGS (Ben-Shabat et al. 2022) and NTPS (Chen et al. 2023). \n- we clarify our positioning wrt adversarial training literature in Related work\n- we provide additonal elements clarifying the benefits of our contritution (Regularization+informative samples) in introduction\n- We provide a clearer classification of our competition in Results\n\n### IVm1\n\n- we add discussion about NC performance in Limitations (excess regularization)\n- we add a comparison between our adversarial samples and just more normal samples in Ablations \n- we add a comparison between our adversarial learning and baseline with increasing size of input in Ablations\n\n### ZZdy\n\n- we add the full derivation Eq 6-8 in method.\n- we add text in Results and videos in supplemantary material justifying why we do not use extremely sparse inputs\n- we bolded best values in Table 3\n- we clarified the metric definition for Tables 4 and 5\n- In Table 5 (Sparse SRB benchmark), we add methods DIGS (Ben-Shabat et al. 2022) and NTPS (Chen et al. 2023). \n- we add a comparison between our adversarial samples and just more normal samples in Ablations \n- we clarified global radius definition in Table 6\n- we add a comparison between the hybrid loss and adversarial loss alone in Ablations\n\n3. We are sorry if we misunderstood your initial comment. Indeed we agree that classifying the methods we compare to in a more intuitive manner would help the reader. We will clarify in our results section that methods we compare to can be classified as shown bellow.\n\n • Unsupervised methods\n\n ◦ Per shape neural fitting\n ▪ Can handle sparse PC density\n NTPS (Chen et al. 2023)\n NSpline (Williams et al. 2021) [Requires normals]\n ▪ Generic PC density\n • Fully implicit\n NP (Ma et al. 2021) [ba [...]\n\nThank you very much for your reply.\n\n1. From the perspective of learning an SDF through “Neural pulling”, the “sparse noise and point displacement noise” can be conceptually very similar and can lead to the same outcome:\n\n- If the input point cloud is sparse, queries are pulled to “badly matched” input points. These noisy pseudo-labels are in this case the GT perfect labels displaced with some offset i.e. noise.\n\n- If the input point cloud is noisy, queries are pulled to these “inaccurate” input points. These noisy pseudo-labels are in this case the GT perfect labels displaced with some offset [...]\n\nThank you very much for acknowledging our rebuttal.\nWe note that smoothness in the sparse SRB reconstructions is in line with the very low input density compared to the high level of detail in the ground-truth shapes. The input point clouds can be seen in the video uploaded at the request of reviewer PU6C.\nHD is very sensitive to outliers. We think the second order direct implicit function regularization in DIGS and NTPS can lead to high robustness against these. OG-INR grid based supervision can also be effective against outliers as any false positives far away from the surface are dismissed [...]\n\n**Questions:**\n### Considering that extra query samples are generated with the proposed method, did you train the Neural Pull baseline with the same total number of samples as the proposed method or with just the same initial number of samples? It would be good to know how much more effective the approach is to just increasing the number of samples initially generated\n\n\nThis is an interesting point. Following the request of the reviewer we perform the experiment where we increase the number of NP samples to equal the total number of samples in our method (I.e. original queries + adversarial qu [...]\n\n### Figure 5 should include a comparison to NTPS as it performs the closest to the proposed method according to Table 3.\n\nUsing their publicly available implementation, we managed to obtain results for object reconstruction benchmarks ShapeNet, Faust and SRB for NTPS. However, we could not reproduce the paper results in the 3D Scene setting using this same implementation. We think this benchmark might require some special hyperparameter setting (e.g. a specific number of patches, optimizer parameters, etc) that was not shared by the authors. We reached out to the authors for help and we have n [...]\n\nWe thank the reviewer for their helpful feedback. We address below their main concerns.\n\n### Considering that the main contribution of the paper revolves around Eq. 6-8, there should be a formal derivation for when using the first order Taylor expansion of loss . I would expect to see this in the supplemental for completeness, but coul\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 5,
+ 6
+ ],
+ "score_mean": 5.75,
+ "score_variance": 0.25,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "",
+ "forum_id": "Cx6Jn6gKHz",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_PU6C",
+ "review_id": "MmvrTiaVvw",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 3814,
+ "edit_detected": true,
+ "edit_delta_seconds": 1131929,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_akZJ",
+ "review_id": "sU6O81jKek",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 3839,
+ "edit_detected": true,
+ "edit_delta_seconds": 2119529,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_iVm1",
+ "review_id": "cqsi2lPSMe",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4558,
+ "edit_detected": true,
+ "edit_delta_seconds": 1064541,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ZZdy",
+ "review_id": "DGEeOArCFP",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3212,
+ "edit_detected": true,
+ "edit_delta_seconds": 2605236,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8574.md b/open_review/iclr2024_8574.md
new file mode 100644
index 0000000000000000000000000000000000000000..8bc209b591c1380142a50a0f6a98e270f21c9ce0
--- /dev/null
+++ b/open_review/iclr2024_8574.md
@@ -0,0 +1,401 @@
+
+
+## - - CAN ADVERSARIAL SAMPLES BENEFIT FEW SHOT UN - SUPERVISED IMPLICIT NEURAL SHAPE REPRESENTA TION LEARNING ?
+
+Authors withheld for review
+
+## ABSTRACT
+
+Implicit Neural Representations have gained prominence as a powerful framework for capturing complex data modalities, encompassing a wide range from 3D shapes to images and audio. Within the realm of 3D shape representation, Neural Signed Distance Functions (SDF) have demonstrated remarkable potential in faithfully encoding intricate shape geometry. However, learning SDFs from 3D point clouds in the absence of ground truth supervision remains a very challenging task. While recent methods rely on smoothness priors to regularize the learning, our method introduces a regularization term that leverages adversarial samples around the shape to improve the learned SDFs. Through extensive experiments and evaluations, we illustrate the efficacy of our proposed method, highlighting its capacity to improve SDF learning with respect to baselines and the state-ofthe-art using synthetic and real data.
+
+## 1 INTRODUCTION
+
+Obtaining faith-full and intelligible neural representations of the 3D world from limited and corrupted point clouds is a challenge of paramount importance, that finds applications in countless downstream computer vision and graphics tasks. While many methods rely on data priors learned from large fully labeled datasets, these priors can fail to generalize to unseen shapes especially under very sparse unoriented inputs Chen et al. (2023a). Hence, it is important to design learning frameworks that can lead to efficient and robust learning of implicit shape representations under such extreme constraints.
+
+In this context, the learning strategy introduced by Ma et al. (2021) named NeuralPull have shown to be one of the most successful ones in learning implicit shapes from point cloud unsupervisedly. However, upon observing the behavior of the training and validation errors of this method under sparse and dense input point clouds (Figure 1), we notice that the validation error starts increasing quite early on in the training in the sparse input case, while the training loss keeps on decreasing. This suggests an overfitting problem that evidently intensifies in the sparse setting. In the case where this method did not entirely diverge from the very beginning, we observe the validation chamfer gap (Figure 1) is synonymous to qualitative deterioration in the extracted shape with symptoms varying between shapes including shape hallucinations, missing shapes, and shape becoming progressively wavy, bumpy and noisy. In extreme instances, shapes break into separate components or clusters around input points. When the input is additionally noisy, this exacerbates the overfitting effect on the learned implicit representation.
+
+Recent work in the field relies on various smoothness priors ( _e.g_ . Chen et al. (2023a); Gropp et al. (2020); Ben-Shabat et al. (2022)) to regularize the implicit shape functions and hence reduce overfitting especially in the sparse input point cloud regime. One side of the problem that remains underexplored however is how training pairs are sampled during learning, and understanding to which extent this sampling could affect performance. This is even the more an important question in our situation. In fact, while standard supervised learning uses typically data/label sample pairs, fitting implicit representation entails mapping spatial coordinates to labels or pseudo labels, where these spatial queries can be sampled uniformly or normally around the input point cloud. Whether it is due to it’s sparsity or to the scanning device noise, a noise due to the displacement of the GT
+
+1
+
+perfect labels is introduced in the supervision of the query points, which can affect both the SDF function and gradient orientation. This is true whether this displacement keeps the points on the surface of the shape (sparsity) or can take them outside the surface (input noise). The network first produces a very smooth shape and when it tries to refine it, it tends to overfit to the noise present in this supervision signal. At this stage, further fitting on easy samples (predominant samples) means overfitting on this noise. The samples that can benefit the implicit representation can be drowned within easy samples.
+
+Among the literature interested in such a problem, active learning advocates sampling based on informativeness and diversity Huang et al. (2010). New samples are queried from a pool of unlabeled data given a measure of these criteria. Informative samples are usually defined as samples that can reduce the uncertainty of a statistical model. However, several heuristics coexist as it is impossible to obtain a universal active learning strategy that is effective for any given task Dasgupta (2005). In our setting it is not clear what samples are the most informative for our implicit shape function and how to sample from the uncertainty regions of the implicit field. Recent work on distributionally robust optimization (DRO) Volpi et al. (2018), Rahimian & Mehrotra (2019) provide a mathematical framework to model uncertainty. In this framework, the loss is minimized over the worst-case distribution in a neighborhood of the observed training data distribution. As a special case, Adversarial training Madry et al. (2017) uses pointwise adversaries rather than adversarial joint perturbations of the entire training set.
+
+Inspired by this literature, we propose to use adversarial samples to regularize the learning of implicit shape representation from sparse point clouds. We build on SDF projection minimization error loss in training. Typically query points are pre-sampled around the input point cloud to train such a method. We augment these queries with adversarial samples during training. To ensure the diversity of these additional samples, we generate them in the vicinity of original queries within locally adapted radii. These radii modulate the adversarial samples density with the input point cloud density, thus allowing us to adapt to the local specificities of the input during the neural fitting. Our adversarial training strategy, focuses on samples that can still benefit the network, which prevents the aforementioned overfitting while refining the implicit representation.
+
+To test our idea, we devise experiments on real and synthetic reconstruction benchmarks, including objects, articulated shapes and large scenes. Our method outperforms the baseline as-well as the most related competition both quantitatively and qualitatively. We notice that our adversarial loss helps our model most in places where shape prediction is the hardest and most ambiguous, such as fine and detailed structures and body extremities. Experiments on a dense reconstruction setting show that our method can be useful in this setup as-well. Finally, as a result of our method illustrated in Figure 1, validation stabilizes and plateaus at convergence unlike our baseline, which makes it easier for us to decide the evaluation model epoch, given that evaluation errors are normally unavailable in unsupervised settings.
+
+**==> picture [120 x 90] intentionally omitted <==**
+
+**==> picture [119 x 90] intentionally omitted <==**
+
+Figure 1: For shape Gargoyle of the dataset SRB, while the training loss (left) is decreasing for both our baseline (NeuralPull (NP) Ma et al. (2021)) and our method, the **Chamfer distance of reconstructions w.r.t. the GT starts increasing quite early on especially in the sparse input point cloud case for the baseline** . This undesirable behaviour is remedied by our adversarial query mining. We report Chamfer for unit box normalized meshes.
+
+## 2 RELATED WORK
+
+Classical shape modelling from point cloud includes combinatorical methods where the shape is defined through an input point cloud based space partitioning, through _e.g_ . alpha shapes Bernardini
+
+2
+
+et al. (1999) Voronoi diagrams Amenta et al. (2001) or triangulation Cazals & Giesen (2006); Liu et al. (2020); Rakotosaona et al. (2021). Differently, the input samples can be used to define an implicit function whose zero level set represents the target shape, using global smoothing priors Williams et al. (2022); Lin et al. (2022); Williams et al. (2021) _e.g_ . radial basis function Carr et al. (2001) and Gaussian kernel fitting Sch¨olkopf et al. (2004), local smoothing priors such as moving least squares Mercier et al. (2022); Guennebaud & Gross (2007); Kolluri (2008); Liu et al. (2021), or by solving a boundary conditioned Poisson equation Kazhdan & Hoppe (2013). The recent literature proposes to parameterise these implicit functions with deep neural networks and learn their parameters with gradient descent, either in a supervised or unsupervised manner. These implicit neural representations Mescheder et al. (2019); Park et al. (2019) overcome many of the limitations of explicit ones ( _e.g_ . point clouds and meshes), as they allow to represent shapes with arbitrary topologies at virtually infinite resolution.
+
+We are interested in unsupervised implicit neural shape learning. In this scenario, an MLP is typically fitted to the input point cloud without extra priors or information. Regularizations can improve the convergence and compensate for the lack of supervision. For instance, Gropp et al. (2020) introduced a spatial gradient constraint based on the Eikonal equation. Ben-Shabat et al. (2022) introduces a spatial divergence constraint. Liu et al. (2022) propose a Lipschitz regularization on the network. Ma et al. (2021) expresses the nearest point on the surface as a function of the neural signed distance and its gradient. Peng et al. (2021) proposed a differentiable Poisson solving layer that converts predicted normals into an indicator function grid efficiently. Koneputugodage et al. (2023) guides the implicit field learning with an Octree based labelling. Boulch et al. (2021) predicts occupancy fields by learning whether a dropped needle goes across the surface or no. Chen et al. (2023a) learns a surface parametrization leveraged to provide additional coarse surface supervision to the shape network. Most methods can benefit from normals if available. Atzmon & Lipman (2020) proposed to supervise the gradient of the implicit function with normals, while Williams et al. (2021) uses the inductive bias of kernel ridge regression. In the absence of normals and learningbased priors, and under input scarcity, most methods still display considerable failures. Differently from all existing methods, we explore the use of adversarial samples in training implicit neural shape representations.
+
+In the adversarial training literature, a trade-off between accuracy and robustness has been observed empirically in different datasets Raghunathan et al. (2019), Madry et al. (2018). This has led prior work to claim that this tradeoff may be inevitable for many classification tasks Tsipras et al. (2018), Zhang et al. (2019). However, many recent papers challenged this claim. Yang et al. (2020) showed theoretically that this tradeoff is not inherent. Rather, it is a consequence of current robustness methods. These findings are corroborated empirically in many recent work Stutz et al. (2019), Xie et al. (2020), Herrmann et al. (2021).Our baseline relies on a pseudo-labeling strategy that introduces noise as the input gets sparser. Our method robustifies the learning against this noise, providing regularization and additional informative samples. The regularization helps prevent overfitting and enhances generalization ie. ensuring the loss behavior on the “training” query points is generalized in the 3D space, while informative samples aid in refining the shape function during advanced training stages.
+
+## 3 METHOD
+
+Given a noisy, sparse unoriented point cloud **P** _⊂_ R[3] _[×][N][p]_ , our objective is to obtain a corresponding 3D shape reconstruction, _i.e_ . the shape surface _S_ that best explains the observation **P** . In other terms, the input point cloud elements should approximate noised samples from _S_ .
+
+In order to achieve this goal, we learn a shape function _f_ parameterised with an MLP _fθ_ . The function represents the implicit signed distance field relative to the target shape _S_ . That is, for a query euclidean space location _q ∈_ R[3] , _f_ ( _q_ ) := _s ·_ min _v∈S ||v − q||_ 2, where _s_ := 1 if _q_ is inside _S_ , and _s_ := _−_ 1 otherwise. The inferred shape _S_[ˆ] can be obtained as the zero level set of the SDF (signed distance function) _fθ_ at convergence:
+
+**==> picture [254 x 13] intentionally omitted <==**
+
+ˆ Practically,(Lorensen &anClineexplicit(1987triangle)) whilemeshqueryingfor _S_ neuralcan benetworkobtained _fθ_ . throughWe noteMarchingalso thatCubes _S_ ˆ can be rendered through ray marching (Hart (1996)) in the SDF field inferred by _fθ_ .
+
+3
+
+## 3.1 BACKGROUND:
+
+## LEARNING A NEURAL SDF BY QUERY PROJECTION ERROR MINIMIZATION
+
+Several state-of-the-art reconstruction from point cloud methods ( _e.g_ . Chen et al. (2023a); Ma et al. (2022b;a); Chen et al. (2022); Ma et al. (2021)), including the state-of-the-art unsupervised reconstruction from sparse point cloud method (Chen et al. (2023a)), build on the neural SDF training procedure introduced in Ma et al. (2021) and explicitly termed Neural Pull. The latter is based on the observation that the distance field guided projection operator _q �→ q − f_ ( _q_ ) _· ∇f_ ( _q_ ) (Chibane et al. (2020); Perry & Frisken (2001); Wolter (1993); Zhao et al. (2021)) yields the nearest surface point when applied near the surface, where _∇f_ is the spatial gradient of _f_ .
+
+**==> picture [198 x 122] intentionally omitted <==**
+
+Figure 2: We learn an implicit shape representation _fθ_ from a point cloud (blue points) by minimizing the error between projection of spatial queries (gray points) on the level set of the field (purple) and the nearest input point. We introduce adversarial queries to the optimization. They are defined as samples maximizing the loss in the vicinity of original queries.
+
+In practice, query points _q ∈ Q_ are sampled around the input point cloud **P** , specifically from normal distributions centered at input samples _{p}_ , with locally defined standard deviations _{σp}_ :
+
+**==> picture [258 x 23] intentionally omitted <==**
+
+where _σp_ is chosen as the maximum euclidean distance to the _K_ nearest points to _p_ in **P** . For each query _q_ , the nearest point _p_ in **P** is computed subsequently, and the following objective is optimized in Ma et al. (2021) yielding a neural signed distance field _fθ_ whose zero level set concurs with the samples in **P** :
+
+**==> picture [351 x 24] intentionally omitted <==**
+
+In the case of Ma et al. (2021), the training procedure is empirical risk minimization (ERM), namely:
+
+**==> picture [233 x 16] intentionally omitted <==**
+
+where _Q_ constitutes the empirical distribution over the training samples.
+
+## 3.2 LOCAL ADVERSARIAL QUERIES FOR THE FEW SHOT SETTING
+
+When training through standard ERM under sparse input point clouds **P** , we notice the distance between the inferred shape and the ground-truth oftentimes increases and suffers from instability, even-though the training loss (over the query points _{q}_ ) can be steadily decreasing. This can be observed in Figure 1. This symptom suggests an over-fitting problem, _i.e_ . the information carried out by query samples decreasing during training thus leading to poor convergence. Hence, differently from existing work in the field of learning based reconstruction from point cloud, we propose to focus on the manner in which query points _q_ are sampled at training as we hypothesise that there could be a different sampling strategy from the one proposed in Neural Pull ( _i.e_ . Equation 2) that can lead to a better convergence. This hypothesis is backed by literature showing that hard sample mining can lead to improved generalization and reduced over-fitting (Xie et al. (2020); Chawla (2010); Fern´andez-Delgado et al. (2014); Krawczyk (2016); Shrivastava et al. (2016)). Intuitively, exposing the network to the worst cases in training is likely to make it more robust and less specialized on the more common easy queries.
+
+Hence, we explore a different procedure from standard ERM (Equation 3.1). Ideally, we wish to optimize _θ_ under the worst distribution _Q[′]_ of query points _{q}_ in terms of our objective function, meaning:
+
+**==> picture [244 x 16] intentionally omitted <==**
+
+4
+
+Such a training procedure is akin to a distributionally robust optimization (Sagawa* et al. (2020); Rahimian & Mehrotra (2019)) which is hard to achieve in essence. It is shown however that a special more attainable case of the latter consists in harnessing hard samples locally (Staib & Jegelka (2017)), that is looking for hard samples in the vicinity of the original empirical samples:
+
+**==> picture [260 x 17] intentionally omitted <==**
+
+In order to achieve this minimization, we introduce a first order Taylor expansion of the loss:
+
+**==> picture [277 x 13] intentionally omitted <==**
+
+using this approximation, we can derive the optimum value _δ_[ˆ] as the solution to a classical dual norm problem:
+
+**==> picture [242 x 25] intentionally omitted <==**
+
+where gradients _∇qL_ can be computed efficiently through automatic differentiation in a deeplearning framework ( _e.g_ . PyTorch (Paszke et al. (2019))).
+
+We found empirically in our context that using local radii _{ρp}_ improves over using a single global radius _ρ_ and we provide and ablation of this design choice. We recall that each query point _q_ has a nearest counterpart _p_ in **P** . As we want our adversarial sample _q_ + _δ_[ˆ] to still remain relatively close to _p_ , we define _{ρq}_ as a fraction of local standard deviation _σp_ of the nearest point _p_ ( _e.g_ . _ρq_ = _σp ×_ 10 _[−]_[2] ), which was used to sample query points around point _p_ . We note that the definition of _σp_ is mentioned in the previous section.
+
+To ensure the stability of our learning, we train our neural network by backpropagating a hybrid loss combining the original objective and the adversarial one, using the the strategy in Liebel & K¨orner (2018) for multi-task learning:
+
+**==> picture [340 x 23] intentionally omitted <==**
+
+where _λ_ 1 and _λ_ 2 are learnable weights. A summary of our training procedure is shown in Algorithm 1. A visual illustration of our training can be seen in Figure 2.
+
+**Algorithm 1** The training procedure of our method.
+
+**Input:** Point cloud **P** , learning rate _α_ , number of iterations _N_ it, batch size _Nb_ . **Output:** Optimal parameters _θ[∗]_ . Compute local st. devs. _{σp}_ � _σp_ = max _t∈K_ nn( _p,_ **P** ) _||t − p||_ 2�. _Q ←_ sample( **P** , _{σp}_ ) (Equ. 2) Compute nearest points in **P** for all samples in _Q_ . Compute local radii _{ρq}_ � _ρq_ = _σp ×_ 10 _[−]_[2] _, p_ := nn( _q,_ **P** )�. Initialize _λ_ 1 = _λ_ 2 = 1. **for** _N_ it times **do** Sample _Nb_ query points _{q, q ∼ Q}_ . Compute losses _{L_ ( _θ, q_ ) _}_ (Equ. 3) Compute loss gradients _{∇qL_ ( _θ, q_ ) _}_ with autodiff. Compute 3D offsets _{δ_[ˆ] _}_ . (Equ. 8, using radii _{ρq}_ ) Compute adversarial losses _{L_ ( _θ, q_ + _δ_[ˆ] ) _}_ (Equ. 3) Compute combined losses _{_ L( _θ, q_ ) _}_ (Equ. 9) ( _θ, λ_ 1 _, λ_ 2) _←_ ( _θ, λ_ 1 _, λ_ 2) _− α∇θ,λ_ 1 _,λ_ 2 Σ _q_ L( _θ, q_ ) **end for**
+
+## 4 RESULTS
+
+To evaluate our method, we assess our ability to learn implicit shape representations given sparse and noisy point clouds. We use datasets from standard reconstruction benchmarks. These datasets highlight a variety of challenges of fitting coordinate based MLPs to sparse data as-well as reconstruction more broadly. Following the literature, we evaluate our method by measuring the accuracy of 3D explicit shape models extracted after convergence from our MLPs. We compare quantitatively and
+
+5
+
+qualitatively to the the state-of-the-art in our problem setting, _i.e_ . unsupervised reconstruction from unoriented point cloud, including methods designed for generic pointcloud densities and methods dedicated to the sparse setting. For the former, we compare to fully implicit deep learning methods such as NP (Ma et al. (2021)), DiGs Ben-Shabat et al. (2022), NDrop (Boulch et al. (2021)), SAP (Peng et al. (2021)), IGR Gropp et al. (2020), SIREN Sitzmann et al. (2020), SAL Atzmon & Lipman (2020), PHASE Lipman (2021), in addition to hybrid methods combining implicit and grid based representations such as OG-INR Koneputugodage et al. (2023) and G-Pull Chen et al. (2023b). When it comes to methods dedicated to the sparse setting we compare to NTPS Chen et al. (2023a) which is the closest method to ours as it focuses specifically on the sparse input case. We show results for NSpline Williams et al. (2021) even-though it requires normals. We also compare to classical Poisson Reconstruction SPSR Kazhdan & Hoppe (2013). We note also that comparisons to NP (our baseline) also serves additionally as an ablation of our adversarial loss through out our experiments. For comprehensive evaluation, we also include comparisons to supervised methods including state of the art feed-forward generalizable methods, namely POCO Boulch & Marlet (2022) and CONet Peng et al. (2020) and NKSR Huang et al. (2023), alongside the finetuning method SAC Tang et al. (2021) and the prior-based optimization method On-Surf dedicated to sparse inputs On-Surf Ma et al. (2022a). Unless stated differently, we use the publicly available official implementations of existing methods. For sparse inputs, we experimented with point clouds of size _Np_ = 1024. While our main focus here is learning SDFs from sparse, noisy and unoriented point clouds, we found that addressing all these challenges under extremely sparse inputs (e.g. 300) leads in many cases to reconstructions that are not very meaningful or useful, and which are also hard to assess properly with standard metrics.
+
+## 4.1 METRICS
+
+Following seminal work, we evaluate our method and the competition w.r.t. the ground truth using standard metrics for the 3D reconstruction task. Namely, the L1 **Chamfer Distance CD** 1 ( _×_ 10[2] ), L2 **Chamfer Distance CD** 2 ( _×_ 10[2] ), the **Hausdorff distance (** _dH_ **)** and the euclidean distance based **F-Score (FS)** when ground truth points are available, and finally **Normal Consistency (NC)** when ground truth normals are available. We detail the expressions of these metrics in the supplementary material.
+
+## 4.2 DATASETS AND INPUT DEFINITIONS
+
+**ShapeNet** (Chang et al. (2015)) consists of various instances of 13 different synthetic 3D object classes. We follow the train/test splits defined in Williams et al. (2021). We generate noisy input point clouds by sampling 1024 points from the meshes and adding Gaussian noise of standard deviation 0 _._ 005 following the literature ( _e.g_ . Boulch & Marlet (2022); Peng et al. (2020)). For brevity we show results on classes Tables, Chairs and Lamps.
+
+**Faust** (Bogo et al. (2014)) consists of real scans of 10 human body identities in 10 different poses. We sample sets of 1024 points from the scans as inputs.
+
+**3D Scene** (Zhou & Koltun (2013)) contains large scale complex real world scenes obtained with a handheld commodity range sensor. We follow Chen et al. (2023a); Jiang et al. (2020); Ma et al. (2021) and sample our input point clouds with a sparse density of 100 per m[2] , and we report performance similarly for scenes Burghers, Copyroom, Lounge, Stonewall and Totempole.
+
+**Surface Reconstruction Benchmark (SRB)** (Williams et al. (2019)) consists of five object scans, each with different challenges such as complex topology, high level of detail, missing data and varying feature scales. We sample 1024 points from the scans for the sparse input experiment, and we also experiment using the dense inputs.
+
+## 4.3 OBJECT LEVEL RECONSTRUCTION
+
+We perform reconstruction of ShapeNet Chang et al. (2015) objects from sparse and noisy point clouds. Table 4.3 and Figure 4 show respectively a numerical and qualitative comparison to the competition. We outperform the competition across all metrics, as witnessed by the visual superiority of our reconstructions. We manage to recover fine structures and details with more fidelity. Although it obtains overall good coarse reconstructions, the thin plate spline smoothing prior of
+
+6
+
+NTPS seems to be hindering its expressivity. We noticed OG-INR fails to converge to satisfactory results under the sparse and noisy regime despite its effective Octree based sign field guidance in dense settings.
+
+||**CD1**|**CD2**|**NC**|**FS**|
+|---|---|---|---|---|
+|SPSR|2.34|0.224|0.74|0.50|
+|OG-INR|1.36|0.051|0.55|0.55|
+|NP|1.16|0.074|0.84|0.75|
+|Grid-Pull|1.07|0.032|0.70|0.74|
+|NTPS|1.11|0.067|**0.88**|0.74|
+|Ours|**0.76**|**0.020**|0.87|**0.83**|
+
+Table 1: ShapeNet Chang et al. (2015) reconstructions from sparse noisy unoriented point clouds.
+
+||**CD1**|**CD2**|**NC**|**FS**|
+|---|---|---|---|---|
+|POCO|0.308|0.002|0.934|0.981|
+|Conv-onet|1.260|0.048|0.829|0.599|
+|On-Surf|0.584|0.012|0.936|0.915|
+|SAC|0.261|0.002|0.935|0.975|
+|NKSR|0.274|0.002|0.945|0.981|
+|SPSR|0.751|0.028|0.871|0.839|
+|Grid-Pull|0.495|0.005|0.887|0.945|
+|NTPS|0.737|0.015|0.943|0.844|
+|NP|0.269|0.003|0.951|0.973|
+|Ours|**0.220**|**0.001**|**0.956**|**0.981**|
+
+Table 2: Faust (Bogo et al. (2014)) reconstructions from sparse noisy unoriented point clouds.
+
+**==> picture [198 x 302] intentionally omitted <==**
+
+**==> picture [198 x 201] intentionally omitted <==**
+
+**==> picture [198 x 30] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Figure 4: ShapeNet (Chang et al. (2015)) re- constructions from sparse noisy unoriented point clouds. **----- End of picture text -----**
+
+Figure 3: Fasut (Bogo et al. (2014)) reconstructions from sparse noisy unoriented point clouds.
+
+## 4.4 REAL ARTICULATED SHAPE RECONSTRUCTION
+
+We perform reconstruction of Faust (Chang et al. (2015)) human shapes from sparse and noisy point clouds. Table 4.3 and Figure 3 show respectively a numerical and qualitative comparison to the competition. We outperform the other methods across all metrics. Visually, our reconstructions are particularly better at body extremities. Similarly to fine structures in the ShapeNet experiment, these
+
+7
+
+are areas where the input point cloud samples are scarce and shape prediction is hard and ambiguous. NTPS reconstructions tend to be coarser and less detailed on this data as-well.
+
+## 4.5 REAL SCENE LEVEL RECONSTRUCTION
+
+Following Chen et al. (2023a), we report reconstruction results on the 3D Scene (Zhou & Koltun (2013)) data from spatially sparse point clouds. Table 3 summarizes numerical results. We compiled results for methods NTPS, NP, SAP, NDrop and NSpline as reported in state-of-the-art method NTPS. We outperform the competition is this benchmark thanks to our loss, as our baseline NP displays more blatant failures in this large scale sparse setup. Figure 5 shows qualitative comparisons to our baseline NP and SPSR. Red boxes highlights area where our method displays particular better details an fidelity in the reconstruction.
+
+|details|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|an fdelity in the reconstruction.|
+|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+||**Burghers** **Copyroom** **Lounge** **Stonewall** **Totemple** **Mean**||||||||||||||||||
+||CD1|CD2|NC|CD1|CD2|NC|CD1|CD2|NC|CD1|CD2|NC|CD1|CD2|NC|CD1|CD2|NC|
+|SPSR NDrop NP SAP Nspline NTPS|0.178 0.205 0.874 0.200 0.114 0.825 0.064 0.008 0.898 0.153 0.101 0.807 0.135 0.123 0.891 0.055 0.005 **0.909**|||0.225 0.286 0.861 0.168 0.063 0.696 0.049 0.005 0.828 0.053 0.009 0.771 0.056 0.023 0.855 0.045 0.003 **0.892**|||0.280 0.365 0.869 0.156 0.050 0.663 0.133 0.038 0.847 0.134 0.033 0.813 0.063 0.039 0.827 0.129 0.022 **0.872**|||0.300 0.480 0.866 0.150 0.081 0.815 0.060 0.005 0.910 0.070 0.007 0.867 0.124 0.091 0.897 0.054 0.004 **0.939**|||0.588 1.673 0.879 0.203 0.139 0.844 0.178 0.024 0.908 0.474 0.382 0.725 0.378 0.768 0.892 0.103 0.017 0.935|||0.314 0.602 0.870 0.175 0.089 0.769 0.097 0.016 0.878 0.151 0.100 0.797 0.151 0.209 0.88 0.077 0.010 **0.897**|||
+|Ours|**0.051** **0.006** 0.881|||**0.037** **0.002** 0.833|||**0.044** **0.011** 0.862|||**0.035** **0.003** 0.912|||**0.042** **0.002** 0.925|||**0.041** **0.004** 0.881|||
+
+Table 3: 3D Scene (Zhou & Koltun (2013)) reconstructions from sparse point clouds.
+
+**==> picture [396 x 84] intentionally omitted <==**
+
+Figure 5: 3D Scene (Zhou & Koltun (2013)) reconstructions from sparse unoriented point clouds.
+
+## 4.6 VARYING THE POINT CLOUD DENSITY
+
+We use the SRB (Williams et al. (2019)) benchmark to assess the behavior of our method across different point cloud densities. Table 5 indicates comparative results under 1024 sized input point clouds, while Table 4 presents results under dense inputs. We compiled results for the competition from OG-INR in the dense setting. We outperform our competition in the sparse case, and we perform on par with the state-of-the-art in the dense case. Our improvement w.r.t. our baseline is substantial for both sparse and dense inputs. This can be seen visually in the supplementary material, where we show reconstructions for both sparse and dense cases. Notice how we recover better topologies in the sparse case and improved and more accurate details in the dense case, as pinpointed by the red boxes. These results showcase the utility and benefit of our contribution even in the dense setting. We note that SPSR becomes a very viable contestant qualitatively in the dense setting.
+
+## 4.7 ABLATION STUDIES
+
+||CD1|NC|
+|---|---|---|
+|NP (baseline)|1.10|0.85|
+|Ours (local)_ρq_ =_σp_/10|0.92|0.86|
+|Ours (local)_ρq_ =_σp_/100|**0.75**|0.86|
+|Ours (local)_ρq_ =_σp_/500|0.88|0.86|
+|Ours (local)_ρq_ =_σp_/1000|1.02|0.84|
+|Ours(global) _ρ_=_σp_/100|0.98|0.86|
+
+Table 6: Ablation of hard sample search radii.
+
+8
+
+||_dC_|_dH_|||||
+|---|---|---|---|---|---|---|
+|Nrml Est + SPSR|1.25|22.59|||||
+|IGR wo n SIREN wo n SAL IGR + FF PHASE+FF DiGS SAP OG-INR|1.38 0.42 0.36 0.96 0.22 **0.19** 0.21 0.20|16.33 7.67 7.47 11.06 4.96 **3.52** 4.51 4.06||SPSR DiGs OG-INR NTPS NP Ours|_dC_ 2.27 0.68 0.85 0.73 0.58 **0.49**|_dH_ 21.1 **6.05** 7.10 7.78 8.90 8.17|
+|NP|0.23|4.46|Table 5:|SRB (Williams et al. (2019)) re-|||
+|OURS|**0.19**|3.84|constructions from||sparse unoriented point||
+||||clouds.||||
+
+Table 4: SRB (Williams et al. (2019)) reconstructions from dense unoriented point clouds.
+
+**Perturbation radii** . The ablation of our main contribution is present through out all Tables and Figures. In fact while we use the combined loss in Equation 9, our baseline ( _i.e_ . NP) uses solely the query projection loss in Equation 3. The improvement brought by our additional loss is present across real/synthetic, scenes/objects, sparse/dense point clouds. Additionally, we perform an ablation of using local _vs_ . global radii _ρ_ (Equation 8) and the choice of value of local radii _ρq_ in Table 6. Results show that using local radii is a superior strategy as it intuitively allows for a spatially adaptive search of hard samples. We note that our baseline NP constitutes the special case _ρ_ = 0. A value of _σp ×_ 10 _[−]_[2] achieves empirically satisfactory results ( _p_ being the nearest point to the query in the input point cloud). Decreasing _ρq_ leads expectedly to worse results as less hard queries are available for sampling. However, we also note that very large values of _ρq_ can lead to spurious pseudo supervision, as adversarial samples _q_ + _δ_ run the risk of no longer having the same nearest point in the input point cloud as their original sample _q_ .
+
+**Multitask loss** : To guarantee the stability of our learning process, we employ a hybrid loss that merges the original objective with an adversarial one. This approach becomes crucial when a shapespecific trade-off between adversarial regularization and the original loss is required for the convergence of the shape function. In practical terms, this strategy outperformed using the adversarial loss alone, leading to an improvement in CD1 from 0.78 to 0.75.
+
+**Increasing the number of query points** we increase the number of NP samples to equal the total number of samples in our method (i.e. original queries + adversarial queries). We find that the performance of NP with extra queries only leads occasionally to marginal improvement. On average Chamfer distance went from 0.581 to 0.576.
+
+## 5 LIMITATIONS
+
+As can be seen in _e.g_ . Figure 4, even-though we improve on our baseline, we still face difficulties in learning very thin and convoluted shape details, such as chair legs and slats. Although our fewshot problem is inherently challenging and can be under-constrained in many cases, we still believe there is room for improvement for our proposed strategy in this setting. For instance, one main area that could be a source of hindrance to our accuracy is the difficulty of balancing empirical risk minimization and adversarial learning. In this work, we used an off the shelf state-of-the-art selftrained loss weighting strategy, and we would like to address this challenge further as part of our future work.
+
+## 6 CONCLUSION
+
+We explored in this work a novel idea for regularizing implicit shape representation learning from sparse unoriented point clouds. We showed that harnessing adversarial samples locally in training can lead to numerous desirable outcomes, including superior results, reduced over fitting and easier evaluation model selection.
+
+9
+
+## REFERENCES
+
+- Nina Amenta, Sunghee Choi, and Ravi Krishna Kolluri. The power crust, unions of balls, and the medial axis transform. _CG_ , 2001.
+
+- Matan Atzmon and Yaron Lipman. Sal: Sign agnostic learning of shapes from raw data. In _CVPR_ , 2020.
+
+- Yizhak Ben-Shabat, Chamin Hewa Koneputugodage, and Stephen Gould. Digs: Divergence guided shape implicit neural representation for unoriented point clouds. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 19323–19332, 2022.
+
+- Fausto Bernardini, Joshua Mittleman, Holly Rushmeier, Claudio Silva, and Gabriel Taubin. The ball-pivoting algorithm for surface reconstruction. _TVCG_ , 1999.
+
+- Federica Bogo, Javier Romero, Matthew Loper, and Michael J. Black. FAUST: Dataset and evaluation for 3D mesh registration. In _CVPR_ , 2014.
+
+- Alexandre Boulch and Renaud Marlet. Poco: Point convolution for surface reconstruction. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 6302– 6314, 2022.
+
+- Alexandre Boulch, Pierre-Alain Langlois, Gilles Puy, and Renaud Marlet. Needrop: Self-supervised shape representation from sparse point clouds using needle dropping. In _2021 International Conference on 3D Vision (3DV)_ , pp. 940–950. IEEE, 2021.
+
+- Jonathan C Carr, Richard K Beatson, Jon B Cherrie, Tim J Mitchell, W Richard Fright, Bruce C McCallum, and Tim R Evans. Reconstruction and representation of 3d objects with radial basis functions. In _SIGGRAPH_ , 2001.
+
+- Fr´ed´eric Cazals and Joachim Giesen. _Effective Computational Geometry for Curves and Surfaces_ . 2006.
+
+- Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. _arXiv preprint arXiv:1512.03012_ , 2015.
+
+- Nitesh V Chawla. Data mining for imbalanced datasets: An overview. _Data mining and knowledge discovery handbook_ , pp. 875–886, 2010.
+
+- Chao Chen, Yu-Shen Liu, and Zhizhong Han. Latent partition implicit with surface codes for 3d representation. In _European Conference on Computer Vision (ECCV)_ , 2022.
+
+- Chao Chen, Zhizhong Han, and Yu-Shen Liu. Unsupervised inference of signed distance functions from single sparse point clouds without learning priors. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2023a.
+
+- Chao Chen, Yu-Shen Liu, and Zhizhong Han. Gridpull: Towards scalability in learning implicit representations from 3d point clouds. In _Proceedings of the ieee/cvf international conference on computer vision_ , pp. 18322–18334, 2023b.
+
+- Julian Chibane, Aymen Mir, and Gerard Pons-Moll. Neural unsigned distance fields for implicit function learning. In _NeurIPS_ , 2020.
+
+- Sanjoy Dasgupta. Coarse sample complexity bounds for active learning. _Advances in neural information processing systems_ , 18, 2005.
+
+- Manuel Fern´andez-Delgado, Eva Cernadas, Sen´en Barro, and Dinani Amorim. Do we need hundreds of classifiers to solve real world classification problems? _The journal of machine learning research_ , 15(1):3133–3181, 2014.
+
+- Amos Gropp, Lior Yariv, Niv Haim, Matan Atzmon, and Yaron Lipman. Implicit geometric regularization for learning shapes. In _ICML_ , 2020.
+
+10
+
+- Ga¨el Guennebaud and Markus Gross. Algebraic point set surfaces. In _ACM siggraph 2007 papers_ , pp. 23–es. 2007.
+
+- John C Hart. Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces. _The Visual Computer_ , 1996.
+
+- Charles Herrmann, Kyle Sargent, Lu Jiang, Ramin Zabih, Huiwen Chang, Ce Liu, Dilip Krishnan, and Deqing Sun. Pyramid adversarial training improves vit performance. _arXiv preprint arXiv:2111.15121_ , 2021.
+
+- Jiahui Huang, Zan Gojcic, Matan Atzmon, Or Litany, Sanja Fidler, and Francis Williams. Neural kernel surface reconstruction. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , pp. 4369–4379, June 2023.
+
+- Sheng-Jun Huang, Rong Jin, and Zhi-Hua Zhou. Active learning by querying informative and representative examples. _Advances in neural information processing systems_ , 23, 2010.
+
+- Chiyu Jiang, Avneesh Sud, Ameesh Makadia, Jingwei Huang, Matthias Nießner, Thomas Funkhouser, et al. Local implicit grid representations for 3d scenes. In _CVPR_ , 2020.
+
+Michael Kazhdan and Hugues Hoppe. Screened poisson surface reconstruction. _TOG_ , 2013.
+
+Ravikrishna Kolluri. Provably good moving least squares. _TALG_ , 2008.
+
+- Chamin Hewa Koneputugodage, Yizhak Ben-Shabat, and Stephen Gould. Octree guided unoriented surface reconstruction. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 16717–16726, 2023.
+
+- Bartosz Krawczyk. Learning from imbalanced data: open challenges and future directions. _Progress in Artificial Intelligence_ , 5(4):221–232, 2016.
+
+- Lukas Liebel and Marco K¨orner. Auxiliary tasks in multi-task learning. _arXiv preprint arXiv:1805.06334_ , 2018.
+
+- Siyou Lin, Dong Xiao, Zuoqiang Shi, and Bin Wang. Surface reconstruction from point clouds without normals by parametrizing the gauss formula. _ACM Transactions on Graphics_ , 42(2): 1–19, 2022.
+
+- Yaron Lipman. Phase transitions, distance functions, and implicit neural representations. In _ICML_ , 2021.
+
+- Hsueh-Ti Derek Liu, Francis Williams, Alec Jacobson, Sanja Fidler, and Or Litany. Learning smooth neural functions via lipschitz regularization. _arXiv preprint arXiv:2202.08345_ , 2022.
+
+- Minghua Liu, Xiaoshuai Zhang, and Hao Su. Meshing point clouds with predicted intrinsic-extrinsic ratio guidance. In _ECCV_ , 2020.
+
+- Shi-Lin Liu, Hao-Xiang Guo, Hao Pan, Peng-Shuai Wang, Xin Tong, and Yang Liu. Deep implicit moving least-squares functions for 3d reconstruction. In _CVPR_ , 2021.
+
+- William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. In _SIGGRAPH_ , 1987.
+
+- Baorui Ma, Zhizhong Han, Yu-Shen Liu, and Matthias Zwicker. Neural-pull: Learning signed distance functions from point clouds by learning to pull space onto surfaces. In _ICML_ , 2021.
+
+- Baorui Ma, Yu-Shen Liu, and Zhizhong Han. Reconstructing surfaces for sparse point clouds with on-surface priors. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 6315–6325, 2022a.
+
+- Baorui Ma, Yu-Shen Liu, Matthias Zwicker, and Zhizhong Han. Surface reconstruction from point clouds by learning predictive context priors. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 6326–6337, 2022b.
+
+11
+
+- Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. _arXiv preprint arXiv:1706.06083_ , 2017.
+
+- Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In _International Conference on Learning Representations_ , 2018.
+
+- Corentin Mercier, Thibault Lescoat, Pierre Roussillon, Tamy Boubekeur, and Jean-Marc Thiery. Moving level-of-detail surfaces. _ACM Transactions on Graphics (TOG)_ , 41(4):1–10, 2022.
+
+- Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 4460–4470, 2019.
+
+- Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In _CVPR_ , 2019.
+
+- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. _NeurIPS_ , 2019.
+
+- Songyou Peng, Michael Niemeyer, Lars Mescheder, Marc Pollefeys, and Andreas Geiger. Convolutional occupancy networks. In _European Conference on Computer Vision_ , pp. 523–540. Springer, 2020.
+
+- Songyou Peng, Chiyu Jiang, Yiyi Liao, Michael Niemeyer, Marc Pollefeys, and Andreas Geiger. Shape as points: A differentiable poisson solver. _Advances in Neural Information Processing Systems_ , 34:13032–13044, 2021.
+
+- Ronald N Perry and Sarah F Frisken. Kizamu: A system for sculpting digital characters. In _Proceedings of the 28th annual conference on Computer graphics and interactive techniques_ , pp. 47–56, 2001.
+
+- Aditi Raghunathan, Sang Michael Xie, Fanny Yang, John C Duchi, and Percy Liang. Adversarial training can hurt generalization. _arXiv preprint arXiv:1906.06032_ , 2019.
+
+Hamed Rahimian and Sanjay Mehrotra. Distributionally robust optimization: A review. _arXiv preprint arXiv:1908.05659_ , 2019.
+
+- Marie-Julie Rakotosaona, Noam Aigerman, Niloy Mitra, Maks Ovsjanikov, and Paul Guerrero. Differentiable surface triangulation. In _SIGGRAPH Asia_ , 2021.
+
+- Shiori Sagawa*, Pang Wei Koh*, Tatsunori B. Hashimoto, and Percy Liang. Distributionally robust neural networks. In _International Conference on Learning Representations_ , 2020. URL https: //openreview.net/forum?id=ryxGuJrFvS.
+
+Bernhard Sch¨olkopf, Joachim Giesen, and Simon Spalinger. Kernel methods for implicit surface modeling. In _NeurIPS_ , 2004.
+
+- Abhinav Shrivastava, Abhinav Gupta, and Ross Girshick. Training region-based object detectors with online hard example mining. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 761–769, 2016.
+
+- Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. In _NeurIPS_ , 2020.
+
+- Matthew Staib and Stefanie Jegelka. Distributionally robust deep learning as a generalization of adversarial training. In _NIPS workshop on Machine Learning and Computer Security_ , volume 3, pp. 4, 2017.
+
+- David Stutz, Matthias Hein, and Bernt Schiele. Disentangling adversarial robustness and generalization. In _IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2019.
+
+12
+
+- Jiapeng Tang, Jiabao Lei, Dan Xu, Feiying Ma, Kui Jia, and Lei Zhang. Sa-convonet: Sign-agnostic optimization of convolutional occupancy networks. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 6504–6513, 2021.
+
+- Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. _arXiv.org_ , 2018. abs/1805.12152.
+
+- Riccardo Volpi, Hongseok Namkoong, Ozan Sener, John C Duchi, Vittorio Murino, and Silvio Savarese. Generalizing to unseen domains via adversarial data augmentation. _Advances in neural information processing systems_ , 31, 2018.
+
+- Francis Williams, Teseo Schneider, Claudio Silva, Denis Zorin, Joan Bruna, and Daniele Panozzo. Deep geometric prior for surface reconstruction. In _CVPR_ , 2019.
+
+- Francis Williams, Matthew Trager, Joan Bruna, and Denis Zorin. Neural splines: Fitting 3d surfaces with infinitely-wide neural networks. In _CVPR_ , 2021.
+
+- Francis Williams, Zan Gojcic, Sameh Khamis, Denis Zorin, Joan Bruna, Sanja Fidler, and Or Litany. Neural fields as learnable kernels for 3d reconstruction. In _CVPR_ , 2022.
+
+- Franz-Erich Wolter. Cut locus and medial axis in global shape interrogation and representation. 1993.
+
+- Cihang Xie, Mingxing Tan, Boqing Gong, Jiang Wang, Alan L Yuille, and Quoc V Le. Adversarial examples improve image recognition. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 819–828, 2020.
+
+- Yao-Yuan Yang, Cyrus Rashtchian, Hongyang Zhang, Ruslan Salakhutdinov, and Kamalika Chaudhuri. A closer look at accuracy vs. robustness. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2020.
+
+- Hongyang Zhang, Yaodong Yu, Jiantao Jiao, Eric Xing, Laurent El Ghaoui, and Michael Jordan. Theoretically principled trade-off between robustness and accuracy. _arXiv.org_ , 2019. abs/1901.08573.
+
+- Fang Zhao, Wenhao Wang, Shengcai Liao, and Ling Shao. Learning anchored unsigned distance functions with gradient direction alignment for single-view garment reconstruction. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 12674–12683, 2021.
+
+- Qian-Yi Zhou and Vladlen Koltun. Dense scene reconstruction with points of interest. _ACM Transactions on Graphics (ToG)_ , 32(4):1–8, 2013.
+
+13
+
diff --git a/open_review/iclr2024_8575.json b/open_review/iclr2024_8575.json
new file mode 100644
index 0000000000000000000000000000000000000000..77292c493e079cf10b6a2484dd2dddc39ef255cf
--- /dev/null
+++ b/open_review/iclr2024_8575.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8575",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Transformer-VQ: Linear-Time Transformers via Vector Quantization",
+ "abstract": "We introduce Transformer-VQ, a decoder-only transformer computing softmax-based dense self-attention in linear time. Transformer-VQ's efficient attention is enabled by vector-quantized keys and a novel caching mechanism. \nIn our large-scale experiments, Transformer-VQ is shown highly competitive in quality, obtaining 0.99 bpb on Enwik8, 26.6 ppl on PG-19, and 3.16 bpb on ImageNet64. In addition, the optimized implementation of Transformer-VQ is over 3x faster than a comparable quadratic-time transformer at sequence length 8k, is over 12x faster at 32k, and can scale to 131k with similar throughput. Code available: \\url{https://github.com/transformer-vq/transformer_vq}",
+ "rebuttal": "### Added additional diagram\nWe have added an additional diagram, as described above. It shows the attention output can be factored as $\\exp(Q\\hat{K}^T)V = \\exp(QC^T)\\Delta V$ in the absence of causal masking or positional biases. This observation generalizes directly to our cache mechanism. Thanks for your feedback, and we hope you find the new diagram satisfactory!\n\n### Added second diagram\nIn addition to the requested speed tests (Appendix B), pseudocode (Appendix E), and initial diagram (Figure 1), we have included additional diagram (Figure 2) to show how our method reduces the computational cost of attention on long sequences. We hope you find these changes to improve the presentation of our paper. \n\nThanks for your feedback, and please do let us know if there's anything else we can do to help!\n\n### Clarification on the diagrams\nHello and thanks for the reply. \n\nFor your reference, we summarize the intention of each figure below, then discuss possible improvements. \n\n- In Figure 1, the colorful boxes were intended to represent hypothetical 3-dimensional keys, with their RGB intensities representing individual dimensions in the standard basis. The empty boxes were intended to represent the attention weights in response to a hypothetical query (not depicted). VQ-Attention distorts the attention weights, notably causing the weights for two initially-distinct \"green\" vectors, $k_{2}$ and [...]\n\n### Follow-up reply\nThank you, we appreciate your increase in score!\n\n> It seems to me that, as further explained by the authors, many results are being compared even though they are not directly comparable for various technical reasons. \n\nOur Enwik8 and PG-19 results are fully comparable. It just so happens we found overfitting to be a challenge on Enwik8 and used a tougher choice of optimizer/vocabulary on PG-19. This does not in any way diminish our results; it strengthens them. \n\nOn ImageNet64, we sought to use models with similar size to Perceiver AR and Efficient VDVAE, and we train for [...]\n\n### Reply to reviewer 1jb5\nThank you for your comments. We have recently uploaded a new version of our paper, which we believe is further improved; see our comment at the top for a summary of changes. We will now address your individual comments.\n\n> The authors experiment with various architecture sizes; how did the authors choose which parameters to scale up? Is there some \"scaling laws\" that the authors observed to be useful? \n\nIn general, we tried copying hyperparameters from whatever paper was SoTA/near SoTA, then made adjustments specific to the design of GAU [1]. If the settings were slo [...]\n\n### Reply to reviewer 1jb5, continued.\nWe hope our comment above helps shed some light on how VQ-Attention was derived initially, and how it ultimately works. It first applies vector-quantization to map similar keys to the same elements in a finite set of choices, then it deduplicates the keys while keeping the attention result the same as not deduplicating them. \n\n> Further, the proofs are written just as a sequence of equations without any conceptual descriptions, so it's quite hard to understand what steps are being used in the proofs.\n\nWe will update the paper to be a bit clearer and will [...]\n\n### Reply to reviewer 5aiB\nThanks for your comments. We have recently uploaded a new version of our paper, which we believe is greatly improved; see our comment at the top for a summary of changes. We will now address your individual comments.\n\n> I think some pseudocode or diagrams illustrating the main ideas would be useful\n\nWe have added some pseudocode to Appendix E, please let us know if this helps clarify things. In addition, we will attempt to create a satisfactory diagram illustrating the main idea. \n\n> Transformer-VQ only significantly outperforms prior work on ImageNet64 where it uses [...]\n\n### Reply to reviewer 5aiB, continued.\n> The datasets Transformer-VQ is evaluated on are also not current mainstream LLM datasets (which is the main application of Transformers and attention at the moment); I think results for e.g. standard token-level language modeling on C4 or The Pile would be more convincing.\n\nThe PG-19 and ImageNet64 datasets we evaluate on are standard long-context modeling benchmarks and are in fact the largest publicly-available autoregressive modeling datasets used in well-cited and spotlighted long-context papers from 2022 [3][4][7][8]. \n\nAs for the Pile, it is a gre [...]\n\n### Reply to reviewer gEU7\nThank you for your comments. We have recently uploaded a new version of our paper, which we believe is greatly improved; see our comment at the top for a summary of changes. We will now address your individual comments.\n\n> The proposed method, termed Transformer-VQ, is applicable for both Transformer Encoder and Decoder models. \n\nTo clarify, our proposal is a transformer decoder, similar to in spirit to Transformer-XL [1] or Memorizing Transformer [2], but whose cache contains the appropriate information while also being fixed in size. We do not make any claims abou [...]\n\n### Reply to reviewer gEU7, continued.\n> The paper uses the GAU Transformer instead of a vanilla Transformer; Is there any reason why you used this variant? \n\nWe used GAU because it is faster than multi-head attention (MHA) and yielded slightly better preliminary results than multi-query attention (MQA, [6]). \n\n> If the reason is that GAU employs single-headed attention, is Transformer-VQ applicable to a base (naïve) Transformer architecture?\n\nYes it is. Theorem 3.7 only requires queries, quantized keys, shortcodes, values, and a codebook, so it can be applied with MHA or MQA instead of GAU. \n [...]\n\n### Thank you for review\nThank you for the increase!\n\nWe have yet to come up with a satisfactory second diagram, but are hoping to have something by the end of the day. \n\nThe main issue is that there are a lot of relevant pieces. We are considering just using a diagram similar Figure 1 of the Performer paper [1], which sh\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 8,
+ 8
+ ],
+ "score_mean": 7.33,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "Paper propose finite codebook-based Vector-Quantization for attention mechanism key vectors. This theoretically reduce the attention complexity from quadratic to linear. This leads and efficient caching leads 3-12x faster models with respectable performance. However, authors are highly encouraged to improve their presentation and add additional details and experiments as suggested by the reviewers.",
+ "forum_id": "oDdzXQzP2F",
+ "primary_area": "generative models",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_5aiB",
+ "review_id": "VcJd60ytG4",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 1642,
+ "edit_detected": true,
+ "edit_delta_seconds": 1878726,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_1jb5",
+ "review_id": "Su6PGR8iw5",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2351,
+ "edit_detected": true,
+ "edit_delta_seconds": 1020783,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_gEU7",
+ "review_id": "u9wmHfcqlR",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 3097,
+ "edit_detected": true,
+ "edit_delta_seconds": 1925934,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8575.md b/open_review/iclr2024_8575.md
new file mode 100644
index 0000000000000000000000000000000000000000..0fa33a492ef896b24a29104527784dcb50918452
--- /dev/null
+++ b/open_review/iclr2024_8575.md
@@ -0,0 +1,1226 @@
+
+
+## TRANSFORMER-VQ: LINEAR-TIME TRANSFORMERS VIA VECTOR QUANTIZATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+We introduce Transformer-VQ, a decoder-only transformer computing softmaxbased dense self-attention in linear time. Transformer-VQ’s efficient attention is enabled by vector-quantized keys and a novel caching mechanism. In our large-scale experiments, Transformer-VQ is shown highly competitive in quality, obtaining 0.99 bpb on Enwik8, 26.6 ppl on PG-19, and 3.16 bpb on ImageNet64. In addition, the optimized implementation of Transformer-VQ is over 3x faster than a comparable quadratic-time transformer at sequence length 8k, is over 12x faster at 32k, and can scale to 131k with similar throughput. Code available: [URL removed]
+
+**==> picture [376 x 75] intentionally omitted <==**
+
+**----- Start of picture text -----**
+≈ VQ k 1 k 2 k 3 k 4 k 5 �→ k ˆ1 k ˆ2 k ˆ3 k ˆ4 k ˆ5 **----- End of picture text -----**
+
+Figure 1: Schematic of the VQ-Attention approximation. The colorful and blank boxes depict the keys and attention weights, respectively. The keys on the right have been vector-quantized. Since the green keys _k_ 2 _, k_ 5 map to the same code, they have the same attention weights in this attention head.
+
+## 1 INTRODUCTION
+
+Transformer (Vaswani et al., 2017) language models would ideally scale to long sequences, since their predictive abilities often improve as context length increases (Dai et al., 2019; Kaplan et al., 2020). Unfortunately, the standard transformer uses a self-attention mechanism with a quadratic time complexity with respect to sequence length. This limits the practicality of applying transformers to very long sequences, since increasing the sequence length by a factor of 10 _[n]_ increases the attention computations by a factor of 100 _[n]_ . Transformer variants that overcome this efficiency bottleneck have the potential to facilitate new long-context applications and enable new breakthroughs.
+
+Up to this point, a variety of _efficient transformers_ (Tay et al., 2020b) have been proposed to scale to long sequences. Techniques include sparsity (Child et al., 2019; Ye et al., 2019; Beltagy et al., 2020; Kitaev et al., 2020; Qiu et al., 2020; Roy et al., 2021; Tay et al., 2020a; Sukhbaatar et al., 2021; Wu et al., 2022; Liu et al., 2023; Zhang et al., 2023), compression (Liu et al., 2018; Rae et al., 2020; Ainslie et al., 2020; Zhu et al., 2021; Ren et al., 2021; Nawrot et al., 2021; 2023), low-rank approximations (Wang et al., 2020; Vyas et al., 2020; Katharopoulos et al., 2020; Xiong et al., 2021; Tay et al., 2021; Choromanski et al., 2021), and cross-attention operations (Dai et al., 2019; Ma et al., 2021; Hutchins et al., 2022; Hawthorne et al., 2022). Other efficient sequence models have also been proposed (Gu et al., 2022; Lee-Thorp et al., 2022; Mehta et al., 2022; Smith et al., 2022; Hasani et al., 2022; Poli et al., 2023; Peng et al., 2023).
+
+In this paper, we present Transformer-VQ, a transformer decoder with _dense self-attention computible in linear time_ with respect to sequence length. This is made possible through a combination of vectorquantized keys, localized positional biases, and compressive cache that can be attended to efficiently, while yielding the same results as an uncompressed variable-length cache. Transformer-VQ is also simple to implement sampling for.
+
+1
+
+## 2 PRELIMINARIES
+
+## 2.1 NOTATION
+
+The real numbers are denoted by R and the extended real numbers R _∪{−∞, ∞}_ by R[¯] . Zero-based indices are used for all tensors. When indexing a matrix **M** along the first axis, we use **M** _i_ to denote a column vector and **M** _i,_ : to denote a row vector. The functions LN( _·_ ), Softmax( _·_ ), Concat( _·_ ) denote LayerNorm (Ba et al., 2016), softmax, and concatenation, each applied row-wise. The symbols ≜ _, ∝, ⊙,_ exp( _·_ ) _, δa,b,_ SG( _·_ ) denote equality by definition, proportionality, element-wise product, element-wise exponentiation, Kronecker delta function, and the stop-gradient operator. We slightly abuse notation to write inner products of vectors **u** _,_ **v** as **u** _[⊤]_ **v** , and outer products as **uv** _[⊤]_ .
+
+We assume familiarity with transformers (Vaswani et al., 2017), and use the notation _Dm_ to denote the model width, _Dk_ to denote the query/key vector width, and _Dv_ to denote the value vector width.
+
+## 2.2 VECTOR QUANTIZATION
+
+Vector quantization (VQ) is a technique used extensively throughout this work. In this subsection we briefly review vector quantization, motivate its use in self-attention, and discuss the backpropagationcompatible VQ scheme introduced by van den Oord et al. (2017).
+
+## 2.3 VECTOR QUANTIZERS AND CODEBOOKS
+
+an input **Definition 2.1. x** , its outputA _vector quantizer_ **x** ˆ is given by is a function VQ( _·_ ; **C** ) with domain R _[D]_ and codomain R _[D]_ . For
+
+**==> picture [249 x 34] intentionally omitted <==**
+
+where **C** _∈_ R _[S][×][D]_ is known as the _codebook_ . The row indices _{_ 0 _, . . . , S −_ 1 _}_ of **C** are called _shortcodes_ , and the rows themselves are called _codewords_ .
+
+**Theorem 2.2** (Based on Guo et al. (2019)) **.** _Let_ **q** _∈_ R _[D] be a random variable with_ E **q** [ **qq** _[⊤]_ ] = _σ_[2] **I** _D for some σ >_ 0 _, and let_ **k** _∈_ R _[D] be a random variable independent of_ **q** _. Let ϕ_ : R _[D] →_ R _[D] be a deterministic function. Then_
+
+**==> picture [290 x 13] intentionally omitted <==**
+
+**Corollary 2.3.** _Let the conditions of Theorem 2.2 hold. Given the constraint that ϕ_ (R _[D]_ ) = _{_ **C** _s}[S] s_ =0 _[−]_[1] _[,] the choice ϕ_ ( _·_ ) = _VQ_ ( _·_ ; **C** ) _minimizes_ E **q** _,_ **k** _||_ **q** _[⊤]_ **k** _−_ **q** _[⊤] ϕ_ ( **k** ) _||_[2] _._
+
+**Corollary 2.4.** _Let the conditions of Theorem 2.2 hold. With_ **k**[ˆ] = _VQ_ ( **k** ; **C** ) _we have_
+
+**==> picture [309 x 19] intentionally omitted <==**
+
+_Remark_ 2.5 _._ Fnding the global minimizer **C** _[∗]_ = arg min **C** E **k** _||_ **k** _−_ **k**[ˆ] _||_[2] is expensive, so in practice we approximate it using the method from van den Oord et al. (2017); Razavi et al. (2019).
+
+## 2.4 VECTOR-QUANTIZED REPRESENTATION LEARNING
+
+**Definition 2.6** (Based on van den Oord et al. (2017)) **.** A _vector-quantizer with straight-through_ ˆ _estimator_ is a function STVQ( _·_ ; **C** ) with domain R _[D]_ and codomain R _[D]_ . For an input **x** , its output **x** is given by
+
+**==> picture [248 x 17] intentionally omitted <==**
+
+**==> picture [249 x 12] intentionally omitted <==**
+
+_Remark_ 2.7 _._ For any **x** _∈_ R _[D]_ , STVQ( **x** ; **C** ) evaluates to VQ( **x** ; **C** ). However, for purposes of backpropagation, the Jacobian of the quantizer w.r.t. its input will now be an identity matrix everywhere, instead of a zero matrix almost everywhere. Intuitively, when using STVQ, gradients w.r.t. the quantizer outputs are copied ‘straight through’ to the inputs.
+
+_Remark_ 2.8 _._ We overload the notation STVQ( _·_ ; **C** ) to operate row-wise on matrix-valued inputs.
+
+2
+
+## 3 TRANSFORMER-VQ
+
+We now propose Transformer-VQ, a decoder-only transformer that can compute dense self-attention in linear time. Proofs for all theoretical results are given in Appendix A.
+
+## 3.1 QUADRATIC-TIME FORMULATION
+
+**Definition 3.1.** _Vector-Quantized Self-Attention_ is a function VQAttn( _·_ ; **C** _,_ **W** _{Q,K,V,G,O}_ ) with domain R _[T][ ×][D][m]_ and codomain R _[T][ ×][D][m]_ . For an input **X** _,_ its output **Y** is defined via
+
+**==> picture [269 x 144] intentionally omitted <==**
+
+where each **W** _•_ denotes a trainable projection, **B** denotes positional biases and/or mask, _τ_ is a fixed constant, and the _φv, φg, φw_ are element-wise or row-wise nonlinearities. The query/key LayerNorms use unit gain and zero bias, and STVQ( _·_ ; **C** ) denotes row-wise application of vector-quantization with a straight-through gradient estimator (van den Oord et al., 2017).
+
+_Remark_ 3.2 _._ Our attention mechanism is applied to a gated attention unit (GAU) design inspired by Hua et al. (2022). GAU is a single-headed gated attention mechanism and generally uses a small key width _Dk_ = 128, and a large value width _Dv_ = 2 _Dm_ , with two GAUs replacing a single transformer layer. This yields a similar parameter count and compute requirement as the usual transformer layer. _Remark_ 3.3 _._ Prior work has also applied LayerNorm or similar to the queries and keys in attention (Henry et al., 2020; Roy et al., 2021; Zhu et al., 2021; Wu et al., 2022; Hutchins et al., 2022; Dehghani et al., 2023; Elsen et al., 2023), generally finding it to improve numerical stability and convergence.
+
+## 3.2 WARMUP: LINEAR-TIME ENCODER ATTENTION
+
+To simplify the theorems for decoder-only attention and build intuition, we first discuss a setting where there is no causal mask.
+
+**Theorem 3.4.** _Suppose_ **B** _i,j_ = 0 _for all i, j, and φw is an element-wise nonlinearity. Then the attention weights in Definition 3.1 can be factored:_
+
+**==> picture [244 x 46] intentionally omitted <==**
+
+_where φw_ ( **QC** _[⊤]_ ) _∈_ R _[T][ ×][S] ,_ **∆** _∈_ R _[S][×][T] and_ **∆** _s,t_ ≜ _δs,zt. Here, δ·,· denotes the Kronecker delta function and zt is the VQ shortcode for timestep t._
+
+**Theorem 3.5.** _Suppose_ **B** _i,j_ = 0 _for all i, j, and φw is the row-wise softmax nonlinearity. Then the attention weights in Definition 3.1 can be factored:_
+
+**==> picture [290 x 46] intentionally omitted <==**
+
+_where_ **1** _∈_ R _[T] ,_ Diag(exp( **QC** _[⊤]_ ) **∆1** ) _[−]_[1] exp( **QC** _[⊤]_ ) _∈_ R _[T][ ×][S] ,_ **∆** _∈_ R _[S][×][T] and_ **∆** _s,t_ ≜ _δs,zt . Here, δ·,· denotes the Kronecker delta function and zt is the VQ shortcode for timestep t._
+
+3
+
+**==> picture [349 x 75] intentionally omitted <==**
+
+Figure 2: Schematic of the VQ-Attention factorization with element-wise _φw_ . The column set of **W** = _φw_ ( **QK**[ˆ] _[⊤]_ ) _∈_ R _[T][ ×][T]_ has size _≤ S_ due to VQ, so the attention output **O** = **WV** can be obtained by computing the unique attention scores _φw_ ( **QC** _[⊤]_ ) and using them to further aggregate to the grouped-sum **∆V** . Transformer-VQ uses a softmax-based extension of this idea for its cache.
+
+## 3.3 LINEAR-TIME DECODER ATTENTION
+
+**Theorem 3.6.** _Let L be a divisor of T . Suppose_ **B** _i,j_ = _−∞ for j > i (causal masking), and_ **B** _i,j_ = 0 _for j < i − L (no bias outside a sliding window). Define_ **∆** _∈_ R _[S][×][T] with_ **∆** _s,t_ ≜ _δs,zt. Let φw be an element-wise nonlinearity with φw_ ( _−∞_ ) = 0 _. For a tensor_ **M** _, let_ **M** ( _...,n,..._ ) _denote the slice_ **M** _...,nL_ :( _n_ +1) _L,..., where unsliced dimensions will be denoted by ‘_ : _’. Then the product_ **WV** _in Definition 3.1 can be computed using the following block-level recurrence:_
+
+**==> picture [319 x 78] intentionally omitted <==**
+
+_where any tensor slice_ **M** ( _...,n,..._ ) _is defined as a zero tensor of width L in the sliced dimension if any block slice index n is less than zero (zero-padding)._
+
+**Theorem 3.7.** _Let the assumptions of Theorem 3.6 hold, but suppose φw is now the row-wise softmax nonlinearity. Let_ **1** _∈_ R _[T] . Let_ **A** ≜ exp( **QK**[ˆ] _[⊤]_ + **B** ) _. Then the product_ **WV** _in Definition 3.1 can be computed using the following block-level recurrence:_
+
+**==> picture [299 x 55] intentionally omitted <==**
+
+**==> picture [316 x 13] intentionally omitted <==**
+
+**==> picture [254 x 33] intentionally omitted <==**
+
+**==> picture [310 x 14] intentionally omitted <==**
+
+**==> picture [321 x 49] intentionally omitted <==**
+
+_Remark_ 3.8 _._ Theorem 3.7 provides an algorithm to compute VQ-Attention from the queries, keys, values, gates, and codebook in _O_ ( _L_ ( _S_ + 2 _L_ )( _Dk_ + _Dv_ )) time per query block, and therefore _O_ ( _T_ ( _S_ + 2 _L_ )( _Dk_ + _Dv_ )) time per sequence.
+
+_Remark_ 3.9 _._ For numerical stability, we use an equivalent implementation of Theorem 3.7 that stores the running mean of the value vectors assigned to a given shortcode, instead of the sum as done by **U** ( _n −_ 2). The result is made equivalent by moving the logarithm of the counts **L** ( _n −_ 2) inside the exponentials exp( **Q** ( _n,_ :) **C** _[⊤]_ ) appearing in ( **AV** )( _n,_ :) and ( **A1** )( _n_ ). See pseudocode in Appendix E.
+
+4
+
+_Remark_ 3.10 _._ The general strategy of computing un-normalized softmax and its denominator is also used by many prior methods, including Memory-Efficient Attention (Rabe & Staats, 2021), FlashAttention (Dao et al., 2022), and RWKV (Peng et al., 2023); however, the first two techniques do not run in linear time, and the last one couples a recurrent state size to the model width, which is contrary to the principle of transformers.
+
+## 3.4 LEARNING ALGORITHM
+
+## 3.4.1 TRAINING LOSS
+
+Let _**θ**_ denote the set of non-codebook parameters of a transformer with _N_ VQ-Attention layers, and let _C_ = _{_ **C**[(] _[ℓ]_[)] _}[N] ℓ_ =0 _[−]_[1][denote the set of the layers’ codebooks.][For autoregressive modeling of a] sequence **X** = _{_ **x** _t}[T] t_ =0[, we define the Transformer-VQ training loss as]
+
+**==> picture [290 x 11] intentionally omitted <==**
+
+where _β >_ 0 is a hyperparameter known as the commit loss coefficient, and
+
+**==> picture [299 x 30] intentionally omitted <==**
+
+**==> picture [300 x 30] intentionally omitted <==**
+
+Thus, the training loss is the average next-token cross-entropy loss, plus the average token’s commitment losses (van den Oord et al., 2017), summed over layer codebooks. The non-codebook parameters _**θ**_ receive a gradient from both loss terms. Following van den Oord et al. (2017); Razavi et al. (2019), codebooks are parameterized using EMA-smoothed k-means.
+
+## 3.4.2 TRAINING UPDATES
+
+Instead of updating on the full sequence loss given above, we generally update every _W/L_ query blocks, where _W ≪ T_ , which resembles a strategy used in prior works (Dai et al., 2019; Wu et al., 2022; Hutchins et al., 2022).
+
+Each update is obtained by backpropagating through a window of _W_ timesteps, with gradients computed on the corresponding terms in the per-token average losses above. Codebooks are also updated every _W/L_ query blocks.
+
+When _W/L_ = 1, using Theorem 3.7 is an efficient equivalent to a variable-length key-value cache. When _W/L >_ 1, a learning signal is sent through any value vectors added to the compressed cache within the backpropagation window.
+
+## 4 RELATED WORK
+
+## 4.1 HIERARCHICAL ATTENTION
+
+Combiner (Ren et al., 2021) proposes an approximation of softmax using a simple graphical model, and parameterizes its internal probabilities using max-pooling over query/key features, enabling decoder-only self-attention in subquadratic time. H-Transformer-1D (Zhu & Soricut, 2021) uses average-pooling operations over queries/keys to reduce the complexity of encoder-only self-attention. Transformer-LS (Zhu et al., 2021) uses dynamic projections to downsample long-range features in transformers by a user-specified factor. Hourglass Transformer (Nawrot et al., 2021) and MegaByte (Yu et al., 2023) eschew pooling in favor of convolutions or reshaping for temporal downsampling, and apply these techniques to reduce computation in the interior layers of decoder-only transformers.
+
+Transformer-VQ differs from these works in that it uses vector quantization (VQ), a well-understood method for compression, instead of newly-designed heuristic methods. In addition, it does not rely on token contiguity to guide the compression process. Instead, it utilizes an equivalence to dense attention. Notably, Transformer-VQ is easier to sample from compared to previous hierarchical attention models; since the cache update logic can be equivalently applied every token instead of every _L_ tokens, there are no sporadic ‘feature consolidation’ operations required during sampling.
+
+5
+
+## 4.2 KERNELIZABLE ATTENTION
+
+Kernelizable attention (Katharopoulos et al., 2020; Choromanski et al., 2021; Peng et al., 2021; Qin et al., 2022b) computes query and key features and applies the same nonlinearity to both of them separately, omitting additional nonlinearities when computing attention weights. By using the associativity of matrix multiplication, kernelized attention reduces attention to linear complexity. Transformer-VQ is distinguished from kernelizable attention through an asymmetric treatment of queries and keys, a deterministic equivalence to softmax-based attention, training stability, and strong quantitative results on long-context autoregressive modeling benchmarks.
+
+Clustering attention (Vyas et al., 2020) uses vector-quantized queries and is also kernelizable. However, it requires learning per-layer codebooks for each sequence and uses a modified form of Lloyd’s iterations based on Hamming distance and locality-sensitive hashing. This yields a complex non-causal algorithm which is only suitable for non-causal attention and is slow on TPUs. Transformer-VQ is strongly differentiated from clustering attention by its simplicity, applicability to decoder-only tasks, efficiency on TPUs, and large-scale experimental validation.
+
+## 4.3 COMPRESSIVE ATTENTION
+
+Compressive Transformers (Rae et al., 2020) directly learn a compression function for long-range features. LUNA (Ma et al., 2021) and Recurrent Transformers (Bulatov et al., 2022; Hutchins et al., 2022) use cross-attention to compress long-range features into a recurrent state. Notably, our model implements a kind of block-recurrent mechanism for its cache, but is significantly more parameter-efficient than the mechanisms proposed by Ma et al. (2021); Hutchins et al. (2022). More generally, Transformer-VQ differs from compressive/recurrent transformers in that it has an equivalence to quadratic-time attention over vector-quantized keys. In other words, if the keys are already vector-quantized, the Transformer-VQ cache losslessly reduces the cost to linear time.
+
+Perceivers (Jaegle et al., 2021; Hawthorne et al., 2022) use cross-attention to attend to long sequences, and compute self-attention over only a narrow stack of ‘latents’. Transformer-VQ differs from Perceivers in that it computes dense self-attention in linear time, instead of just cross-attention. Thus, while Perceivers’ long-range layers incur a quadratic time complexity during sampling, TransformerVQ generates sequences in linear time.
+
+## 4.4 GATED SEQUENCE MODELS
+
+Gated attention was introduced in FLASH (Hua et al., 2022) as a fusion of attention sublayers (Vaswani et al., 2017) and GLU-based MLP sublayers (Shazeer, 2020). Various gating mechanisms have previously been used to stabilize training of transformers (Parisotto et al., 2019) and other sequence models including S4 (Gu et al., 2022), GSS (Mehta et al., 2022), MEGA (Ma et al., 2023) and RWKV (Peng et al., 2023). Transformer-VQ uses the original gating formulation from Hua et al. (2022), and develops a new attention mechanism.
+
+## 4.5 VQ, K-MEANS, AND BEYOND
+
+Ideas relating to _k_ -means, vector quantization, and/or codebooks have also been applied in transformers for sparse attention (Roy et al., 2021; Wang et al., 2021; 2022), feature learning (Mao et al., 2022; Roy et al., 2022), sparsely-activated MLPs (Lample et al., 2019), and expert selection (Roller et al., 2021). These works generally feature codebooks or similar _within_ a transformer architecture. Several works also have proposed models that feature a codebook somewhere _outside_ a transformer, e.g., when transformers are priors for VQ-VAEs (Kaiser et al., 2018; Dhariwal et al., 2020; Ramesh et al., 2021; Lee et al., 2022; Zhou et al., 2022). Transformer-VQ uses one codebook within each layer and, in contrast to all of the aforementioned works, computes dense self-attention in linear time.
+
+Transformer-VQ is not directly related to methods which quantize the weights of a transformer e.g., Dettmers et al. (2022); Dettmers & Zettlemoyer (2023); Frantar et al. (2023). Such methods are typically applied after training to reduce the memory overhead of the model weights, while still computing in higher precision. As such, they do not affect the bitwidth of the queries, keys, or values, nor the complexity of self-attention. However, if applying our method to large models, these approaches may be complementary during inference.
+
+6
+
+## 5 EXPERIMENTS
+
+Transformer-VQ is implemented in Jax (Bradbury et al., 2018) and Flax (Heek et al., 2023). For training, we use TPU v3 pod slices (Jouppi et al., 2017). Hyperparameters follow Appendix C unless specifically mentioned. Generated samples for all models are provided in Appendix D.
+
+## 5.1 PRELIMINARY STUDIES
+
+## 5.1.1 CODEBOOK SIZE ABLATIONS
+
+Larger codebook sizes may allow more flexible attention patterns and could improve the fidelity of the gradients, both of which are likely to benefit model quality at the expense of additional wall time. To investigate, we ablate the codebook size _S_ using the Enwik8 dataset (described in _§_ 5.2.1), and report the lowest validation bits-per-byte (BPB, lower is better) obtained by each model in Table 1.
+
+Table 1: Codebook size ablations.
+
+Table 2: Compressive cache ablation.
+
+|**Setting** **Val. BPB** **Latency (Rel.)** _S_ = 256 1.010 **0.927** _S_ = 512 1.005 1.0 _S_= 1024 **1.000** 1.109|**Compressive cache** **Val. BPB** **Latency (Rel.)**|
+|---|---|
+||No 1.026 **0.836** Yes **1.010** 0.927|
+
+Table 1 confirms the intuition that larger codebooks improve the prediction quality (lower BPB) in return for additional wall time per training step. In particular, for this dataset and model size, increasing the codebook size by a factor of two appears to decrease the validation BPB by about a factor of 0 _._ 995. This result may suggest that the validation loss follows a power-law scaling (Kaplan et al., 2020) w.r.t. codebook size, though more experiments are needed to verify this phenomenon, and it is subject to the caveat that the validation loss must eventually level off (Henighan et al., 2020; Hoffmann et al., 2022), as the model cannot be expected to obtain zero loss at infinite codebook size.
+
+## 5.1.2 COMPRESSIVE CACHE ABLATION
+
+Since our model has several architectural differences from most prior works, the benefit of the compressive cache must be shown directly. To investigate, we train a model with the compressive cache omitted, using codebook size _S_ = 256. We report the validation BPB for Enwik8 in Table 2.
+
+As shown in Table 2, removing the compressive cache reduces the wall time per step by a factor of about 1 _._ 1 at the evaluated model size, but leads to a significant drop in quality (higher bits-per-byte). This confirms the importance of our compressive cache mechanism.
+
+## 5.1.3 LATENCY AND THROUGHPUT
+
+We now measure the training latency (seconds per step) and compute the training throughput (tokens per second). The latter is computed as tokens per batch divided by latency, and allows a direct efficiency comparison across different sequence lengths. We benchmark on a TPU v3 with 8 cores, using a global batch size of 8 sequences. For these experiments, we scale the sequence length _T_ by multiples of 4 _×_ , and backpropagate through the entire sequence length.
+
+We compare an unquantized quadratic-time full attention baseline (‘Full’) to our proposed linear-time VQ-Attention (‘VQ’) using Theorem 3.7. Since this theorem does not require access to the output gates, VQ-Attention can be extended to multi-head attention variants as well. For each attention type, we therefore benchmark three head types: multi-head attention (‘MHA’; Vaswani et al. (2017)), multi-query attention (‘MQA’; Shazeer (2019)), and single-head gated attention (‘SHGA’ aka GAU; Hua et al. (2022)). For VQ-attention, we use codebook size _S_ = 512 and block length _L_ = 512, which is the same as our later experiments. All models use roughly 190M parameters total.
+
+As shown in Table 6, our model has a 3x lower latency/3x higher throughput than the quadratic attention baseline at _T_ = 8192 when using SHGA for both. Moreover, Transformer-VQ is over 6x faster than the quadratic-time baselines when using MQA/MHA for both models. As the sequence
+
+7
+
+length increases to _T_ = 32768, Transformer-VQ is over 12x faster than the quadratic time baseline when both use SHGA. For MQA/MHA, the quadratic-time attention gives an out-of-memory error at _T_ = 32768, while Transformer-VQ maintains comparable or better throughput than with 4x shorter sequences. Table 7 even shows that Transformer-VQ can scale to sequences of length _T_ = 131072 without a substantial decrease in throughput and without running out of memory.
+
+## 5.2 QUANTITATIVE RESULTS
+
+To assess the ability of Transformer-VQ to learn long-range dependencies, we now conduct a series of large-scale experiments, benchmarking on several long-range autoregressive modeling tasks. For fair comparison, we only benchmark against models (a) trained without using any extra data or augmentation, and (b) evaluated with fixed parameters. In all cases, we use codebook size _S_ = 512.
+
+## 5.2.1 ENWIK8
+
+Enwik8 is a byte-level language modeling dataset consisting of 100 million bytes of unprocessed Englishlanguage Wikipedia articles (Mahoney, 2011), with long-term dependencies that may span tens of thousands of bytes. Per convention, it is split into train, validation, and test sets of 90 million, 5 million, and 5 million bytes, respectively (Child et al., 2019; Rae et al., 2020).
+
+For this dataset, we trained a Transformer-VQ with 190M parameters, smaller than the model by Dai et al. (2019). We report test bits-per-byte (BPB) in Table 3.
+
+Transformer-VQ obtains a BPB of 0.99, notably matching the result of the large Transformer-XL model from Dai et al. (2019), while using 33% fewer parameters and a 75% shorter cache that covers a longer context.
+
+Table 3: Test bits-per-byte on Enwik8.
+
+||**Model**|**BPB**|
+|---|---|---|
+||Dai et al. (2019) - XL|0.99|
+||Child et al. (2019) - Sparse|0.99|
+||Beltagy et al. (2020) - Longform.|0.99|
+||Roy et al. (2021) - Routing Sukhbaatar et al. (2019) - Adapt. Nawrot et al. (2021) - Hourglass|0.99 0.98 0.98|
+||Rae et al. (2020) - Compress.|0.97|
+||Zhu et al. (2021) - Long-Short Fan et al. (2020b) - Feedback Lei (2021) - SRU++|0.97 0.96 0.95|
+||Sukhbaatar et al. (2021) - Expire.|0.95|
+||Lutati et al. (2023) - Focus Attn.|**0.94**|
+||Transformer-VQ|0.99|
+
+For this dataset, we found overfitting was a significant issue, and due to the compressive cache mechanism, using i.i.d. attention dropout was not possible. Sweeping over the residual dropout rate, weight decay coefficient, and layerdrop (Fan et al., 2020a) rate, we found a setting yielding good generalization. Nonetheless Transformer-VQ does fall short of state-of-the-art here, with several works using complex recurrence or forgetting mechanisms and obtaining better Enwik8 results.
+
+## 5.2.2 PG-19
+
+PG-19 is an open-vocabulary language modeling dataset consisting of 11 gigabytes of text from over 28,000 freely-available Project Gutenberg books published prior to 1919 (Rae et al., 2020). The average number of words per book is nearly 70,000, enabling learning long-term dependencies, especially in novels (Sun et al., 2021; Hutchins et al., 2022).
+
+For this dataset, we trained a Transformer-VQ with 1.3B parameters, similar to the largest model by Hutchins et al. (2022). Since PG-19 is an open-vocabulary dataset, we first learned a SentencePiece vocabulary (Kudo & Richardson, 2018) of size 32,000 using the BPE method. Following the calculations of Rae et al. (2020), we report the test set word-level perplexity (WLP) in Table 4.
+
+Transformer-VQ obtains a WLP of 26.6, very close to the state-of-the-art by Block-Recurrent Transformers (Hutchins et al., 2022). Interestingly, since our Transformer-VQ design is equivalent to using dense self-attention with vector-quantized keys, our strong result shows that models using selfattention only (no recurrence) can also be highly competitive on PG-19. This affirms the efficacy of standalone self-attention as a method for sequence processing at scale. Furthermore, compared to the Block-Recurrent Transformer, our model can be implemented via intra-block sums and cross-block reductions, a strategy also used by FLASH (Hua et al., 2022) and shown to be faster in Appendix B. Lastly, we avoid the instabilities of FLASH (Qin et al., 2022a; Ma et al., 2023) thanks to softmax normalization and our cache normalization ( _§_ 3.9).
+
+8
+
+Table 4: Test word-level perplexity on PG-19.
+
+Table 5: Validation bits-per-byte on ImageNet64.
+
+|**Model**|**WLP**|
+|---|---|
+|Yu et al. (2023) - MegaByte|36.4|
+|Rae et al. (2020) - XL|36.3|
+|Rae et al. (2020) - Compressive|33.6|
+|Roy et al. (2021) - Routing|33.2|
+|Hawthorne et al. (2022) - Perceiver AR|28.9|
+|Hutchins et al. (2022) - Block-Recur.|**26.5**|
+|Transformer-VQ|26_._6|
+
+|**Model**|**BPB**|
+|---|---|
+|Kingma et al. (2021) - VDM|3.40|
+|Hawthorne et al. (2022) - Perceiver AR|3.40|
+|Yu et al. (2023) - MegaByte|3.40|
+|Grcic et al. (2021) - DenseFlow|3.35|
+|Lipman et al. (2023) - Flow Matching|3.31|
+|Hazami et al. (2022) - Effcient VDVAE|3.30|
+|Transformer-VQ (190M)|**3.22**|
+|Transformer-VQ (1.2B)|**3.16**|
+
+## 5.2.3 IMAGENET64
+
+ImageNet64 is an image dataset consisting of over 1.2 million images downsampled to 64x64 resolution (Chrabaszcz et al., 2017; Deng et al., 2009). Flattening the images yields an autoregressive density estimation task on sequences of over 12,000 bytes each. Note since the official test set is not public for this dataset, we report results on the official validation set. For validation purposes we used a held-out set of about 80,000 examples from the training split.
+
+For this dataset, we trained Transformer-VQ models with 190M and 1.2B parameters, similar to the Enwik8 and PG-19 models, respectively. We report the bits-per-byte on the official validation set in Table 5. Several of the earlier baselines used an earlier variant of downsampled ImageNet prepared by van den Oord et al. (2016) with a different downsampling algorithm. Since that variant has been unavailable through official channels for about a year, we used the newer variant following Lipman et al. (2023). We emphasize that our results using the newer variant cannot be directly compared with baselines using the earlier variant; however, due to several reporting ambiguities, Table 5 does not symbolically distinguish variants used.
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+Figure 3: Generated samples from our large ImageNet64 model; nucleus 1.0.
+
+Transformer-VQ with 190M parameters is roughly the same size as the Efficient VDVAE (Hazami et al., 2022), but obtains a better result of 3.22 BPB, setting a new state-of-the-art for small models. Transformer-VQ with 1.2B parameters obtains a 3.16 BPB, setting a new absolute state-of-the-art on this dataset, and generates high-fidelity samples on par with Perceiver AR while using 33% fewer steps, omitting its image-specific architectural adjustments, and generating samples in linear time.
+
+## 6 CONCLUSION
+
+Transformer-VQ is a transformer decoder computing softmax-based self-attention in linear time. Its efficient attention is enabled by vector-quantized keys, which allow our cache to be attended to in compressed form, while yielding the same result as uncompressed attention over the same keys. Large-scale experiments show Transformer-VQ is an efficient and flexible autoregressive model, with state-of-the-art results or near on PG-19 and ImageNet64. Future work directions include formal scaling laws, larger models, and porting to lower-level frameworks like Pallas, Triton, or CUDA.
+
+9
+
+## REPRODUCIBILITY STATEMENT
+
+To facilitate reproducibility, our attention mechanism is described mathematically in Section 3, and pseudocode is provided in Appendix E. In addition, our hyperparameters and other implementation details are given in Appendix C, and our implementation is open-sourced at the link in the abstract.
+
+## REFERENCES
+
+- Joshua Ainslie, Santiago Ontanon, Chris Alberti, Vaclav Cvicek, Zachary Fisher, Philip Pham, Anirudh Ravula, Sumit Sanghai, Qifan Wang, and Li Yang. ETC: Encoding long and structured inputs in transformers. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 268–284, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.19. URL https: //aclanthology.org/2020.emnlp-main.19.
+
+- Jimmy Lei Ba, Jamie Kiros, and Geoffrey E. Hinton. Layer normalization, 2016. URL https: //arxiv.org/abs/1607.06450.
+
+- Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The long-document transformer. _CoRR_ , abs/2004.05150, 2020. URL [URL removed]
+
+- James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL [URL removed]
+
+- Aydar Bulatov, Yuri Kuratov, and Mikhail Burtsev. Recurrent memory transformer. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), _Advances in Neural Information Processing Systems_ , 2022. URL [URL removed]
+
+- Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. _CoRR_ , abs/1904.10509, 2019. URL [URL removed]
+
+- Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamás Sarlós, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J Colwell, and Adrian Weller. Rethinking attention with performers. In _International Conference on Learning Representations_ , 2021. URL https: //openreview.net/forum?id=Ua6zuk0WRH.
+
+- Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, Parker Schuh, Kensen Shi, Sasha Tsvyashchenko, Joshua Maynez, Abhishek Rao, Parker Barnes, Yi Tay, Noam Shazeer, Vinodkumar Prabhakaran, Emily Reif, Nan Du, Ben Hutchinson, Reiner Pope, James Bradbury, Jacob Austin, Michael Isard, Guy Gur-Ari, Pengcheng Yin, Toju Duke, Anselm Levskaya, Sanjay Ghemawat, Sunipa Dev, Henryk Michalewski, Xavier Garcia, Vedant Misra, Kevin Robinson, Liam Fedus, Denny Zhou, Daphne Ippolito, David Luan, Hyeontaek Lim, Barret Zoph, Alexander Spiridonov, Ryan Sepassi, David Dohan, Shivani Agrawal, Mark Omernick, Andrew M. Dai, Thanumalayan Sankaranarayana Pillai, Marie Pellat, Aitor Lewkowycz, Erica Moreira, Rewon Child, Oleksandr Polozov, Katherine Lee, Zongwei Zhou, Xuezhi Wang, Brennan Saeta, Mark Diaz, Orhan Firat, Michele Catasta, Jason Wei, Kathy Meier-Hellstern, Douglas Eck, Jeff Dean, Slav Petrov, and Noah Fiedel. Palm: Scaling language modeling with pathways, 2022. URL [URL removed]
+
+10
+
+- Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the CIFAR datasets. _CoRR_ , abs/1707.08819, 2017. URL [URL removed] abs/1707.08819.
+
+- Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 2978–2988, Florence, Italy, jul 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1285. URL [URL removed]
+
+- Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness, 2022. URL [URL removed] 2205.14135.
+
+- Mostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski, Jonathan Heek, Justin Gilmer, Andreas Steiner, Mathilde Caron, Robert Geirhos, Ibrahim Alabdulmohsin, Rodolphe Jenatton, Lucas Beyer, Michael Tschannen, Anurag Arnab, Xiao Wang, Carlos Riquelme, Matthias Minderer, Joan Puigcerver, Utku Evci, Manoj Kumar, Sjoerd van Steenkiste, Gamaleldin F. Elsayed, Aravindh Mahendran, Fisher Yu, Avital Oliver, Fantine Huot, Jasmijn Bastings, Mark Patrick Collier, Alexey Gritsenko, Vighnesh Birodkar, Cristina Vasconcelos, Yi Tay, Thomas Mensink, Alexander Kolesnikov, Filip Paveti´c, Dustin Tran, Thomas Kipf, Mario Luˇci´c, Xiaohua Zhai, Daniel Keysers, Jeremiah Harmsen, and Neil Houlsby. Scaling vision transformers to 22 billion parameters, 2023. URL [URL removed]
+
+- Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In _2009 IEEE Conference on Computer Vision and Pattern Recognition_ , pp. 248–255, 2009. doi: 10.1109/CVPR.2009.5206848.
+
+- Tim Dettmers and Luke Zettlemoyer. The case for 4-bit precision: k-bit inference scaling laws, 2023. URL [URL removed]
+
+- Tim Dettmers, Mike Lewis, Younes Belkada, and Luke Zettlemoyer. GPT3.int8(): 8-bit matrix multiplication for transformers at scale. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), _Advances in Neural Information Processing Systems_ , 2022. URL [URL removed]
+
+- Prafulla Dhariwal, Heewoo Jun, Christine McLeavey Paine, Jong Wook Kim, Alec Radford, and Ilya Sutskever. Jukebox: A generative model for music, 2020. URL [URL removed] 2005.00341.
+
+- Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. _CoRR_ , abs/1702.03118, 2017. URL http: //arxiv.org/abs/1702.03118.
+
+- Erich Elsen, Augustus Odena, Maxwell Nye, Sa˘gnak Ta¸sırlar, Tri Dao, Curtis Hawthorne, Deepak Moparthi, and Arushi Somani. Releasing persimmon-8b, 2023. URL [URL removed] ai/blog/persimmon-8b.
+
+- Angela Fan, Edouard Grave, and Armand Joulin. Reducing transformer depth on demand with structured dropout. In _International Conference on Learning Representations_ , 2020a. URL [URL removed]
+
+- Angela Fan, Thibaut Lavril, Edouard Grave, Armand Joulin, and Sainbayar Sukhbaatar. Addressing some limitations of transformers with feedback memory, 2020b. URL [URL removed] abs/2002.09402.
+
+- Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. OPTQ: Accurate quantization for generative pre-trained transformers. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed]
+
+11
+
+- Matej Grcic, Ivan Grubisic, and Sinisa Segvic. Densely connected normalizing flows. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 23968–23982. Curran Associates, Inc., 2021. URL [URL removed] 2021/file/c950cde9b3f83f41721788e3315a14a3-Paper.pdf.
+
+- Albert Gu, Karan Goel, and Christopher Re. Efficiently modeling long sequences with structured state spaces. In _International Conference on Learning Representations_ , 2022. URL https: //openreview.net/forum?id=uYLFoz1vlAC.
+
+- Ruiqi Guo, Quan Geng, David Simcha, Felix Chern, Sanjiv Kumar, and Xiang Wu. New loss functions for fast maximum inner product search. _CoRR_ , abs/1908.10396, 2019. URL http: //arxiv.org/abs/1908.10396.
+
+- Ramin Hasani, Mathias Lechner, Tsun-Hsuan Wang, Makram Chahine, Alexander Amini, and Daniela Rus. Liquid structural state-space models, 2022. URL [URL removed] 2209.12951.
+
+- Curtis Hawthorne, Andrew Jaegle, C˘at˘alina Cangea, Sebastian Borgeaud, Charlie Nash, Mateusz Malinowski, Sander Dieleman, Oriol Vinyals, Matthew Botvinick, Ian Simon, Hannah Sheahan, Neil Zeghidour, Jean-Baptiste Alayrac, Joao Carreira, and Jesse Engel. Generalpurpose, long-context autoregressive modeling with Perceiver AR. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 8535–8558. PMLR, 17–23 Jul 2022. URL https: //proceedings.mlr.press/v162/hawthorne22a.html.
+
+- Louay Hazami, Rayhane Mama, and Ragavan Thurairatnam. Efficient-VDVAE: Less is more, 2022. URL [URL removed]
+
+- Jonathan Heek, Anselm Levskaya, Avital Oliver, Marvin Ritter, Bertrand Rondepierre, Andreas Steiner, and Marc van Zee. Flax: A neural network library and ecosystem for JAX, 2023. URL [URL removed]
+
+- Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B. Brown, Prafulla Dhariwal, Scott Gray, Chris Hallacy, Benjamin Mann, Alec Radford, Aditya Ramesh, Nick Ryder, Daniel M. Ziegler, John Schulman, Dario Amodei, and Sam McCandlish. Scaling laws for autoregressive generative modeling. _CoRR_ , abs/2010.14701, 2020. URL [URL removed]
+
+- Alex Henry, Prudhvi Raj Dachapally, Shubham Shantaram Pawar, and Yuxuan Chen. Query-key normalization for transformers. In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pp. 4246–4253, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.findings-emnlp.379. URL [URL removed] findings-emnlp.379.
+
+- Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. Training compute-optimal large language models, 2022. URL [URL removed] 2203.15556.
+
+- Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. In _International Conference on Learning Representations_ , 2020. URL https: //openreview.net/forum?id=rygGQyrFvH.
+
+- Weizhe Hua, Zihang Dai, Hanxiao Liu, and Quoc Le. Transformer quality in linear time. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 9099–9117. PMLR, 17–23 Jul 2022. URL [URL removed]
+
+12
+
+- DeLesley Hutchins, Imanol Schlag, Yuhuai Wu, Ethan Dyer, and Behnam Neyshabur. Block-recurrent transformers. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), _Advances in Neural Information Processing Systems_ , 2022. URL [URL removed] net/forum?id=uloenYmLCAo.
+
+- Andrew Jaegle, Felix Gimeno, Andy Brock, Oriol Vinyals, Andrew Zisserman, and Joao Carreira. Perceiver: General perception with iterative attention. In Marina Meila and Tong Zhang (eds.), _Proceedings of the 38th International Conference on Machine Learning_ , volume 139 of _Proceedings of Machine Learning Research_ , pp. 4651–4664. PMLR, 18–24 Jul 2021. URL [URL removed]
+
+- Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre-luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, C. Richard Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Daniel Killebrew, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Matt Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit. _SIGARCH Comput. Archit. News_ , 45(2):1–12, jun 2017. ISSN 0163-5964. doi: 10.1145/3140659.3080246. URL [URL removed] org/10.1145/3140659.3080246.
+
+- Lukasz Kaiser, Samy Bengio, Aurko Roy, Ashish Vaswani, Niki Parmar, Jakob Uszkoreit, and Noam Shazeer. Fast decoding in sequence models using discrete latent variables. In Jennifer Dy and Andreas Krause (eds.), _Proceedings of the 35th International Conference on Machine Learning_ , volume 80 of _Proceedings of Machine Learning Research_ , pp. 2390–2399. PMLR, 10–15 Jul 2018. URL [URL removed]
+
+- Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. _CoRR_ , abs/2001.08361, 2020. URL [URL removed]
+
+- Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Hal Daumé III and Aarti Singh (eds.), _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pp. 5156–5165. PMLR, 13–18 Jul 2020. URL [URL removed]
+
+- Diederik Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 21696–21707. Curran Associates, Inc., 2021. URL [URL removed] 2021/file/b578f2a52a0229873fefc2a4b06377fa-Paper.pdf.
+
+- Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In _International Conference on Learning Representations_ , 2020. URL [URL removed] net/forum?id=rkgNKkHtvB.
+
+- Taku Kudo and John Richardson. SentencePiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pp. 66–71, Brussels, Belgium, November 2018. Association for Computational Linguistics. doi: 10.18653/v1/D18-2012. URL [URL removed]
+
+- Guillaume Lample, Alexandre Sablayrolles, Marc' Aurelio Ranzato, Ludovic Denoyer, and Herve Jegou. Large memory layers with product keys. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ ,
+
+13
+
+volume 32. Curran Associates, Inc., 2019. URL [URL removed] paper/2019/file/9d8df73a3cfbf3c5b47bc9b50f214aff-Paper.pdf.
+
+- Doyup Lee, Chiheon Kim, Saehoon Kim, Minsu Cho, and Wook-Shin Han. Autoregressive image generation using residual quantization. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , pp. 11523–11532, June 2022. URL [URL removed] Lee_Autoregressive_Image_Generation_Using_Residual_Quantization_ CVPR_2022_paper.html.
+
+- James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, and Santiago Ontanon. FNet: Mixing tokens with Fourier transforms. In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 4296–4313, Seattle, United States, July 2022. Association for Computational Linguistics. doi: 10.18653/v1/ 2022.naacl-main.319. URL [URL removed]
+
+- Tao Lei. When attention meets fast recurrence: Training language models with reduced compute. In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pp. 7633–7648, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.602. URL [URL removed]
+
+- Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed]
+
+- Peter J. Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. Generating wikipedia by summarizing long sequences. In _International Conference on Learning Representations_ , 2018. URL [URL removed] Hyg0vbWC-.
+
+- Zichang Liu, Aditya Desai, Fangshuo Liao, Weitao Wang, Victor Xie, Zhaozhuo Xu, Anastasios Kyrillidis, and Anshumali Shrivastava. Scissorhands: Exploiting the persistence of importance hypothesis for LLM KV cache compression at test time, 2023. URL [URL removed] abs/2305.17118.
+
+- Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In _International Conference on Learning Representations_ , 2019. URL [URL removed] Bkg6RiCqY7.
+
+- Shahar Lutati, Itamar Zimerman, and Lior Wolf. Focus your attention (with adaptive IIR filters), 2023. URL [URL removed]
+
+- Xuezhe Ma, Xiang Kong, Sinong Wang, Chunting Zhou, Jonathan May, Hao Ma, and Luke Zettlemoyer. LUNA: Linear unified nested attention. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , 2021. URL [URL removed]
+
+- Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, and Luke Zettlemoyer. Mega: Moving average equipped gated attention. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed] net/forum?id=qNLe3iq2El.
+
+- Matt Mahoney. Large text compression benchmark, 2011. URL: [URL removed] dc/text.html.
+
+- Chengzhi Mao, Lu Jiang, Mostafa Dehghani, Carl Vondrick, Rahul Sukthankar, and Irfan Essa. Discrete representations strengthen vision transformer robustness. In _International Conference on Learning Representations_ , 2022. URL [URL removed] 8hWs60AZcWk.
+
+- Harsh Mehta, Ankit Gupta, Ashok Cutkosky, and Behnam Neyshabur. Long range language modeling via gated state spaces, 2022. URL [URL removed]
+
+14
+
+- Piotr Nawrot, Szymon Tworkowski, Michal Tyrolski, Lukasz Kaiser, Yuhuai Wu, Christian Szegedy, and Henryk Michalewski. Hierarchical transformers are more efficient language models. _CoRR_ , abs/2110.13711, 2021. URL [URL removed]
+
+- Piotr Nawrot, Jan Chorowski, Adrian Ła´ncucki, and Edoardo M. Ponti. Efficient transformers with dynamic token pooling, 2023. URL [URL removed]
+
+- Emilio Parisotto, H. Francis Song, Jack W. Rae, Razvan Pascanu, Çaglar Gülçehre, Siddhant M. Jayakumar, Max Jaderberg, Raphael Lopez Kaufman, Aidan Clark, Seb Noury, Matthew M. Botvinick, Nicolas Heess, and Raia Hadsell. Stabilizing transformers for reinforcement learning. _CoRR_ , abs/1910.06764, 2019. URL [URL removed]
+
+- Bo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak, Samuel Arcadinho, Huanqi Cao, Xin Cheng, Michael Chung, Matteo Grella, Kranthi Kiran GV, Xuzheng He, Haowen Hou, Przemyslaw Kazienko, Jan Kocon, Jiaming Kong, Bartlomiej Koptyra, Hayden Lau, Krishna Sri Ipsit Mantri, Ferdinand Mom, Atsushi Saito, Xiangru Tang, Bolun Wang, Johan S. Wind, Stansilaw Wozniak, Ruichong Zhang, Zhenyuan Zhang, Qihang Zhao, Peng Zhou, Jian Zhu, and Rui-Jie Zhu. RWKV: Reinventing RNNs for the transformer era, 2023. URL [URL removed] 13048.
+
+- Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah Smith, and Lingpeng Kong. Random feature attention. In _International Conference on Learning Representations_ , 2021. URL [URL removed]
+
+- Michael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y. Fu, Tri Dao, Stephen Baccus, Yoshua Bengio, Stefano Ermon, and Christopher Ré. Hyena hierarchy: Towards larger convolutional language models, 2023. URL [URL removed]
+
+- Zhen Qin, Xiaodong Han, Weixuan Sun, Dongxu Li, Lingpeng Kong, Nick Barnes, and Yiran Zhong. The devil in linear transformer. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang (eds.), _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , pp. 7025–7041, Abu Dhabi, United Arab Emirates, December 2022a. Association for Computational Linguistics. doi: 10.18653/v1/2022.emnlp-main.473. URL [URL removed] 2022.emnlp-main.473.
+
+- Zhen Qin, Weixuan Sun, Hui Deng, Dongxu Li, Yunshen Wei, Baohong Lv, Junjie Yan, Lingpeng Kong, and Yiran Zhong. CosFormer: Rethinking softmax in attention. In _International Conference on Learning Representations_ , 2022b. URL [URL removed] Bl8CQrx2Up4.
+
+- Jiezhong Qiu, Hao Ma, Omer Levy, Wen-tau Yih, Sinong Wang, and Jie Tang. Blockwise selfattention for long document understanding. In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pp. 2555–2565, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.findings-emnlp.232. URL [URL removed] org/2020.findings-emnlp.232.
+
+- Markus N. Rabe and Charles Staats. Self-attention does not need o(n[2] ) memory. _CoRR_ , abs/2112.05682, 2021. URL [URL removed]
+
+- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners, 2019. https: //cdn.openai.com/better-language-models/language_models_are_ unsupervised_multitask_learners.pdf Last visited on 2023/09/07.
+
+- Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier, and Timothy P. Lillicrap. Compressive transformers for long-range sequence modelling. In _International Conference on Learning Representations_ , 2020. URL [URL removed]
+
+- Jack W. Rae, Sebastian Borgeaud, Trevor Cai, Katie Millican, Jordan Hoffmann, H. Francis Song, John Aslanides, Sarah Henderson, Roman Ring, Susannah Young, Eliza Rutherford, Tom Hennigan, Jacob Menick, Albin Cassirer, Richard Powell, George van den Driessche, Lisa Anne Hendricks, Maribeth Rauh, Po-Sen Huang, Amelia Glaese, Johannes Welbl, Sumanth Dathathri, Saffron
+
+15
+
+Huang, Jonathan Uesato, John Mellor, Irina Higgins, Antonia Creswell, Nat McAleese, Amy Wu, Erich Elsen, Siddhant M. Jayakumar, Elena Buchatskaya, David Budden, Esme Sutherland, Karen Simonyan, Michela Paganini, Laurent Sifre, Lena Martens, Xiang Lorraine Li, Adhiguna Kuncoro, Aida Nematzadeh, Elena Gribovskaya, Domenic Donato, Angeliki Lazaridou, Arthur Mensch, JeanBaptiste Lespiau, Maria Tsimpoukelli, Nikolai Grigorev, Doug Fritz, Thibault Sottiaux, Mantas Pajarskas, Toby Pohlen, Zhitao Gong, Daniel Toyama, Cyprien de Masson d’Autume, Yujia Li, Tayfun Terzi, Vladimir Mikulik, Igor Babuschkin, Aidan Clark, Diego de Las Casas, Aurelia Guy, Chris Jones, James Bradbury, Matthew J. Johnson, Blake A. Hechtman, Laura Weidinger, Iason Gabriel, William S. Isaac, Edward Lockhart, Simon Osindero, Laura Rimell, Chris Dyer, Oriol Vinyals, Kareem Ayoub, Jeff Stanway, Lorrayne Bennett, Demis Hassabis, Koray Kavukcuoglu, and Geoffrey Irving. Scaling language models: Methods, analysis & insights from training gopher. _CoRR_ , abs/2112.11446, 2021. URL [URL removed]
+
+- Prajit Ramachandran, Barret Zoph, and Quoc V. Le. Searching for activation functions. _CoRR_ , abs/1710.05941, 2017. URL [URL removed]
+
+- Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. _CoRR_ , abs/2102.12092, 2021. URL [URL removed]
+
+- Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with vq-vae-2. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc., 2019. URL [URL removed] 2019/file/5f8e2fa1718d1bbcadf1cd9c7a54fb8c-Paper.pdf.
+
+- Hongyu Ren, Hanjun Dai, Zihang Dai, Mengjiao Yang, Jure Leskovec, Dale Schuurmans, and Bo Dai. Combiner: Full attention transformer with sparse computation cost. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 22470–22482. Curran Associates, Inc., 2021. URL [URL removed] 2021/file/bd4a6d0563e0604510989eb8f9ff71f5-Paper.pdf.
+
+- Stephen Roller, Sainbayar Sukhbaatar, Arthur Szlam, and Jason E Weston. Hash layers for large sparse models. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , 2021. URL [URL removed] id=lMgDDWb1ULW.
+
+- Aurko Roy, Mohammad Saffar, Ashish Vaswani, and David Grangier. Efficient content-based sparse attention with routing transformers. _Transactions of the Association for Computational Linguistics_ , 9:53–68, 2021. doi: 10.1162/tacl_a_00353. URL [URL removed] tacl-1.4.
+
+- Aurko Roy, Rohan Anil, Guangda Lai, Benjamin Lee, Jeffrey Zhao, Shuyuan Zhang, Shibo Wang, Ye Zhang, Shen Wu, Rigel Swavely, Yu Tao, Phuong Dao, Christopher Fifty, Zhifeng Chen, and Yonghui Wu. N-Grammer: Augmenting transformers with latent n-grams, 2022. URL [URL removed]
+
+- Noam Shazeer. Fast transformer decoding: One write-head is all you need. _CoRR_ , abs/1911.02150, 2019. URL [URL removed]
+
+- Noam Shazeer. GLU variants improve transformer, 2020. URL [URL removed] 2002.05202.
+
+- Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. _CoRR_ , abs/1804.04235, 2018. URL [URL removed]
+
+- Jimmy T. H. Smith, Andrew Warrington, and Scott W. Linderman. Simplified state space layers for sequence modeling, 2022. URL [URL removed]
+
+- Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention span in transformers. In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pp. 331–335, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1032. URL [URL removed]
+
+16
+
+- Sainbayar Sukhbaatar, Da Ju, Spencer Poff, Stephen Roller, Arthur Szlam, Jason Weston, and Angela Fan. Not all memories are created equal: Learning to forget by expiring. In Marina Meila and Tong Zhang (eds.), _Proceedings of the 38th International Conference on Machine Learning_ , volume 139 of _Proceedings of Machine Learning Research_ , pp. 9902–9912. PMLR, 18–24 Jul 2021. URL [URL removed]
+
+- Simeng Sun, Kalpesh Krishna, Andrew Mattarella-Micke, and Mohit Iyyer. Do long-range language models actually use long-range context? In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pp. 807–822, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021. emnlp-main.62. URL [URL removed]
+
+- Yi Tay, Dara Bahri, Liu Yang, Donald Metzler, and Da-Cheng Juan. Sparse sinkhorn attention. _CoRR_ , abs/2002.11296, 2020a. URL [URL removed]
+
+- Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. _CoRR_ , abs/2009.06732, 2020b. URL [URL removed]
+
+- Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan, Zhe Zhao, and Che Zheng. Synthesizer: Rethinking self-attention for transformer models. In Marina Meila and Tong Zhang (eds.), _Proceedings of the 38th International Conference on Machine Learning_ , volume 139 of _Proceedings of Machine Learning Research_ , pp. 10183–10192. PMLR, 18–24 Jul 2021. URL [URL removed]
+
+- Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017. URL [URL removed] 7a98af17e63a0ac09ce2e96d03992fbc-Paper.pdf.
+
+- Aäron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In Maria Florina Balcan and Kilian Q. Weinberger (eds.), _Proceedings of The 33rd International Conference on Machine Learning_ , volume 48 of _Proceedings of Machine Learning Research_ , pp. 1747–1756, New York, New York, USA, 20–22 Jun 2016. PMLR. URL [URL removed]
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017. URL [URL removed] 3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf.
+
+- Apoorv Vyas, Angelos Katharopoulos, and François Fleuret. Fast transformers with clustered attention. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 21665–21674. Curran Associates, Inc., 2020. URL [URL removed] f6a8dd1c954c8506aadc764cc32b895e-Paper.pdf.
+
+- Ningning Wang, Guobing Gan, Peng Zhang, Shuai Zhang, Junqiu Wei, Qun Liu, and Xin Jiang. ClusterFormer: Neural clustering attention for efficient and effective transformer. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 2390–2402, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.170. URL [URL removed] 170.
+
+- Shuohang Wang, Luowei Zhou, Zhe Gan, Yen-Chun Chen, Yuwei Fang, Siqi Sun, Yu Cheng, and Jingjing Liu. Cluster-former: Clustering-based sparse transformer for question answering. In _Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021_ , pp. 3958– 3968, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021. findings-acl.346. URL [URL removed]
+
+17
+
+- Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: self-attention with linear complexity. _CoRR_ , abs/2006.04768, 2020. URL [URL removed] 04768.
+
+- Yuhuai Wu, Markus Norman Rabe, DeLesley Hutchins, and Christian Szegedy. Memorizing transformers. In _International Conference on Learning Representations_ , 2022. URL https: //openreview.net/forum?id=TrjbxzRcnf-.
+
+- Yunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan, Glenn Fung, Yin Li, and Vikas Singh. Nyströmformer: A nyström-based algorithm for approximating self-attention. _Proceedings of the AAAI Conference on Artificial Intelligence_ , 35(16):14138–14148, May 2021. doi: 10.1609/aaai.v35i16.17664. URL [URL removed] article/view/17664.
+
+- Zihao Ye, Qipeng Guo, Quan Gan, Xipeng Qiu, and Zheng Zhang. BP-Transformer: Modelling long-range context via binary partitioning. _CoRR_ , abs/1911.04070, 2019. URL [URL removed] org/abs/1911.04070.
+
+- Lili Yu, Dániel Simig, Colin Flaherty, Armen Aghajanyan, Luke Zettlemoyer, and Mike Lewis. Megabyte: Predicting million-byte sequences with multiscale transformers, 2023. URL http: //arxiv.org/abs/2305.07185.
+
+- Biao Zhang and Rico Sennrich. Root mean square layer normalization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc., 2019. URL [URL removed] 1e8a19426224ca89e83cef47f1e7f53b-Paper.pdf.
+
+- Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, Zhangyang Wang, and Beidi Chen. H2o: Heavyhitter oracle for efficient generative inference of large language models, 2023. URL https: //arxiv.org/abs/2306.14048.
+
+- Shangchen Zhou, Kelvin C.K. Chan, Chongyi Li, and Chen Change Loy. Towards robust blind face restoration with codebook lookup transformer. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), _Advances in Neural Information Processing Systems_ , 2022. URL [URL removed]
+
+- Chen Zhu, Wei Ping, Chaowei Xiao, Mohammad Shoeybi, Tom Goldstein, Anima Anandkumar, and Bryan Catanzaro. Long-short transformer: Efficient transformers for language and vision. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems_ , volume 34, pp. 17723–17736. Curran Associates, Inc., 2021. URL [URL removed] 9425be43ba92c2b4454ca7bf602efad8-Paper.pdf.
+
+- Zhenhai Zhu and Radu Soricut. H-transformer-1D: Fast one-dimensional hierarchical attention for sequences. In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pp. 3801–3815, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.294. URL [URL removed] acl-long.294.
+
+18
+
+## A THEOREMS
+
+## A.1 PROOF OF THEOREM 2.2
+
+_Proof._ This proof is based on Guo et al. (2019). Invoking the fact that **q** _,_ **k** _, ϕ_ ( **k** ) _∈_ R _[D]_ , the assumed independence between **q** and **k** , the law of iterated expectations, and the isotropy assumption on **q** , i.e., E **q** [ **qq** _[⊤]_ ] = _σ_[2] **I** _D_ for _σ_[2] _>_ 0, we have
+
+**==> picture [283 x 110] intentionally omitted <==**
+
+A.2 PROOF OF COROLLARY 2.3
+
+_Proof._ By definition, VQ( **k** ; **C** ) ≜ arg min **c** _∈{_ **C** _s}Ss_ =0 _−_ 1 _[||]_ **[k]** _[ −]_ **[c]** _[||]_[2][.][In other words,] _[ ϕ]_[(] **[k]**[) =][ VQ][(] **[k]**[;] **[ C]**[)] minimizes _||_ **k** _− ϕ_ ( **k** ) _||_[2] under the constraint that the outputs of _ϕ_ are limited to the rows of **C** , i.e., _ϕ_ (R _[D]_ ) = _{_ **C** _s}[S] s_ =0 _[−]_[1][.][Since this choice is a pointwise minimizer under the given constraint, it is also] a minimizer of the expectation E **k** _||_ **k** _− ϕ_ ( **k** ) _||_[2] under the same constraint.
+
+Under the assumptions of Theorem 2.2, the aforementioned expectation is equal to E **q** _,_ **k** _||_ **q** _[⊤]_ **k** _−_ **q** _[⊤] ϕ_ ( **k** ) _||_[2] up to a positive proportionality constant _σ_[2] . As a result, VQ( **k** ; **C** ) is also a minimizer of the expectation E **q** _,_ **k** _||_ **q** _[⊤]_ **k** _−_ **q** _[⊤] ϕ_ ( **k** ) _||_[2] under the same constraint on the output of _ϕ_ .
+
+## A.3 PROOF OF THEOREM 3.4
+
+_Proof._ When _φw_ is an element-wise nonlinearity, _φ_ ( _c_ ) is well-defined, where _c_ is any scalar. Then using definitions alone, we have
+
+**==> picture [284 x 100] intentionally omitted <==**
+
+**==> picture [213 x 30] intentionally omitted <==**
+
+A.4 PROOF OF THEOREM 3.5
+
+_Proof._ By Theorem 3.4 with _φw_ ( _·_ ) = exp( _·_ ), we have exp( **QK**[ˆ] _[⊤]_ ) = exp( **QC** _[⊤]_ ) **∆** . Invoking the definition of row-wise softmax and applying substitution, we have
+
+**==> picture [319 x 13] intentionally omitted <==**
+
+**==> picture [250 x 13] intentionally omitted <==**
+
+19
+
+## A.5 PROOF OF THEOREM 3.6
+
+_Proof._ For _n_ = 0 _,_ 1 the result follows by inspection.
+
+For _n ≥_ 2, by the definition of **U** ( _n −_ 2) we have
+
+**==> picture [312 x 33] intentionally omitted <==**
+
+Note that in our notation, the superscripts’ block index range is _non-inclusive_ on the ending value, so **∆** (: _,_ 0: _n−_ 1) **V** (0: _n−_ 1 _,_ :) is equal to the sum of the matrix products for the matrix blocks from 0 to _n −_ 2. Thus, by substitution, we have
+
+**==> picture [327 x 13] intentionally omitted <==**
+
+We invoke the same argument as in the proof of Theorem 3.4 to conclude _φw_ ( **Q** ( _n,_ :) **C** _[⊤]_ ) **∆** (: _,_ 0: _n−_ 1) = **W** ( _n,_ 0: _n−_ 1). Substituting this expression into the right-hand side above gives
+
+**==> picture [301 x 14] intentionally omitted <==**
+
+Substituting this expression into the formula for ( **WV** )( _n,_ :) claimed in the theorem statement, and invoking the same argument as in the proof of Theorem 3.4 on the middle term, we see the claimed formula has the form **W** ( _n,_ 0: _n−_ 1) **V** (0: _n−_ 1 _,_ :) + **W** ( _n,n−_ 1) **V** ( _n−_ 1 _,_ :) + **W** ( _n,n_ ) **V** ( _n,_ :). The diagonal block **W** ( _n,n_ ) of **W** is causally masked, so the sum of the three terms indeed equals ( **WV** )( _n,_ :).
+
+## A.6 PROOF OF THEOREM 3.7
+
+_Proof._ Recall that we defined **A** ≜ exp( **QK**[ˆ] _[⊤]_ + **B** ). The proposed expression for ( **AV** )( _n,_ :) follows from Theorem 3.6 with _φw_ ( _·_ ) = exp( _·_ ). The proposed expression for ( **A1** )( _n_ ) follows by a substitution argument using ( **AV** )( _n,_ :). Normalizing ( **AV** )( _n,_ :) by ( **A1** )( _n_ ) and iterating over _n_ thus yields all blocks of the product **WV** when the nonlinearity _φw_ is row-wise softmax.
+
+20
+
+## B THROUGHPUT
+
+We present throughput results for three methods to compute the cache variables: serial scan, matmul, and associative scan. The first two are generalizations of the cross-block reduction methods from FLASH (Hua et al., 2022), which were a simple cumulative sum and matrix multiplication by a lower-triangular matrix of ones, respectively. We found our proposed generalizations were necessary for stable training, an issue where FLASH has known weaknesses (Qin et al., 2022a; Ma et al., 2023). Pseudocode for each of our stable reduction methods is given in Appendix E.
+
+In addition to the three cross-block reduction methods to compute the cache variables from parallelcomputed per-block summaries, we also benchmark an _input scanning_ implementation of VQAttention inspired by Wu et al. (2022); Hutchins et al. (2022), such that all the operations for a transformer layer are performed one input block at a time. To ground all comparisons, we benchmark the throughput against a transformer using unquantized quadratic-time attention, the same attention head type (SHGA, MQA, or MHA), and an identical non-codebook parameter count.
+
+Table 6: Training throughput comparison (tokens/sec) on Google Cloud VM with 8 TPU v3 cores, between Full Attention and VQ-Attention with serial scan reduction.
+
+|Model|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|
+|---|---|---|---|---|
+|||8192|32768|131072|
+|||Full VQ Speedup|Full VQ Speedup|Full VQ Speedup|
+|SHGA MQA MHA|**65.5k** 63.0k 0.962_×_ 58.9k **63.0k** 1.070_×_ **52.0k** 49.6k 0.955_×_|23.9k **77.2k** 3.230_×_ 10.4k **74.8k** 7.192_×_ 9.5k **57.8k** 6.084_×_|6.5k **82.1k** 12.631_×_ OOM **79.7k** – OOM **60.7k** –|OOM OOM – OOM OOM – OOM OOM –|
+
+Table 7: Training throughput comparison (tokens/sec) on Google Cloud VM with 8 TPU v3 cores, between Full Attention and VQ-Attention with matmul reduction.
+
+|Model|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|
+|---|---|---|---|---|
+|||8192|32768|131072|
+|||Full VQ Speedup|Full VQ Speedup|Full VQ Speedup|
+|SHGA MQA MHA|**65.5k** 62.5k 0.954_×_ 58.9k **62.5k** 1.061_×_ **52.0k** 48.2k 0.926_×_|23.9k **75.2k** 3.148_×_ 10.4k **74.9k** 7.144_×_ 9.5k **58.2k** 6.096_×_|6.5k **80.0k** 12.250_×_ OOM **80.2k** – OOM **61.6k** –|OOM **69.5k** – OOM **67.7k** – OOM OOM –|
+
+Table 8: Training throughput comparison (tokens/sec) on Google Cloud VM with 8 TPU v3 cores, between Full Attention and VQ-Attention with associative scan reduction.
+
+|Model|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|
+|---|---|---|---|---|
+|||8192|32768|131072|
+|||Full VQ Speedup|Full VQ Speedup|Full VQ Speedup|
+|SHGA MQA MHA|**65.5k** 58.9k 0.899_×_ 58.9k **62.8k** 1.066_×_ **52.0k** 49.1k 0.944_×_|23.9k **62.2k** 2.603_×_ 10.4k **74.2k** 7.134_×_ 9.5k **55.4k** 5.831_×_|6.5k **63.4k** 9.754_×_ OOM **79.0k** – OOM **57.8k** –|OOM OOM – OOM **67.0k** – OOM OOM –|
+
+21
+
+Table 9: Training throughput comparison (tokens/sec) on Google Cloud VM with 8 TPU v3 cores, between Full Attention and VQ-Attention, both with input scanning.
+
+|Model|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|Sequence Length 2048 8192 32768 131072 Full VQ Speedup Full VQ Speedup Full VQ Speedup Full VQ Speedup|
+|---|---|---|---|---|
+|||8192|32768|131072|
+|||Full VQ Speedup|Full VQ Speedup|Full VQ Speedup|
+|SHGA MQA MHA|32.0k **40.8k** 1.275_×_ 36.2k **54.8k** 1.514_×_ 30.0k **43.7k** 1.457_×_|12.7k **47.4k** 3.732_×_ 14.5k **64.9k** 4.476_×_ 11.4k **50.7k** 4.447_×_|OOM **49.4k** – OOM **68.3k** – OOM **53.1k** –|OOM OOM – OOM OOM – OOM OOM –|
+
+22
+
+## C TRAINING DETAILS
+
+## C.1 HYPERPARAMETERS
+
+Per-dataset hyperparameters are provided below.
+
+Table 10: Hyperparameters.
+
+|**Name**|**Symbol**|**Enwik8**|**PG-19**|**ImageNet64**|**ImageNet64**|
+|---|---|---|---|---|---|
+|parameter count||190M|1.3B|190M|1.2B|
+|global batch size|_B_|128|128|16|128|
+|sequence length|_T_|8192|8192|12288|12288|
+|backprop length|_W_|2048|2048|12288|2048|
+|block length|_L_|512|512|512|512|
+|model dimension|_Dm_|768|2048|768|2048|
+|key dimension|_Dk_|128|128|128|128|
+|value dimension|_Dv_|1536|4096|1536|4096|
+|num code|_S_|512|512|512|512|
+|num gau|_N_|48|48|48|48|
+|sinusoid dropout rate|_p_dropsin|0.2|0.1|0.1|0.1|
+|residual dropout rate|_p_dropres|0.5|0.1|0.0|0.0|
+|layerdrop rate|_p_droplyr|0.3|0.1|0.0|0.0|
+|weight decay||0.0002|0.0|0.0|0.0|
+|optimizer||adamw|adafactor|adamw|adafactor|
+|total steps||125000|500000|125000|500000|
+
+Note that the 190M parameter ImageNet64 result was added after the other experiments had concluded. To avoid biasing its result, we use the exact same architectural hyperparameters as the Enwik8 model, and the exact same regularization as the larger ImageNet64 model. The smaller ImageNet model was trained in a newer version of our codebase optimized for higher throughput and faster compile times, rather than training on long sequences in constant space via input scans and truncated backprop through time. The attention in the optimized codebase was unit-tested to match the original.
+
+## C.2 IMPLEMENTATION
+
+Weights and token embeddings were initialized following Chowdhery et al. (2022). For the small model, the classifier layer omits LayerNorm and is independently parameterized. For the large model, the classifier layer uses LayerNorm and its projection is tied with the token embedding table, then scaled down by a large constant. For image datasets, we add absolute sinusoidal position embeddings, scaled by a trainable scalar, to the token embeddings (Hua et al., 2022; Vaswani et al., 2017). We used a maximum angular wavelength of 10[5] for all sinusoidal embeddings.
+
+We used the pre-norm placement of LayerNorm (Radford et al., 2019), and always used the RMS LayerNorm variant (Zhang & Sennrich, 2019). For the activations, we used _φw_ = Softmax and _φv_ = _φg_ = SiLU, the self-gated activation (Elfwing et al., 2017; Ramachandran et al., 2017). Several models use LayerDrop for regularization (Fan et al., 2020a), and following the Transformer-XL codebase (Dai et al., 2019) models apply dropout to the flipped sinusoidal embeddings used for (local) relative positional biases.
+
+We used float32 parameters, with bfloat16 precision for most computations (Rae et al., 2021). For the AdamW optimizer (Loshchilov & Hutter, 2019), we used gradient clip 0 _._ 1, max learning rate _α_ = 0 _._ 0004 and hyperparameters _β_ 1 = 0 _._ 9 _, β_ 2 = 0 _._ 98 _, ϵ_ = 10 _[−]_[9] . For the Adafactor optimizer (Shazeer & Stern, 2018), we used relative stepsizes, update clip 1 _._ 0, max learning rate _α_ = 0 _._ 01, and hyperparameters _β_[ˆ] 1 = 0 _._ 0 _, β_[ˆ] 2 _,t_ = 1 _− t[−]_[0] _[.]_[8] . We used weight decay with a constant schedule throughout training and omit decay on any one-dimensional parameter tensors (Radford et al., 2019). The codebook commit coefficient was always _β_ = 0 _._ 0001 and codebook EMA rate was always _γ_ = 0 _._ 99. Learning rates were linearly warmed up for 10,000 steps, then decayed by a 10x factor using a cosine schedule.
+
+23
+
+## D GENERATED SAMPLES
+
+## D.1 QUALITATIVE ANALYSIS
+
+## D.1.1 PG-19
+
+- `No effort has been made to explain elementary methods of photography, for the reason that such explanation has been found in the publications of every leading technical journal. The endeavor has been to present what is`
+
+- `necessary to the amateur and the professional photographer, together with suggestions of how to make apparatus for the student, and to give a chapter on lens building. The author is fully aware of the imperfections in the methods described, and would like to emphasize the necessity of studying these methods carefully before attempting to use them, if it is desired to make satisfactory photographs. The most essential point in photography is the study of light. It is impossible to have success in photography unless the operator knows what light is. The writer believes that much may be done to advance the art of photography by the use of simple apparatus. The student must not overlook the fact that some simple apparatus is`
+
+- `necessary in order to get good results. A lens is necessary to bring the image on the sensitive plate up to the focus of the lens. This lens is very expensive and only a few can be had of the best makers.`
+
+## Figure 4: Sample excerpt from our PG-19 model, generated with nucleus 0.8.
+
+We generated 128 sequences using nucleus sampling (Holtzman et al., 2020). In Figure 4, we observe a sample except in which our PG-19 model synthesizes high-quality text, and maintains a consistent tone, topic, and train of thought. These observations were found to hold for the vast majority of the samples we generated.
+
+## D.1.2 IMAGENET64
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+Figure 5: Generated samples from our large ImageNet64 model; nucleus 0.999.
+
+Figures 3 and 5 show a subset of samples with the same indices from two batches with different nucleus settings. We see that our large ImageNet64 model synthesizes sequences of over 12,000 bytes and is capable of depicting relatively high-fidelity ocean water, shorelines, leaves, insects, trees, animals, people, mountains, and architecture.
+
+## D.2 EXTENSIVE SAMPLES
+
+Samples for Enwik8, PG-19, and ImageNet64 can be viewed at the anonymized URLs in Table 11.
+
+Table 11: Generated samples’ URLs by dataset.
+
+## **URL**
+
+[URL removed] [URL removed] [URL removed]
+
+D.3 IMAGENET64 - FULL BATCH
+
+24
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+25
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [65 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+**==> picture [64 x 65] intentionally omitted <==**
+
+26
+
+## E PSEUDOCODE
+
+```
+importflax.linenasnn
+importjax
+importjax.numpyasjnp
+importchex
+classVQAttn(nn.Module):
+n_code:int
+d_k:int
+d_v:int
+@nn.compact
+def__call__(self,x):
+"""Inputshape:[batchsize,numblocks,blocklength,modelwidth]."""
+B,R,C,D=x.shape
+S,K,V=self.n_code,self.d_k,self.d_v
+x_tilde=RMSLayerNorm(axis=−1)(x)
+q=RMSLayerNorm(axis=−1)(nn.Dense(self.d_k)(x_tilde))
+k=RMSLayerNorm(axis=−1)(nn.Dense(self.d_k)(x_tilde))
+v=jax.nn.silu(nn.Dense(self.d_v)(x_tilde))
+g=jax.nn.silu(nn.Dense(self.d_v)(x_tilde))
+quantizer=VectorQuantizer(codebook_size=self.n_code,width=self.d_k)
+k_hat,z,l_commit,l_codebook=quantizer(k)#quantizedkeys,shortcodes,etc
+c=quantizer.get_codebook()
+```
+
+```
+local_biases=XLBiasProducer(width=self.d_k,length=2∗C)(q)
+chex.assert_shape(local_biases,[B,R,C,2∗C])
+local_biases_prev,local_biases_present=jnp.split(local_biases,2,axis=−1)
+scores_present=jnp.einsum("brik,brjk−>brij",q,k_hat)
+scores_present+=local_biases_present
+```
+
+```
+scores_present−=1e30∗(1−jnp.tril(jnp.ones_like(scores_present)))
+```
+
+```
+k_hat_prev=jnp.pad(k_hat[:,:−1],((0,0),(1,0),(0,0),(0,0)))
+v_prev=jnp.pad(v[:,:−1],((0,0),(1,0),(0,0),(0,0)))
+scores_prev=jnp.einsum("brik,brjk−>brij",q,k_hat_prev)
+scores_prev+=local_biases_prev
+scores_prev=jnp.pad(
+scores_prev[:,1:],
+((0,0),(1,0),(0,0),(0,0)),
+constant_values=−1e30,
+)
+```
+
+```
+scores_cache=jnp.einsum("brik,sk−>bris",q,c)
+cache_u_div_l_by_block,cache_l_by_block=get_cache_vars(z,v,S)
+chex.assert_shape(cache_u_div_l_by_block,[B,R,S,V])
+chex.assert_shape(cache_l_by_block,[B,R,S])
+count_biases=jnp.where(
+jnp.greater(cache_l_by_block,jnp.zeros_like(cache_l_by_block)),
+jnp.log(jnp.clip(cache_l_by_block,a_min=1.0)),
+jnp.full_like(cache_l_by_block,fill_values=−1e30),
+)
+scores_cache+=jnp.expand_dims(count_biases,axis=−2)
+scores_present_max=jnp.max(scores_present,axis=−1)
+scores_prev_max=jnp.max(scores_present,axis=−1)
+scores_cache_max=jnp.max(scores_cache,axis=−1)
+scores_max=jnp.maximum(
+jnp.maximum(scores_present_max,scores_prev_max),
+scores_cache_max,
+)
+scores_max=jax.lax.stop_gradient(scores_max)
+scores_present−=scores_max[...,None]
+scores_prev−=scores_max[...,None]
+scores_cache−=scores_max[...,None]
+a_present=jnp.exp(scores_present)
+a_prev=jnp.exp(scores_prev)
+a_cache=jnp.exp(scores_cache)
+d=jnp.sum(a_present,axis=−1)
+d+=jnp.sum(a_prev,axis=−1)
+d+=jnp.sum(a_cache,axis=−1)
+w_present=a_present/d[...,None]
+w_prev=a_prev/d[...,None]
+w_cache=a_cache/d[...,None]
+wv=jnp.einsum("brij,brjv−>briv",w_present,v)
+wv+=jnp.einsum("brij,brjv−>briv",w_prev,v_prev)
+wv+=jnp.einsum("bris,brsv−>briv",w_cache,cache_u_div_l_by_block)
+o=wv∗g
+residual=nn.Dense(D)(o)
+returnx+residual,l_commit,l_codebook
+```
+
+Code 1: Jax/Flax pseudocode for VQ-Attention.
+
+27
+
+```
+defget_cache_vars(z,v,n_code):
+#throughoutthisfunction,weoftenuseclippingofelementwisedenominatorsat1toavoidnans.
+#intheplaceswherewedothis,itdoesnotaltertheactualcachevariableestimates
+
+delta=jax.nn.one_hot(z,num_classes=n_code,dtype=v.dtype,axis=−1)
+delta1_by_block=jnp.einsum("bris−>brs",delta)
+deltav_by_block=jnp.einsum("bris,briv−>brsv",delta,v)
+deltav_by_block_normalized=jnp.divide(
+deltav_by_block,
+jnp.clip(delta1_by_block[...,None],a_min=1.0),
+)
+defscan_func(carry,in_dict):
+#computesrunningaverageofthevaluevectorsforeachshortcode("upperdivlower"),
+#andrunningcount("lower").
+lower=carry["lower"]
+lower_block=in_dict["delta1_by_block"]
+lower_new=lower+lower_block
+f1=jnp.divide(lower,jnp.clip(lower_new,a_min=1.0))
+f2=jnp.divide(lower_block,jnp.clip(lower_new,a_min=1.0))
+upper_div_lower_new=jnp.add(
+f1[...,None]∗carry["upper_div_lower"],
+f2[...,None]∗in_dict["deltav_by_block_normalized"],
+)
+carry_new=dict(
+upper_div_lower=upper_div_lower_new,
+lower=lower_new,
+)
+returncarry_new,carry_new#statetocarry,outputtosave
+#beforewescan,wehavetotransposesincejaxonlysupportsscansalongaxis0.
+#thisisstillfast,possiblybecausejnp.transposemightbechoosingtoreturnaview
+deltav_by_block_normalized=jnp.transpose(deltav_by_block_normalized,(1,0,2,3))
+delta1_by_block=jnp.transpose(delta1_by_block,(1,0,2))
+_,cache_vars=jax.lax.scan(
+f=scan_func,
+init=dict(
+upper_div_lower=jnp.zeros(dtype=self.dtype,shape=deltav_by_block_normalized.shape[1:]),
+lower=jnp.zeros(dtype=self.dtype,shape=delta1_by_block.shape[1:]),
+),
+xs=dict(
+deltav_by_block_normalized=deltav_by_block_normalized,
+delta1_by_block=delta1_by_block,
+),
+unroll=1,
+)
+cache_var_upper_div_lower=jnp.pad(
+jnp.transpose(cache_vars["upper_div_lower"][:−2],(1,0,2,3)),
+((0,0),(2,0),(0,0),(0,0)),
+)
+cache_var_lower=jnp.pad(
+jnp.transpose(cache_vars["lower"][:−2],(1,0,2)),
+((0,0),(2,0),(0,0)),
+)
+returncache_var_upper_div_lower,cache_var_lower
+```
+
+Code 2: Jax/Flax pseudocode to get cache variables for all blocks; serial scan version.
+
+28
+
+## `def get_cache_vars(z, v, n_code):`
+
+**==> picture [358 x 266] intentionally omitted <==**
+
+**----- Start of picture text -----**
+# throughout this function, we often use clipping of elementwise denominators at 1 to avoid nans. # in the places where we do this, it does not alter the actual cache variable estimates # since the corresponding entries in the numerator will be zero when the clip is applied. delta = jax.nn.one_hot(z, num_classes=n_code, dtype=v.dtype, axis=−1) delta1_by_block = jnp.einsum("bris−>brs", delta) deltav_by_block = jnp.einsum("bris,briv−>brsv", delta, v) deltav_by_block_normalized = jnp.divide( deltav_by_block, jnp.clip(delta1_by_block[..., None], a_min=1.0), ) delta1_by_block_tiled = jnp.einsum( "brs,bgs−>bsrg", jnp.ones_like(delta1_by_block), delta1_by_block, ) delta1_by_block_tiled = jnp.tril(delta1_by_block_tiled) delta1_fracs_by_block = jnp.divide( delta1_by_block_tiled, jnp.clip(jnp.einsum("bsrg−>bsr", delta1_by_block_tiled)[..., None], a_min=1.0), ) deltav_by_block_cumulative_normalized = jnp.einsum( "bsrg,bgsv−>brsv", delta1_fracs_by_block, deltav_by_block_normalized ) delta1_by_block_cumulative = jnp.cumsum(delta1_by_block, axis=1) cache_var_upper_div_lower = jnp.pad( deltav_by_block_cumulative_normalized[:, :−2], ((0, 0), (2, 0), (0, 0), (0, 0)), ) cache_var_lower = jnp.pad( delta1_by_block_cumulative[:, :−2], ((0, 0), (2, 0), (0, 0)) ) return cache_var_upper_div_lower, cache_var_lower **----- End of picture text -----**
+
+Code 3: Jax/Flax pseudocode to get cache variables for all blocks; matmul version
+
+29
+
+```
+defget_cache_vars(z,v,n_code):
+```
+
+```
+#throughoutthisfunction,weoftenuseclippingofelementwisedenominatorsat1toavoidnans.
+#intheplaceswherewedothis,itdoesnotaltertheactualcachevariableestimates
+
+delta=jax.nn.one_hot(z,num_classes=n_code,dtype=v.dtype,axis=−1)
+delta1_by_block=jnp.einsum("bris−>brs",delta)
+deltav_by_block=jnp.einsum("bris,briv−>brsv",delta,v)
+deltav_by_block_normalized=jnp.divide(
+deltav_by_block,
+jnp.clip(delta1_by_block[...,None],a_min=1.0),
+)
+defmerge_func(a,b):
+a_upper_div_lower=a[0]
+b_upper_div_lower=b[0]
+a_lower=a[1]
+b_lower=b[1]
+lower_new=a_lower+b_lower
+term1=jnp.multiply(
+jnp.divide(a_lower,jnp.clip(lower_new,a_min=1.0))[...,None],
+a_upper_div_lower,
+)
+term2=jnp.multiply(
+jnp.divide(b_lower,jnp.clip(lower_new,a_min=1.0))[...,None],
+b_upper_div_lower,
+)
+upper_div_lower_new=term1+term2
+returnupper_div_lower_new,lower_new
+assoc_scan_output=jax.lax.associative_scan(
+fn=merge_func,
+elems=(deltav_by_block_normalized,delta1_by_block),
+reverse=False,
+axis=1,
+)
+deltav_by_block_normalized_cumulative=assoc_scan_output[0]
+delta1_by_block_cumulative=assoc_scan_output[1]
+cache_var_upper_div_lower=jnp.pad(
+deltav_by_block_normalized_cumulative[:,:−2],
+((0,0),(2,0),(0,0),(0,0)),
+)
+cache_var_lower=jnp.pad(
+delta1_by_block_cumulative[:,:−2],((0,0),(2,0),(0,0))
+)
+returncache_var_upper_div_lower,cache_var_lower
+```
+
+Code 4: Jax/Flax pseudocode to get cache variables for all blocks; associative scan version
+
+30
+
diff --git a/open_review/iclr2024_8576.json b/open_review/iclr2024_8576.json
new file mode 100644
index 0000000000000000000000000000000000000000..a335d5b09aa17fa9ff59720dbee03a696039c789
--- /dev/null
+++ b/open_review/iclr2024_8576.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8576",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "MIMIC: Masked Image Modeling with Image Correspondences",
+ "abstract": "Dense pixel-specific representation learning at scale has been bottlenecked due to the unavailability of large-scale multi-view datasets. Current methods for building effective pretraining datasets heavily rely on annotated 3D meshes, point clouds, and camera parameters from simulated environments, preventing them from building datasets from real-world data sources where such metadata is lacking. We propose a pretraining dataset-curation approach that does not require any additional annotations. Our method allows us to generate multi-view datasets from both real-world videos and simulated environments at scale. Specifically, we experiment with two scales: MIMIC-1M with 1.3M and MIMIC-3M with 3.1M multi-view image pairs. We train multiple models with different masked image modeling objectives to showcase the following findings: Representations trained on our automatically generated MIMIC-3M outperform those learned from expensive crowdsourced datasets (ImageNet-1K) and those learned from synthetic environments (MULTIVIEW-HABITAT) on two dense geometric tasks: depth estimation on NYUv2 (↑1.7%), and surface normals estimation on Taskonomy (↓2.05%). For dense tasks which also require object understanding, we outperform MULTIVIEW- HABITAT, on semantic segmentation on ADE20K (↑3.89%), pose estimation on MSCOCO (↑9.4%), and reduce the gap with models pre-trained on the object-centric expensive ImageNet-1K. We outperform even when the representations are frozen, and when downstream training data is limited to few-shot. Larger dataset (MIMIC-3M) significantly improves performance, which is promising since our curation method can arbitrarily scale to produce even larger datasets.",
+ "rebuttal": "### Withdrawing MIMIC\nWe are grateful to the reviewers for taking the time to review our work and for their valuable suggestions. We acknowledge the reviewers' concerns and would like to withdraw our paper. \n\nThanks,\n\nMIMIC team",
+ "initial_scores": [
+ 6,
+ 8,
+ 3,
+ 3
+ ],
+ "score_mean": 5.0,
+ "score_variance": 6,
+ "score_spread": 5,
+ "score_min": 3,
+ "score_max": 8,
+ "decision": "",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "",
+ "forum_id": "uhtQyRrTzY",
+ "primary_area": "datasets and benchmarks",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_HFtz",
+ "review_id": "M07vbxoMbL",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2663,
+ "edit_detected": true,
+ "edit_delta_seconds": 648649,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_AdG9",
+ "review_id": "SeuCCNQlFs",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 3,
+ "contribution": 4,
+ "confidence": 4
+ },
+ "review_text_chars": 1167,
+ "edit_detected": true,
+ "edit_delta_seconds": 690446,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_fi3r",
+ "review_id": "LaOehg7MZl",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2372,
+ "edit_detected": true,
+ "edit_delta_seconds": 831076,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ytkL",
+ "review_id": "n1Zn53yTPe",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2031,
+ "edit_detected": true,
+ "edit_delta_seconds": 1139914,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8576.md b/open_review/iclr2024_8576.md
new file mode 100644
index 0000000000000000000000000000000000000000..94374eec0e9cf1ba6db6f59195a19f11525918d7
--- /dev/null
+++ b/open_review/iclr2024_8576.md
@@ -0,0 +1,519 @@
+
+
+## MIMIC: MASKED IMAGE MODELING WITH IMAGE CORRESPONDENCES
+
+Authors withheld for review
+
+## ABSTRACT
+
+Dense pixel-specific representation learning at scale has been bottlenecked due to the unavailability of large-scale multi-view datasets. Current methods for building effective pretraining datasets heavily rely on annotated 3D meshes, point clouds, and camera parameters from simulated environments, preventing them from building datasets from real-world data sources where such metadata is lacking. We propose a pretraining dataset-curation approach that does not require any additional annotations. Our method allows us to generate multi-view datasets from both realworld videos and simulated environments at scale. Specifically, we experiment with two scales: MIMIC-1M with 1 _._ 3M and MIMIC-3M with 3 _._ 1M multi-view image pairs. We train multiple models with different masked image modeling objectives to showcase the following findings: Representations trained on our automatically generated MIMIC-3M outperform those learned from expensive crowdsourced datasets (ImageNet-1K) and those learned from synthetic environments (MULTIVIEW-HABITAT) on two dense geometric tasks: depth estimation on NYUv2 (↑1.7%), and surface normals estimation on Taskonomy (↓2.05%). For dense tasks which also require object understanding, we outperform MULTIVIEWHABITAT, on semantic segmentation on ADE20K (↑3.89%), pose estimation on MSCOCO (↑9.4%), and reduce the gap with models pre-trained on the objectcentric expensive ImageNet-1K. We outperform even when the representations are frozen, and when downstream training data is limited to few-shot. Larger dataset (MIMIC-3M) significantly improves performance, which is promising since our curation method can arbitrarily scale to produce even larger datasets.
+
+## 1 INTRODUCTION
+
+Today, dense vision tasks—depth prediction, surface normal estimation, semantic segmentation, and pose estimation— often rely on pretrained representations (He et al., 2022; Bachmann et al., 2022). Naturally, self-supervised learning lends itself as a potential solution. Despite the impressive performance on object recognition and other high-level tasks, self-supervised representations for dense prediction tasks have not yet fully delivered (Weinzaepfel et al., 2022). The representations trained on object-centric datasets such as ImageNet-1K (Deng et al., 2009) do not transfer well to dense prediction datasets such as NYUv2 (Silberman et al., 2012), and KITTI (Geiger et al., 2012), Cityscapes (Cordts et al., 2016), which contain indoor and outdoor scenes. Moreover, the jointembedding-based objectives (SimCLR (Chen et al., 2020), MoCo (He et al., 2020), DINO (Caron et al., 2021)) that are often used on object-centric datasets utilize augmentations that do not preserve geometric pixel-wise information. In response, the general purpose representation learning method—masked image modeling and specifically masked autoencoders (MAE)—has become a popular default mechanism for such tasks (He et al., 2022; Bachmann et al., 2022; Weinzaepfel et al., 2022). Unfortunately, recent findings suggest that the representations learned by MAE are devoid of sufficient local information for tasks like depth estimation (Weinzaepfel et al., 2022).
+
+Based on these observations, we ask the following question: _What data do we need to learn useful representations for dense vision tasks_ ? We find a potential answer in cognitive science: 3D understanding of the physical world is one of the first visual skills emergent in infants; it plays a critical role in the development of other skills, like depth estimation, understanding surfaces, occlusions, etc (Held & Hein, 1963). Scientists hypothesize that 3D understanding emerges from infants learning the relationship between changes in visual stimuli in response to their self-motion (Jayaraman
+
+1
+
+**==> picture [396 x 69] intentionally omitted <==**
+
+Figure 1: We introduce a data-curation method that generates multi-view image datasets for selfsupervised learning. Our method identifies potential data sources, including videos of indoor scenes, people, and objects, 3D indoor environments, outdoor street views, and stereo pairs to mine potential multiview images. Next, we use classical computer vision methods such as SIFT keypoint detection and homography transformation to locate corresponding patches. Finally, we filter pairs based on a threshold for significant overlap, ensuring a substantial percentage of pixels match between a pair.
+
+& Grauman, 2015), i.e. 3D awareness emerges by learning correspondences between appearances as the infant’s vantage point changes (Rader et al., 1980).
+
+Very recently, a machine learning paper proposed a variant of masked image modeling, named **cro** ss-view **co** mpletion (CroCo), which uses an objective that operationalizes learning representations in response to changes in self-motion (Weinzaepfel et al., 2022). Given a pair of multi-view images, CroCo reconstructs a masked view using the second view as support. Unfortunately, CroCo is a data-hungry objective. Its synthetic MULTIVIEW-HABITAT dataset of 1 _._ 8M multi-view images was curated using a method that requires ground truth 3D meshes to be annotated. Although CroCo shows promise, the lack of datasets with 3D annotations is a severe limitation, preventing its objective from scaling. If one could mine large-scale multi-view datasets, perhaps dense vision tasks could enjoy the success that the field of natural language processing has welcomed due to the availability of large-scale pretraining text (Brown et al., 2020).
+
+In this work, we contribute MIMIC: a data-curation method for developing multi-view datasets that scale. Our method does not require any 3D meshes and can generate multi-view datasets from unannotated videos and 3D simulated environments. We leverage classical computer vision techniques, such as SIFT(Scale Invariant Feature Transform) keypoint detection (Lowe, 2004), RANSAC (Fischler & Bolles, 1981), homography estimation (Hartley & Zisserman, 2003), etc. to extract correspondences between frames in open-sourced unannotated videos (see Figure 1). In other words, MIMIC produces a pretraining dataset for **m** asked **i** mage **m** odeling using **i** mage **c** orrespondences.
+
+We experiment with two scales: MIMIC-1M and MIMIC-3M, and show that they effectively train useful self-supervised (MAE and CroCo) representations when compared to MULTIVIEW-HABITAT. Our experiments show the following: Most importantly, representations learned from MIMIC3M, our automatically generated dataset, outperform those trained using ImageNet-1K Deng et al. (2009), an expensive human-labeled dataset on dense geometric tasks: depth estimation (NYUv2 (Nathan Silberman & Fergus, 2012)) and surface normals (Taskonomy (Zamir et al., 2018)); Second, MIMIC also trains better representations than MULTIVIEW-HABITAT Weinzaepfel et al. (2022), a baseline automatically generated dataset, on both dense geometric tasks, such as depth estimation (NYUv2) and surface normal prediction (Taskonomy), as well as on dense objectrelated tasks, such as semantic segmentation (ADE20K (Zhou et al., 2019)) and pose estimation (MSCOCO (Lin et al., 2014)). Third, larger pretraining dataset (MIMIC-3M _>_ MIMIC-1M) significantly improves performance, which is promising since our curation method can arbitrarily scale to produce even larger datasets. Finally, our representations demonstrate better few-shot performance on depth estimation (NYUv2) and semantic segmentation (ADE20K).
+
+## 2 RELATED WORK
+
+In this section, we discuss masked image modeling - a promising paradigm for self-supervised dense representation learning at scale and data curation methods for large-scale visual learning.
+
+**Masked image modeling.** Amongst masked image modeling, BEiT (Bao et al., 2021) proposes the pre-training task of recovering the visual tokens from a corrupted image, MAE (He et al., 2022) learns by masking patches of an image and inpainting the masked patches; MultiMAE extends MAE to a multi-task formulation (Bachmann et al., 2022). Their approach uses pseudo-labels–
+
+2
+
+hence, MultiMAE is not fully self-supervised. CroCo (Weinzaepfel et al., 2022) uses cross-view completion and ingests multi-view images. Their data curation method, though, uses 3D metadata and meshes of synthetic 3D environments; their dataset is also not publicly available. By contrast, MIMIC neither needs any pseudo labels extracted using supervised methods nor it needs any 3D meshes, point clouds, or camera parameters for dataset curation.
+
+**Data curation for large scale visual learning.** Large-scale image datasets have incredibly accelerated progress in visual learning. ImageNet-1K, with 1 _._ 2M images annotated by crowdsourcing led to several breakthroughs and is still a standard dataset used for pretraining vision models. It was manually designed to cover a diverse taxonomy of object categories with sufficient representation of instances per category. Unfortunately, this approach is extremely costly, not scalable, and serves as an upper bound for what is possible with manual curation instead of our automatic curation.
+
+Moreover, the efforts so far have been focused on high-level semantic tasks like classification, and large-scale pretraining datasets for dense prediction tasks such as MULTIVIEW-HABITAT with synthetic image pairs mined using Habitat simulator Savva et al. (2019) are not available publicly. MULTIVIEW-HABITAT uses annotations such as camera parameters and meshes to sample image pairs with a co-visibility threshold of 0.5. The use of such metadata for mining image pairs is a limiting factor as (1) it requires expensive sensors to obtain these annotations on real-world datasets (2) it cannot be scaled up to mine web-scale data sources where this information is not readily available.
+
+To address these challenges we propose a methodology for curating multi-view datasets using videos and 3D environments. We demonstrate that it is possible to use our data collection strategy and outperform on multiple dense vision tasks without making use of any explicit annotations.
+
+## 3 MIMIC: CURATING MULTI-VIEW IMAGE DATASET FOR DENSE VISION TASKS
+
+While CroCo recently utilized MULTIVIEW-HABITAT, a multi-view dataset, their dataset creation process requires the availability of 3D mesh, point cloud, or camera pose information for each scene. This dependency imposes limitations on the range of data sources that can be used for crafting a multi-view dataset. Unfortunately, there is currently no large-scale publicly available dataset to address this void. To bridge this gap, we introduce MIMIC.
+
+MIMIC can generate multi-view datasets from unannotated videos and 3D simulated environments. Any data source that contains multi-view information with static objects or at least with minimal object movement is a suitable data source. MIMIC works by cleverly combining traditional computer vision methods (Figure 1). The only mechanism our curation process requires is a sampling mechanism ( _I_ 1 _, I_ 2) _∼ g_ ( _S_ ), where _S_ is some data source from which _g_ ( _·_ ) samples two images _I_ 1 and _I_ 2. For example, _S_ can be a video from which _g_ ( _·_ ) samples two image frames. Or _S_ can be a synthetic 3D environment from which _g_ ( _·_ ) navigates to random spatial locations and samples two random image renderings of the same scene.
+
+**Identifying data sources.** We generate our MIMIC dataset from both real as well as synthetic data sources. We use DeMoN (Ummenhofer et al., 2017), ScanNet (Dai et al., 2017), ArkitScenes (Baruch et al., 2021), Objectron (Ahmadyan et al., 2021), CO3D (Reizenstein et al., 2021), Mannequin (Li et al., 2019), and 3DStreetView (Zamir et al., 2016) as real data sources. DeMoN is a dataset containing stereo image pairs. ScanNet and ArkitScenes contain videos from indoor environments. Objectron and CO3D are collections of videos containing objects. Mannequin provides a video dataset featuring individuals engaged in the mannequin challenge. 3DStreetView offers a collection of street images from multiple urban areas.
+
+We also source data from 3D indoor scenes in HM3D (Ramakrishnan et al., 2021a), Gibson (Xia et al., 2018), and Matterport (Chang et al., 2017) datasets, using the Habitat simulator (Savva et al., _·_ 2019). We initialize an agent randomly in the 3D environment and design _g_ ( ) to move the agent in random steps and directions. For each scene, the agent moves to numerous locations and captures various views. All our data sources with their distributions are visualized in Figure 2.
+
+**Mining potential pairs.** The primary characteristic of the image pairs in our dataset resides in their ability to capture the same scene or object from varying viewpoints while exhibiting a substantial degree of overlap. The dataset is designed to strike a balance: the overlap is not excessively large to
+
+3
+
+the point of containing identical images, rendering the pre-training task trivial; nor is it excessively small, resulting in disjoint image pairs that offer limited utility, making the task only self-completion. Particularly, we discard the image pairs with a visual overlap of less than 50% and more than 70%. We base this design decision on empirical ablations performed in CroCo. Their experiments suggest that cross-view completion offers no advantage if the visual overlap is outside of this range.
+
+In each video or scene, many image pairs can be generated. However, we focus on selecting a limited number of pairs that are more likely to meet our desired condition of having sufficient overlap. Nonetheless, not all of these candidate pairs may ultimately be chosen. For instance, when dealing with video data, a practical strategy involves creating a list of frames at regular time intervals, which depends on the video’s speed. By selecting consecutive frames from this list, potential pairs are generated. Conversely, collecting potential pairs in 3D scenes such as HM3D (Ramakrishnan et al., 2021a) or Gibson (Xia et al., 2018) presents greater challenges. Therefore, inspired by CroCo, we employ the habitat simulator (Savva et al., 2019) to capture comprehensive environment views. The agent undergoes random rotations and movements, exploring the scene from various perspectives. By capturing images during these random walks, we generate potential pairs for further analysis. The selection process involves filtering based on a specified overlap range (50% to 70%) and ensuring the inclusion of pairs with diverse viewpoints. However, our approach does not rely on additional annotations and solely utilizes the available images.
+
+## **Matching and measuring overlap.**
+
+Given a potential image pair capturing a scene, we employ the robust, and widely used SIFT features to localize key points in both images.
+
+After obtaining the key points and descriptors, we apply a brute-force matching technique to establish correspondences between the key points in the first image and those in the second image. More efficient methods, such as FLANN matcher (Muja & Lowe, 2009), may offer ( _≈_ 1 _._ 24 _×_ ) speedups. However, our initial exploration shows that brute-force matching yields better matches; also, extracting pairs is a one-time process. We further utilize these matches to estimate the homography matrix, us-
+
+**==> picture [239 x 109] intentionally omitted <==**
+
+Figure 2: Distribution of Data Sources (%). Real data sources, including DeMoN, ScanNet, ArkitScenes, Objectron, CO3D, Mannequin, and 3DStreetView, contribute to 32% of MIMIC. The remaining portion consists of synthetic sources, namely HM3D, Gibson, and Matterport.
+
+ing the RANSAC (Random Sample Consensus) algorithm to eliminate outliers. Note that the homography transformation holds true in three scenarios–(1) when capturing planar surfaces, (2) when capturing a distant scene, and (3) when a camera undergoes a pure rotation. In real-world videos, these assumptions may not always hold true. Regardless, homography serves as an approximation to the transformation. We further use this approximated matrix to filter out unwanted image pairs with no visual overlap.
+
+We then partition each image into non-overlapping patches of size _N × N_ , where _N_ is the patch size of the image encoder. We use _N_ = 16 for our experiments. For each patch in the first image, we search for the corresponding patch in the second image with the highest overlap. We randomly sample points within the first image and match them with their correspondences in the second image. Next, we map each patch in the first image to the patch with the highest number of matched correspondences in the second. Lastly, we measure visual overlap by calculating the total number of matched patches divided by all patches. Refer to the Appendix for more details.
+
+**Filtering out degenerate matches.** In our approach, the selection of image pairs is guided by the objective of capturing shared 3D information while mitigating redundancy. Hence, the desired pairs consist of images that depict the same objects or scenes from different perspectives. This characteristic enables the learning model to acquire valuable insights about the underlying 3D structure. However, it is crucial to avoid including pairs where one image is a zoomed-in version of the other, as such pairs provide limited additional information.
+
+4
+
+To address this concern, we modify the overlap metric used in the pair selection process. Specifically, we incorporate a criterion that prevents the inclusion of patches from the first image that have exact correspondences in the second image. Therefore, in the counting, we consider all patches that have the same corresponding patch in the second image as a single entity.
+
+**Overall statistics.** To understand the effect of data size we experiment with two scales. MIMIC1M, comprises a total of 1 _,_ 316 _,_ 199 image pairs, each capturing different scenes or objects from varying viewpoints. Among these pairs, 761 _,_ 751 are sourced from HM3D, 305 _,_ 197 from Gibson, 29 _,_ 658 from Matterport, 114 _,_ 729 from Mannequin, 22 _,_ 184 from DeMoN, 36 _,_ 433 from ScanNet, and 46 _,_ 250 from Objectron. We further expand the dataset to create a larger version, MIMIC-3M, to contain a total of 3 _,_ 163 _,_ 333 image pairs. This expansion involves augmenting the HM3D dataset with an additional 699 _,_ 322 pairs, the Gibson dataset with 351 _,_ 828 pairs, and the inclusion of new datasets such as ArkitScenes with 81 _,_ 189 pairs, CO3D with 133 _,_ 482 pairs, and 3DStreetViews with 579 _,_ 310 pairs. By incorporating these new datasets, we further enrich the diversity and quantity of image pairs available in our dataset.
+
+## 4 TRAINING WITH MIMIC
+
+To measure the effectiveness of MIMIC, we train two models with masked image modeling objectives and evaluate the utility of the learned representations on downstream dense prediction tasks. We compare against existing pretraining dataset alternatives.
+
+## 4.1 PRETRAINING
+
+We use MAE (He et al., 2022) and CroCo (Weinzaepfel et al., 2022) for pretraining. We follow the protocol from CroCo and use a ViT-B/16(Dosovitskiy et al., 2020) as a backbone for all our experiments with input images sizes of 224 _×_ 224. We train our models on 8 RTX A6000 GPUs for 200 epochs with a warmup of 20 epochs with a base learning rate of 1 _._ 5 _×_ 10 _[−]_[4] , an AdamW (Loshchilov & Hutter, 2017) optimizer with a cosine learning rate schedule, a weight decay of 0 _._ 05, and an effective batch size of 4096. Lastly, we evaluate these pretrained representations on a series of downstream dense prediction tasks.
+
+**MAE pretraining.** To understand the importance of including correspondences in the pretraining objective, we train MAE, which does not encode multi-view correspondences and treats each image in our image pairs independently. MAE masks out a large portion (75%) of the input patches of an image and uses an asymmetric encoder-decoder architecture to reconstruct the masked-out pixels. Specifically, it uses a ViT-based encoder to extract the latent representations of the masked view. Then it pads the output with the masked tokens and feeds it to a lightweight decoder. The decoder’s output reconstruction is optimized with an L2 loss. The reconstruction pixel targets are normalized by computing the mean and standard deviation of the image patches.
+
+**CroCo pretraining.** Unlike MAE, CroCo aims to encode relationships between the two views of the same scene from different viewpoints and learns to reason about the illumination and viewpoint changes. CroCo reconstructs a masked image input similar to MAE but supports the reconstruction process through an unmasked second reference view. CroCo masks 90% of the first image. CroCo uses the same ViT encoder as MAE, with shared weights to encode both views. The decoding cross-attends over the second view while reconstructing the first masked view.
+
+## 4.2 BASELINE DATASETS.
+
+We compare MIMIC with: ImageNet-1K (Deng et al., 2009) and MULTIVIEW-HABITAT (Weinzaepfel et al., 2022).
+
+**ImageNet-1K** is a widely used large-scale dataset with 1 _._ 2M training images. It was manually designed to cover a diverse taxonomy of a thousand object categories. The images were chosen to have sufficient instances per category. Therefore, ImageNet-1K serves almost as an upper bound for what is possible with immense human data-curation effort.
+
+**MULTIVIEW-HABITAT** comprises of synthetic renderings of indoor scenes collected using the 3D meshes available in the Habitat simulator (Savva et al., 2019). It is derived from HM3D (Ramakrish-
+
+5
+
+Table 1: For **dense geometric tasks** including depth estimation and surface normals estimation, CroCo pretrained with MIMIC-3M outperforms MAE and DINO on ImageNet-1K as well as MULTIVIEW-HABITAT. We report the results from the CroCo paper (marked with _[∗]_ ) as well as those with our task-specific fine-tuning setup adopted from MultiMAE.
+
+|Model Frozen Dataset|NYUv2 depth est. _δ_1(↑)|Taskonomy surface normal est. L1 (↓)|
+|---|---|---|
+|DINO ImageNet-1K MAE ImageNet-1K|81.45 85.1|65.64 59.20|
+|MAE ✓ MV-HABITAT MAE ✓ MIMIC-3M|- 80.65|- 68.97|
+|MAE MV-HABITAT MAE MIMIC-3M|79.00 **85.32**|59.76 **58.72**|
+|CroCo ✓ MV-HABITAT CroCo ✓ MIMIC-3M|85.20_∗_(84.66) **85.81**|64.58 **61.7**|
+|CroCo MV-HABITAT CroCo MIMIC-3M|85.60_∗_(90.19) **91.79** +1.6|54.13 **53.02** -1.11|
+
+nan et al., 2021b), ScanNet (Dai et al., 2017), Replica (Straub et al., 2019) and ReplicaCAD (Szot et al., 2021). This dataset is not available publicly. So, we compare against the released models trained on it. MULTIVIEW-HABITAT serves as our main baseline dataset since it is the only largescale multi-view dataset that has been used for training use representations for dense vision tasks.
+
+## 4.3 DOWNSTREAM TASKS, DATASETS, EVALUATION PROTOCOLS
+
+We evaluate our models on two dense geometric tasks: depth estimation and surface normal estimation. We also evaluate on two dense object-related tasks: semantic segmentation, and pose estimation. Finally, we report object classification numbers for completion. We provide below the details of the datasets, metrics, and protocols used for fine-tuning and evaluations.
+
+**Depth Estimation** involves estimating the depth of each pixel of an input image from the camera. For evaluation, we use the NYUv2 (Nathan Silberman & Fergus, 2012), a dataset of RGB images and their corresponding ground truth depth maps. It consists of 795 training and 654 test images of indoor scenes. We report the _δ_ 1 metric on the test images - which computes the percent of the pixels with error _max_ ( _yypigi[,] yypigi_[)][ less than][ 1] _[.]_[25][, where] _[ y][p][i]_[is the depth prediction and] _[ y][g][i]_[is the ground truth] of the _i_ th pixel of an image. We use DPT (Ranftl et al., 2021) head as in MultiMAE for finetuning.
+
+**Surface Normals Estimation** is a regression task that aims to estimate the orientation of a 3D surface. We use a subset of Taskonomy (Zamir et al., 2018) with 800 training images, 200 validation images, and 54 _,_ 514 test images. We use the L1 loss value on the test set as a metric for evaluations.
+
+**Semantic Segmentation** entails assigning a class to each pixel of an image based on its semantic category. We use ADE20K (Zhou et al., 2019), which consists of 20 _,_ 210 training images and 150 semantic categories. We report the mIOU which quantifies the percentage overlap between the predictions and the ground truth annotations. For finetuning, we use a segmentation head based on ConvNext (Liu et al., 2022) adapter.
+
+**Classification** is a high-level semantic task that involves assigning a category to an image based on its content. We use ImageNet-1K(Deng et al., 2009) which contains 1 _._ 28M training images and 50K validation images. This task allows us to measure how large the gap is when models are pretrained for dense tasks in mind. We follow the linear probing protocol from MAE and report accuracy.
+
+**Pose Estimation** involves detecting keypoints and their connections in an image. We use the MSCOCO (Lin et al., 2014) dataset for finetuning and report Average Precision and Average Recall on the validation set. Specifically, we adopt ViTPose-B (Xu et al., 2022) for finetuning.
+
+6
+
+## 5 EXPERIMENTS
+
+We evaluate our pre-trained models on two dense geometric vision tasks – depth estimation and surface normal prediction. MIMIC-3M’s dense representations outperform both tasks (§ 5.1). Next, we finetune our encoders for pixel-level tasks that also require object understanding – semantic segmentation, and pose estimation and high-level semantic tasks – image classification. For these three tasks, our experiments demonstrate that models trained using our automatically generated data close the gap with models trained on ImageNet-1K (§ 5.2). We further experiment with the data size used for pretraining and showcase that more data leads to improvements on depth estimation and semantic segmentation tasks (§ 5.3). Unlike CroCo trained on MULTIVIEW-HABITAT, our pre-trained models do not saturate or degrade over time on depth estimation and semantic segmentation (§ 5.4). Our performance benefits also hold as we vary the number of fine-tuning data points available for both depth estimation and semantic segmentation (§ 5.5) Finally, we find that our models produce higher-quality reconstructions using the pretraining decoder (§ 5.6).
+
+- 5.1 MIMIC-3M OUTPERFORMS MULTIVIEW-HABITAT AND IMAGENET-1K ON DENSE GEOMETRIC TASKS
+
+We finetune our trained models on two dense geometric tasks: NYUv2 depth estimation and Taskonomy surface normal prediction. We also finetune the CroCo models trained on MULTIVIEWHABITAT using task-specific decoders adopted from MultiMAE and report their improved results.
+
+Even though MIMIC-3M was generated automatically, without manual intervention, and uses no 3D annotations, representations pretrained on MIMIC-3M perform better on both dense geometric tasks (Table 1). These gains can be attributed to the inclusion of real sources–thanks to the flexibility of our method which allows us to use real-world videos of complex scenes as a data source.
+
+We also validate the utility of multi-view correspondences by comparing MAE with CroCo models. CroCo offers significant gains over MAE on MIMIC-3M demonstrating the benefits of using correspondences during pretraining (Table 1) . In fact, CroCo when trained on MIMIC-3M leads to the state-of-the-art _δ_ 1 of 91.79 NYUv2 depth and L1 of 53.02 on surface normals using masked image modeling methods.
+
+- 5.2 MIMIC-3M OUTPERFORMS THE MULTIVIEW-HABITAT AND REDUCES THE GAP TO IMAGENET-1K ON DENSE OBJECT TASKS.
+
+To understand the potential of MIMIC for dense tasks which also require object-level understanding, we evaluate MAE and CroCo pretrained with MIMIC-3M on ADE20K semantic segmentation and MSCOCO pose estimation (Table 2). We observe consistent gains in comparison to the MULTIVIEW-HABITAT. We hypothesize that these improvements come from the real-world objectcentric data from Objectron and Co3D. When compared to MULTIVIEW-HABITAT, MIMIC-3M reduces the performance gap by 7.36% with MAE and 2.64% with CroCo on manually curated, object-centric, and human-annotated ImageNet-1K.
+
+## 5.3 SCALING UP MIMIC LEADS TO PERFORMANCE GAINS
+
+We study the scaling trends of MIMIC by varying the data size. We experiment with two scales: the first MIMIC-1M with 1.3M image pairs and the second MIMIC-3M with 3.1M image pairs. We train CroCo with these two training sets and evaluate the performance on depth estimation (NYUv2), semantic segmentation (ADE20K), and surface normals (Taskonomy) (Table 3). We observe consistent improvements: _δ_ 1 by 2.33, mIOU on ADE20K by 3.73, and L1 loss by 4.10. We conjecture that the improvements occur because of the additional 1.8M image pairs added from three real datasets: CO3D, ArkitScenes, 3DStreetViews.
+
+## 5.4 MIMIC REPRENSETATIONS IMPROVE WITH MORE PRETRAINING ITERATIONS
+
+In contrast to models trained on MULTIVIEW-HABITAT, we do not observe performance saturation or degradation with pretraining iterations (see Figure 6 in their paper (Weinzaepfel et al., 2022)). Instead, the performance of both MIMIC-1M and MIMIC-3M improves on depth estimation and
+
+7
+
+Table 2: MIMIC-3M, our automatically generated dataset shows improvements over MULTIVIEWHABITAT on dense object-related tasks such as ADE20K semantic segmentation and MSCOCO pose estimation. It even improves on ImageNet-1K classification and further closes the gap with models pre-trained on ImageNet-1K, curated with expensive crowdsourcing.
+
+|Model Pretraining dataset|ADE-20K(↑) mIOU|MSCOCO(↑) AP AR|ImageNet-1K(↑)|
+|---|---|---|---|
+||||% accuracy|
+|MAE MV-HABITAT MAE MIMIC-3M|40.30 **40.54**|- - 69.13 75.22|32.50 **39.86**|
+|CroCo MV-HABITAT CroCo MIMIC-3M|40.60 **42.18** +1.58|66.50 73.20 **72.80** **78.40** +6.30 +5.20|37.00 **39.64** +2.64|
+|MAE ImageNet-1K|**46.10**|**74.90** **80.40**|**67.45**|
+
+Table 3: MIMIC-3M shows improvements over MIMIC-1M on depth estimation (NYUV2), Semantic Segmentation (ADE20K), Surface Normals Estimation (L1)
+
+|Dataset Frozen|NYUv2(↑) _δ_1|ADE20K(↑) mIOU|Taskonomy(↓)|
+|---|---|---|---|
+||||L1|
+|MIMIC-1M ✓ MIMIC-3M ✓|82.67 **85.81** +3.14|27.47 **30.25** +2.78|67.23 **61.70** -5.53|
+|MIMIC-1M MIMIC-3M|89.46 **91.79** +2.33|38.45 **42.18** +3.73|57.12 **53.02** -4.10|
+
+semantic segmentation (Figure 3(a)) for an iterations-matched training run. This trend holds regardless of whether the representations are fine-tuned or kept frozen.
+
+## 5.5 MIMIC-3M OUTPERFORMS MULTIVIEW-HABITAT WITH FEW-SHOT FINETUNING
+
+We measure the label efficiency of the learned representations trained on MIMIC-3M by evaluating its few-shot performance on NYUv2 depth estimation and ADE20K semantic segmentation. We freeze the image encoder and fine-tune the task-specific decoders by varying the number of training images. We run each k-shot finetuning at least 5 times and report the mean and the standard deviation of the runs. For depth estimation, we also experimented with k-shot regimes where k is less than 10. Overall the representations trained on our MIMIC-3M show better labeling efficiency than those trained using MULTIVIEW-HABITAT (Figure 3(b)). These gains can be attributed to the diverse, and real world training data during pretraining.
+
+## 5.6 MIMIC ACHIEVES HIGHER FID SCORE AND LOWER RECONSTRUCTION ERROR
+
+We analyze the quality of the reconstructions trained on MIMIC-3M versus MULTIVIEWHABITAT. We use FID scores (Heusel et al., 2017), which indicate how realistic the reconstructions are and the reconstruction error (L2 loss) in the original masked image modeling objective. We sample a test set of 500 images from the Gibson dataset. We ensure that these images are sampled from the scenes that are exclusive of MULTIVIEW-HABITAT and MIMIC-3M pretraining datasets. We mask 90% of each test image and then compare the quality of the reconstructions (Table 4). Our analysis shows that CroCo trained on MIMIC-3M improves the FID by 12 _._ 65 points and reduces the reconstruction loss on the test set (see Appendix for visualizations).
+
+8
+
+**==> picture [400 x 148] intentionally omitted <==**
+
+**----- Start of picture text -----**
+NYUv2 dataset ADE20K dataset NYUv2 dataset ADE20K dataset 92 finetuned 42 finetuned Multiview-Habitat 30 Mu l t i v i ew-Ha bi tat frozen frozen 80 MIMIC-3M MIMIC-3M 40 90 25 38 70 88 20 36 60 86 34 15 50 32 84 10 30 40 82 28 5 30 50 100 150 200 50 100 150 200 10 [0] 10 [1] 10 [2] 10 [3] 10 [2] 10 [3] 10 [4] Number of epochs Number of epochs Training samples seen Training samples seen (a) (b) delta 1 mIOU delta 1 mIOU **----- End of picture text -----**
+
+Figure 3: **(a)** CroCo pretrained on MIMIC shows an increasing trend with the number of training epochs. The figure on the left shows the trends for the fine-tuned and frozen versions of the encoder on NYUv2 depth estimation. The figure on the right shows the trend on the ADE20K dataset. **(b)** CroCo pretrained on MIMIC-3M achieves better few shot performance on CroCo pretrained on MULTIVIEW-HABITAT. The figure on the left shows the few shot performance on the NYUv2 dataset and the figure on the right shows the few shot performance on ADE20K.
+
+Table 4: MIMIC-3M achieves better FID score and reduces the reconstruction loss on 500 test images from the Gibson dataset compared to MULTIVIEW-HABITAT
+
+|Model|Dataset|Reconst. loss (↓)|FID score (↓)|
+|---|---|---|---|
+|CroCo|MV-HABITAT|0.357|85.77|
+|CroCo|MIMIC-3M|**0.292**|**73.12**|
+
+6 DISCUSSION
+
+We present MIMIC, an approach to curate large-scale pretraining datasets from real-world videos and synthetic environments, geared towards dense vision tasks. Our work aims to provide a holistic solution that requires no manual intervention and domain knowledge about the data sources. We discuss below the limitations and safety considerations regarding our dataset and lay out opportunities for future work.
+
+**Limitations.** There are several limitations of our work. First, we pretrain CroCo on MIMIC-3M using a fixed-sized architecture ViT-B/16; model scaling experiments are outside the scope of this work. Second, our curated dataset primarily consists of static objects and does not involve dynamic scenes. Lastly, MIMIC-3M has a small amount of object-centric data, and its suitability for objectrelated tasks is limited. Including more object-centric sources may help bridge this gap.
+
+**Safety and ethical considerations.** While our method uses publicly available datasets for data curation, we acknowledge that the algorithm can be scaled up to scrape videos in the wild. We are aware of the privacy, and ethical issues caused by models trained on large-scale datasets and the amplification of the biases these models may result in. As such, we ensure to limit our data sources to only open-sourced video datasets. Lastly, we recommend the use of face blurring and NSFW filtering before scraping internet videos.
+
+**Future work.** We would like to design methodologies to mine dynamic videos where epipolar geometric constraints do not apply, design new objectives for pretraining on image pairs curated using MIMIC, and evaluate representations on more diverse tasks. The flexibility of MIMIC makes it suitable for further scaling it up to even larger pretraining datasets.
+
+9
+
+## REFERENCES
+
+- Adel Ahmadyan, Liangkai Zhang, Artsiom Ablavatski, Jianing Wei, and Matthias Grundmann. Objectron: A large scale dataset of object-centric videos in the wild with pose annotations. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , pp. 7822–7831, June 2021.
+
+- Roman Bachmann, David Mizrahi, Andrei Atanov, and Amir Zamir. Multimae: Multi-modal multitask masked autoencoders. In _Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXXVII_ , pp. 348–367. Springer, 2022.
+
+- Hangbo Bao, Li Dong, Songhao Piao, and Furu Wei. Beit: Bert pre-training of image transformers. _arXiv preprint arXiv:2106.08254_ , 2021.
+
+- Gilad Baruch, Zhuoyuan Chen, Afshin Dehghan, Tal Dimry, Yuri Feigin, Peter Fu, Thomas Gebauer, Brandon Joffe, Daniel Kurz, Arik Schwartz, and Elad Shulman. ARKitscenes - a diverse realworld dataset for 3d indoor scene understanding using mobile RGB-d data. In _Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1)_ , 2021. URL [URL removed]
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020.
+
+- Mathilde Caron, Hugo Touvron, Ishan Misra, Herv´e J´egou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 9650–9660, 2021.
+
+- Angel Chang, Angela Dai, Thomas Funkhouser, Maciej Halber, Matthias Niessner, Manolis Savva, Shuran Song, Andy Zeng, and Yinda Zhang. Matterport3d: Learning from rgb-d data in indoor environments. _International Conference on 3D Vision (3DV)_ , 2017.
+
+- Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In _International conference on machine learning_ , pp. 1597–1607. PMLR, 2020.
+
+- Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In _Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2016.
+
+- Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 5828–5839, 2017.
+
+- Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In _2009 IEEE conference on computer vision and pattern recognition_ , pp. 248–255. Ieee, 2009.
+
+- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. _arXiv preprint arXiv:2010.11929_ , 2020.
+
+- Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. _Communications of the ACM_ , 24 (6):381–395, 1981.
+
+- Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In _Conference on Computer Vision and Pattern Recognition (CVPR)_ , 2012.
+
+- Richard Hartley and Andrew Zisserman. _Multiple view geometry in computer vision_ . Cambridge university press, 2003.
+
+10
+
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 9729–9738, 2020.
+
+- Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Doll´ar, and Ross Girshick. Masked autoencoders are scalable vision learners. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 16000–16009, 2022.
+
+- Richard Held and Alan Hein. Movement-produced stimulation in the development of visually guided behavior. _Journal of comparative and physiological psychology_ , 56(5):872, 1963.
+
+- Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. _Advances in neural information processing systems_ , 30, 2017.
+
+- Dinesh Jayaraman and Kristen Grauman. Learning image representations tied to ego-motion. In _Proceedings of the IEEE International Conference on Computer Vision (ICCV)_ , December 2015.
+
+- Zhengqi Li, Tali Dekel, Forrester Cole, Richard Tucker, Noah Snavely, Ce Liu, and William T Freeman. Learning the depths of moving people by watching frozen people. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 4521–4530, 2019.
+
+- Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Doll´ar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In _Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13_ , pp. 740–755. Springer, 2014.
+
+- Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A convnet for the 2020s. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 11976–11986, 2022.
+
+- Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. _arXiv preprint arXiv:1711.05101_ , 2017.
+
+- David G Lowe. Distinctive image features from scale-invariant keypoints. _International journal of computer vision_ , 60:91–110, 2004.
+
+- Marius Muja and David G. Lowe. Fast approximate nearest neighbors with automatic algorithm configuration. In _International Conference on Computer Vision Theory and Applications_ , 2009. URL [URL removed]
+
+- Pushmeet Kohli Nathan Silberman, Derek Hoiem and Rob Fergus. Indoor segmentation and support inference from rgbd images. In _ECCV_ , 2012.
+
+- Nancy Rader, Mary Bausano, and John E Richards. On the nature of the visual-cliff-avoidance response in human infants. _Child development_ , pp. 61–68, 1980.
+
+- Santhosh K Ramakrishnan, Aaron Gokaslan, Erik Wijmans, Oleksandr Maksymets, Alex Clegg, John Turner, Eric Undersander, Wojciech Galuba, Andrew Westbury, Angel X Chang, et al. Habitat-matterport 3d dataset (hm3d): 1000 large-scale 3d environments for embodied ai. _arXiv preprint arXiv:2109.08238_ , 2021a.
+
+- Santhosh Kumar Ramakrishnan, Aaron Gokaslan, Erik Wijmans, Oleksandr Maksymets, Alexander Clegg, John M Turner, Eric Undersander, Wojciech Galuba, Andrew Westbury, Angel X Chang, Manolis Savva, Yili Zhao, and Dhruv Batra. Habitat-matterport 3d dataset (HM3d): 1000 largescale 3d environments for embodied AI. In _Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track_ , 2021b. URL [URL removed] 2109.08238.
+
+- Ren´e Ranftl, Alexey Bochkovskiy, and Vladlen Koltun. Vision transformers for dense prediction. In _Proceedings of the IEEE/CVF International Conference on Computer Vision_ , pp. 12179–12188, 2021.
+
+11
+
+- Jeremy Reizenstein, Roman Shapovalov, Philipp Henzler, Luca Sbordone, Patrick Labatut, and David Novotny. Common objects in 3d: Large-scale learning and evaluation of real-life 3d category reconstruction. In _International Conference on Computer Vision_ , 2021.
+
+- Manolis Savva, Abhishek Kadian, Oleksandr Maksymets, Yili Zhao, Erik Wijmans, Bhavana Jain, Julian Straub, Jia Liu, Vladlen Koltun, Jitendra Malik, Devi Parikh, and Dhruv Batra. Habitat: A platform for embodied ai research. In _Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)_ , October 2019.
+
+- Nathan Silberman, Derek Hoiem, Pushmeet Kohli, and Rob Fergus. Indoor segmentation and support inference from rgbd images. In _European Conference on Computer Vision_ , 2012.
+
+- Julian Straub, Thomas Whelan, Lingni Ma, Yufan Chen, Erik Wijmans, Simon Green, Jakob J. Engel, Raul Mur-Artal, Carl Ren, Shobhit Verma, Anton Clarkson, Mingfei Yan, Brian Budge, Yajie Yan, Xiaqing Pan, June Yon, Yuyang Zou, Kimberly Leon, Nigel Carter, Jesus Briales, Tyler Gillingham, Elias Mueggler, Luis Pesqueira, Manolis Savva, Dhruv Batra, Hauke M. Strasdat, Renzo De Nardi, Michael Goesele, Steven Lovegrove, and Richard Newcombe. The Replica dataset: A digital replica of indoor spaces. _arXiv preprint arXiv:1906.05797_ , 2019.
+
+- Andrew Szot, Alexander Clegg, Eric Undersander, Erik Wijmans, Yili Zhao, John Turner, Noah Maestre, Mustafa Mukadam, Devendra Singh Chaplot, Oleksandr Maksymets, et al. Habitat 2.0: Training home assistants to rearrange their habitat. _Advances in Neural Information Processing Systems_ , 34:251–266, 2021.
+
+- Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, and Thomas Brox. Demon: Depth and motion network for learning monocular stereo. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 5038–5047, 2017.
+
+- Philippe Weinzaepfel, Vincent Leroy, Thomas Lucas, Romain Br´egier, Yohann Cabon, Vaibhav Arora, Leonid Antsfeld, Boris Chidlovskii, Gabriela Csurka, and J´erˆome Revaud. Croco: Self-supervised pre-training for 3d vision tasks by cross-view completion. _arXiv preprint arXiv:2210.10716_ , 2022.
+
+- Fei Xia, Amir R Zamir, Zhiyang He, Alexander Sax, Jitendra Malik, and Silvio Savarese. Gibson env: Real-world perception for embodied agents. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 9068–9079, 2018.
+
+- Yufei Xu, Jing Zhang, Qiming Zhang, and Dacheng Tao. Vitpose: Simple vision transformer baselines for human pose estimation. _arXiv preprint arXiv:2204.12484_ , 2022.
+
+- Amir R Zamir, Tilman Wekel, Pulkit Agrawal, Colin Wei, Jitendra Malik, and Silvio Savarese. Generic 3d representation via pose estimation and matching. In _Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part III 14_ , pp. 535–553. Springer, 2016.
+
+- Amir R. Zamir, Alexander Sax, William B. Shen, Leonidas J. Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. In _IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ . IEEE, 2018.
+
+- Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Semantic understanding of scenes through the ade20k dataset. _International Journal of Computer Vision_ , 127:302–321, 2019.
+
+## A APPENDIX
+
+## B DATASET, RESOURCES, ASSETS
+
+## B.1 DATASET USAGE
+
+The code and instructions to download, access, and use MIMIC-3M can be found here. The primary use case of this dataset is to train a 3D-aware ViT in a self-supervised manner.
+
+12
+
+## B.2 COMPUTE RESOURCES
+
+As mentioned in Section 4.1 (Pretraining) we train CroCo (Weinzaepfel et al., 2022) for 200 epochs, each epoch taking about 1 hour 40 minutes using 8 NVIDIA RTX A6000 GPUs. The cost for one training run is about 111 GPU days.
+
+## B.3 ASSETS
+
+We provide the details of the dataset and code licenses used in our study in Table5. We bear all responsibility in case of violation of rights. Our code is primarily based on MAE (He et al., 2020), MultiMAE (Bachmann et al., 2022) and CroCo (Weinzaepfel et al., 2022) and our work is licensed under CC BY-NC-SA 4.0.
+
+Table 5: List of the assets and licenses
+
+|Asset|License|
+|---|---|
+|**Pretraining datasets**||
+|HM3D (Ramakrishnan et al., 2021a)|[link]|
+|Gibson (Xia et al., 2018)|[link]|
+|3DStreetView (Zamir et al., 2016)|[link]|
+|CO3D (Reizenstein et al., 2021)|[link]|
+|Mannequin (Li et al., 2019)|[link]|
+|ArkitScenes (Baruch et al., 2021)|[link]|
+|Objectron (Ahmadyan et al., 2021)|[link]|
+|ScanNet (Dai et al., 2017)|[link]|
+|Matterport (Chang et al., 2017)|[link]|
+|DeMoN (Ummenhofer et al., 2017)|[link]|
+|**Downstream datasets**||
+|ImageNet-1K (Deng et al., 2009)|[link]|
+|NYUv2 (Nathan Silberman & Fergus, 2012)|[link]|
+|ADE20K (Zhou et al., 2019)|[link]|
+|Taskonomy (Zamir et al., 2018)|[link]|
+|MSCOCO (Lin et al., 2014)|[link]|
+|**Code/Pretrained models**||
+|MAE (He et al., 2022)|[link]|
+|CroCo (Weinzaepfel et al., 2022)|[link]|
+|MultiMAE (Bachmann et al., 2022)|[link]|
+
+## C DATA CURATION DETAILS
+
+## C.1 DETAILS ON MINING POTENTIAL PAIRS
+
+We utilized different data types within our datasets, including videos, 3D scenes, and street views. Consequently, the process of mining potential pairs for each data type varied. For street views (Zamir et al., 2016), we adopted a strategy where we grouped images based on their target id (images that have the same target id in their name, show the same physical point in their center). Subsequently, among all possible combinations of images in a group, we selected the pair with minimal overlap ranging from 50% to 70%.
+
+When dealing with video data, a practical approach involved creating a list of frames at regular time intervals, determined by the speed of the video. Then, we generated pairs of consecutive frames from this list. In cases where substantial overlap between consecutive frames was observed, we specifically chose the second consecutive frame and evaluated its overlap with the preceding frame. We implemented this step to ensure that the selected frame pair exhibits an appropriate level of dissimilarity and minimized redundancy.
+
+To tackle the challenges associated with handling 3D scenes, we employed the habitat simulator (Savva et al., 2019) to sample locations within the navigable area of the scene. We initialized an agent with a random sensor height and rotated it eight times at 45 _[◦]_ intervals, capturing a comprehensive view of the surroundings to form the first list of eight images. Subsequently, we sampled
+
+13
+
+a random rotation degree from multiples of 60 _[◦]_ (excluding 180 _[◦]_ and 360 _[◦]_ ), and rotated the agent accordingly before moving in the current direction for a random step ranging from 0.5 to 1 meter. We repeated the process of rotating eight times at 45 _[◦]_ intervals, capturing the second list of eight images. Likewise, we randomly rotated and moved the agent to generate the third list of eight images. From these lists, we selected an optimal pair ( _img_ 1 _, img_ 2) from a pool of 8 _×_ 16 potential pairs. _img_ 1 belonged to the first list, while _img_ 2 was chosen from the combined pool of the second and third lists, with a minimal overlap ranging from 50% to 70%, if applicable.
+
+The selection of a 45 _[◦]_ rotation aimed to capture a comprehensive view of the environment while minimizing redundancy. Furthermore, the choice of rotation degrees as multiples of 60 _[◦]_ prevented capturing images in directions already covered by those obtained with the 45 _[◦]_ rotation, effectively avoiding the capture of zoomed-in versions of previously acquired images.
+
+## C.2 DETAILS ON MEASURING THE OVERLAP
+
+Given a pair of images or views from a scene (we call it a potential pair), we checked whether these two are sufficiently overlapped during the six steps. If they had enough overlap, we saved this pair along with other metadata for the next phase, which was the model pretraining. The six steps are listed below:
+
+**Keypoint localization using SIFT (Lowe, 2004).** We used SIFT (Scale-Invariant Feature Transform) as a feature detector to localize the two views’ key points separately. SIFT has been shown to perform well compared to other traditional methods. Figure 4a provides an example pair with key points.
+
+**==> picture [199 x 112] intentionally omitted <==**
+
+**==> picture [199 x 114] intentionally omitted <==**
+
+**==> picture [213 x 8] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 4: **(a)** A pair of images with SIFT key points. **(b)** Matching key points of images with a brute force matcher.
+
+**==> picture [198 x 113] intentionally omitted <==**
+
+**==> picture [199 x 113] intentionally omitted <==**
+
+**==> picture [213 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 5: **(a)** Inlier matches after finding the homography matrix. **(b)** Dividing each image to nonoverlapping patches.
+
+**Brute force matching.** Having obtained both key point features and their descriptors from the previous step, we performed a brute-force matching process to match the key points in the first view (source points) with the key points in the second view (destination points). We present matches between two views in Figure 4b.
+
+14
+
+**==> picture [198 x 131] intentionally omitted <==**
+
+**==> picture [199 x 134] intentionally omitted <==**
+
+**==> picture [213 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 6: **(a)** Sampling random points from a patch in the first view. **(b)** Blue points are the corresponding points of the green points in the second view.
+
+**==> picture [199 x 110] intentionally omitted <==**
+
+**==> picture [199 x 110] intentionally omitted <==**
+
+**==> picture [213 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 7: **(a)** The green patch from the view 1 is matched with the blue patch in view 2. **(b)** Two views with their matching patches (matching patches have the same color).
+
+15
+
+**Finding homography transformation (Hartley & Zisserman, 2003).** We leveraged the homography (Hartley & Zisserman, 2003) matrix to translate the transformation among the views with provided source and destination points matches from the previous step. However, we know the found transformation is not thoroughly accurate and free of errors. Therefore, to overcome this issue, we used RANSAC (Fischler & Bolles, 1981) to conclude with better estimations of the transformation. As a result, only some of the matches was categorized as inliers. Inlier matches are shown in Figure 5a
+
+**Creating non-overlapping patches.** After finding the homography matrix, we divided each view into non-overlapping patches (16 _×_ 16 here) and matched patches from view 1 to view 2, see Figure 5b.
+
+**Obtaining the patch correpondences** To find a corresponding patch in the second view for a particular patch in the first view, we performed the following steps: 1. Randomly sampled a suitable number of points within the specific patch in the first view (e.g., 100 points). In Figure 6a, random green points are sampled within the green patch of the first view. 2. Applied the homography matrix _H_ to the sampled points to determine their corresponding positions in the second view. 3. Determined the patch number in which each corresponding point falls, such as _patch_ ( _x_ = 17 _, y_ = 0) = 1. 4. Identified the patch that contains the maximum number of corresponding points as the match for the specific patch in the first image. In Figure 6b, the blue points represent the positions of the corresponding points in the second view that fall within nearby patches. It can be observed that the majority of the blue points cluster within a specific patch, which is marked as the matched patch for the green patch. This match is illustrated in Figure 7a.
+
+**Measuring the visual overlap** We repeated the procedure from the previous step for all patches in the first view to determine their matches in the second view. We computed the count of patches in the first view that have a matching patch within the boundaries of the second view, provided that the matching patch has not been previously matched with another patch from the first view. Then, we divided this count by the total number of patches, serving as a metric to measure the overlap.
+
+To ensure a comprehensive evaluation, we performed the mentioned algorithm both for finding _overlap_ ( _view_ 1 _, view_ 2) and its inverse, _overlap_ ( _view_ 2 _, view_ 1). We chose the minimum value between these two overlap metrics as the final overlap measure.
+
+Subsequently, we retained pairs with an overlap ranging from 50% to 75% along with corresponding patches information. Figure 7b showcases all patches from the first view that have their matches falling within the second view. Additionally, Figure 8 provides an illustrative example of a retained pair of images from each dataset, along with their corresponding patches.
+
+## D DOWNSTREAM TASKS
+
+## D.1 FINETUNING DETAILS
+
+For fine-tuning depth estimation, semantic segmentation, and surface normal estimation we adopt the task-specific decoders from MultiMAE Bachmann et al. (2022). For pose estimation, we use the ViTPose Xu et al. (2022) decoders. In Table 6 , we provide the details of the hyperparameters used for finetuning CroCo (Weinzaepfel et al., 2022) pretrained on MIMIC-3M on NYUv2 (Nathan Silberman & Fergus, 2012), ADE20K (Zhou et al., 2019), Taskonomy (Zamir et al., 2018), MSCOCO (Lin et al., 2014).
+
+## D.2 ERROR ESTIMATES
+
+To estimate the variability associated with our fine-tuned models we compute the error estimates for each of our fine-tuned models. Specifically, we create 100 test sets from each of the downstream (val/test) datasets by sampling with replacement and then report the minimum, maximum, mean, and standard deviation of the metric in Table 7. Overall we observe that the mean values are close to the numbers reported in the main paper and the standard deviation is small.
+
+16
+
+**==> picture [298 x 351] intentionally omitted <==**
+
+Figure 8: Visualizations of the patchwise correspondences (matching patches have the same color).
+
+Table 6: Hyperparameters used for fine-tuning NYUv2 (depth estimation), ADE20K (semantic segmentation), Taskonomy (surface normals)
+
+|Hyperparameter|NYUv2(depth)|ADE20K(sem.seg.)|Taxonomy (surf.norm.)|MSCOCO(pos.est.)|
+|---|---|---|---|---|
+|Optimizer|AdamW|AdamW|AdamW|AdamW|
+|Learning rate|0.0001|0.0005|0.0003|0.0005|
+|Layer-wise lr decay|0.75|0.75|0.75|0.75|
+|Weight decay|0.0003|0.05|0.05|0.1|
+|Adam_β_|(0.9, 0.999)|(0.9, 0.999)|(0.9, 0.999)|(0.9, 0.999)|
+|Batch size|64|16|8|512|
+|Learning rate schedule.|Cosine decay|Cosine decay|Cosine decay|Linear Decay|
+|Training epochs|2000|64|100|210|
+|Warmup learning rate|-|0.000001|0.000001|0.001|
+|Warmup epochs|100|1|5|500|
+|Input resolution|256_×_256|512_×_512|384_×_384|224_×_224|
+|Augmentation|ColorJitter, RandomCrop|HorizontalFlip, ColorJitter|-|TopDownAffne|
+|Drop path|0.0|0.1|0.1|0.30|
+
+## D.3 VISUALIZATIONS OF THE FINE-TUNED MODELS
+
+In this section, we provide the visualizations of the depth maps, semantic segmentation masks, surface normal predictions, and pose regression outputs after finetuning CroCo pretrained using MIMIC-3M. For finetuning NYUv2 for depth, ADE20K for semantic segmentation, and Taskonomy for surface normals, we followed MultiMAE (Bachmann et al., 2022) and used the settings from D.1. For finetuning on MS COCO we used ViTPose (Xu et al., 2022).
+
+17
+
+Table 7: Error estimates for fine-tuning NYUv2 depth, ADE20K semantic segmentation, Taskonomy surface normal prediction
+
+|Task(metric)|Dataset (Val/Test)|Min|Max|Standard Deviation|Mean|Reported value|
+|---|---|---|---|---|---|---|
+|Depth Estimation (_δ_1)|NYUv2 (Silberman et al., 2012)|90.17|92.91|0.56|91.70|91.79|
+|Semantic Segmentation (mIOU)|ADE20K (Zhou et al., 2019)|39.75|43.36|0.75|41.71|42.18|
+|Surface Normal Estimation (L1)|Taxonomy (Zamir et al., 2018)|48.28|54.09|1.24|50.78|53.02|
+
+**Depth Estimation.** Figure 9 shows the input RGB file, predicted depth maps, and ground truth depth maps from the validation set after finetuning on NYUv2.
+
+**Semantic Segmentation.** Figure 10 shows the RGB images, predicted semantic segmentations, and the ground truth labels from the ADE20K validation set after finetuning.
+
+**Surface Normals.** Figure 11 shows predicted surface normals from the Taskonomy test set after finetuning.
+
+**Pose estimation.** Figure 12 shows the predicted keypoints from MS COCO validation set after finetuning.
+
+18
+
+**==> picture [358 x 605] intentionally omitted <==**
+
+Figure 9: Visualizations of the depth maps
+
+19
+
+**==> picture [358 x 617] intentionally omitted <==**
+
+Figure 10: Visualizations of the segmentation maps
+
+20
+
+**==> picture [358 x 605] intentionally omitted <==**
+
+Figure 11: Visualizations of the surface normal predictions
+
+21
+
+**==> picture [358 x 351] intentionally omitted <==**
+
+Figure 12: Visualizations of the pose estimation
+
+22
+
diff --git a/open_review/iclr2024_8579.json b/open_review/iclr2024_8579.json
new file mode 100644
index 0000000000000000000000000000000000000000..f261bb3e74abb72ca29132851162f95e9b376585
--- /dev/null
+++ b/open_review/iclr2024_8579.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8579",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Semi-Supervised Learning of Tree-Based Models Using Uncertain Interpretation of Data",
+ "abstract": "Semi-supervised learning (SSL) learns an estimator from labeled and unlabeled data. While diverse methods based on various assumptions have been developed for parametric models, SSL for tree-based models is largely limited to variants of self-training, for which decision trees are not well-suited. We introduce an intrinsic semi-supervised learning algorithm that achieves state-of-the-art performance for tree-based models. The algorithm first grows a tree to minimize a semi-supervised notion of impurity, then assigns leaf values using a leaf similarity graph to optimize either for smoothness or adversarial robustness of the estimator near the data. Our methods can be viewed as natural extensions of conventional tree induction methods emerging from an uncertain interpretation of model input, or alternatively as inductive tree-based approximations of well-established graph-based SSL algorithms.",
+ "rebuttal": "### Acknowledgment of reviews and plan for revision\nThanks to all the reviewers for your constructive feedback. We are incorporating as much as we can into a revision that we will upload as soon as it is ready.\n\nWe are replying to each of the reviewers to address their comments and start a discussion to gather more feedback.\n\nThe biggest change will be adding several experimental baselines requested by reviewers and switching to inductive rather than transductive evaluation of performance, for which we cannot include label propagation as a baseline. Some of the requested baselines do not have public implementations available, and while we will do our best to include these, we cannot guarantee our ability to create a working implementation of all of them. It will also take us some time to implement and test these.\n\nWe will also make requested changes to the text, including adding related works, expanding the discussion of them, fixing some typos and unclear mathematical statements, and making some other requested changes.\n\n### Gathering feedback for a future submission\nThanks again to all the reviewers for your comments.\n\nWe have decided to target a future venue so that we have enough time to fully incorporate all the feedback from these reviews. We would appreciate any follow-up comments on our revision plans and answers to our clarifying questions before the discussion period closes.\n\n### Response to review\nIn response to weaknesses:\n\nWe are now including as baselines fully supervised KDDTs and semi-supervised PCTs, which are the contributing components that can be used on their own. Thanks for this suggestion.\n\nWe believe that improved performance, sometimes by a large margin, is a strong case for the value of the work. Beyond that, we do have reduced computational complexity in the number of samples compared to purely graph-based methods, and we implement similar assumptions while producing a predictive model which is tree-based and has additional utility as a result. We [...]\n\n### Response to review\nIn response to weaknesses:\n\nIn what way can we improve the presentation of existing work? We have referenced, summarized, and described the relationship of our work to other works with related methods. Besides some notational corrections and clarifications, we believe our presentation of the proposed approach is sufficiently formalized - are there specific concerns we can address? We also have a clear sectional structure describing the components of the method. Please let us know if there was confusion, and how we can make it clearer.\n\nWithin each section, we motivate th [...]\n\n### Response to review\nIn response to weaknesses:\n\n- We were not aware of this paper - thanks for pointing it out. We will include it in the discussion of related work. We would point out that our method does *not* construct a similarity graph over the data, but over the leaves; we never compute distance between any two data instances. Also, the tree-based simplification of the implied similarity score, as described in Lemma 1, is one of the reasons we think our method can perform better than a conventional graph-based approach. We will point out these differences in the revision.\n- As far as [...]\n\n### Response to review\nIn response to weaknesses:\n\nWe do not expect consistent advantage for any semi-supervised method. As we stated in the text, the performance of a semi-supervised learning algorithm largely depends on how well its underlying assumptions apply to the data. This is why different methods do well on different data, and why it is common for even well-accepted methods to do worse than purely supervised learning on some data sets. The fact that ours is the best by a notable margin on many data sets is the best we can reasonably expect and is certainly, we believe, enough to demon [...]\n\n### Thanks\nThanks for the additional feedback.\n\nWe had planned a revised version, but we have decided instead to target a future venue so that we have enough time to fully incorporate all the feedback from these reviews.",
+ "initial_scores": [
+ 3,
+ 3,
+ 5,
+ 3
+ ],
+ "score_mean": 3.5,
+ "score_variance": 1,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "",
+ "forum_id": "ppTAQRu8EJ",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_HSUS",
+ "review_id": "rhL1DLLbpT",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 4,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3227,
+ "edit_detected": true,
+ "edit_delta_seconds": 827539,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_e7qU",
+ "review_id": "nuTz4DfJu6",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 5
+ },
+ "review_text_chars": 2995,
+ "edit_detected": true,
+ "edit_delta_seconds": 945540,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_YpyQ",
+ "review_id": "DCwuvEy4Kr",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 4089,
+ "edit_detected": true,
+ "edit_delta_seconds": 1737074,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ExDS",
+ "review_id": "4hprBWrQbp",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 2813,
+ "edit_detected": true,
+ "edit_delta_seconds": 1948033,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8579.md b/open_review/iclr2024_8579.md
new file mode 100644
index 0000000000000000000000000000000000000000..ae9eeddd50a4c649b2c8e6452940b4178d7fdd98
--- /dev/null
+++ b/open_review/iclr2024_8579.md
@@ -0,0 +1,359 @@
+
+
+## - SEMI-SUPERVISED LEARNING OF TREE-BASED MOD ELS USING UNCERTAIN INTERPRETATION OF DATA
+
+Authors withheld for review
+
+## ABSTRACT
+
+Semi-supervised learning (SSL) learns an estimator from labeled and unlabeled data. While diverse methods based on various assumptions have been developed for parametric models, SSL for tree-based models is largely limited to variants of self-training, for which decision trees are not well-suited. We introduce an intrinsic semi-supervised learning algorithm that achieves state-of-the-art performance for tree-based models. The algorithm first grows a tree to minimize a semi-supervised notion of impurity, then assigns leaf values using a leaf similarity graph to optimize either for smoothness or adversarial robustness of the estimator near the data. Our methods can be viewed as natural extensions of conventional tree induction methods emerging from an uncertain interpretation of model input, or alternatively as inductive tree-based approximations of well-established graphbased SSL algorithms.
+
+## 1 INTRODUCTION
+
+In applications of supervised machine learning, there is often copious data available, but labeling the data accurately is expensive. This motivates semi-supervised learning (SSL), which combines strategies from supervised and unsupervised learning to learn a predictive model from labeled and unlabeled data. It does this by leveraging some underlying assumption that informs the use of unlabeled data, such as clusterability, smoothness, or separability of the data. Effective SSL can greatly reduce the amount of labeled data needed to achieve a particular level of performance.
+
+Tree-based models such as decision trees, random forests (Breiman, 2001), ExtraTrees (Geurts et al., 2006), and XGBoost (Chen & Guestrin, 2016) are popular in real-world applications of supervised machine learning for various reasons including ease of use, low resource requirements, very fast inference, reliably good performance on tabular data, and relatively good interpretability. However, most SSL methods are designed for parametric models, so SSL for tree-based models is largely limited to model-agnostic wrapper methods such as self-training (Triguero et al., 2015), for which tree-based models are not even well-suited (van Engelen & Hoos, 2020). This lack of options also limits the choice of assumption that drives the SSL process.
+
+A few SSL methods specific to decision trees have been proposed (Liu et al., 2013; 2015; Levati´c et al., 2017); however, these are limited in that their main contribution is choosing splits in a semisupervised way, and they lack the ability to propagate labels across regions of dense unlabeled data, limiting expressiveness. To fill this gap, we introduce a new SSL algorithm for tree-based models. It first grows a semi-supervised tree as in Levati´c et al. (2017), but allows leaves to contain no labeled data, increasing expressiveness since trees may grow large even with very few labeled data. It then assigns leaf values by a novel method: construct a similarity graph over the leaves and use a graph algorithm. We propose two such algorithms corresponding to different underlying assumptions. The first assumes that data with similar feature values should have similar labels, produces a smooth model, solves a linear system to assign leaf values, and is suitable for classification or regression. The second assumes the data is separable into classes by a low-density boundary, produces an adversarially robust model, assigns leaf values using graph min-cut, and is suitable only for classification. Figure 1 motivates the need for this kind of approach even for simple data and highlights the difference between the leaf assignment strategies. The former can be viewed as a tree-based approximation of label propagation (Zhu & Ghahramani, 2002), and the latter is similar in spirit to min-cut SSL approaches (Blum & Chawla, 2001; Blum et al., 2004). These are purely
+
+1
+
+**==> picture [117 x 74] intentionally omitted <==**
+
+**==> picture [124 x 90] intentionally omitted <==**
+
+**==> picture [123 x 90] intentionally omitted <==**
+
+**==> picture [385 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Fit a semi-supervised tree. (b) Assign smoothed leaf values. (c) Or assign robust leaf values. **----- End of picture text -----**
+
+Figure 1: An overview of our SSL algorithm. Gray data are unlabeled. We (a) fit a tree to minimize impurity of both labels and features (Section 3.1), then assign leaf values using one of two strategies with different underlying assumptions, which produce either (b) a smooth model (Section 3.2) or (c) an adversarially robust model (Section 3.3). Previous tree-based SSL methods do not propagate labels to similar leaves, so they cannot learn a good boundary in this example.
+
+graph-based algorithms which are _transductive_ , meaning they merely assign labels or pseudo-labels to the unlabeled data without producing a predictive model. Our method, by contrast, is _inductive_ , meaning it produces a predictive model. It also scales better computationally with the number of samples, and by controlling tree size, it allows a tradeoff between a tree-like representation with a kind of automatic dimension reduction and a kernel-like representation.
+
+Ultimately, semi-supervised learning algorithms perform largely based on how well their underlying assumption(s) describe the data; by introducing new assumptions for tree-based models— assumptions which are grounded, reasonable, and often used outside tree-based methods—we improve performance on data where other tree-based methods fall short, as shown by our experiment results in Section 4.
+
+## 2 RELATED WORK
+
+Over many years, numerous semi-supervised learning algorithms with various underlying assumptions have been proposed for a wide range of models. We refer the reader to van Engelen & Hoos (2020) for a comprehensive overview. We highlight two taxonomic distinctions: first, a method is _inductive_ if it produces a predictive model, or _transductive_ if it only assigns labels or pseudo-labels to the unlabeled training data; second, an inductive method is a _wrapper method_ if it is agnostic to the predictive model used, or _intrinsic_ if it is specialized for a particular class of models. The algorithm presented in this work is thus an intrinsically semi-supervised method for induction of decision trees.
+
+Wrapper methods were once the only option for semi-supervised learning of decision trees and remain a popular approach. Foremost are variants of self-training (Triguero et al., 2015), an iterative process whereby the model is fitted to labeled data, then the most confidently predicted among the unlabeled data are labeled and added to the training pool for the next iteration. Despite its widespread use with trees, tree-based models are actually not well-suited for self-training due to poor calibration and overconfident predictions (van Engelen & Hoos, 2020). As a result, works such as Li & Zhou (2007); Leistner et al. (2009); Deng & Guo (2011); Tanha et al. (2017); Liu et al. (2020) propose strategies to improve self-training of tree-based models.
+
+A few intrinsic methods have been proposed for decision trees. By assigning pseudo-labels to unlabeled data using posterior probability computed from kernel density with reduced dimension on the labeled data, Liu et al. (2013) and Liu et al. (2015) choose better oblique splits using unlabeled data. Similarly, by using impurity of the _features_ in addition to impurity of the _labels_ as a splitting criterion for tree construction, Levati´c et al. (2017) propose semi-supervised predictive clustering trees (SSL-PCTs) that choose better conventional axis-aligned splits using unlabeled data. Our methods leverage SSL-PCTs, but additionally assign leaf values in a semi-supervised way.
+
+Graph-based SSL is a family of transductive methods that constructs a similarity graph over the labeled and unlabeled data and uses a graph algorithm to assign pseudo-labels. We mention two that are relevant to this work. First, label propagation Zhu & Ghahramani (2002) solves a linear system
+
+2
+
+such that each pseudo-label is a combination of its neighbors’ labels or pseudo-labels, weighted by similarity. Second, graph min-cut approaches Blum & Chawla (2001); Blum et al. (2004) use min-cut (equivalently max-flow) algorithms to separate the data into classes such that the inter-class similarity is minimized.
+
+## 3 METHODS
+
+Our proposed semi-supervised learning algorithm has two phases. First, the tree structure is grown using a semi-supervised generalization of CART for KDDTs which is based on the growth strategy of SSL-PCTs from Levati´c et al. (2017). Next, a similarity graph over the leaves is constructed and used to assign leaf values. This assignment, differently from previous work, propagates labels across leaves, so all leaves can be assigned a value even if only a few contain labeled data. We propose two assignment approaches; one method implements the assumption that data with similar features should have similar labels, optimizes for smoothness of the model in regions of high density, and conceptually relates to label propagation. The other implements the assumption that the decision boundary should be in low-density regions, optimizes for average adversarial robustness of predictions, that is, distance from the decision boundary, and conceptually relates to graph-based SSL using min-cut. A visual summary is provided in Figure 1.
+
+We notate training data _**x** i ∈_ R _[p]_ , with categorical features one-hot encoded, and labels _**y** i ∈_ R _[q]_ , with each either a vector of _q_ regression targets or a one-hot vector encoding one of _q_ distinct classes. We write D _L_ and D _U_ the sets of indices of labeled and unlabeled data, respectively, with D _L ∪_ D _U_ = D the entire data set with _|_ D _|_ = _n_ .
+
+Underlying our approach is a fuzzy decision tree (FDT) method called Kernel Density Decision Trees (KDDTs) (Good et al., 2022). FDTs allow a decision to take multiple paths with different weight so that a prediction is ultimately a sparse weighted combination of leaf values. KDDTs define the fuzzy splitting by interpreting inputs as uncertain according to a kernel function: interpret each input _**x**_ as a continuous random variable **x** with some probability density **x** _∼ f_ ( _·,_ _**x**_ ). For the KDDT fitting algorithm to work, it is assumed that _f_ ( _·,_ _**x**_ ) can be written as a product of marginal distributions _f_ ( _**z** ,_ _**x**_ ) =[�] _[p] j_ =1 _[f][j]_[(] _[z][j][,]_ _**[ x]**_[)][ where] _[ f][j]_[(] _[·][,]_ _**[ x]**_[)][ may be different for each] _[ j][∈]_[[] _[p]_[]] and _**x** ∈_ R _[p]_ . Typically, _f_ ( _·,_ _**x**_ ) is a symmetric, unimodal distribution such as multivariate uniform or Gaussian. This _f_ is referred to as a “kernel” for its similarity to the kernel from kernel density estimation. It smooths the model by spreading the input over a local area. The assumptions driving our SSL approaches are formalized by this uncertain interpretation.
+
+## 3.1 SEMI-SUPERVISED TREE GROWTH
+
+Since we do semi-supervised learning under the assumption that data with similar feature values should have similar labels, we grow the tree so that, within each leaf, the labels are pure for labeled data (as in typical supervised tree learning), and the feature values are pure for all data (as in unsupervised tree-based hierarchical clustering). For this purpose we adopt the framework proposed by Levati´c et al. (2017) for semi-supervised growth of predictive clustering trees (PCTs), which finds a hierarchical clustering of the data using tree splits. Given a tree T that partitions R _[p]_ into leaves, each of which is a hyper-interval L _⊆_ R _[p]_ , the loss for classification is
+
+**==> picture [341 x 37] intentionally omitted <==**
+
+where _w ∈_ [0 _,_ 1] is a hyperparameter that controls the tradeoff between supervised and unsupervised loss, with _w_ = 1 completely supervised and _w_ = 0 completely unsupervised, and _w_ L is the weight of data belonging to leaf L, defined in the next section. For KDDTs, data can have partial membership in leaves, so the computation of impurity is weighted by membership. For regression, the Gini term is replaced with the average of the variances of the target variables.
+
+Generally we limit tree growth using a cost-complexity pruning (CCP) parameter _α_ ; if the best split does not result in a loss decrease of at least _α_ , then stop growing this subtree and do not perform the split. Since the loss is normalized into [0 _,_ 1], a given value of _α_ provides a consistent tradeoff between loss and tree size for various data sets. However, other growth stopping conditions, such as
+
+3
+
+maximum depth or minimum sample weight in a leaf, are also options. These semi-supervised trees can grow quite large compared to a supervised tree on the same data as a result of the unsupervised component of the impurity. However, once the tree is fitted and the leaf values assigned, it can be pruned according to the purity of the assigned leaf values to get a tree with size in line with fully supervised learning.
+
+## 3.2 SMOOTH LEAF VALUE ASSIGNMENT
+
+As a result of the smoothing induced by the uncertain input interpretation defining KDDTs, a natural SSL approach emerges by simply writing the predictions for unlabeled data and using the resulting system to solve for leaf values. This approach is suitable for both classification and regression. Given a tree T that partitions R _[p]_ into leaves, a KDDT prediction _**p**_ T( _x_ ) is derived as follows. Recall that we interpret an input _**x**_ as random variable **x** _∼ f_ ( _·,_ _**x**_ ).
+
+**==> picture [156 x 39] intentionally omitted <==**
+
+In each leaf L, approximate the expected label by the average over the leaf.
+
+**==> picture [139 x 27] intentionally omitted <==**
+
+Write membership function _µ_ L( _**x**_ ) = _P_ ( **x** _∈_ L) = �L _[f]_[(] _**[z]**[,]_ _**[ x]**_[)] _[ d]_ _**[z]**_[and compute the expected label] from training data _**x** i_ , _**y** i_ , _i ∈_ D.
+
+**==> picture [119 x 29] intentionally omitted <==**
+
+Each leaf L is thus assigned a value _**v**_ L = _w_ 1L � _i∈_ D _[µ]_[L][(] _**[x]**[i]_[)] _**[y]**[i]_[., where] _[ w]_[L][ is the total sample weight] _w_ L =[�] _i∈_ D _[µ]_[L][(] _**[x]**[i]_[)][ at leaf][ L][, and the prediction is] _**[ p]**_[T][(] _**[x]**_[) =][ �] L _∈_ T _[µ]_[L][(] _**[x]**_[)] _**[v]**_[L][.]
+
+For _i ∈_ D _U_ , _**y** i_ is unknown; instead substitute the predicted _**p**_ T( _**x** i_ ).
+
+**==> picture [239 x 89] intentionally omitted <==**
+
+By stacking this equation over each L, we have a linear system
+
+**==> picture [232 x 11] intentionally omitted <==**
+
+where _**V**_ is the unknown matrix of leaf values where (with a slight abuse of notation) each row is the corresponding leaf’s value _**V**_ L _,_ : = _**v**_ L for L _∈_ T, _**V**[′]_ is similarly the known matrix of leaf value components from labeled data only _**V**_ L _[′] ,_ :[=] _w_ 1L � _i∈_ D _L[µ]_[L][(] _**[x]**[i]_[)] _**[y]**[i]_[for][L] _[∈]_[T][,][and] _[A]_[L] _[,]_[L] _[′]_[=] _w_ 1L � _i∈_ D _U[µ]_[L][(] _**[x]**[i]_[)] _[µ]_[L] _[′]_[(] _**[x]**[i]_[)][ indicates the weight of shared unlabeled samples for each pair of leaves.] This can be interpreted as a similarity graph over the leaves. Naturally, it can be solved for _**V**_ directly, or iteratively as in label propagation.
+
+## 3.2.1 CONVERGENCE AND EQUIVALENCE TO LABEL PROPAGATION
+
+We show that our smoothness-based SSL approach can be interpreted as an approximation of label propagation (Zhu & Ghahramani, 2002) using a kernel that arises from the uncertain input interpretation. Given a kernel _k_ : R _[p] ×_ R _[p] →_ R _≥_ 0, label propagation assigns pseudo-labels _**Y** U_ by solving the linear system _**Y** U_ = _**K** UU_ _**Y** U_ + _**K** UL_ _**Y** L_ where
+
+**==> picture [100 x 25] intentionally omitted <==**
+
+4
+
+is the normalized kernel matrix _Ki,j_ = _k_ ( _**x** i,_ _**x** j_ ) _/_[�] _m[k]_[(] _**[x]**[i][,]_ _**[ x]**[m]_[)][, split into blocks corresponding] to labeled data D _L_ and unlabeled data D _U_ . We write the solution _**Y** U_ ( _**K**_ ) in terms of the kernel similarity matrix _**K**_ .
+
+For given training data D and tree T, define a kernel
+
+**==> picture [284 x 28] intentionally omitted <==**
+
+and _**K**_ D _,_ T the corresponding similarity matrix. Let _**X** U i,_ : = _**x** i_ be the corresponding feature values to labels _**Y** U_ . Lemma 1 shows that the semi-supervised tree predicts the pseudo-labels from label propagation using kernel _k_ D _,_ T.
+
+**Lemma 1.** _**Y** U_ ( _**K**_ D _,_ T) = _**p**_ T( _**X** U_ ) _._
+
+_Proof._ As shown in its derivation, Equation 1, which is used to solve for leaf values, is equivalent to the system
+
+**==> picture [304 x 23] intentionally omitted <==**
+
+for _i ∈_ D _U_ . Noting that[�] _j∈_ D _[k]_[D] _[,]_[T][(] _**[x]**[i][,]_ _**[ x]**[j]_[)][=][1][for][all] _[i][∈]_[D][,][the][above][is][equivalently][written] _**Y** U_ = _**K** UU_ _**Y** U_ + _**K** UL_ _**Y** L_ , where _**Y** U_ = _**p**_ T( _**X**_ ) and _**K**_ = _**K**_ D _,_ T.
+
+Next we show that these predictions converge as the size of the tree grows large. Define kernel
+
+**==> picture [150 x 25] intentionally omitted <==**
+
+with similarity matrix _**K**_ D. Lemma 2 (proven in Appendix A) shows that, as T grows large, _**K**_ D _,_ T converges to _**K**_ D.
+
+**Lemma 2.** _If f is continuous almost everywhere and w >_ 0 _, then_ lim _|_ T _|→∞_ _**K**_ D _,_ T = _**K**_ D _._
+
+Finally Theorem 1 concludes that, as the tree grows large, its predictions on the unlabeled data converge to the pseudo-labels assigned by label propagation with kernel _k_ D. In this sense, our proposed SSL algorithm is an inductive tree-based approximation of label propagation. As a result, smaller tree models are more tree-like, while larger tree models are more kernel-like as in label propagation. Controlling tree size enables a tradeoff between the two extremes.
+
+**Theorem 1.** _If f is continuous almost everywhere and w >_ 0 _, then_ lim _|_ T _|→∞_ _**p**_ T( _**X** U_ ) = _**Y** U_ ( _**K**_ D) _._
+
+_Proof._ By Lemma 1, we have lim _|_ T _|→∞_ _**p**_ T(D _U_ ) = lim _|_ T _|→∞_ _**Y** U_ ( _**K**_ D _,_ T) with _**Y** U_ the solution for label propagation _**Y** U_ ( _**K**_ ) = ( _**I** −_ _**K** UU_ ) _[−]_[1] _**K** UL_ _**Y** L_ . Matrix inversion is continuous; therefore, by the properties of limits of sums, products, and compositions, lim _|_ T _|→∞_ _**K**_ D _,_ T = _**K**_ D (Lemma 2) implies lim _|_ T _|→∞_ _**Y** U_ ( _**K**_ D _,_ T) = _**Y** U_ ( _**K**_ D). Therefore lim _|_ T _|→∞_ _**p** T_ ( _**X** U_ ) = _**Y** U_ ( _**K**_ D).
+
+## 3.3 ROBUST LEAF VALUE ASSIGNMENT
+
+Another leaf value assignment strategy, which is only suitable for classification, uses graph min-cut to maximize adversarial robustness, that is, distance from the decision boundary, thereby placing the boundary in low-density regions. While determining the robust radius for a given point is NP-Hard for fuzzy decision trees such as KDDTs (Good et al., 2023), we can use the framework of randomized smoothing to efficiently compute good lower bounds. Randomized smoothing is a technique where a smoothing distribution (usually Gaussian) is used to augment training data with perturbed samples, and predictions are averaged over similar perturbations; KDDTs deterministically achieve the same. Then a lower bound on the robust radius of a prediction is computed as an increasing function of the highest predicted probability. In this sense, the predicted value of a KDDT is directly linked to the robustness of the prediction. For example, for Gaussian smoothing, the robust radius is lower bounded by _r_ = _σ_ Φ _[−]_[1] ( _p_ max), where Φ _[−]_[1] is the inverse Gaussian CDF, _σ_ is the standard deviation of the smoother, and _p_ max is the highest predicted class probability (Cohen et al.,
+
+5
+
+2019). By maximizing this quantity over training data[�] _i[p][i,]_[max][,][we][maximize][a][robustness][ob-] jective[�] _i_[Φ(] _[r][i][/σ]_[)][,][where][each] _[r][i]_[lower][bounds][the][robust][radius][for][sample] _[i]_[.][Thus][we][define] a semi-supervised objective[�] _i∈_ D _L[p][i,y] i_[+][ �] _i∈_ D _U[p][i,]_[max][for][the][model][to][be] _[robustly][correct]_[on] labeled data and _robust_ on unlabeled data. Note that, regardless of practical concerns, it is necessary for the objective to be bounded; if we aim to maximize[�] _i[r][i]_[directly, then the ideal model always] predicts the majority class and has infinite robust radius for data belonging to that class.
+
+To achieve efficient optimization, we instead maximize[�] _i∈_ D _L[p][i,y] i_[+][�] _i∈_ D _U_ � _j[p]_[2] _i,j_[, which lower] bounds the original objective and is equal at the extremes _p_ max = 1 and _p_ max = _pj ∀j_ . Before discussing the method of optimization, we first motivate this altered objective from the perspective of minimizing impurity, the typical approach for training tree-based models. For each _i_ , let **y** _i ∼_ Categorical( _**p** i_ ) be a random label sampled from the predicted label probabilities at _**x** i_ . The Gini impurity typically used in CART is the probability that a prediction sampled in this way is incorrect: _Pi∼_ Unif(D _L_ )( **y** _i_ = _yi_ ). Thus minimizing Gini impurity maximizes the probability that such a prediction is correct. We propose that a natural extension for unlabeled data is to maximize the probability that a prediction on labeled data is correct, and that a prediction on unlabeled data is _consistent_ . This targets a high predicted probability, and thus high robustness with KDDTs, for the predicted class on unlabeled data, without prescribing which class should actually be predicted. Let **y** _i_ and **y** _i[′]_[be independently drawn from Categorical][(] _**[p]**[i]_[)][.]
+
+**==> picture [248 x 58] intentionally omitted <==**
+
+where _**V**[′]_ is as in Equation (1), diag( _**w**_ ) is a matrix with vector _**w**_ = ( _w_ L)L _∈_ T on the diagonal and 0 elsewhere, and _**M**_ is the membership matrix _**M** i,j_ = _µ_ L _j_ ( _**x** i_ ).
+
+With this setup, we can efficiently solve for the leaf values _**V**_ . Since _**M**[T]_ _**M**_ is positive semidefinite, the objective is convex. Moreover, each row of _**V**_ must sum to 1 to represent a valid probability distribution over the class labels. This constitutes the maximization of a convex function subject to linear constraints, so at least one maximizer must exist at a corner point; that is, there is some maximizing _**V**_ with only one nonzero element (which has value 1) in each row.
+
+Let _**A**_ = _**M**[T]_ _**M**_ . With a slight abuse of notation, let _**V**_ L _,_ : be the row of _**V**_ corresponding to leaf L, and similarly for _**A**_ . For each L, let _c_ L denote the index such that _V_ L _[∗] ,c_ L[=][1][, that is,] _[ c]_[L][is the class] predicted at leaf L. Rewrite maximization of the objective as minimization of the following loss.
+
+**==> picture [313 x 71] intentionally omitted <==**
+
+We can construct a graph such that this loss is the value of a _k_ -terminal cut, also called a multiway cut. This is a generalization of the min-cut problem where there may be many terminals, whereas standard min-cut has only two—a source and a sink. Given nodes _N_ = _{s_ 1 _, . . . , sk, n_ 1 _, n_ 2 _, . . . }_ , a _k_ -terminal cut is a partition of the nodes into _k_ sets C1 _, . . . ,_ C _k_ such that _s_ 1 _∈_ C1, _s_ 2 _∈_ C2, etc. The value of the cut is defined as the total weight of edges removed to separate the nodes into sets: �C=C _[′]_ � _n∈_ C � _n[′] ∈_ C _[′][ w]_[(] _[n, n][′]_[)][.]
+
+The graph is constructed as follows. For each class _c_ , define node _sc_ , and for each leaf L, define node _n_ L. Set edge weights _w_ ( _sc, n_ L) = _w_ L _V_ L _[′] ,c_[and] _[ w]_[(] _[n]_[L] _[, n][′]_ L[)][=] _[A]_[L] _[,]_[L] _[′]_[.][Then, given a cut][ C][1] _[, . . . ,]_[ C] _[k]_[,] for each L, set _V_ L _,c_ L = 1 such that _n_ L _∈_ C _c_ L. Then the value of the cut is
+
+**==> picture [334 x 24] intentionally omitted <==**
+
+and so the minimum such cut provides leaf values _**V**[∗]_ that minimize the loss.
+
+6
+
+For _k_ = 2, the problem is simply called _min cut_ or _max flow_ , and there are many algorithms to solve it with various complexity. The problem of finding the minimum _k_ -terminal cut for _k ≥_ 3 is NP-Hard; however, a simple heuristic achieves an approximation of 2 _−_ 2 _/k_ by solving the standard minimum cut problem in a one-vs-rest fashion _k_ times (Dahlhaus et al., 1992). We use this heuristic.
+
+In practice, a model fitted in this way may sacrifice correctness on labeled data for greater robustness on unlabeled data; in the worst case, if there are relatively few labeled samples and the unlabeled data is not easily separable, it is possible that the most robust model just predicts the globally most common label for all inputs. In this case, simply increase the weight of the labeled samples.
+
+## 3.4 MODEL SELECTION
+
+There are three important hyperparameters that must be selected: _w_ controls the amount of supervision in tree growth; the cost-complexity pruning _α_ (or other growth stopping condition) controls the tree size; and the kernel bandwidth _h_ controls the amount of smoothing. If these cannot be chosen by prior knowledge, e.g. setting _h_ according to a desired radius of adversarial robustness for the robust leaf assignment method, then a method for automatic selection is desirable.
+
+Despite the limited number of labeled data in in the semi-supervised setting, we find cross-validation of a supervised metric to the best approach for hyperparameter selection. This is also used by Levati´c et al. (2017) to choose _w_ . Since the tree growth phase dominates the run time of our methods, we grow the tree just once on all data, then perform _k_ -fold cross validation over the labeled part of the data by redoing the leaf assignment phase only. When the number of labeled data is small, accuracy is too coarse, so we use mean absolute error (MAE) instead for model selection. For classification, MAE is _n_[1] � _i_[1] _[ −]_ _**[y]** i[T]_ _**[p]**_[(] _**[x]**[i]_[)][.]
+
+## 3.5 ENSEMBLES
+
+Tree-based models are often ensembled to improve generalization to unseen data, and while KDDTs can generalize better than standard decision trees, they also benefit from ensemble approaches (Good et al., 2022). For some ensemble methods, the extension to semi-supervised learning is straightforward. Random forests, perhaps the most popular tree ensemble, use bagging, where each model is trained on a bootstrap sample of the data, and at each split, only a random subsample of features is considered. We follow the precedent of Levati´c et al. (2017) and adapt this to semi-supervised learning by bootstrap sampling from the union of the labeled and unlabeled data, then train the semisupervised trees on each bootstrap sample with feature subsampling. Another popular tree ensemble algorithm, ExtraTrees (Geurts et al., 2006), only changes the tree fitting process by selecting thresholds at random, and can be used for SSL without modification. Boosted tree ensembles, however, including algorithms such as AdaBoost (Freund & Schapire, 1997) and XGBoost (Chen & Guestrin, 2016), use a supervised loss function, so the adaptation to SSL is not so straightforward. We leave this topic to future work.
+
+## 3.6 COMPUTATIONAL COST
+
+In practice, the run time is dominated by the tree growth phase. This semi-supervised tree growth suffers from adverse complexity with respect to the number of features _p_ ; each split iterates over each feature, and for each feature, impurity must be computed for each feature and class or regression target, resulting in _O_ ( _np_ ( _p_ + _q_ )) to find an optimal split.
+
+We use the following strategies to mitigate this cost. First, control the tree size by avoiding very small CCP- _α_ ; also, for efficient tuning of _α_ , grow the tree just once using the smallest _α_ , then prune it to get the model for larger _α_ . Second, when training random forests, sample just log2 _p_ features to consider for splitting instead of the more commonly used _[√] p_ . Normally when fitting a random forest, if a suitable split is not found in these log2 _p_ features, the search continues over the other features, and growth stops only if none of the _p_ features yield an acceptable split. Thus the cost of such a search added over the leaves is still _O_ ( _np_ ( _p_ + _q_ )). We instead stop after just the initial log2 _p_ features regardless of whether an acceptable split was found, reducing the cost to _O_ ( _n_ ( _p_ + _q_ ) log _p_ ).
+
+Some additional cost is incurred during tree growth and inference because, in KDDTs, a sample may belong to more than one decision path. For a kernel with unbounded support, every sample belongs
+
+7
+
+**==> picture [358 x 576] intentionally omitted <==**
+
+Figure 2: Average accuracy on unlabeled data vs. number of labeled data. Solid lines show our models. Beneath each data set name is shown its number of instances, number of features (after one-hot encoding categorical features, if applicable), and number of classes.
+
+8
+
+to every leaf, so growth and inference time scale linearly with the number of nodes; however, with a reasonably scaled kernel of bounded support, membership in leaves is sparse, so cost scales more in line with a crisp decision tree, that is, linearly with the depth for a balanced tree.
+
+For leaf value assignment, the complexity is the same as the related graph-based methods, namely label propagation and min-cut SSL, but the size of the graph is equal to the number of leaves instead of the number of data. Therefore, for fixed tree size, our methods’ total cost scales linearly with the number of data, better than any purely graph-based SSL. These results suggest that our methods may fill a practical niche wherein there are very many samples but not too many features.
+
+## 4 EXPERIMENTS
+
+We replicate the experimental setup of Levati´c et al. (2017). Of their data sets, we use a subset containing those that (1) we could find available online, (2) are not primarily categorical features, and (3) have few enough features that our methods execute in reasonable time. For each data set, we train our models and several baselines with various numbers of data chosen uniformly at random to be labeled. We report average accuracy of predictions on the unlabeled data used in training over 5 different samples of labeled data. The baselines include regular supervised decision tree and random forest, self-trained random forest, and label propagation. Hyperparameter and data preprocessing details are in Appendix B. While we are not able to include results from the SSL-PCTs of Levati´c et al. (2017), the matching experimental setup at least enables some comparison.
+
+Figure 2 shows the results. To summarize, among tree-based methods, one of ours outperforms the baselines for at least one label count on 11 of 14 data sets, and outperforms them in all label counts on 4 of 14 data sets. In aggregate, one of our models is the best tree-based model in 50% of cases. Smoothed random forest has the best average rank at 2.47, followed by random forest at 2.52 and robust random forest at 3.02. In cases where our methods perform poorly, we see that label propagation also performs poorly; this is unsurprising since they rely on similar assumptions. In most cases, random forests greatly outperform single-tree models. There is usually little difference in performance between our two leaf value assignment strategies. Neither is preferred for every data set, but for a given data set, one tends to be consistently better than the other if there is a gap.
+
+To keep the experiment run times down, we use CCP- _α_ no smaller than 10 _[−]_[3] for our models, which substantially limits tree size. This and the modifications to the random forest feature sampling described in Section 3.6 reduce the power of our models, which we suspect negatively influences performance on complex data. While this limitation was necessary for comprehensive benchmarking, it is unlikely to be necessary in practice except perhaps for data with many features.
+
+## 5 CONCLUSIONS
+
+We have proposed a novel intrinsic method for semi-supervised learning of decision trees. By propagating label information across similar leaves, it improves expressiveness and implements different assumptions from previous tree-based SSL methods and, as a result, performs well on many data sets where those methods fall short. It is similar to graph-based semi-supervised learning relying on Euclidean distance; however, unlike graph-based approaches, it produces a predictive model that has all the practical benefits of decision trees, scales well with data volume, and ultimately outperforms graph-based assignment of labels on several data sets.
+
+The key remaining limitation is the scalability of the proposed method vs. the dimensionality of data. While this can be partially mitigated using dimension reduction and strategies such as those described in Section 3.6, our future work will focus on improving the efficiency of fitting unsupervised and semi-supervised PCTs, which would have impact beyond just this work. Future work will also investigate the proposed approach for regression tasks and consider its adaptation to other tree-based models, such as boosted ensembles.
+
+## REFERENCES
+
+Avrim Blum and Shuchi Chawla. Learning from labeled and unlabeled data using graph mincuts. 2001.
+
+9
+
+- Avrim Blum, John Lafferty, Mugizi Robert Rwebangira, and Rajashekar Reddy. Semi-supervised learning using randomized mincuts. In _Proceedings of the Twenty-First International Conference on Machine Learning_ , ICML ’04, pp. 13, New York, NY, USA, 2004. Association for Computing Machinery. ISBN 1581138385. doi: 10.1145/1015330.1015429. URL [URL removed] 10.1145/1015330.1015429.
+
+- Leo Breiman. Random forests. _Machine learning_ , 45(1):5–32, 2001.
+
+- Tianqi Chen and Carlos Guestrin. XGBoost: A scalable tree boosting system. In _Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , KDD ’16, pp. 785–794, New York, NY, USA, 2016. ACM. ISBN 978-1-4503-4232-2. doi: 10.1145/ 2939672.2939785. URL [URL removed]
+
+- Jeremy Cohen, Elan Rosenfeld, and Zico Kolter. Certified adversarial robustness via randomized smoothing. In _international conference on machine learning_ , pp. 1310–1320. PMLR, 2019.
+
+- E. Dahlhaus, D. S. Johnson, C. H. Papadimitriou, P. D. Seymour, and M. Yannakakis. The complexity of multiway cuts (extended abstract). In _Proceedings of the Twenty-Fourth Annual ACM Symposium on Theory of Computing_ , STOC ’92, pp. 241–251, New York, NY, USA, 1992. Association for Computing Machinery. ISBN 0897915119. doi: 10.1145/129712.129736. URL [URL removed]
+
+- Chao Deng and M. Zu Guo. A new co-training-style random forest for computer aided diagnosis. _Journal of Intelligent Information Systems_ , 36(3):253–281, Jun 2011. ISSN 1573-7675. doi: 10. 1007/s10844-009-0105-8. URL [URL removed]
+
+- Yoav Freund and Robert E Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. _Journal of Computer and System Sciences_ , 55(1):119–139, 1997. ISSN 0022-0000. doi: [URL removed] URL [URL removed] sciencedirect.com/science/article/pii/S002200009791504X.
+
+- Pierre Geurts, Damien Ernst, and Louis Wehenkel. Extremely randomized trees. _Machine learning_ , 63(1):3–42, 2006.
+
+- Jack H. Good, Kyle Miller, and Artur Dubrawski. Kernel density decision trees. In _Proceedings of the AAAI Spring Symposium on AI Engineering_ . Curran Associates, Inc., 2022. URL https: //resources.sei.cmu.edu/library/asset-view.cfm?assetid=883959.
+
+- Jack H. Good, Nicholas Gisolfi, Kyle Miller, and Artur Dubrawski. Verification of fuzzy decision trees. _IEEE Transactions on Software Engineering_ , pp. 1–12, 2023. doi: 10.1109/TSE.2023. 3251858.
+
+- Markelle Kelly, Rachel Longjohn, and Kolby Nottingham. The uci machine learning repository. URL [URL removed]
+
+- Christian Leistner, Amir Saffari, Jakob Santner, and Horst Bischof. Semi-supervised random forests. In _2009 IEEE 12th International Conference on Computer Vision_ , pp. 506–513, 2009. doi: 10. 1109/ICCV.2009.5459198.
+
+- Jurica Levati´c, Michelangelo Ceci, Dragi Kocev, and Sa _**s**_ o D _**z**_ eroski. Semi-supervised classification trees. _Journal of Intelligent Information Systems_ , 49(3):461–486, Dec 2017. ISSN 1573-7675. doi: 10.1007/s10844-017-0457-4. URL [URL removed] s10844-017-0457-4.
+
+- Ming Li and Zhi-Hua Zhou. Improve computer-aided diagnosis with machine learning techniques using undiagnosed samples. _IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans_ , 37(6):1088–1098, 2007. doi: 10.1109/TSMCA.2007.904745.
+
+- Xiao Liu, Mingli Song, Dacheng Tao, Zicheng Liu, Luming Zhang, Chun Chen, and Jiajun Bu. Semi-supervised node splitting for random forest construction. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)_ , June 2013.
+
+10
+
+- Xiao Liu, Mingli Song, Dacheng Tao, Zicheng Liu, Luming Zhang, Chun Chen, and Jiajun Bu. Random forest construction with robust semisupervised node splitting. _IEEE Transactions on Image Processing_ , 24(1):471–483, 2015. doi: 10.1109/TIP.2014.2378017.
+
+- Zhenyu Liu, Tao Wen, Wei Sun, and Qilong Zhang. Semi-supervised self-training feature weighted clustering decision tree and random forest. _IEEE Access_ , 8:128337–128348, 2020. doi: 10.1109/ ACCESS.2020.3008951.
+
+- F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. _Journal of Machine Learning Research_ , 12:2825–2830, 2011.
+
+- Jafar Tanha, Maarten van Someren, and Hamideh Afsarmanesh. Semi-supervised self-training for decision tree classifiers. _International Journal of Machine Learning and Cybernetics_ , 8(1):355– 370, Feb 2017. ISSN 1868-808X. doi: 10.1007/s13042-015-0328-7. URL [URL removed] org/10.1007/s13042-015-0328-7.
+
+- Isaac Triguero, Salvador Garc´ıa, and Francisco Herrera. Self-labeled techniques for semi-supervised learning: taxonomy, software and empirical study. _Knowledge and Information Systems_ , 42(2): 245–284, Feb 2015. ISSN 0219-3116. doi: 10.1007/s10115-013-0706-y. URL [URL removed] org/10.1007/s10115-013-0706-y.
+
+- Jesper E. van Engelen and Holger H. Hoos. A survey on semi-supervised learning. _Machine Learning_ , 109(2):373–440, Feb 2020. ISSN 1573-0565. doi: 10.1007/s10994-019-05855-6. URL [URL removed]
+
+- Joaquin Vanschoren, Jan N. van Rijn, Bernd Bischl, and Luis Torgo. Openml: networked science in machine learning. _SIGKDD Explorations_ , 15(2):49–60, 2013. doi: 10.1145/2641190.2641198. URL [URL removed]
+
+- Xiaojin Zhu and Zoubin Ghahramani. Learning from labeled and unlabeled data with label propagation. 2002.
+
+## A PROOF OF LEMMA 2
+
+Since _f_ ( _·,_ _**x**_ ) is continuous almost everywhere, it is uniformly continuous almost everywhere on a compact domain, So we have for every _ϵ >_ 0, there exists _δ >_ 0 such that, for any leaf L of diameter (maximum range of its constituent intervals) less than _δ_ on which _f_ ( _·,_ _**x**_ ) is continuous, we have max _**z** ∈_ L _f_ ( _**z** ,_ _**x**_ ) _−_ min _**z** ∈_ L _f_ ( _**z** ,_ _**x**_ ) _< ϵ_ . Likewise for _**z** �→ f_ ( _**z** ,_ _**x**_ ) _f_ ( _**z** ,_ _**x**[′]_ ) _/_[�] _i∈_ D _[f]_[(] _**[z]**[,]_ _**[ x]**[i]_[)][.] Let _**c** ∈_ L. Then, if we consider T to partition a compact domain X _⊆_ R _[p]_ ,
+
+**==> picture [363 x 170] intentionally omitted <==**
+
+11
+
+and likewise
+
+**==> picture [260 x 83] intentionally omitted <==**
+
+so we have error
+
+**==> picture [180 x 38] intentionally omitted <==**
+
+Since _f_ is continuous almost everywhere, finitely many leaves contain discontinuities, so their error goes to zero as _δ →_ 0. So, for any compact X, we can achieve bounded error with leaves of diameter less than _δ_ . Then as X _→∞_ and _δ →_ 0, we have _k_ D _,_ T( _**x** ,_ _**x**[′]_ ) _→ k_ D( _**x** ,_ _**x**[′]_ ). Thus it is sufficient to show that leaf diameter goes to zero. An exception to this requirement is that, for any L where _fj_ ( _zj,_ _**x** i_ ) = _f_ ( _zj[′][,]_ _**[ x]**[i]_[)][ for all] _**[ z]**[,]_ _**[ z]**[′][∈]_[L][,] _[ i][∈]_[D][, the error is zero over feature] _[ j]_[, so the leaf need not] be any smaller in dimension _j_ . And, in fact, the tree growth algorithm will not split on feature _j_ in such cases because no further gain is possible.
+
+Otherwise, consider a feature _j_ where these conditions are not met, and where splitting results in some gain. Then there must be some sufficiently small _ϵ_ such that, if the range of each _fk_ ( _·,_ _**x** i_ ), _k_ = _j_ , _i ∈_ D is less than _ϵ_ , then the gain from splitting on feature _k_ is less than the gain from splitting on feature _j_ . Since _fk_ ( _·,_ _**x** i_ ) is continuous almost everywhere, there exists a _δ_ such that this is true with a diameter less than _δ_ for all _k_ = _j_ ; then the next split is on feature _j_ . In this way, the leaf diameters along all necessary dimensions approach zero as the size of the tree grows large.
+
+## B EXPERIMENT DETAILS
+
+Here we provide details of experimental setup for reproducibility.
+
+The data is preprocessed by one-hot encoding categorical variables, replacing missing values (there are not many in these data sets) with the mean, and standardizing all features to mean 0 and standard deviation 1. When we sample data to be labeled in the training of models, we ensure that at least one instance of each class is represented, that is, we sample one instance uniformly at random from each class, then the rest uniformly at random (without replacement) from the entire remaining data set.
+
+At the time of writing, each data set is available from the UCI Machine Learning Repository (Kelly et al.) or OpenML (Vanschoren et al., 2013) at the following URLs:
+
+- Abalone
+
+[URL removed]
+
+- banknote authentication [URL removed]
+
+- QSA biodegradation [URL removed]
+
+- diabetes [URL removed]
+
+- EEG Eye State [URL removed]
+
+- hypothyroid [URL removed]
+
+- baseball
+
+[URL removed]
+
+12
+
+- Cardiotocography
+
+- [URL removed]
+
+- cmc
+
+- [URL removed]
+
+- Image Segmentation
+
+[URL removed]
+
+- MiceProtein
+
+[URL removed]
+
+- Optical Recognition of Handwritten Digits
+
+- [URL removed]
+
+- Page Blocks Classification
+
+[URL removed]
+
+- Pen-Based Recognition of Handwritten Digits
+
+[URL removed]
+
+Our baseline models are implementations from the popular machine learning package scikit-learn Pedregosa et al. (2011). Hyperparameters are as follows.
+
+- **Decision tree** . We use sklearn.tree.DecisionTreeClassifier with default hyperparameters. The tree is fully grown.
+
+- **Random forest** . We use sklearn.tree.DecisionTreeClassifier with default hyperparameters. Each has 100 fully grown trees, and features to consider for splitting are randomly subsampled to _[√] p_ at each split. If a suitable split is not found, the remaining features are searched.
+
+- **Self-training Random Forest** . We use sklearn.tree.DecisionTreeClassifier as above along with sklearn.semi ~~s~~ upervised.SelfTrainingClassifier with default hyperparameters.
+
+- **Label propagation** . We use sklearn.semi ~~s~~ upervised.LabelPropagation using a RBF (Gaussian) kernel with standard deviation chosen from [0 _._ 01 _,_ 0 _._ 0215 _, ._ 0464 _,_ 0 _._ 1]. We choose the standard deviation that minimizes the loss defined in the original label propagation paper Zhu & Ghahramani (2002).
+
+- **Our methods** . Our KDDTs use a Gaussian kernel. For fitting, a piecewise-constant kernel is required, so we use a histogram approximation of Gaussian with 7 pieces truncated to 3 standard deviations. We choose CPP- _α_ from [0 _._ 001 _,_ 0 _._ 00316 _,_ 0 _._ 01 _,_ 0 _._ 0316 _,_ 0 _._ 1] and kernel bandwidth _h_ (standard deviation of the Gaussian kernel) from [0 _._ 01 _,_ 0 _._ 0215 _, ._ 0464 _,_ 0 _._ 1] using 10-fold cross validation of the mean absolute error (MAE) on the unlabeled data. This range for CCP- _α_ limits trees to be relatively small, which is necessitated by the run time and scope of the experiments; it is a current weakness of this analysis. For efficient cross validation, a we grow a single tree structure on all data and only reassign the leaf values for each fold. For the supervised vs. unsupervised tradeoff parameter _w_ , we simply use _w_ = _|_ D _L|/|_ D _|_ . This way it is fully unsupervised with zero labeled data and fully supervised with zero unlabeled data. During leaf assignment, we increase the weight of labeled data to max(1 _, |_ D _U |/|_ D _L|_ ). This gives at least as much total weight to labeled data as unlabeled data to prevent collapse to the global majority if the data is not easily separable.
+
+13
+
diff --git a/open_review/iclr2024_8582.json b/open_review/iclr2024_8582.json
new file mode 100644
index 0000000000000000000000000000000000000000..781a9a1db89d75ef78b178ec7d1c7141c470882e
--- /dev/null
+++ b/open_review/iclr2024_8582.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8582",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "SHINE: Shielding Backdoors in Deep Reinforcement Learning",
+ "abstract": "Recent studies have discovered that similar to supervised classifiers, a deep reinforcement learning (DRL) policy is also vulnerable to backdoor attacks. Existing defenses against backdoor attacks either do not consider RL's unique mechanism or make unrealistic assumptions, resulting in limited defense efficacy, practicability, and generalizability. In this work, we propose SHINE, a novel backdoor shielding method for DRL. SHINE first leverages policy explanation techniques to identify the backdoor triggers and then designs a policy retraining algorithm to eliminate the negative impact of the triggers on backdoored agents. We theoretically prove that SHINE guarantees to improve a backdoored agent's performance in a poisoned environment while ensuring its performance difference in the clean environment before and after shielding is bounded. We further conduct extensive experiments that evaluate SHINE against three mainstream DRL backdoor attacks in various benchmark RL environments. Our results show that SHINE significantly outperforms existing defenses in mitigating these backdoor attacks.",
+ "rebuttal": "### Follow up with reviewer 5eAS\nWe thank the reviewer very much for the questions and comments. We would like to kindly follow up with the reviewer. We are happy to answer follow-up questions. Meanwhile, we respectfully and kindly ask the reviewer if they can reconsider their score if our response helps address their concerns.\n\n### Follow up with reviewer r1tp\nWe thank the reviewer very much for the questions and comments. We would like to kindly follow up with the reviewer. We are happy to answer follow-up questions. Meanwhile, we respectfully and kindly ask the reviewer if they can reconsider their score if our response helps address their concerns.\n\n### Follow up with the reviewer F9HD\nWe thank the reviewer very much for the questions and comments. We would like to kindly follow up with the reviewer. We are happy to answer follow-up questions. Meanwhile, we respectfully and kindly ask the reviewer if they can reconsider their score if our response helps address their concerns.\n\n### Response to Review 2tnZ\n**5. About the computational cost, loss during the mitigation, and metric.**\n\nThank the reviewer for the comment. Regarding the computational cost, all of the three baseline defenses (NC, FeatureRE, and Direct retraining) require retraining. This part of the cost is the same for all methods.\nRegarding trigger restoration, Direct retraining does not conduct this step and thus does not have a cost. NC and FeatureRE take 12 and 15 hours for this step. Their restored trigger is of very low fidelity, and they can only be applied to environments with a discrete action spa [...]\n\n### Response to Review 2tnZ\nWe thank the reviewer for the constructive comments. Please see below for our responses. \n\n**1. About the technical contributions.**\n\nThank the reviewer for the comment. We agree with the reviewer that our method indeed uses the explanation method proposed by Guo et al., 2021b as it is the state-of-the-art step-level explanation method. However, we would like to respectfully argue that this does not dilute our method’s technical contribution. First, the overall defense framework that is composed of explanation-driven trigger restoration and retraining-based shield [...]\n\n### Response to Review 5eAS\nWe thank the reviewer for the constructive comments. Please see below for our responses. \n\n**1. Compare SHINE against other types of defenses.**\n\nThank the reviewer for the comment. We follow the reviewer’s comment and add one more baseline defense: STRIP [1]. This defense assumes the inputs containing the trigger, and it tries to pinpoint the trigger. It does not conduct trigger inversion (like FeatureRE or NE). We use this method to detect the trigger for perturbation-based attacks (given that it can only be applied to games with discrete action spaces). After det [...]\n\n### Response to Review F9HD\n**5. About the question of our masking.**\n\nThank the reviewer for the comment. We agree with the reviewer that if the attackers use zero pixels as the trigger, our masking strategy may not work as it is equivalent to adding the trigger to the environment. A solution to this is to replace the detected trigger with mean pixels across all collected states. To avoid the case where the trigger consists of the mean pixels, we can further apply a Gaussian blur on the mean pixels and then replace it with the detected trigger. We apply this solution to two attack setups on t [...]\n\n### Response to Review F9HD\nWe thank the reviewer for the constructive comments. Please see below for our responses. \n\n**1. About the definition of the attacks and defenses.**\n\nThank the reviewer for the comment. As stated in the introduction, the existing attacks against DRL policy train a victim policy $\\pi$ for an agent in a given environment. The agent performs normally in the clean environment, i.e., will finish its corresponding task with a high success rate and achieve a high reward. The victim policy will take suboptimal actions when the trigger shows in the environment state. This wil [...]\n\n### Response to Review r1tp\nWe thank the reviewer for the constructive comments. Please see below for our responses. \n\n**1. Sensitivity analysis regarding the impact of the number of trajectories used for explanation.**\n\nThank the reviewer for the comment. Following the reviewer’s comment, we conducted an additional experiment to evaluate the impact of the number of trajectories on our method. We used the Pong game for this experiment. We vary the number of trajectories as 200/500/1000 and report the trigger fidelity and final retraining performance. The results in Table 1 show that our method [...]\n\n### Response to Reviewer 2tnZ\nThanks the reviewer for the additional question regarding why the explanation-based solution can work when no clean states exist. In our experiment, If there is no clean state, the collected trajectories will all be failure trajectories (we collect 100 of them). \nHere, our step-level explanation can still be used to fit the collected trajectories and identify some important states. The step-level explanation may not be entirely faithful. Given that all the states contain the trigger, we can still apply our feature-level explanation method to the identified states [...]\n\n### Response to Reviewer 2tnZ\nWe thank the reviewer 2tnZ for the kind response and the additional question. \n\nFirst of all, we would like to respectfully and kindly state that as a defense work, we follow the threat model/attack assumptions of existing backdoor attacks. All existing backdoor attacks define a successful attack as significantly reducing the victim agent's reward when the trigger is presented in the environment, which is a failure. Our defense leverages this definition to explain the failure cases and identify the trigger. If there is no clear definition of failures, first, it is [...]\n\n### Response to the reviewer\nThanks the reviewer F9HD for the additional comment. We have responded in points 1&4, a clear setup of our att\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 5,
+ 6
+ ],
+ "score_mean": 5.75,
+ "score_variance": 0.25,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "The paper introduces SHINE, an innovative approach for shielding deep reinforcement learning (DRL) agents from backdoor attacks. It leverages policy explanation techniques and a policy retraining algorithm to identify and mitigate backdoor triggers, showing improvement in poisoned environments while maintaining performance in clean ones. \n\nExtensive experiments validate its effectiveness against various DRL backdoor attacks. However, discussions with reviewers highlighted some issues, such as its reliance on specific types of corrupted data, the need for more comprehensive exploration of related works, and a lack of clarity in certain aspects. Although the authors responded proactively to these concerns, providing additional experiments and clarifications, some reviewers remained unconvinced about the scalability and generalizability of the method, particularly in more advanced or varied attack scenarios.\n\nFor future improvements, it's recommended that the authors focus on enhancing the clarity and formal definitions of attacks and defenses, expand the scope of related work, and explicitly state and justify the assumptions underpinning their method to improve its relevance and applicability to diverse real-world scenarios.",
+ "forum_id": "AKAlVyunxA",
+ "primary_area": "societal considerations including fairness, safety, privacy",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_r1tp",
+ "review_id": "CJ658ywSe8",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2202,
+ "edit_detected": true,
+ "edit_delta_seconds": 596253,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_5eAS",
+ "review_id": "7Y5G7bEHah",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 1124,
+ "edit_detected": true,
+ "edit_delta_seconds": 1896776,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_F9HD",
+ "review_id": "Kbl3L6rO7d",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 2800,
+ "edit_detected": true,
+ "edit_delta_seconds": 850298,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_2tnZ",
+ "review_id": "wGURG9E6QJ",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4376,
+ "edit_detected": true,
+ "edit_delta_seconds": 1998265,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8582.md b/open_review/iclr2024_8582.md
new file mode 100644
index 0000000000000000000000000000000000000000..21fc7802b603d0b93a4fd5c2bfe1c963d22f6329
--- /dev/null
+++ b/open_review/iclr2024_8582.md
@@ -0,0 +1,485 @@
+
+
+## - SHINE: SHIELDING BACKDOORS IN DEEP REINFORCE MENT LEARNING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Recent studies have discovered a deep reinforcement learning (DRL) policy is vulnerable to backdoor attacks. Existing defenses against backdoor attacks either do not consider RL’s unique mechanism or make unrealistic assumptions, resulting in limited defense efficacy, practicability, and generalizability. We propose SHINE, a backdoor shielding method specific for DRL. SHINE leverages policy explanation techniques to identify the backdoor triggers and designs a policy retraining algorithm to eliminate the impact of the triggers on backdoored agents. We theoretically prove that SHINE guarantees to improve a backdoored agent’s performance in a poisoned environment while ensuring its performance difference in the clean environment before and after shielding is bounded. We further conduct extensive experiments that evaluate SHINE against three mainstream DRL backdoor attacks in various benchmark RL environments. Our results show that SHINE significantly outperforms existing defenses in mitigating these backdoor attacks.
+
+## 1 INTRODUCTION
+
+Deep reinforcement learning has demonstrated remarkable performance in various sequential decisionmaking problems, ranging from beating professorial human players in Go (Silver et al., 2016) and real-time strategy games (DeepMind, 2017; OpenAI, 2017) to controlling robots to accomplish sophisticated tasks (Levine et al., 2016; Tai et al., 2017). Along with its great success comes a new security concern of the supply chain management of DRL agents – backdoor threats. Specifically, recent research (Kiourti et al., 2019; Wang et al., 2021a) demonstrates that an attacker could train a backdoored agent and outsource it to a user. After the user deploys the agent in the corresponding environment, the attacker places the backdoor trigger in the environment, forcing the agent to take non-optimal actions and thus reduce its total reward. Defending backdoor attacks in DRL is inherently challenging in that the trigger pattern is typically imperceptible, and the backdoored agent performs normally at clean states. Based on different trigger patterns, existing backdoor attacks against DRL can be categorized as perturbation-based attacks and adversarial agent attacks (detailed in Section 2).
+
+Existing defenses against backdoor attacks consider two setups – 1) training-phase defense that trains a robust model from a poisoned dataset (e.g., Tran et al. (2018); Du et al. (2019); Weber et al. (2020); Zhang et al. (2022); Wu et al. (2022); Zhang et al. (2022)) and 2) testing-phase defense that shields a pretrained model/policy (e.g., Wang et al. (2019); Gao et al. (2019); Chou et al. (2020); Ma et al. (2022); Wang et al. (2022); Guo et al. (2022); Bharti et al. (2022)). We consider the second setup to shield a pretrained (backdoored) agent from being affected by the backdoor trigger presented in the environment. Most existing testing-phase defenses are designed for supervised classifiers (e.g., Wang et al. (2019); Guo et al. (2020); Liu et al. (2019); Gao et al. (2019); Chou et al. (2020); Ma et al. (2022); Wang et al. (2022)). Due to the significant difference between DRL agents and classifiers in the mechanism (i.e., sequential decision-making vs. individual class prediction) and model output (i.e., action at each time step vs. predicted class), these techniques either cannot be applied or demonstrate very limited efficacy in defending backdoors in DRL agents. Only a few defenses are designed specifically for DRL agents (Bharti et al., 2022; Guo et al., 2022). As we will discuss in Section 2, Bharti et al. (2022) design their defense only for the perturbation-based attack, while the defense proposed in Guo et al. (2022) is only applicable to adversarial agent attacks.
+
+In this work, we propose SHINE, a novel method to shield a pretrained DRL agent against both the perturbation-based attacks and the adversarial agent attacks. Technically, we first collect a set of
+
+1
+
+trajectories of the agent running in the environment and design a two-stage explanation method to identify the backdoor trigger presented in these trajectories. Our explanation method first pinpoints the states where the trigger is most likely to be presented. Then, it identifies a common subset of features in the trigger-presenting states that are most critical to the agent’s action at these states and deems them as the backdoor trigger. With the identified trigger, we then design a policy retraining algorithm to shield the agent from being affected by the backdoor. By carefully designing the retraining objective function, we theoretically guarantee that the retrained agent performs better in a poisoned environment while maintaining its performance in the pristine clean environment.
+
+We evaluate SHINE against three most prevalent backdoor attacks (perturbation-based attacks in single-agent RL, adversarial agent attacks in two-player competitive RL, and perturbation-based attacks in multi-agent cooperative RL) in seven benchmark RL environments. Our results demonstrate that SHINE is effective against all three attacks in terms of faithfully identifying the trigger and improving a backdoored agent’s performance in a poisoned environment. Additionally, we demonstrate that SHINE outperforms two representative defenses designed for supervised classifiers (Wang et al., 2019; 2022) and a state-of-the-art DRL defense (Bharti et al., 2022). Second, we show that SHINE does not jeopardize (or even improve) a _clean_ agent’s performance. This is an essential property in that users could apply SHINE to arbitrary agents without worrying about the negative impact on the clean ones. Finally, we verify that SHINE retains its effectiveness against attacks with different variations (e.g., simple and complex triggers) and possible adaptive attacks. To the best of our knowledge, this is the first backdoor defense against both perturbation-based and adversarial agent attacks in both single- and multi-agent RL that does not require accessing a clean environment.
+
+## 2 RELATED WORK
+
+**Backdoor Attacks.** Based on different trigger patterns and injection methods, existing attacks can be categorized as: 1) perturbation-based attack that uses a perturbation patch as the trigger (Kiourti et al., 2019; Wang et al., 2021b; Chen et al., 2022b) and 2) adversarial agent attack that uses an adversarial agent’s certain actions as the trigger (Wang et al., 2021a). Based on the target environment, existing attacks can be further categorized as attacks against single-agent RL (Yang et al., 2019; Kiourti et al., 2019; Wang et al., 2021b), attacks against two-agent competitive RL (Wang et al., 2021a; Chen et al., 2022a), attacks against multi-agent cooperative RL (Chen et al., 2022b;a).
+
+**Backdoor Defenses.** As mentioned in Section 1, we focus on the testing-phase defense, and most existing works in this category target supervised classifiers (e.g., Wang et al. (2019); Guo et al. (2020); Liu et al. (2019); Gao et al. (2019); Chou et al. (2020); Ma et al. (2022); Wang et al. (2022)). As we will show in Section 4, due to the fundamental differences between RL and supervised learning, these techniques demonstrate limited efficacy in DRL backdoor defense. Only a few research works have focused specifically on mitigating backdoors in DRL agents. Unfortunately, these methods have limited practicability and generalizability. Specifically, the defense proposed in Bharti et al. (2022) is designed only for perturbation-based attacks, and it is only applicable to environments with a discrete action space. The method in Guo et al. (2022) is designed particularly for adversarial agent attacks. Different from existing methods, our defense is applicable to both perturbation-based attacks and adversarial agent attacks. In addition, we demonstrate its efficacy in all three types of target environments mentioned above. Note that recent works also extend backdoor attacks and defenses to weak-supervised learning (Saha et al., 2022; Carlini & Terzis, 2021; Yan et al., 2021) and federated learning (Bagdasaryan et al., 2020; Wang et al., 2020; Xie et al., 2019), which are beyond our scope.
+
+Our technique is inspired by the DRL explanation methods that identify the agent’s critical state and actions (Amir & Amir, 2018; Huang et al., 2018; Jacq et al., 2022; Guo et al., 2021b). Although they help pinpoint the time steps when the trigger is likely to be presented, These methods can neither identify the trigger nor shield the target agent from the backdoor attack.
+
+## 3 KEY TECHNIQUE
+
+## 3.1 OVERVIEW
+
+**Threat Model.** We consider perturbation-based and adversarial agent attacks, where perturbationbased attacks add the trigger to the agent’s perceived state without changing the actual state and
+
+2
+
+**==> picture [397 x 123] intentionally omitted <==**
+
+**----- Start of picture text -----**
+A trajectory of the DRL agent losing the game: Step-level explanation: Most critical time steps lead to the losing Backdoor Shielding: Retraining agent to unlearn the identified trigger Feature-level explanation: Critical features leading to Identified the agent’s The agent won after shielding trigger action **----- End of picture text -----**
+
+Figure 1: Overview of SHINE. The green paddle is the DRL agent and the arrow indicates its action. its transition. By contrast, adversarial agent attacks use an agent’s action sequences as the trigger, manipulating the actual state and the state transition. We are given a pretrained agent operating in a potentially poisoned environment. The agent (denoted as shielding agent) has a policy _π_ that potentially contains a backdoor. We assume the state and action space can be discrete or continuous.
+
+Rather than assuming the defender has a clean environment that cannot be accessed or poisoned by the attacker, we assume the attacker and defender access the same environment that the agent actually operates (denoted as operating environment). After the agent is deployed, the attacker can place the trigger at any desired states to spitefully distract the backdoored agent and reduce its reward. As the defender, we do not assume any knowledge of the trigger and thus cannot decide whether it is present.
+
+We believe this is a practical setup because it simulates the actual RL operation scenarios where the environment is a natural scene or a simulator created by a third party, and the attacker and defender have the same privilege to access the environment. Note that different from supervised learning, where it is relatively easy to hold out a clean validation set for the defender, constructing a clean environment could be extremely difficult in DRL. Take the self-driving car as an example. To build a clean environment, the defender must construct a simulator of the actual road scenarios and traffic conditions. The amount of effort required is often beyond the capacity of a policy user, necessitating the involvement of a specialized third party. Once released, the simulator becomes accessible to authorized users, both benign and malicious.
+
+**Technical Overview.** Our _goal is to ensure the shielding DRL agent can normally perform, regardless of whether the trigger is presented in the environment_ . Take Fig. 1 as an example. The attacker can present the trigger (small patch at the top left corner) at any desired time steps, and we want to ensure the agent can still obtain a decent winning rate in the poisoned/operating environment and the original clean environment. At a high level, SHINE has a _trigger restoration_ step to identify the backdoor trigger, followed by a _backdoor shielding_ step to prevent our shielding agent from being affected by the backdoor. More specifically, for the trigger restoration, we draw insights from the DRL explanation methods (Amir & Amir, 2018; Huang et al., 2018; Jacq et al., 2022; Guo et al., 2021b) and identify the trigger from the previous trajectories of the shielding agent. The idea is as follows (demonstrated in Fig. 1). Given the backdoor attack’s goal is to fail a victim agent by distracting its actions with the backdoor trigger. Here, failing means the agent receives a very low reward or loses the game. By analyzing and explaining why a backdoored agent failed in its previous game rounds (trajectories), we should be able to identify the key reason, i.e., the trigger presented in the environment. In particular, given a failing trajectory of our shielding agent, we first utilize a step-level explanation method – EDGE (Guo et al., 2021b) to pinpoint the most critical time steps that led the agent to fail its task (See Fig. 1). For a backdoored agent, these steps are most likely to have the trigger presented in the environment. Then, we design a more fine-grained feature-level explanation method to further interpret why the agent took certain actions at the pinpointed steps. As detailed in Section 3.2, our method will identify a subset of features in the state vector that contributes most to the agent’s actions at the pinpointed steps. Since the agent’s inappropriate actions are mostly driven by the trigger, the identified features are likely to represent the trigger.
+
+Then, we design a backdoor shielding technique to protect the agent from being compromised by the identified trigger. Our high-level idea is to retrain the shielding agent such that it learns to take proper actions at the operating states and keeps its original behaviors at the clean states. As detailed in Section 3.3, we reconstruct the environment with the identified trigger and model this shielding process as a novel optimization problem in the constructed environment. By carefully designing the
+
+3
+
+policy learning objective function, we could theoretically guarantee that the shielding agent achieves a higher reward in an operating environment while keeping its performance in the pristine clean environment. We leverage the PPO algorithm (Schulman et al., 2017) to update the policy, whose monotonicity property speeds up the convergence and thus improves the retraining efficiency.
+
+Note that we do not assume the knowledge of whether the shielding agent is backdoored or not. In other words, we apply the same detection and shielding process for arbitrary agents. As we will show later in Section 4, by adding proper constraints to the feature-level explanation and shielding retraining, our proposed technique will not affect a clean agent’s performance.
+
+## 3.2 TRIGGER RESTORATION
+
+We first run the shielding agent’s policy _π_ in the operating environment and collect a set of _N_ trajectories _{_ _**X**_[(] _[i]_[)] _, yi}i_ =1: _N_ . _**X**_[(] _[i]_[)] = _{_ _**s**_[(] _t[i]_[)] _[,]_ _**[ a]**_[(] _t[i]_[)] _[}][t]_[=1:] _[T]_[represents the] _[ i]_[-th trajectory, where] _**[ s]**_[(] _t[i]_[)] and _**a**_[(] _t[i]_[)] are the state and action at the time step _t_ . _yi_ denotes the total reward of the _i_ -th trajectory. Then, we conduct a step-level explanation to pinpoint the time steps when the trigger is likely to show up. Finally, we conduct a feature-level explanation to identify the trigger at the pinpointed time steps.
+
+**Step-level Explanation.** We leverage a state-of-the-art explanation method EDGE (Guo et al., 2021b). At a high level, EDGE designs a self-explainable model to fit the collected trajectories and thus pinpoint the important time steps in each trajectory. Technically, EDGE proposes the following deep Gaussian process-based model to fit the trajectories.
+
+**==> picture [369 x 28] intentionally omitted <==**
+
+**==> picture [11 x 9] intentionally omitted <==**
+
+Where _**f**_ is the output of the deep Gaussian process (DGP) encoder. This DGP encoder first inputs a trajectory _**X**_[(] _[i]_[)] into an RNN encoder and a shallow MLP encoder to obtain an embedding of the state at each time step _{_ _**h**_[(] _t[i]_[)] _[}][t]_[=1:] _[T]_[and an embedding of the whole trajectory] _**[ e]**_[(] _[i]_[)][.][It then designs an] additive GP with square exponential (SE) kernel _kγt_ and _kγe_ to transform _**h**_ and _**e**_ into _**f** ∈_ R _[T][ ×]_[1] . With the representation _**f**_ 1:[(] _[i] T_[)][, EDGE then designs a regression model to predict the final reward] _[ y][i]_
+
+Since the trigger may present at different time steps in different trajectories, we apply a trajectoryspecific mixing weight _**w** t_[(] _[i]_[)] = _g_ ( _**h**_[(] _t[i]_[)] _[,]_ _**[ e]**_[(] _[i]_[)][)][, where] _[ g]_[ is a shallow MLP network.][Following Alvarez-] Melis & Jaakkola (2018), we add a local linear constrain _Le_ to _**w**_[(] _[i]_[)] to ensure its local linearity. By ranking the mixing weight and selecting the time steps associated with the top mixing weights, we can pinpoint the most critical steps for each trajectory. The critical time steps of the failing trajectories are when the agent took inappropriate actions and are thus the most likely to have the trigger presented. **Feature-level Explanation.** After pinpointing the potential time steps that contain the trigger (denoted as trigger-presented time steps), we then design a feature-level explanation to interpret the agent’s actions at those time steps. Given that the trigger causes the agent’s inappropriate actions at the trigger-presented time steps. By extracting the key sub-region/features in the state representations at the trigger-presented time steps, we could identify the backdoor trigger. Specifically, we first extract the shielding agent’s states and actions at the trigger-presented time steps, denoted as _D_ = _{_ _**s**_[(] _t[i]_[)] _[,]_ _**[ a]**_[(] _t[i]_[)] _[}]_[.][Then, we design a feature explanation mask] _**[ m]**_[ with the same dimensionality] as the state representation _**s**_ . Each element in the mask _**m** j_ equals to either 0 or 1, where _**m** j_ = 1 means the corresponding ( _j_ -th) element in the state representation _**s**_[(] _t[i]_[)] is important to the agent’s current action _**a** t_[(] _[i]_[)] , otherwise _**m** j_ = 0. We design _**m** j_ to follow a Bernoulli distribution Bern( _θj_ ), with the parameter _θj_ . Finally, we add this explanation mask on top of each state in _D_ , input the masked state _**s**_ ˜[(] _t[i]_[)] into the agent’s policy network, and obtain a masked action _**a**_ ˜[(] _t[i]_[)][.]
+
+**==> picture [301 x 21] intentionally omitted <==**
+
+Our goal is to mask as many elements in a state _**s**_[(] _t[i]_[)] as possible but keeping its corresponding masked action _**a**_ ˜[(] _t[i]_[)] as similar as the agent’s original action _**a**_[(] _t[i]_[)][.][This filters out features that are not important] to the agent’s current action and only preserves the important ones. As discussed above, the preserved
+
+4
+
+features most likely represent the trigger that is the reason for the agent’s inappropriate actions at the trigger-presented time steps. Note that the trigger of adversarial agent attacks is an action sequence, which is encoded in certain dimensions of the state vector. By highlighting the dimensions pertaining to the adversarial agent’s action, our method could identify the trigger actions.
+
+**Explanation Parameter Learning.** We follow Guo et al. (2021b) to solve the step-level explanation model. As for the feature-level explanation model (Eqn. 2), our goal is to minimize the difference between the masked action ˜ _**a**_[(] _t[i]_[)] and the shielding agent’s original action _**a**_[(] _t[i]_[)] at the states in _D_ . This is equivalent to maximize the marginal likelihood _p_ ( _**a** |_ _**s** , θ_ 1: _J_ ), which minimizes the difference between the distribution where _**a**_ ˜ _t_[(] _[i]_[)] is sampled from (i.e., _π_ (˜ _**s**_[(] _t[i]_[)][)][) and the agent’s original action distribution.] Unfortunately, log _p_ ( _**a** |_ _**s**_ ) is intractable because _**m**_ is discrete and non-differentiable. To tackle this challenge, we leverage the concrete distribution (Maddison et al., 2016) and Jensen’s Inequality to derive a lower bound of log _p_ ( _**a** |_ _**s**_ ).
+
+**Theorem 1.** _Given_ _**m** j ≈ hθ_ ( _**u**_ ) = _σ_ ( _[lo][g][α][j]_[+] _[lo][g]_[(] _**[u]** λ[j][/]_[(][1] _[−]_ _**[u]**[j]_[))] ) _, where σ_ ( _·_ ) _is the sigmoid function,_ _**u** j ∼ uniform_ (0 _,_ 1) _, and αj_ = 1 _−θjθj[.][We have the following inequality.]_
+
+**==> picture [273 x 10] intentionally omitted <==**
+
+Appendix A specifies the derivative of Eqn. 3. Instead of maximizing the original log marginal likelihood, we maximize its lower bound. We consider the typical cases where the agent’s policy follows a Gaussian or Categorical distribution. Specifically, we have log _p_ ( _**a**_[(] _t[i]_[)] _[|]_ _**[s]**_[(] _t[i]_[)] _[, h][θ]_[(] _**[u]**_[))] equals to _∥_ _**a**_[(] _t[i]_[)] _− π_ ( _**s**_[(] _t[i]_[)] _⊙ hθ_ ( _**u**_ )) _∥_ for the Gaussian cases, and _**a**_ log _p_ ( _π_ ( _**s**_[(] _t[i]_[)] _⊙ hθ_ ( _**u**_ ) = _**a**_ ) for the categorical distribution. With the approximations above, we can solve _θ_ 1: _J_ by maximizing E _D_ [E _**u**_ [log _p_ ( _**a**_[(] _t[i]_[)] _[|]_ _**[s]** t_[(] _[i]_[)] _[, h][θ]_[(] _**[u]**_[))]] +] _[ λ][R]_[(] _[θ]_[)][ using a first-order optimization method.][Here,] _[ R]_[(] _[θ]_[)][ is an] elastic net (Zou & Hastie, 2005) regularization.
+
+After conducting the two-step explanation, we identify a potential trigger, denoted as _T_ . In particular, for the perturbation-based attack, we compute the average values of the state features selected by _**m**_ across trigger-present time steps as the trigger patch (Fig. 1). For adversarial agent attacks, we first identify a continuous trigger-present time slice in each trajectory ( _t_ 1 _, ..., tL_ ). Then, we compute the average value of the selected features in each state across all trajectoriesaverage state sequence ( _**s**_ ¯ _t_ 1 _, ...,_ ¯ _**s** tL_ ) as the indicator of the trigger actions. _**s**_ ¯ _tl_ = _N_[1] � _s_ ˜( _tli_ )[and use this]
+
+## 3.3 BACKDOOR SHIELDING
+
+We define two Markov decision processes (MDP) for the shielding agent,ˆ _M_ = _{S, A, R, P, γ}_ and _M_ = _{S_[ˆ] _, A, R, P, γ}_ , where _M_ and _M_[ˆ] refers to the MDP of the clean and operating environment. _**s**_ ˆ _∈ S_[ˆ] can be poisoned or clean, and we are not aware of its cleanliness. For a multi-agent environment, we fix the policy of the non-shielding agents, and the environment becomes an MDP (Guo et al., 2021a). Given an agent’s policy _π_ , we define its state occupancy distribution in the clean and operating environment as _ρ[π]_ ( _**s**_ ) = (1 _−γ_ )[�] _t[γ][t][p]_[(] _**[s]**[t]_[=] _**[ s]**[|][π]_[)][ and][ ˆ] _[ρ][π]_[(ˆ] _**[s]**_[) = (1] _[−][γ]_[)][ �] _t[γ][t][p]_[(ˆ] _**[s]**[t]_[=] _**[s]**_[ˆ] _[|][π]_[)][.] Similarly, we also define the expected total reward of the agent in the clean and operating environment as _η_ ( _π_ ) = E[[�] _t[γ][t][R]_[(] _**[s]**[, π]_[(] _**[s]**_[))]][ and] _[η]_[ˆ][(] _[π]_[) =][ E][[][�] _t[γ][t][R]_[(ˆ] _**[s]**[, π]_[(ˆ] _**[s]**_[))]][.]
+
+**Retraining Objective Function.** Recall that the retraining goal is to improve the agent’s performance in the operating environment and maintain its performance in the clean environment. This can be ˆ ˆ interpreted as the following objective function: argmax _π_ ˆ _η_ (ˆ _π_ ), s.t. _|η_ (ˆ _π_ ) _− η_ ( _π_ ) _| ≤ ϵ_ , where _π_ is the retrained policy. To solve this objective function, we first define the following approximation ˆ ˆ ˆ of _η_ (ˆ _π_ ) based on _η_ ( _π_ ). _Lπ_ (ˆ _π_ ) = _η_ ( _π_ ) +[�] _**s**_ ˆ _[ρ]_[ˆ] _[π]_[(ˆ] _**[s]**_[)][ �] _**a**[π]_[ˆ][(] _**[a]**[|]_ _**[s]**_[ˆ][)] _[A][π]_[(ˆ] _**[s]**[,]_ _**[ a]**_[)][, where] _[ A]_[ is the advantage] function. According to Schulman et al. (2015), we have the following inequalityˆ ˆ ˆ _η_ (ˆ _π_ ) _≥ Mπ_ (ˆ _π_ ) = [ _MLππ_ (ˆ( _ππ_ )) = _−Cη_ ˆmax( _π_ ). _**s**_ ˆAs a result, without considering the constraint, we can guarantee the performance of _∼ρ_ ˆ _π_ KL( _π_ ( _·|_ _**s**_ ) _∥π_ ( _·|_ _**s**_ ))]. By maximizing _Mπ_ (ˆ _π_ ), we can guarantee that _Mπ_ (ˆ _π_ ) _≥_ the retrained agent will be improved in the operating environment, i.e., _η_ ˆ(ˆ _π_ ) _≥ η_ ˆ( _π_ ).
+
+To realize the constraint _|η_ (ˆ _π_ ) _− η_ ( _π_ ) _| ≤ ϵ_ , we first introduce the following theorem.
+
+ˆ **Theorem 2.** _Given a policy π and its retrained policy π, we have the following inequality |η_ ( _π_ ) _−_ ˆ _η_ (ˆ _π_ ) _| ≤ Cmax_ _**s** ∼ρπ_ KL( _π_ ( _·|_ _**s**_ ) _∥π_ ( _·|_ _**s**_ )) _._
+
+5
+
+See Appendix A for the proof. Theorem 2 states that by constraining the maximum KL divergence between _π_ and ˆ _π_ in the clean states, we can bound the difference between the _η_ ( _π_ ) and _η_ (ˆ _π_ ) and thus maintain the agent’s performance in the clean environment.
+
+As such, we can transform the objective function above to the following objective function.
+
+**==> picture [325 x 28] intentionally omitted <==**
+
+By solving Eqn. 4, we theoretically guarantee that the shielding agent achieves a higher reward in an operating environment ( _η_ ˆ(ˆ _π_ ) _≥ η_ ˆ( _π_ )) while keeping its performance in the clean environment ( _|η_ (ˆ _π_ ) _− η_ ( _π_ ) _| ≤ ϵ_ ).
+
+**Retraining Algorithm.** We conduct the retraining in the operating environment. To approximate the constraint _K_ in Eqn. 4, we need to identify a set of clean states in the operating environment. For the perturbation-based attack, we apply the explanation mask to the current state and compare the feature values in the highlighted region with _T_ . If their difference is within a certain threshold, we deem _**s** t_ as a poisoned state; otherwise, we treat it as a clean state. We apply similar operations for the adversarial agent attack to compare the agent’s current action with the identified trigger actions. Algorithm 1 in Appendix A shows our final backdoor shielding algorithm. At a high level, we approximate _K_ with the clean states identified from the operating environment and retrain the shielding agent by maximizing Eqn. 4. Appendix B specifies implementation and hyper-parameters.
+
+## 4 EVALUATION
+
+## 4.1 EXPERIMENT SETUP
+
+**Attacks and Environments.** We first select Trojdrl (Kiourti et al., 2019), a perturbation-based attack against single-player environments. Trojdrl adds a 3 _×_ 3 square patch to the agent’s state representation and forces the backdoored agent to take either a pre-specified action (targeted attack) or a random action (untargeted attack) at poisoned states. Here, we mainly test SHINE against the targeted, and Appendix E shows the results against the untargeted attack. We follow Trojdrl and select three Atari games from the OpenAI Gym (Brockman et al., 2016) environment pool - Pong, Breakout, and Space Invaders. We also consider a perturbation-based attack against the multi-agent cooperative RL (Chen et al., 2022b). We select the SMAC environment and use the default attack setup to launch two attacks: one against a Q-learning algorithm QMIX and the other against a policy gradient algorithm COMA. Appendix A discusses how to adapt SHINE to this attack against multi-agent RL. Regarding the adversarial agent attack, we select Backdoorl (Wang et al., 2021a), designed for two-player competitive Markov games. We also use three MuJoCo environments selected by Backdoorl, i.e., You-Shall-Not-Pass, Sumo-Humans, and Run-To-GO-Ants (Todorov et al., 2012). We follow Backdoorl and set the trigger actions as standing still for a few time steps.
+
+Using the selected environments, we first train a clean agent to achieve near-optimal performance. Then, we train backdoored agents such that each agent’s reward reduces dramatically when the trigger is presented while keeping near-optimal in the clean environment. Finally, we simulate the operating environment by presenting the trigger in the environment with probability _Pα_ at each time step.
+
+**Baseline.** There is no existing work that considers the same setup and defense goal as ours. We first select two state-of-the-art trigger restoration techniques designed for classifiers – NC (Wang et al., 2019) and FeatureRE (Wang et al., 2022). In particular, we collect a set of states and actions of the shielding agent and run these methods by treating the agent’s actions as the target classes. We deem the restored trigger with the smallest _l_ 0 norm as the backdoor trigger. We use our proposed retraining method on the triggers identified by the NC and FeatureRE to retrain the shielding agent. Note that these methods cannot be applied to adversarial agent attacks or environments with a continuous action space. We also consider a straightforward baseline, that is, to directly retrain the shielding agent in the operating environment using the PPO algorithm without applying any shielding (denoted as “Direct retraining”). Section 2 discusses two other existing DRL backdoor defenses. Bharti et al. (2022) requires accessing clean environments. Appendix C shows that SHINE is more effective, generalizable, and scalable than Bharti et al. (2022).[1]
+
+> 1Another defense (Guo et al., 2022) is still a pre-print paper without public implementation. Besides, it cannot be applied to perturbation-based attacks. As such, we do not compare it with SHINE in our experiments.
+
+6
+
+Table 1: Trigger restoration fidelity of SHINE , NC, and FeatureRE. Note that “-” means not applicable.
+
+|Method|Pong|Breakout|Space Invaders|SMAC|You-Shall-Not-Pass|Sumo-Humans|Run-to-Go-Ants|
+|---|---|---|---|---|---|---|---|
+|NC|0.268_±_0.033|0.296_±_0.020|0.217_±_0.036|0.045_±_0.009|-|-|-|
+|FeatureRE|0.936_±_0.005|0.962_±_0.012|0.927_±_0.006|0.896_±_0.011|-|-|-|
+|SHINE|**0.998**_±_0.001|**0.997**_±_0.001|**0.998**_±_0.001|**0.936**_±_0.003|**0.930**_±_0.002|**0.973**_±_0.006|**0.981**_±_0.003|
+
+Table 2: Performance of _backdoored_ agents retrained with different methods in the operating and clean environment. We report the average score or average winning rate across 1,000 game rounds. We also conduct a paired t-test to demonstrate the statistical significance of results in this table and analyze the agent’s action distribution in clean and poisoned states of the operating environment. The results are shown in Appendix F.
+
+|Environment|Method|Pong|Breakout|Space Invaders|QMIX (%)|COMA (%)|You-Shall- Not-Pass (%)|Sumo- Humans (%)|Run-to- Go-Ants (%)|
+|---|---|---|---|---|---|---|---|---|---|
+||Original|-0.010_±_0.001|16.40_±_0.48|108.3_±_2.9|19.6_±_0.1|62.0_±_0.7|17.9_±_0.4|10.4_±_0.2|16.2_±_0.2|
+|Operating|Direct retraining NC|0.032_±_0.002 -0.102_±_0.005|20.37_±_1.72 11.50_±_0.69|639.0_±_5.4 293.7_±_1.4|82.6_±_0.5 23.8_±_0.3|88.9_±_1.8 21.9_±_0.6|27.8_±_4.3 -|23.6_±_2.8 -|37.6_±_0.3 -|
+||FeatureRE|0.124_±_0.003|15.36_±_1.02|403.3_±_2.1|33.2_±_0.5|23.9_±_0.1|-|-|-|
+||SHINE|**0.728**_±_0.027|**28.63**_±_2.05|**832.9**_±_7.5|**99.1**_±_0.8|**92.3**_±_1.2|**48.2**_±_1.8|**32.4**_±_1.3|**52.4**_±_0.6|
+||Original|0.680_±_0.030|22.33_±_1.05|685.3_±_3.5|99.6_±_0.9|96.3_±_0.5|49.8_±_0.2|29.3_±_0.1|52.0_±_0.4|
+|Clean|Direct retraining NC|0.286_±_0.016 0.136_±_0.013|21.82_±_1.90 12.66_±_1.02|723.2_±_2.7 301.6_±_2.8|99.1_±_0.6 99.3_±_0.1|96.9_±_1.2 97.3_±_0.6|38.4_±_3.2 -|23.5_±_3.6 -|51.0_±_1.2 -|
+||FeatureRE|0.293_±_0.021|22.57_±_1.42|703.9_±_9.2|99.2_±_0.1|96.9_±_0.5|-|-|-|
+||SHINE|0.734_±_0.021|25.35_±_1.60|835.1_±_3.6|99.2_±_0.8|97.0_±_0.5|49.5_±_1.6|33.5_±_1.8|52.9_±_0.6|
+
+## 4.2 EXPERIMENT DESIGN
+
+**Exp-I: Trigger Restoration Faithfulness.** We first evaluate whether SHINE faithfully identifies the trigger. For perturbation-based attacks, we compare the trigger _T_ identified by SHINE with the real trigger _T_[ˆ] and compute the precision _[∥][T ] ∥T ∥[⊙][T ]_[ˆ] 1 _[∥]_[1] and recall _[∥][T ] ∥T ∥[⊙]_[ˆ] _[T ]_[ˆ] 1 _[∥]_[1][.][We report the F1 score as] the faithfulness metric. We compare SHINE with NC and FeatureRE under the perturbation-based attacks. Since adversarial agent attacks do not have a fixed trigger patch, we compare the trigger actions identified by SHINE with the real ones designed by the attackers and report the F1 score.
+
+**Exp-II: Backdoor Shielding Effectiveness.** Second, we evaluate the efficacy of SHINE in backdoored agent shielding. In particular, we retrain the backdoored agents in Exp-I using our proposed retraining algorithm and report their performance in the operating and clean environment before and after retraining. We compare SHINE with the three baselines mentioned above.
+
+**Exp-III: SHINE on Clean Agents.** We also apply SHINE to the clean agent in each environment to verify that SHINE will not affect a clean agent’s performance. Similar to Exp-II, We report each agent’s performance in the operating and clean environment before and after shielding.
+
+**Exp-IV: Sensitivity of SHINE against Attack Variations.** We use the Atari-pong environment of the perturbation-based attack to test the sensitivity of SHINE against attacks varied in trigger patterns, sizes, and poison rates. We craft eight attack variations. We first vary the trigger pattern from the dense patch to more incompact triggers (Cross and Equal sign). We also keep the trigger pattern as dense and vary the trigger size (3 _×_ 3, 4 _×_ 4, 5 _×_ 5) and the trigger presenting probabilities ( _Pα_ = 0 _._ 1 _/_ 0 _._ 2 _/_ 0 _._ 3). In each environment, we train a backdoored agent, shield it with our method and two baseline approaches (Direct training and NC), and report the shielding performance.
+
+We repeat each experiment 3 times with different random seeds and report the mean and standard deviation (std). Furthermore, we conduct an ablation study, demonstrate the computational efficiency, evaluate the hyper-parameter sensitivity, and test SHINE against more attack variations. Due to the space limit, we present these experiments in Appendix D& F.
+
+## 4.3 EXPERIMENT RESULTS
+
+**Results of Exp-I.** Tab. 1 shows the trigger restoration fidelity. Both NC and FeatureRE show limited capability in trigger restoration because these methods do not consider DRL’s sequential decision-making nature. In contrast, SHINE can faithfully identify the trigger for both perturbationbased attacks and adversarial agent attacks, verifying the effectiveness of our trigger restoration technique (Appendix F showcases the identified triggers). The ablation study in Appendix F further demonstrates the efficacy of step-level and feature-level explanations, respectively.
+
+7
+
+Table 3: Performance of _clean_ agents retrained with SHINE in the operating and clean environment. We report the average score and average winning rate across 1,000 game rounds, respectively.
+
+|Environment|Method|Pong|Breakout|Space Invaders|QMIX (%)|COMA (%)|You-Shall- Not-Pass (%)|Sumo- Humans (%)|Run-to- Go-Ants (%)|
+|---|---|---|---|---|---|---|---|---|---|
+|Operating|Original SHINE|0.816_±_0.040 0.818_±_0.038|19.50_±_0.59 24.99_±_1.07|835.6_±_1.8 838.2_±_3.6|99.0_±_0.2 99.3_±_0.6|96.3_±_0.1 96.9_±_1.7|50.2_±_0.3 51.3_±_0.9|34.5_±_0.2 35.3_±_0.5|53.5_±_0.2 53.9_±_0.3|
+|Clean|Original SHINE|0.778_±_0.067 0.769_±_0.089|27.50_±_1.32 26.27_±_0.64|836.4_±_3.2 838.2_±_3.4|99.8_±_0.1 99.6_±_0.1|96.6_±_0.1 97.9_±_0.2|51.2_±_0.1 51.5_±_0.5|35.8_±_0.2 35.7_±_1.2|54.5_±_0.1 53.8_±_0.2|
+
+**Results of Exp-II and Exp-III.** Tab. 2 shows the performance of backdoored agents shielded by SHINE and three baseline methods. First, NC and FeatureRE have limited efficacy due to the low fidelity of their resolved triggers. Direct retraining could improve the retrained agent’s performance in the operating/poisoned environment, but the improvement is still limited. More importantly, due to environmental variations, it cannot preserve the retrained agent’s effectiveness in the original clean environment. Note that direct retraining outperforms NC and FeatureRE in some cases, demonstrating the negative impact of retraining with non-faithful triggers. In comparison, benefiting from its highfidelity trigger, the agent retrained by SHINE achieves the highest performance in the operating environment of all the games. In addition, SHINE well retains (or even improves) the retrained agent’s effectiveness in the original clean environment. This result is aligned with our theoretical analysis in Section 3.3, verifying the effectiveness of our backdoor shielding in robustifying a backdoored agent while preserving its generalizability.
+
+Tab. 3 shows a clean agent’s performance before and after shielding it with SHINE . As shown in the table, SHINE introduces a minor performance drop or improves the clean agent’s performance in both operating and clean environments. This is an important property in that users could directly apply SHINE to arbitrary agents without making critical decisions of which ones are truly backdoored agents, which, in general, is sensitive to the choice of detection threshold.
+
+**Results of Exp-IV.** retraining performance of SHINE and Fig. 2 shows the 1 1 1 baseline methods against different at0 _._ 5 0 _._ 5 0 _._ 5 tack variations. SHINE only has marginal performance variations in 0 DirectNC 0 DirectNC 0 DirectNC different setups, verifying SHINE’s _−_ 0 _._ 5 Block Cross SHINEEqual _−_ 0 _._ 5 3 _×_ 3 4 _×_ 4 SHINE5 _×_ 5 _−_ 0 _._ 5 0.1 0.2 SHINE0.4 insensitivity against attack variations. Trigger pattern Trigger size Trigger presenting probability This verifies the generalizability and (a) (b) (c) practicability of SHINE in that users could apply SHINE without tailoring Figure 2: The average score of the agent retrained with different for different attack variations. Fig. 2 shielding methods against attack variations. also demonstrates that SHINE outperforms baselines against all attack variations, further demonstrating its superiority over these methods. In appendix F, we demonstrate the robustness of SHINE against more variations in trigger shapes and sizes.
+
+## 5 DISCUSSION
+
+**Adaptive Attacks.** We first consider a straightforward adaption of the perturbation-based attack. Specifically, we allow the trigger to present at different locations in the environment snapshot at different time steps. This adaptive attack with a dynamic trigger could potentially bypass our method because our feature-level explanation resolves a fixed trigger mask across all the trigger-presented time steps. We follow the attack method in TrojDRL (Kiourti et al., 2019) and try to launch this attack in the Pong environment. The attack cannot succeed even after we carefully tune the training parameters. We can only reduce the agent’s average score in the operating environment by 30.3% and 1.2% for targeted and untargeted attacks, respectively. Our attempts motivate future work to design stronger backdoor attacks that could inject this dynamic trigger. Even if this attack succeeds, we can adjust SHINE to defend against it. First, rather than obtaining a common explanation mask, we first solve a specific mask for each state to capture the trigger movement. During retraining, we slide our identified trigger _T_ across the whole state representation to decide its cleanliness (Appendix A).
+
+8
+
+Another possible adaptive attack is to attack our explanation methods. We found only one existing attack (Huai et al., 2020) that targets gradient/saliency-based explanation methods. Since both our step-level and feature-level explanations have a different mechanism from these gradient-based methods, this attack cannot be directly applied to our method. To enable an effective attack against our explanation method, the attacker needs to first design a proper attack against either step-level or feature-level explanation method. The attacker also needs to consider how to properly design this attack, such that it could work together with the trojan attack against the DRL agent. We believe designing such an attack requires non-trivial effort and leave it as our future work.
+
+**Distinction from Environment-perturbation Attacks and Robust RL.** Our problem differs from environment-perturbation attacks (Russo & Proutiere, 2019; Zhang et al., 2021; Liang et al., 2022; Sun et al., 2021; Kamalaruban et al., 2020), which attack a pretrained agent by adding perturbations to its observations. Defenses against such attacks typically limit the perturbation strength within a _ϵ_ -norm ball and design methods to train optimal policies under this perturbation ball. Similarly, some robust RL methods (Pinto et al., 2017; Tessler et al., 2019) train policies under random perturbations to the agent’s observations or actions. Due to differences in attack/problem setups, these methods cannot be directly applied to our problem. Our future work will explore novel DRL backdoor defenses by following the idea of these works. For instance, we will investigate how to model the defense against trojan attacks as a Partially Observable MDP and train a robust policy accordingly.
+
+**Postmortem Defense.** SHINE operates in a postmortem fashion, meaning it conducts shielding after a backdoor is triggered. This approach significantly lowers the threshold and cost for defense since it does not require a guaranteed clean environment, which can be challenging to construct. We acknowledge that for extremely critical applications, triggering the attack can be costly. Recall that SHINE can effectively identify triggers even when they occur very infrequently ( _Pα_ = 0 _._ 1). This suggests that SHINE does not require extensive failed cases to apply shielding. For critical applications, SHINE offers a rapid response once an attack occurs, minimizing future damage. It represents a practical defense approach in environments where attackers can access.
+
+**More complicated triggers.** As mentioned in Section 4, we first use default triggers of existing attacks to evaluate our method. Then, we demonstrate the effectiveness of SHINE against perturbationbased attacks with more complicated and incompact triggers (Exp-IV. and Appendix F). Furthermore, existing attacks against supervised classifiers also explore other trigger patterns (e.g., watermarks), which have not been used for DRL attacks yet. In future work, we will explore designing effective attacks with such trigger patterns and extending SHINE to defend against these attacks.
+
+**Limitations.** First, existing research proposes other methods to explain a DRL agent’s action (e.g., Atrey et al. (2019); Greydanus et al. (2018); Puri et al. (2020)). Our future research endeavor will explore extending these methods to identify the backdoor trigger in our context. Second, we compare SHINE with NC and FeatureRE, two state-of-the-art backdoor detection methods for supervised classifiers. While recent research proposes other methods Wang et al. (2023); Tao et al. (2022), they are still designed for supervised classifiers and suffer similar limitations. Thus, they have limited efficacy and generalizability in our problem. Our future work will test whether these methods can yield better results than NC against perturbation-based attacks in environments with a discrete action space. Third, we evaluate SHINE against the attacks in three types of environments. Our future work will extend the backdoor attacks and defenses to broader types of games, including extensive-form games (Go (Tian et al., 2019), board games (Lanctot et al., 2019)), multi-agent competitive games (Zhang et al., 2019). Finally, we show that SHINE can still detect and shield a backdoored agent even when the trigger varies in size and presenting timesteps/probability. Our future work will explore providing a theoretical guarantee against these variations.
+
+## 6 CONCLUSION
+
+This work proposes SHINE, a method for shielding DRL agents against backdoor attacks. SHINE first identifies the backdoor trigger presented in the environment and then retrains the DRL agent to eliminate the influence of the trigger on its policy. Our experiments in various benchmark RL environments demonstrate SHINE’s efficacy in shielding backdoored agents against different backdoor attacks while maintaining the clean agents’ performance. With all these experiments and analyses, we safely conclude that through explanation and retraining, we can effectively shield DRL agents from backdoor attacks in a practical scenario.
+
+9
+
+## REFERENCES
+
+Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In _ICML_ , 2017.
+
+- David Alvarez-Melis and Tommi S Jaakkola. Towards robust interpretability with self-explaining neural networks. In _NeurIPS_ , 2018.
+
+Dan Amir and Ofra Amir. Highlights: Summarizing agent behavior to people. In _AAMAS_ , 2018.
+
+- Akanksha Atrey, Kaleigh Clary, and David Jensen. Exploratory not explanatory: Counterfactual analysis of saliency maps for deep reinforcement learning. _arXiv preprint arXiv:1912.05743_ , 2019.
+
+- Eugene Bagdasaryan, Andreas Veit, Yiqing Hua, Deborah Estrin, and Vitaly Shmatikov. How to backdoor federated learning. In _AISTAT_ , 2020.
+
+- Shubham Kumar Bharti, Xuezhou Zhang, Adish Singla, and Xiaojin Zhu. Provable defense against backdoor policies in reinforcement learning. In _NeurIPS_ , 2022.
+
+- Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. _arXiv preprint arXiv:1606.01540_ , 2016.
+
+Nicholas Carlini and Andreas Terzis. Poisoning and backdooring contrastive learning. _arXiv preprint arXiv:2106.09667_ , 2021.
+
+Shuo Chen, Yue Qiu, and Jie Zhang. Backdoor attacks on multiagent collaborative systems. _arXiv preprint arXiv:2211.11455_ , 2022a.
+
+- Yanjiao Chen, Zhicong Zheng, and Xueluan Gong. Marnet: Backdoor attacks against cooperative multi-agent reinforcement learning. _IEEE Transactions on Dependable and Secure Computing_ , 2022b.
+
+Edward Chou, Florian Tramer, and Giancarlo Pellegrino. Sentinet: Detecting localized universal attacks against deep learning systems. In _IEEE Security and Privacy Workshops (SPW)_ , 2020.
+
+DeepMind. Alphastar: Mastering the real-time strategy game starcraft ii. [URL removed] com/blog/article/alphastar, 2017.
+
+Min Du, Ruoxi Jia, and Dawn Song. Robust anomaly detection and backdoor attack detection via differential privacy. _arXiv preprint arXiv:1911.07116_ , 2019.
+
+Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural networks. In _ACSAC_ , 2019.
+
+- Jacob R Gardner, Geoff Pleiss, David Bindel, Kilian Q Weinberger, and Andrew Gordon Wilson. Gpytorch: Blackbox matrix-matrix gaussian process inference with gpu acceleration. In _NeurIPS_ , 2018.
+
+- Samuel Greydanus, Anurag Koul, Jonathan Dodge, and Alan Fern. Visualizing and understanding atari agents. In _ICML_ , 2018.
+
+- Junfeng Guo, Ang Li, and Cong Liu. Backdoor detection in reinforcement learning. _arXiv preprint arXiv:2202.03609_ , 2022.
+
+Wenbo Guo, Lun Wang, Yan Xu, Xinyu Xing, Min Du, and Dawn Song. Towards inspecting and eliminating trojan backdoors in deep neural networks. In _ICDM_ , 2020.
+
+Wenbo Guo, Xian Wu, Sui Huang, and Xinyu Xing. Adversarial policy learning in two-player competitive games. In _ICML_ , 2021a.
+
+Wenbo Guo, Xian Wu, Usmann Khan, and Xinyu Xing. Edge: Explaining deep reinforcement learning policies. _NeurIPS_ , 2021b.
+
+Mengdi Huai, Jianhui Sun, Renqin Cai, Liuyi Yao, and Aidong Zhang. Malicious attacks against deep reinforcement learning interpretations. In _KDD_ , 2020.
+
+10
+
+- Sandy H Huang, Kush Bhatia, Pieter Abbeel, and Anca D Dragan. Establishing appropriate trust via critical states. In _IROS_ , 2018.
+
+- Alexis Jacq, Johan Ferret, Olivier Pietquin, and Matthieu Geist. Lazy-mdps: Towards interpretable rl by learning when to act. In _AAMAS_ , 2022.
+
+- Parameswaran Kamalaruban, Yu-Ting Huang, Ya-Ping Hsieh, Paul Rolland, Cheng Shi, and Volkan Cevher. Robust reinforcement learning via adversarial training with langevin dynamics. _Advances in Neural Information Processing Systems_ , 33:8127–8138, 2020.
+
+- Panagiota Kiourti, Kacper Wardega, Susmit Jha, and Wenchao Li. Trojdrl: Trojan attacks on deep reinforcement learning agents. _arXiv preprint arXiv:1903.06638_ , 2019.
+
+- Marc Lanctot, Edward Lockhart, Jean-Baptiste Lespiau, Vinicius Zambaldi, Satyaki Upadhyay, Julien Pérolat, Sriram Srinivasan, Finbarr Timbers, Karl Tuyls, Shayegan Omidshafiei, et al. Openspiel: A framework for reinforcement learning in games. _arXiv preprint arXiv:1908.09453_ , 2019.
+
+- Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. _Journal of Machine Learning Research_ , 2016.
+
+- Yongyuan Liang, Yanchao Sun, Ruijie Zheng, and Furong Huang. Efficient adversarial training without attacking: Worst-case-aware robust reinforcement learning. _arXiv preprint arXiv:2210.05927_ , 2022.
+
+- Yingqi Liu, Wen-Chuan Lee, Guanhong Tao, Shiqing Ma, Yousra Aafer, and Xiangyu Zhang. Abs: Scanning neural networks for back-doors by artificial brain stimulation. In _CCS_ , 2019.
+
+- Wanlun Ma, Derui Wang, Ruoxi Sun, Minhui Xue, Sheng Wen, and Yang Xiang. The" beatrix”resurrections: Robust backdoor detection via gram matrices. _arXiv preprint arXiv:2209.11715_ , 2022.
+
+- Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. _arXiv preprint arXiv:1611.00712_ , 2016.
+
+- OpenAI. Openai at the international 2017. [URL removed] 2017.
+
+- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. _arXiv preprint arXiv:1912.01703_ , 2019.
+
+- Lerrel Pinto, James Davidson, Rahul Sukthankar, and Abhinav Gupta. Robust adversarial reinforcement learning. In _ICML_ . PMLR, 2017.
+
+- Nikaash Puri, Sukriti Verma, Piyush Gupta, Dhruv Kayastha, Shripad Deshmukh, Balaji Krishnamurthy, and Sameer Singh. Explain your move: Understanding agent actions using specific and relevant feature attribution. In _ICLR_ , 2020.
+
+- Antonin Raffin, Ashley Hill, Maximilian Ernestus, Adam Gleave, Anssi Kanervisto, and Noah Dormann. Stable baselines3, 2019.
+
+- Alessio Russo and Alexandre Proutiere. Optimal attacks on reinforcement learning policies. _arXiv preprint arXiv:1907.13548_ , 2019.
+
+- Aniruddha Saha, Ajinkya Tejankar, Soroush Abbasi Koohpayegani, and Hamed Pirsiavash. Backdoor attacks on self-supervised learning. In _CVPR_ , 2022.
+
+- John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In _ICML_ , 2015.
+
+- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. _arXiv preprint arXiv:1707.06347_ , 2017.
+
+11
+
+David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. _Nature_ , 2016.
+
+- Yanchao Sun, Ruijie Zheng, Yongyuan Liang, and Furong Huang. Who is the strongest enemy? towards optimal and efficient evasion attacks in deep rl. _arXiv preprint arXiv:2106.05087_ , 2021.
+
+- Lei Tai, Giuseppe Paolo, and Ming Liu. Virtual-to-real deep reinforcement learning: Continuous control of mobile robots for mapless navigation. In _IROS_ , 2017.
+
+- Guanhong Tao, Guangyu Shen, Yingqi Liu, Shengwei An, Qiuling Xu, Shiqing Ma, Pan Li, and Xiangyu Zhang. Better trigger inversion optimization in backdoor scanning. In _CVPR_ , 2022.
+
+- Chen Tessler, Yonathan Efroni, and Shie Mannor. Action robust reinforcement learning and applications in continuous control. In _ICML_ , 2019.
+
+- Yuandong Tian, Jerry Ma, Qucheng Gong, Shubho Sengupta, Zhuoyuan Chen, James Pinkerton, and C Lawrence Zitnick. Elf opengo: An analysis and open reimplementation of alphazero. In _ICML_ , 2019.
+
+- Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In _2012 IEEE/RSJ international conference on intelligent robots and systems_ , 2012.
+
+- Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. In _NeurIPS_ , 2018.
+
+- Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y. Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In _S&P_ , 2019.
+
+- Hongyi Wang, Kartik Sreenivasan, Shashank Rajput, Harit Vishwakarma, Saurabh Agarwal, Jy-yong Sohn, Kangwook Lee, and Dimitris Papailiopoulos. Attack of the tails: Yes, you really can backdoor federated learning. In _NeurIPS_ , 2020.
+
+- Lun Wang, Zaynah Javed, Xian Wu, Wenbo Guo, Xinyu Xing, and Dawn Song. Backdoorl: Backdoor attack against competitive reinforcement learning. _arXiv preprint arXiv:2105.00579_ , 2021a.
+
+- Yue Wang, Esha Sarkar, Wenqing Li, Michail Maniatakos, and Saif Eddin Jabari. Stop-and-go: Exploring backdoor attacks on deep reinforcement learning-based traffic congestion control systems. _IEEE Transactions on Information Forensics and Security_ , 2021b.
+
+- Zhenting Wang, Kai Mei, Hailun Ding, Juan Zhai, and Shiqing Ma. Rethinking the reverseengineering of trojan triggers. _arXiv preprint arXiv:2210.15127_ , 2022.
+
+- Zhenting Wang, Kai Mei, Juan Zhai, and Shiqing Ma. Unicorn: A unified backdoor trigger inversion framework. In _ICLR_ , 2023.
+
+Maurice Weber, Xiaojun Xu, Bojan Karlaš, Ce Zhang, and Bo Li. Rab: Provable robustness against backdoor attacks. _arXiv preprint arXiv:2003.08904_ , 2020.
+
+- Fan Wu, Linyi Li, Chejian Xu, Huan Zhang, Bhavya Kailkhura, Krishnaram Kenthapadi, Ding Zhao, and Bo Li. Copa: Certifying robust policies for offline reinforcement learning against poisoning attacks. _arXiv preprint arXiv:2203.08398_ , 2022.
+
+- Chulin Xie, Keli Huang, Pin-Yu Chen, and Bo Li. Dba: Distributed backdoor attacks against federated learning. In _ICLR_ , 2019.
+
+- Zhicong Yan, Gaolei Li, Yuan TIan, Jun Wu, Shenghong Li, Mingzhe Chen, and H Vincent Poor. Dehib: Deep hidden backdoor attack on semi-supervised learning via adversarial perturbation. In _AAAI_ , 2021.
+
+- Zhaoyuan Yang, Naresh Iyer, Johan Reimann, and Nurali Virani. Design of intentional backdoors in sequential models. _arXiv preprint arXiv:1902.09972_ , 2019.
+
+12
+
+Huan Zhang, Hongge Chen, Duane Boning, and Cho-Jui Hsieh. Robust reinforcement learning on state observations with learned optimal adversary. _arXiv preprint arXiv:2101.08452_ , 2021.
+
+- Kaiqing Zhang, Zhuoran Yang, and Tamer Ba¸sar. Multi-agent reinforcement learning: A selective overview of theories and algorithms. _arXiv preprint arXiv:1911.10635_ , 2019.
+
+- Xuezhou Zhang, Yiding Chen, Xiaojin Zhu, and Wen Sun. Corruption-robust offline reinforcement learning. In _AISTAT_ , 2022.
+
+Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. _Journal of the royal statistical society: series B (statistical methodology)_ , 2005.
+
+13
+
+## A ADDITIONAL TECHNICAL DETAILS
+
+## A.1 PROOF OF THEOREM 1.
+
+Based on Jensen’s inequality, we have the following derivative of the log marginal likelihood log _p_ ( _**a** |_ _**s** , θ_ ).
+
+**==> picture [347 x 37] intentionally omitted <==**
+
+As stated in Theorem 1, by defining _**u**_ , where _**u** j ∼_ uniform(0 _,_ 1), and _αj_ = 1 _−θjθj_[,][we][can] approximate _**m** j_ with _hθ_ ( _**u**_ ) = _σ_ ([lo][g] _[α][j]_[+][lo][g][(] _**[u]** λ[j][/]_[(][1] _[−]_ _**[u]**[j]_[))] ), where _σ_ ( _·_ ) is the sigmoid function. With _**u**_ , we can then derive the following inequality from Eqn. equation 5
+
+**==> picture [334 x 32] intentionally omitted <==**
+
+A.2 PROOF OF THEOREM 2.
+
+We define _Hπ_ (ˆ _π_ ) = _η_ ( _π_ )+ _Nπ_ (ˆ _π_ ) = _η_ ( _π_ )+[�] _**s**[ρ][π]_[ �] _**a**[π]_[ˆ][(] _**[a]**[ |]_ _**[ s]**_[)] _[A][π]_[(] _**[s]**[,]_ _**[ a]**_[)][.][According to Schulman] et al. (2015), we have
+
+**==> picture [341 x 40] intentionally omitted <==**
+
+According to Theorem 1 in Achiam et al. (2017), we can derive
+
+**==> picture [385 x 58] intentionally omitted <==**
+
+Based on Eqn. equation 7 and equation 8, we have the following inequality.
+
+**==> picture [299 x 32] intentionally omitted <==**
+
+## A.3 BACKDOOR SHIELDING ALGORITHM.
+
+Algorithm 1 shows our final backdoor shielding algorithm. Note that, for perturbation-based attacks, to further filter out false positive triggers, we leverage the assumption that a trigger is small and visually imperceptible and add a trigger filter before using the identified trigger for retraining. Specifically, we compute the _l_ 0-norm of _T_ and only use it if _∥T ∥_ 0 is smaller than a threshold (e.g., 5% of the whole state representation features).
+
+## A.4 ADAPTIONS OF SHINE.
+
+**Adaption for Multi-agent Attacks.** Recall that we also apply SHINE against an existing attack for multi-agent cooperative RL in the SMAC environment. We use in-distribution triggers with a trigger size of 5%. We use the 2s3z and 3m map for QMIX and COMA, respectively. To run our method, we need to apply the following adoptions. Specifically, we first applied our explanation-based trigger detection method on the local observations of the cooperative agents to identify the backdoor trigger. In particular, for QMIX, we performed the explanation for each local Q function and then aggregated the identified triggers. For COMA, we directly used the global Q function since it takes the central states as input. Using the identified trigger, we then applied the shielding procedure. Since this attack
+
+14
+
+**Algorithm 1** Backdoor shielding algorithm.
+
+1: **Input:** the operating environment that the trigger show ups at each state with a certain probability, the shielding agent’s original policy _π_ , the identified trigger _T_ , threshold _η_ 1 and _η_ 2, retraining iteration _L_ 2: **for** _l_ = 1 to _L_ **do** 3: Run the current policy _π_ ˆ[(] _[l][−]_[1)] in the environment and collect a set of trajectories _I_ . 4: Define a clean state set _C_ . 5: **for** _i_ = 1 to _|I|_ and _t_ = 1 to _T_ **do** 6: **if** _∥_ _**s**[i] t[⊙]_ _**[m]**[ −T ∥≥][η]_[2] **[then]** 7: _C_ = _C ∪_ _**s**[i] t_ 8: **end if** 9: **end for** ˆ 10: Approximate _K_ in Eqn. (5) with _K_[˜] = E _**s** ∈C_ [KL( _π_ ( _·|_ _**s**_ ) _∥π_[(] _[l][−]_[1)] ( _·|_ _**s**_ ))] 11: Plug _K_[˜] in Eqn. (5), 12: Using _I_ , which contains poisoned states to compute _K_[ˆ] and _Lπ_ (ˆ _π_ ). 13: Update _π_ ˆ[(] _[l][−]_[1)] by solving Eqn. (5) and obtain the updated policy _π_ ˆ[(] _[l]_[)] 14: **end for** ˆ ˆ 15: Return the retrained policy: _π_ = _π_[(] _[L]_[)] (a) SHINE Masks (b) SHINE Triggers (c) Ground Truth (d) Ground Truth TrigMasks gers
+
+Figure 3: Triggers and masks solved by SHINE . We only show 50 _×_ 50 pixels in the top-left corner of the states for better visualization purposes, since the trigger size is small.
+
+considers multiple victim agents, we retrain each agent using algorithm 1. When updating the policy (line 13), we leverage the agent’s original training method (i.e., either QMIX or COMA).
+
+**Adaption for Adaptive Attacks.** As mentioned in Section 4, to defend against the adaptive attack where the trigger varies its location across time, we also need to adapt our defense to solve a specific mask for each state. Specifically, we select the states of the top important time steps identified by our step-level explanation. These states are those where the trigger is most likely to be presented. For each state, we perturb its representation by adding Gaussian noise. Then, we use the original and perturbed states as the input data and apply our feature-level explanation to solve an explanation mask. We solve an explanation mask for each of the selected states, which highlights the different subset of features in the state representation (i.e., different locations in the environment), capturing the movement of the trigger. By applying the explanation masks solved from the select states to their representations, we could identify the common trigger pattern.
+
+Note that this adaption (trigger location variation) is not applicable to the adversarial-agent attack, which does not have a perturbation patch as the trigger. Besides, in the MuJoCo games, the feature meanings in the state representation are pre-defined. In other words, specific dimensions of the state representation correspond to the adversarial agent’s status, including its position and action. This indicates that no matter how the adversarial agent changes its trigger action, it will pertain to fixed dimensions in the state representation, giving a similar explanation mask.
+
+## B IMPLEMENTATION AND HYPER-PARAMETERS
+
+**Implementations.** We use the pytorch (Paszke et al., 2019) and the gpytorch (Gardner et al., 2018) package to implement the trigger detection step of SHINE and stable-baseline (Raffin et al., 2019) to implement the backdoor shielding of SHINE.
+
+15
+
+Table 4: The average score of the agent shielded by SHINE in the operating and clean environment of the Pong game.
+
+Table 5: The average score of backdoored agents shielded with different methods in the operating and clean environment. The agents are subject to untargeted attacks.
+
+|Environment|_λ_|_ϵ_ 0.005 0.01 0.05 0.765 0.728 0.714 0.734 0.734 0.333|Policy Operating Environment Clean Environment|
+|---|---|---|---|
+||1_×_10_−_4 2_×_10_−_4 3_×_10_−_4|||
+||||Direct retraining 0.412 0.560 NC 0.210 0.160 SHINE **0.530** **0.574**|
+|Operating Clean|0.728 0.784 0.644 0.734 0.732 0.522|||
+|||||
+
+**Hyper-parameters.** The key hyper-parameters introduced by our method are the weight of the elastic-net regularization term in the feature-level explanation _λ_ and the strength of the KL constraint in the policy retraining _ϵ_ . We set _λ_ to 1 _×_ 10 _[−]_[4] and _ϵ_ to 0.01. In addition, our method inherits hyperparameters from the selected step-level explanation method – EDGE (Guo et al., 2021b), the policy updating method – PPO (Schulman et al., 2017), and the temperature in the concrete distribution (Maddison et al., 2016). For those hyper-parameters, we use the default choices in their original implementations.
+
+## C SHINE AGAINST LATEST BACKDOOR DEFENSE IN RL
+
+We also evaluate SHINE against the latest backdoor defense against the perturbation-based attack (Bharti et al., 2022). More specifically, we relax our assumption of only accessing to the agent’s operation environment. Instead, we allow access to the original clean environment and apply the defense in Bharti et al. (2022). We compare the backdoored agent’s performance after shielding with our method and the method in Bharti et al. (2022) using the Breakout environment (which is originally used by Bharti et al. (2022) to evaluate their method). Note that we use the same backdoored agent in our evaluation, and shield the agent with SHINE under the same environment. We use their official implementation and adopt the default hyperparameters.
+
+The average score of the agent shielded by our method and Bharti et al. (2022) across 1,000 rounds is 28.63 and 2.5, respectively. SHINE achieves better performance than Bharti et al. (2022), verifying its effectiveness. We note that the results are at a different scale from the reported numbers in Bharti et al. (2022). This is because we set a maximum length of 2,000 for each game round, while they run the game for an unlimited time until it stops naturally. As such, the agents in their experiments collect more scores than those in our setup. Note that, following the suggestion in Bharti et al. (2022), we tried multiple attempts for the singular value thresholds and reported the best result.
+
+In addition, Bharti et al. (2022) requires computing the eigen-decomposition of the concatenation of the state representation, whose complexity is cubic to the dimensionality of the input matrix. This indicates the method in Bharti et al. (2022) will encounter scalability issues when handling environments whose state representation is of high dimensionality and the trajectory is long. Besides, this method is designed only for perturbation-based attacks. As such, SHINE is more generalizable and scalable than the method in Bharti et al. (2022).
+
+## D COMPUTATIONAL EFFICIENCY AND HYPER-PARAMETER SENSITIVITY
+
+**Runtime.** On average, the trigger detection stage of SHINE takes 12 hours, and the retraining stage takes 5 hours on a single NVIDIA RTX A6000 GPU. We believe this runtime is reasonable in that it is still within the normal range of training a DRL agent in benchmark environments.
+
+**Hyper-parameter Sensitivity.** Recall that SHINE introduces two unique hyper-parameters – the elastic-net regularization term in the feature-level explanation _λ_ and the strength of the KL constraint in the policy retraining _ϵ_ . Here, we vary these parameters and observe their influence on SHINE’s performance. In particular, we conduct the experiment on the Pong environment, with the trigger setup the same as the Exp-I in Section 5. We evaluate three choices of _λ_ : 1 _×_ 10 _[−]_[4] , 2 _×_ 10 _[−]_[4] , 3 _×_ 10 _[−]_[4] and three choices of _ϵ_ : 0 _._ 005 _,_ 0 _._ 01 _,_ 0 _._ 05. Tab. 4 shows the performance of the shielded agent in the operating and clean environment under different hyper-parameter settings. The results show that SHINE is insensitive to the subtle variations in these two hyper-parameters.
+
+16
+
+**==> picture [391 x 91] intentionally omitted <==**
+
+**----- Start of picture text -----**
+100 100 100 100 poisoned states poisoned states poisoned states poisoned states 80 clean states 80 clean states 80 clean states 80 clean states 60 60 60 60 40 40 40 40 20 20 20 20 0 0 0 0 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 action action action action (a) Poisoned (b) Direct Retraining (c) NC (d) SHINE action probability (%) action probability (%) action probability (%) action probability (%) **----- End of picture text -----**
+
+Figure 4: Action distributions in poisoned and clean states in the operating environment of the Atari-Pong Game, corresponding to the results of Exp-II. A poisoned policy exhibits a higher probability of taking the target action (#2) in poisoned states than in clean states.
+
+Table 6: Paired t-test p-value between the performance of backdoored agents retrained with our method and those retrained with the baseline methods in the operating environment.
+
+|Method|Pong|Breakout|Space Invaders|QMIX|COMA|You-Shall- Not-Pass|Sumo- Humans|Run-to- Go-Ants|
+|---|---|---|---|---|---|---|---|---|
+|Original|>0.001|>0.001|>0.001|>0.001|>0.001|>0.001|>0.001|>0.001|
+|Direct retraining|>0.001|0.013|>0.001|0.001|0.004|0.002|0.004|>0.001|
+|NC|>0.001|>0.001|>0.001|>0.001|>0.001|-|-|-|
+|FeatureRE|>0.001|>0.001|>0.001|>0.001|>0.001|-|-|-|
+
+## E SHINE AGAINST UNTARGETED ATTACK IN TROJDRL.
+
+In Tab. 5, we show the average score of SHINE and baselines on the Pong game against the untargeted attack in TrojDRL (with the same trigger as the Exp-I. in Section 5). The table shows that SHINE is still more effective than the selected baseline methods against the untargeted attack, which further demonstrates the effectiveness of our method.
+
+## F OTHER EXPERIMENTS.
+
+**Paired t-test for Results in Tab.2.** We conduct a paired t-test to demonstrate the statistical significance of our comparison results in Tab. 2. More specifically, our null hypothesis is _H_ 0 : E[ _D_ ] _≤_ 0, where _D_ is the reward difference between our method and a baseline method. If the _p_ -value is larger than an empirical threshold (e.g., 0.05), we accept _H_ 0, indicating our method cannot outperform the baseline. We report the results in Tab. 6.
+
+**SHINE against more Trigger Variations.** Using the same pong environment as Exp-IV, we consider three trigger shapes: dense square block, cross sign, and equal sign. For each shape, we consider four different sizes: 3 _×_ 3, 4 _×_ 4, 5 _×_ 5, and 6 _×_ 6. We use these 16 triggers to launch the TrojDRL attack and run SHINE for defending. We report the trigger fidelity and final shielding performance in the operating environment in Tab. 7 and Tab. 8. The results show that our method, including the feature-level explanation, is robust against these variations. Note that, for all the variations, we run the same number of epochs for the feature-level explanation. They all take around 10 _∼_ 12 hours on a single NVIDIA RTX A6000 GPU, indicating the changes in trigger size and shape impose a minor influence on the runtime of SHINE.
+
+**Ablation Study.** We add a comprehensive ablation study in the Pong game with the TrojDRL attack (we use the default trigger setup). Specifically, to verify the effectiveness of our trigger restoration. We first replace our trigger restoration method with FeatureRE (Wang et al., 2022) and apply our retraining method using the trigger restored by FeatureRE (Same as Exp-II.). Results in Tab. 9 show that SHINE is better than this baseline. We further verify the necessity of the step-level explanation. We directly apply the feature-level explanations using all the collected states and then retrain the agent with our proposed method. Tab. 9 (SHINE-NS vs. SHINE) shows that without the step-level explanation, we observe a performance drop in both the trigger fidelity and the agent’s retraining performance. Note that we cannot remove the feature-level explanation as we need it to automatically pinpoint the trigger. To demonstrate the effectiveness of our retraining method, we replace it with
+
+17
+
+Table 7: Trigger detection fidelity of SHINE under different trigger patterns and trigger sizes.
+
+|Dense Square Block 3_×_3 4_×_4 5_×_5 6_×_6|Cross Sign 3_×_3 4_×_4 5_×_5 6_×_6|Equal Sign|
+|---|---|---|
+|||3_×_3 4_×_4 5_×_5 6_×_6|
+|0.998 0.998 0.976 0.959|0.993 0.989 0.975 0.968|0.998 0.993 0.985 0.972|
+
+Table 8: Performance of the original poisoned agent and SHINE in the operating environment.
+
+|Agent|Dense Square Block 3_×_3 4_×_4 5_×_5 6_×_6|Cross Sign 3_×_3 4_×_4 5_×_5 6_×_6|Equal Sign|
+|---|---|---|---|
+||||3_×_3 4_×_4 5_×_5 6_×_6|
+|Original Retrained|-0.010 0.021 0.035 -0.082 0.728 0.548 0.818 0.712|-0.031 -0.024 -0.021 -0.039 0.686 0.582 0.637 0.682|0.019 -0.024 -0.091 0.030 0.584 0.691 0.592 0.581|
+
+directly retraining the agent in the operating environment (Same as the direct retraining in Exp-II.). Tab. 9 (DR v.s SHINE) shows the effectiveness of our proposed retraining method.
+
+Table 9: Ablation Study. “DR“ stands for directly retraining. “SHINE -NS” means SHINE without the step-level explanation.
+
+|Environment|Original|FeatureRE|DR|SHINE -NS|SHINE|
+|---|---|---|---|---|---|
+|Operating|-0.010_±_0.001|0.124_±_0.003|0.032_±_0.002|0.109_±_0.001|0.728_±_0.027|
+|Clean|0.680_±_0.030|0.293_±_0.021|0.286_±_0.016|-0.023_±_0.002|0.734_±_0.021|
+
+**SHINE in an Operating Environment without Clean States.** We consider a setup where the attacker poisons every state in the operating environment _Pα_ = 1. We used the Pong and breakout game for the experiment. The results are as follows. The retrained agent’s reward in the operating/poisoned environment is: Pong: 0.805 _±_ 0.032; Breakout: 30.26 _±_ 1.102. The reward in the clean environment is: Pong: 0.705 _±_ 0.023; Breakout: 20.380 _±_ 1.026. Compared to the results in Table 2, we found that the retrained agent performs better in the operating environment. However, its performance in the clean environment drops from 0.734 _±_ 0.021 to 0.705 _±_ 0.023 in the pong game and from 25.350 _±_ 1.609 to 20.380 _±_ 1.026 in the breakout game. This is because, without clean states, we can only simulate clean states by masking out the trigger identified by our explanation method. Due to the inevitable approximation errors, the agent’s performance in the clean environment drops slightly.
+
+**Visualization.** Fig. 3 showcases the triggers and masks solved by SHINE for both backdoored and clean agents in the Pong game. In addition to the overall performance, we also take a closer look into the agent’s action distribution in clean and poisoned states of the operating environment. Fig. 4 shows the action distribution of the backdoored agent before and after retraining in the Pong game. This result further explains the superior performance of SHINE, which enables almost identical distribution in clean and poisoned states.
+
+## G POTENTIAL SOCIAL IMPACT
+
+Our method offers a practical tool to safeguard DRL agents deployed in many applications, enhancing their security and reliability. Additionally, it could potentially boost the policy-sharing market for large-scale RL models. By raising the bar for attackers to compromise DRL agents, our method can contribute to pushing the arms race between defenders and attackers in the field of DRL backdoor attacks. This can drive further advancements in defense techniques and make DRL systems more resilient to malicious attacks, benefiting the broader RL-related community.
+
+18
+
diff --git a/open_review/iclr2024_8584.json b/open_review/iclr2024_8584.json
new file mode 100644
index 0000000000000000000000000000000000000000..acd1da0a69d59a3f5cf593766cac8390a457c6d7
--- /dev/null
+++ b/open_review/iclr2024_8584.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8584",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "FlashFFTConv: Efficient Convolutions for Long Sequences with Tensor Cores",
+ "abstract": "Convolution models with long filters have demonstrated state-of-the-art reasoning abilities in many long-sequence tasks but lag behind the most optimized Transformers in wall-clock time.\nA major bottleneck is the Fast Fourier Transform (FFT)---which allows long convolutions to run in $O(N\\log N)$ time in sequence length $N$ but has poor hardware utilization.\nIn this paper, we study how to optimize the FFT convolution.\nWe find two key bottlenecks: the FFT does not effectively use specialized matrix multiply units, and it incurs expensive I/O between layers of the memory hierarchy.\nIn response, we propose FlashFFTConv.\nFlashFFTConv uses a matrix decomposition that computes the FFT using matrix multiply units and enables kernel fusion for long sequences, reducing I/O.\nWe also present two sparse convolution algorithms---1) partial convolutions and 2) frequency-sparse convolutions---which can be implemented simply by skipping blocks in the matrix decomposition, enabling further opportunities for memory and compute savings.\nFlashFFTConv speeds up exact FFT convolutions by up to 8.7$\\times$ over PyTorch and achieves up to 4.4$\\times$ speedup end-to-end.\nGiven the same compute budget, FlashFFTConv allows Hyena-GPT-s to achieve 2.3 points better perplexity and M2-BERT-base to achieve 3.3 points higher GLUE score---matching models with twice the parameter count.\nFlashFFTConv also achieves 96.1% accuracy on Path-512, a high-resolution vision task where no model had previously achieved better than 50%.\nFurthermore, partial convolutions enable longer-sequence models---yielding the first DNA model that can process the longest human genes (2.3M base pairs)---and frequency-sparse convolutions speed up pretrained models while maintaining or improving model quality.",
+ "rebuttal": "### Common Response (1/2)\nWe thank all the reviewers for their time and effort reviewing our paper and for their constructive comments, which have made our paper stronger. We appreciate the positive feedback that our work solves an “important problem” (reviewer pq6T) with a “solid” method and “convincing” experiments (reviewer 8BY8). In this common response, we address some common questions that were brought up by multiple reviewers: a summary of why we need a new algorithm for FFT convolution now (even though FFT has been around for decades) and the precision of the inputs & numerical error.\n\nWe’re also excited to report that FlashFFTConv has already started to see some adoption to train new models since our initial submission – it is being used to train long-context retrieval models, and to scale up hybrid gated convolution-attention architectures that rival the best open-source LLMs in quality. We're excited by this rapid adoption and impact, and **appreciate your help in making this work better and even more impactful!**\n\n# Why do we need to optimize the FFT Convolution?\nA question brought up by multiple reviewers (Bh63, 8BY8) was why we need to be developing new algorithms for the FFT convolution now, when the FFT has existed in different guises for half a century, and when there have been so many algorithms for the FFT in the past.\n\nThe key is that we have a **new use case, with new hardware and bottlenecks.** In our case, a recent wave of new ML architectures such as S4, Hyena, BiGS, CKConv, M2, and more [1-5] require optimization of the FFT convolution, and the characteristics of ML accelerators such as GPUs introduce new bottlenecks around I/O and utilizing matrix-multiply units. \n\nAs an aside – developing new FFT algorithms for new bottlenecks has actually been common in the history of the FFT – the “FFT algorithm” is not actually one algorithm, but many different algorithms. These algorithms are all mathematically-equivalent to each other, but they are computationally different depending on the compute and memory characteristics of the systems of the day. For instance, see:\n* Winograd FFT [6] to minimize multiplication vs. addition (for old hardware platforms where multiplication was more expensive than addition)\n* Bailey’s FFT [7] was originally designed to distribute extremely long FFTs that did not fit in the local memory of a single machine – and is primarily focused with the memory access pattern.\n* Hexagonal FFT [8] for data sampled on hexagonal grids\n\nFlashFFTConv is another step in this line of new FFT algorithms designed for new hardware bottlenecks. There are two important points:\n* The convolution requires FFT, pointwise multiply, and inverse FFT. This has a different **memory-compute tradeoff** than a single FFT operation.\n * Indeed, a **single FFT** does not have this tradeoff, even on GPUs. On GPU, the compute is fast enough (even without tensor cores) that a single FFT is completely memory-bound – so it doesn’t matter if it’s computed with tensor cores or with general arithmetic operations. See below, for a single FFT of length 1K has similar runtime to torch.clone on H100 (and is actually slightly faster, which may indicate slightly better implementation than torch.clone):\n\n| **Operation** | **Runtime (ms), B = 64, H = 768** |\n|----------------:|:---------------------------------:|\n| **torch.clone** | 0.31 |\n| **FFT** | 0.27 |\n| **Fused FFTConv (no tensor cores)** | 0.67 |\n\n* When multiple steps of the FFT are fused together, then the memory-compute tradeoff changes, and a **fused FFT convolution is no longer memory-bound** (see the third row above, where a fused FFT convolution takes more time than just reading & writing the output).\n * That is when it is important to use the tensor cores – compute becomes the bottleneck.\n\nThat memory-compute tradeoff is why the method is named FlashFFTConv, and not FlashFFT – we specifically focus on the tradeoffs for FFT convolutions on GPU. This is also the **primary difference** between the FlashFFTConv algorithm, and previous statements, like Bailey’s FFT decomposition or the four-step FFT decomposition. The core arithmetic is the same, but previous algorithms emphasize different bottlenecks (i.e., Bailey’s only focuses on the limits of local memory, not the compute units to compute the FFT).\n\nVan Loan [9] gives a good overview of frameworks for computing the FFT, and how they are all mathematically the same formulation, but with different compute characteristics, for those interested.\n\n### Common Response (2/2)\n# Precision of FlashFFTConv\nReviewers pq6T and Bh63 ask about the numerical precision of the method. We currently have implementations in fp16 and bf16.\n\nWe present some results on the numerical precision of the method, compared to an fp32 PyTorch implementation of the FFT convolution, for a sample of sequence lengths. We present $L_\\inf$ error, the maximum absolute error across the entire output:\n\n| | **256** | **1K** | **4K** | **32K** | **1M** |\n|---------:|:-------:|:------:|:------:|:-------:|:------:|\n| **fp16** | 3.8e-6 | 7.6e-6 | 1.5e-5 | 6.5e-5 | 4.0e-4 |\n| **bf16** | 3.1e-5 | 3.1e-5 | 6.1e-5 | 6.1e-5 | 6.1e-5 |\n\nWe have added these results to the appendix. We plan to support fp32 in the future, but prioritized fp16 and bf16 initially since speed-sensitive training workloads generally train in half-precision (to make the MLPs faster).\n\n[1] Efficiently Modeling Long Sequences with Structured State Spaces. https://arxiv.org/abs/2111.00396 \n\n[2] Hyena Hierarchy: Towards Larger Convolutional Language Models. https://arxiv.org/abs/2302.10866 \n\n[3] Pretraining Without Attention. https://arxiv.org/abs/2212.10544 \n\n[4] CKConv: Continuous Kernel Convolution For Sequential Data. https://arxiv.org/abs/2102.02611 \n\n[5] Monarch Mixer: A Simple Sub-Quadratic GEMM-Based Architecture. https://arxiv.org/abs/2310.12109 \n\n[6] S. Wino\n[rebuttal truncated]",
+ "initial_scores": [
+ 8,
+ 8,
+ 6
+ ],
+ "score_mean": 7.33,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "The paper proposes a new algorithm for computing convolutions via FFT, specifically useful for long-sequence tasks, more effectively on recent GPUs leveraging tensor core hardware.\n\nReviewers were consistently positive about the paper, and liked the overall contributions made. This includes convincing experimental results, sufficient novelty and a clearly written paper, overall well-deserving acceptance.\n\nWe hope the authors will incorporate the several minor points mentioned by the reviewers during the discussions.",
+ "forum_id": "gPKTTAfYBp",
+ "primary_area": "infrastructure, software libraries, hardware, etc.",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_pq6T",
+ "review_id": "4Fe5WNpdjU",
+ "scores": {
+ "rating": 8,
+ "soundness": 4,
+ "presentation": 3,
+ "contribution": 4,
+ "confidence": 4
+ },
+ "review_text_chars": 1104,
+ "edit_detected": true,
+ "edit_delta_seconds": 551546,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Bh63",
+ "review_id": "DeYQlcn21x",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 4492,
+ "edit_detected": true,
+ "edit_delta_seconds": 830073,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_8BY8",
+ "review_id": "cK3q1jlpgp",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 2702,
+ "edit_detected": true,
+ "edit_delta_seconds": 1986141,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8584.md b/open_review/iclr2024_8584.md
new file mode 100644
index 0000000000000000000000000000000000000000..6374430bf83bc4127e6fe2266ccd08b1872d4868
--- /dev/null
+++ b/open_review/iclr2024_8584.md
@@ -0,0 +1,993 @@
+
+
+## FLASHFFTCONV: EFFICIENT CONVOLUTIONS FOR LONG SEQUENCES WITH TENSOR CORES
+
+Authors withheld for review
+
+## ABSTRACT
+
+Convolution models with long filters have demonstrated state-of-the-art reasoning abilities in many long-sequence tasks but lag behind the most optimized Transformers in wall-clock time. A major bottleneck is the Fast Fourier Transform (FFT)—which allows long convolutions to run in _O_ ( _N_ log _N_ ) time in sequence length _N_ but has poor hardware utilization. In this paper, we study how to optimize the FFT convolution. We find two key bottlenecks: the FFT does not effectively use specialized matrix multiply units, and it incurs expensive I/O between layers of the memory hierarchy. In response, we propose FLASHFFTCONV. FLASHFFTCONV uses a matrix decomposition that computes the FFT using matrix multiply units and enables kernel fusion for long sequences, reducing I/O. We also present two sparse convolution algorithms—1) partial convolutions and 2) frequency-sparse convolutions—which can be implemented simply by skipping blocks in the matrix decomposition, enabling further opportunities for memory and compute savings. FLASHFFTCONV speeds up exact FFT convolutions by up to 7.93 _×_ over PyTorch and achieves up to 4.4 _×_ speedup end-to-end. Given the same compute budget, FLASHFFTCONV allows Hyena-GPT-s to achieve 2.3 points better perplexity on the PILE and M2-BERT-base to achieve 3.3 points higher GLUE score—matching models with twice the parameter count. FLASHFFTCONV also achieves 96.1% accuracy on Path-512, a high-resolution vision task where no model had previously achieved better than 50%. Furthermore, partial convolutions enable longer-sequence models—yielding the first DNA model that can process the longest human genes (2.3M base pairs)—and frequency-sparse convolutions speed up pretrained models while maintaining or improving model quality.
+
+## 1 INTRODUCTION
+
+A key challenge in machine learning is to efficiently reason over long sequences. Recently, convolutions have emerged as a key primitive for sequence modeling, underpinning state-of-the-art performance in language modeling (Ma et al., 2022; Poli et al., 2023; Wang et al., 2022a; Fu et al., 2023a), time-series analysis (Tang et al., 2022; Zhang et al., 2022b; Gu et al., 2021; Fathullah et al., 2023), computer vision (Wang et al., 2023; Liu et al., 2022; Nguyen et al., 2022), DNA modeling (Nguyen et al., 2023), and more (Li et al., 2022; Islam et al., 2023; Kim & Park, 2023; David et al., 2022; Miyazaki et al., 2023; Mehari & Strodthoff, 2023). Despite these strong quality results—and other benefits ranging from better scaling in sequence length (Gu et al., 2021) to greater stability (Tay et al., 2021a; Bietti & Mairal, 2017)—convolutional sequence models still lag behind Transformers in wall-clock time.
+
+A major reason is poor hardware support. Unlike classical convolutions used in vision applications, which often have short filters (e.g., 3 _×_ 3 or 7 _×_ 7 (Krizhevsky et al., 2012; He et al., 2016)), convolutions for sequence modeling often use filters as long as the input sequence (Romero et al., 2021b; Li et al., 2022). Such long filters necessitate the use of the FFT convolution algorithm, which computes the convolution between an input _u_ and convolution kernel _k_ via a conversion to frequency space:
+
+**==> picture [307 x 32] intentionally omitted <==**
+
+where _F_ is the FFT, which can be computed in _O_ ( _N_ log _N_ ) time in sequence length _N_ , and _⊙_ is elementwise multiplication. Despite its asymptotic efficiency, the FFT convolution algorithm has
+
+1
+
+**==> picture [394 x 91] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Registers 19 TB/s FFT FN1 T FN2 2 UnpadiFFT SRAM64 KB Reg 1.5 Pointwise kf Pointwise 20 MBHBM40 GB SRAMHBM TB/s iFFT FN2 -1 FN1 -1 1 FFT KernelFused 0 Pad GPU Memory Order- p Monarch Decomposition of PyTorch FlashFFTConv Sparse Convolution Hierarchy FFT Convolution on Tensor Cores Speedup Through Fusion Filters Time Time (ms) Frequency **----- End of picture text -----**
+
+Figure 1: **Left:** GPU memory hierarchy. **Middle left:** Order- _p_ Monarch decomposition of FFT convolution, with _p_ =2. **Middle right:** Kernel fusion for end-to-end speedup. **Right:** FLASHFFTCONV introduces analogues of sparsity for convolutions.
+
+poor wall-clock time on modern accelerators. In contrast, systems advances have pushed Transformers to the limits of modern accelerators—achieving more than 72% FLOP utilization end-to-end with FlashAttention-v2 (Dao et al., 2022b; Dao, 2023).
+
+In this paper, we study how to optimize the FFT convolution algorithm on modern accelerators, to enable longer-context abilities. Just as systems advances such as FlashAttention yielded improvements in modeling quality (Ahdritz et al., 2022; Li et al., 2023) and the development of new attention algorithms (Paliotta et al., 2023; Athiwaratkun et al., 2023; Kwon et al., 2023; Liu & Abbeel, 2023), we hope that understanding how to optimize the FFT convolution can also inspire algorithmic innovation, thus improving the quality of convolutional sequence models.
+
+For short sequences, the FFT convolution is relatively easy to optimize. Kernel filters are often shared across many batches, which allows pre-computing the FFT of the filter _kf_ = _Fk_ and re-using it in a batch: ( _u∗k_ )= _F[−]_[1] ( _Fu⊙kf_ ). Thus the FFT convolution is pleasantly parallel across batches and filters, and intermediate outputs of the convolution can be cached in SRAM or registers via kernel fusion.
+
+However, as sequence length increases, we find that two key bottlenecks emerge. First, FFT convolutions do not effectively use the specialized matrix-matrix multiply units available on modern accelerators—e.g., the H100 can use tensor cores to compute matrix-matrix multiply at 1.0 PetaFLOP/s compared to 67 TeraFLOP/s for general arithmetic. Second, sequences become too large to fit in SRAM, and kernel fusion fails, resulting in expensive I/O costs (Figure 1 middle right). These I/O costs can be exacerbated by padding operations for causality, and conversions from real-valued inputs/outputs to complex-valued FFT intermediates.
+
+In response, we propose FLASHFFTCONV, a new system that optimizes the FFT convolution for long sequences using a Monarch decomposition of the FFT. An order- _p_ Monarch decomposition rewrites the FFT as a series of _p_ matrix-matrix multiply operations (Figure 1 middle left), which can be efficiently mapped onto hardware (Dao et al., 2022a). The order _p_ controls the number of matrix multiply operations and introduces a tradeoff: higher values of _p_ incur lower FLOP cost via smaller matrices, but require more I/O to communicate intermediate results. Using a simple GPU cost model, we show how to adjust _p_ based on the sequence length to balance the FLOP cost and I/O cost. This decomposition introduces a second benefit: a reduction in the amount of the sequence that needs to be kept in SRAM, which makes kernel fusion viable at longer sequence lengths. As a result, FLASHFFTCONV scales across four orders of magnitude in sequence length, from 256 to 4 million. FLASHFFTCONV also exploits a real-valued FFT algorithm to cut the length of the FFT operation in half (Sorensen et al., 1987), and selectively skips portions of the matrix-multiply operations when the input is zero-padded.
+
+Finally, the matrix view of the FFT convolution presents a natural interface to implement two architectural modifications: partial convolutions, which learn with _k_ that is shorter than the input sequence, and frequency-sparse convolutions, which zero out portions of the kernel _kf_ in frequency space. These can be viewed as convolutional analogues to sparse/approximate attention in Transformers (Han et al., 2015a;b; Kitaev et al., 2020; Paliotta et al., 2023; Beltagy et al., 2020), and map naturally on to FLASHFFTCONV: both algorithms can be implemented simply by skipping portions of the matrix decomposition, thus reducing memory footprint and wall-clock runtime.
+
+**Evaluation** We show that FLASHFFTCONV speeds up the FFT convolution, yielding higher-quality, more efficient, and longer-sequence models.
+
+2
+
+- **Quality** FLASHFFTCONV improves the quality of convolutional sequence models via better efficiency: for the same compute budget, FLASHFFTCONV allows Hyena-GPT-s to achieve 2.3 points better perplexity (Poli et al., 2023), and allows M2-BERT-base (Fu et al., 2023a) to achieve up to 3.3 higher average GLUE score—a gain in performance equivalent to doubling the parameters of the model.
+
+- **Efficiency** FLASHFFTCONV makes convolutions more efficient across four orders of magnitude in sequence length, yielding speedups of up to 7.93 _×_ and memory savings of up to 5.60 _×_ over PyTorch. FLASHFFTCONV achieves up to 62.3% end-to-end FLOP utilization—only 10% less than FlashAttention-v2—and is faster in wall-clock time than FlashAttention-v2 end-to-end at sequence lengths 2K and longer due to lower FLOP costs.
+
+- **Longer Sequence Models** FLASHFFTCONV enables longer-sequence models. In high-resolution image classification, FLASHFFTCONV yields the first model that can solve the challenging Path-512 task (sequence length 256K) from the long range arena benchmark (Tay et al., 2020). In DNA modeling, FLASHFFTCONV uses partial convolutions to extend HyenaDNA (Nguyen et al., 2023) to 4M sequence length—yielding the first model that can embed the longest human genes (up to 2.3M base pairs) at single nucleotide resolution.
+
+Overall, we hope that FLASHFFTCONV enables further adoption of convolutional sequence models and that the insights from our work helps inform the design of better hardware-efficient architectures.
+
+## 2 BACKGROUND
+
+We provide some background on the FFT convolution and the Monarch FFT decomposition, and discuss the performance characteristics of GPUs.
+
+## 2.1 FFT CONVOLUTION
+
+Recall the definition of a convolution operation: ( _u ∗ k_ )[ _i_ ] =[�] _[i] j[u][j][k][i][−][j]_[.][Computing this formula] directly incurs _O_ ( _NNk_ ) FLOPs in sequence length _N_ and kernel length _Nk_ . For long convolutions, where _Nk_ = _N_ , a popular strategy is to use the Fourier transform to convert the signal _u_ and kernel _k_ to the frequency domain, and compute the convolution using pointwise multiplication in frequency domain, using Equation 1. Critically, a Fourier transform _FN_ over an input of length _N_ can be computed in _O_ ( _N_ log _N_ ) time using the FFT—bringing the overall cost of the long convolution from _O_ ( _N_[2] ) to _O_ ( _N_ log _N_ ). We note that the FFT convolution technically computes a circular convolution � _Nj[u][j][k][i][−][j]_[, where] _[ i][−][j <]_[0][ loops back to the end of] _[ k]_[. For this reason,] _[ u]_[ and] _[ k]_[ are often padded with] zeros to compute a causal convolution.
+
+**Monarch FFT Decomposition** For _N_ = _N_ 1 _N_ 2, an order-2 Monarch FFT decomposition rewrites _FN_ = **P** ( **I** _N_ 2 _⊗FN_ 1) **DP** _[−]_[1] ( **I** _N_ 1 _⊗FN_ 2) **P** , where _⊗_ denotes the Kronecker product, _FN_ is the _N ×N_ discrete Fourier matrix, **P** is a permutation matrix that reshapes the input to _N_ 1 _×N_ 2, transposes it to _N_ 2 _×N_ 1, and then reshapes it back to _N_ , and **D** _∈_ C _[N][×][N]_ is a diagonal matrix containing correctional values called Twiddle factors (Bailey, 1989). Higher-order Monarch decompositions recursively apply the order-2 decomposition to _FN_ 1 or _FN_ 2, which reduces FLOP costs but increases the number of permutation operations, increasing I/O cost.
+
+## 2.2 GPU PERFORMANCE CHARACTERISTICS
+
+We provide some background on the GPU memory hierarchy and available compute units, as well as compute-bound vs. memory-bound operations. We focus on GPU programming in this paper, but the general principles extend to most modern hardware accelerators (Jouppi et al., 2023; Zhang et al., 2022a; Lavely, 2022; Emani et al., 2021).
+
+**GPU Compute Model and Memory Hierarchy** GPUs have a memory hierarchy consisting of high-bandwidth memory (HBM), shared memory (SRAM), and registers, as shown in Figure 1 Left. Lower/larger levels of the memory hierarchy have more space but are much slower, whereas higher/smaller levels of the memory hierarchy have less space but are much faster (NVIDIA, 2017; 2020; 2022). The memory hierarchy is closely tied to the GPU compute model. A GPU is composed of many independent streaming multiprocessors (SMs), each of which is composed of independent threads. HBM is shared among all SMs, but each SM has an independent SRAM. The SRAM is shared among all the threads in the SM. Each thread has access to its own registers, but cannot access the
+
+3
+
+registers of other threads. Thus, performing global operations between SMs requires moving data to and from HBM, whereas independent work in each SM can remain local to SRAM.
+
+**GPU Compute Units** Modern GPUs (since the V100 (NVIDIA, 2017)) have specialized matrix multiply units called tensor cores, which can compute matrix-matrix multiply operations with much higher TFLOPs than the general-purpose compute units. For example, the H100 tensor core can compute matrix multiplication between 16 _×_ 16 matrices at 1.0 PFLOPs, whereas the general-purpose compute units can only compute at 67 TFLOPs (NVIDIA, 2022).
+
+**Memory-Boundvs. Compute-BoundOperations** GPUoperationscanbememory-boundorcomputebound. Memory-bound operations are bottlenecked by the amount of I/O between HBM and registers they need to perform, and are limited by the bandwidth of the memory hierarchy. Examples include simple pointwise operations such as addition or multiplication, as well as most traditional FFT implementations. Compute-bound operations are bottlenecked by the amount of FLOPs they need to execute, and are limited by the speed of the compute units. Examples include large matrix multiply operations.
+
+**Kernel Fusion** A popular method for reducing I/O costs is kernel fusion—loading data for multiple operations into SRAM, computing them independently in each SM, and then writing the final results back to HBM. Kernel fusion is common (and can be automated) for pointwise operations (Paszke et al., 2019), but is more challenging for complex operations that require referencing multiple pieces of data. For example, fusing the operations in attention was not common until the development of FlashAttention (Dao et al., 2022b).
+
+## 3 FLASHFFTCONV
+
+Section 3.1 provides a broad overview of FLASHFFTCONV and shows how to adapt the Monarch FFT decomposition to convolutions, which involves broadcasting the matrix multiply in parallel across the input sequence. We also describe our kernel fusion strategy and how we exploit domainspecific properties of the convolution in ML for further optimization. Section 3.2 presents a cost model characterizing the relative cost of different order- _p_ decompositions of the FFT as sequence length changes, along with a simple heuristic for selecting _p_ given hardware characteristics. Finally, Section 3.3 discusses architectural extensions by presenting analogues to sparsity in convolutional kernels.
+
+## 3.1 FLASHFFTCONV ALGORITHM
+
+We describe the core FLASHFFTCONV algorithm. Algorithm 1 provides an overview. We first describe how we adapt the Monarch FFT decomposition for convolutions. Then, we discuss how the Monarch decomposition enables kernel fusion for long sequences. We conclude by presenting domain-specific optimizations.
+
+**==> picture [159 x 103] intentionally omitted <==**
+
+**----- Start of picture text -----**
+F F F @ ... @ @ Broadcast over B, H Broadcast over N F F , T @ SRAM @ Transpose in SRAM Replaces Permutations **----- End of picture text -----**
+
+Figure 2: **Top:** FLASHFFTCONV adapts the Monarch FFT decomposition to broadcast matrix multiply operations over the sequence instead of over the batch and hidden dimensions. **Bottom:** This converts HBM permutations into simple matrix transpose operations in SRAM.
+
+**Adapting Monarch for Fusion** The Monarch FFT decomposition, as well as classical algorithms such as Bailey’s FFT algorithm (Bailey, 1989), traditionally broadcasts the matrix operation against the batch dimension and the hidden dimension (Figure 2 top left). This allows each _FN_ 1 operation in the **I** _N_ 2 _⊗FN_ 1 matrix to run independently. However, it also makes kernel fusion difficult; fusing across the matrix multiply and permutation operations requires loading at least 16 sequences at once into SRAM to fill out the matrix multiply unit—limiting sequence length to around 2 _K_ on A100 and H100.
+
+Instead, we broadcast the matrix operation across the entire sequence (Figure 2 top right) and run the algorithm in parallel across the batch and hidden dimensions. This reduces the SRAM requirements for kernel fusion, since we only need to load a single sequence into SRAM at a time—allowing us to fuse the entire kernel for sequences up to 32K in fp16/bf16 on A100 and H100. Broadcasting along the sequence has an added benefit: the permutations simply become matrix transposes (Figure 2 bottom), which can be done quickly using well-established routines on-chip (NVIDIA, 2020). The core algorithm is shown in Algorithm 1 for a two-way decomposition. Higher-order decompositions and more details are given in Appendix B.
+
+4
+
+**Algorithm 1** FLASHFFTCONV core algorithm, with order-2 Monarch decomposition. We assume _N_ = _N_ 1[2][for simplicity here.]
+
+**Input:** Input _u ∈_ R _[B][×][H][×][N]_ , convolution kernel _kf ∈_ C _[H][×][N]_ , FFT matrices **F** _∈_ C _[N]_[1] _[×][N]_[1] , **F** _[−]_ **[1]** _∈_ C _[N]_[1] _[×][N]_[1] , Twiddle factors _t ∈_ C _[N]_ , _tinv ∈_ C _[N]_ , _B_ tile size _Btile_ , _H_ tile size _Htile_ . **Output:** Output _y ∈_ R _[B][×][H][×][N]_ .
+
+**for** SMs in parallel across _B/Btile ×H/Htile_ **do** Load **F** , **F** _[−]_ **[1]** , _t_ , _tinv_ from HBM. **for** _h ←_ 1 to _Htile_ **do** Load **Kf** _← kf_ [ _h_ ] from HBM, reshaped to _N_ 1 _×N_ 1. **for** _b ←_ 1 to _Btile_ **do** Load **X** _← u_ [ _b,h_ ] from HBM, reshaped to _N_ 1 _×N_ 1. **X** _←_ (( **F** _[⊤]_ **X** ) _∗t_ ) **F** _▷_ FFT, decomposed into two steps _⊤_ **X** _←_ **X** _∗_ **Kf** _▷_ Elementwise multiply with _kf_ **Y** _←_ (( **XF** _[−]_[1] ) _[⊤] ∗tinv_ ) **F** _[−]_[1] _▷_ Inverse FFT, decomposed into two steps Write **Y** _[⊤]_ to HBM.
+
+## **Cost Model for Order-** _**p**_ **Monarch Decompositions**
+
+**==> picture [379 x 120] intentionally omitted <==**
+
+**----- Start of picture text -----**
+100 Matrices Too Small for Tensor Cores, p = 4 10 Matrices TooSmall, p 3 SRAM Limit p = 2 p = 3 p = 4 256 1K 4K 16K 64K 256K 1M 4M Sequence Length N Cost Per Token C/N **----- End of picture text -----**
+
+Figure 3: Compute costs of different order- _p_ Monarch decompositions as sequence length increases on A100. For short sequences, higher-order decompositions break the FFT down into matrices that are too small for tensor cores. At length 32K, the sequence is too long to fit into SRAM, and higher-order decompositions are necessary for fusion.
+
+**Kernel Fusion and Recomputation** The Monarch decomposition allows kernel fusion for long sequences. Inner layers of the decomposition do not require the entire sequence, which reduces the SRAM requirements for fusion. Thus, for long sequences, we can fuse the innermost matrix operations and elementwise multiplications, and take an I/O each for the outermost matrix operations. We use also use **recomputation** in the backward pass to reduce the memory footprint and I/O cost. Instead of storing intermediate results on HBM for the backward pass (e.g., the intermediate result of _FN u_ ), we simply recompute them in the backward pass.
+
+**Domain-Specific Optimizations** Finally, we use a few domain-specific optimizations to adapt the convolution specifically for the sequence learning workload. First, since the convolutions used in sequence learning are real-to-real convolutions (with real kernel weights), we can use a classic algorithm called one-stage decimation in time to compute the FFT of a sequence of length _N_ using a complex FFT of length _N/_ 2 (see Appendix B)—cutting the FFT cost in half. Second, inputs and outputs are often padded with zeros in the convolution to compute a causal convolution (Gu et al., 2021; Poli et al., 2023; Fu et al., 2023a). We special-case this padding, and use it to eliminate half of the outermost matrix multiply operations in the FFT and iFFT. We also fuse in additional operations around the convolution, such as elementwise-gating, to further reduce I/O.
+
+## 3.2 COST MODEL OF ORDER- _p_ MONARCH DECOMPOSITION
+
+We present a formal cost model for an order- _p_ Monarch decomposition of the convolution based on sequence length. The cost model accounts for both the cost of compute and I/O, similar to a roofline analysis (Hennessy & Patterson, 2011). Let _B_ and _H_ be the batch size and model hidden dimension, respectively, and assume that we compute the convolution in half precision. Let _N_ be the sequence
+
+5
+
+length, and let _N_ = Π _[p] i_ =1 _[N][i]_[ be the product of] _[ p]_[ factors.][For simplicity, we will assume that] _[ N]_[is a] power of 2. Let _µ_ be the size of the matrix-matrix multiply unit on the GPU (e.g., 16 for A100 (NVIDIA, 2020) and H100 (NVIDIA, 2022)). Let _τG_ and _τM_ be the empirically-achievable FLOPs on the GPU for general-purpose arithmetic, and matrix-matrix multiply arithmetic, respectively. For convenience, define _γ_ ( _Ni_ ) as a helper function that returns _τG_ if _Ni < µ_ , and _τM_ if _Ni ≥ µ_ . Finally, let _σH_ and _σS_ be empirically-achievable bandwidth for HBM and SRAM, respectively. Sample values for these constants are given in Appendix D.
+
+Now, we can present the cost of an FFT convolution with an order- _p_ Monarch decomposition. Let _ω_ ( _i_ ) be a helper function that returns _σH_ if the intermediate result of step _i_ is stored on HBM, or _σS_ otherwise. The cost of the convolution using an order- _p_ Monarch decomposition is given by:
+
+**==> picture [255 x 29] intentionally omitted <==**
+
+Figure 3 graphs Equation 2 for different order- _p_ decompositions on different sequence lengths for A100, for _p ∈{_ 2 _,_ 3 _,_ 4 _}_ . For cases where _N_ 1 = _···_ = _Np_ , the total FLOP cost of an order- _p_ decomposition grows with _O_ ( _N_[(] _[p]_[+1)] _[/p]_ ). However, for shorter sequences, higher-order decompositions are actually _more expensive_ , since they decompose to matrices that are smaller than the matrix-matrix multiply unit (corresponding to the early bumps). Note also the bump in cost for _p_ =3 between 32K and 64K, which is a result of running out of SRAM but which is mediated by an extra decomposition for _p_ =4.
+
+## 3.3 ARCHITECTURAL EXTENSIONS: SPARSITY IN CONVOLUTIONS
+
+We present two architectural extensions to FLASHFFTCONV: partial convolutions and frequencysparse convolutions, which are approximate convolution methods enabled by FLASHFFTCONV.
+
+**Partial Convolutions** In partial convolutions, we zero out later portions of the convolution kernel, analogous to local attention. This has two benefits. First, it reduces the memory footprint, since it requires fewer elements to be held in GPU memory at once. Second, it allows for natural extensions of a pretrained convolutional model to longer sequences (i.e., via a sliding window approach).
+
+**Frequency-Sparse Convolutions** In frequency-sparse convolutions, we zero out portions of the convolution kernel in frequency space, i.e. zeroing out portions of _kf_ . Here, the specific sparsity pattern can yield computational benefits—corresponding to skipping portions of the matrix multiplies in FLASHFFTCONV (see Appendix B for examples).
+
+## 4 EXPERIMENTS
+
+In this section, we evaluate FLASHFFTCONV in terms of quality and efficiency. First (Section 4.1), we show that FLASHFFTCONV allows models to achieve better quality for the same compute budget in language modeling—matching the performance of models with twice the parameters for free. FLASHFFTCONV also enables higher quality via higher resolution in image classification—solving the challenging Path-512 task for the first time simply via increased sequence length. Next (Section 4.2), we demonstrate FLASHFFTCONV’s speedup for convolutions, evaluate its efficiency gains end-to-end, and compare a convolutional model using FLASHFFTCONV to Transformers using FlashAttention-v2. Finally (Section 4.3), we evaluate partial and frequency-sparse convolutions. Partial convolutions yield the first DNA model that can embed the longest genes at single nucleotide resolution (2.3M base pairs), and frequency-sparse convolutions yield speedup while maintaining—or improving—quality.
+
+## 4.1 IMPACT OF EFFICIENCY ON QUALITY
+
+We study how FLASHFFTCONV impacts downstream quality. First, given two implementations with the same compute budget, FLASHFFTCONV achieves higher quality due to higher training throughput. Second, we show that improved efficiency can lead to higher quality via longer sequence length.
+
+**Improvement in Quality with Fixed Compute Budget** To evaluate the impacts of efficiency on downstream quality, we train two popular convolutional language models, M2-BERT-base (Fu et al., 2023a) and Hyena-s (Poli et al., 2023), from scratch. These models are trained BERT-style (masked language modeling) and GPT-style (next token prediction), respectively. We compare the quality of models trained with the same compute budget but different implementations of the convolution—either FLASHFFTCONV or a PyTorch implementation of the FFT convolution. FLASHFFTCONV achieves higher pretraining throughput, which allows the models to see more data during pretraining. These efficiency gains improve average GLUE score by up to 3.4 points for M2-BERT-base and perplexity
+
+6
+
+Table 1: Improvement in quality given a fixed compute budget.
+
+|**Model (Metric)**|PyTorch|FLASHFFTCONV|
+|---|---|---|
+|M2-BERT-base-110M (GLUE Score_↑_)|77.6|**80.9**|
+|Hyena-s-155M (PPL_↓_)|13.4|**11.1**|
+
+Table 2: Classification accuracy ( _↑_ ) on Path-X and Path-512 from the long range arena benchmark (Tay et al., 2020). FLASHFFTCONV allows for higher-resolution classification. indicates out of memory.
+
+|**Task (seq. len.)**|PyTorch|FLASHFFTCONV|
+|---|---|---|
+|Path-X (16K)|**96.9**|**96.9**|
+|Path-512 (256K)||**96.1**|
+
+Table 3: Time ( _↓_ ) to compute the forward pass of a convolution with FLASHFFTCONV in milliseconds on one H100-SXM, as well as ablations removing specific optimizations. We also show memory savings. Results scaled to batch size 64, hidden dimension 768.
+
+|Sequence Length|_p_=2|_p_=3 **4K** **8K** **16K** **32K**|_p_=4 **1M** **2M** **4M**|
+|---|---|---|---|
+||**256** **1K**|||
+|PyTorch FLASHFFTCONV|0.43 1.57 **0.09** **0.24**|6.65 13.7 28.6 62.1 **1.37** **3.19** **9.27** **21.8**|2,346.3 4,892.1 10,127.6 **1,492.8** **2,695.1** **7,587.0**|
+|Fusion-Only/cuFFTdx|0.21 0.67|3.51 7.71 21.4 45.5|– – –|
+|Speedup over PyTorch Memory Savings|4.78_×_ 6.54_×_ 8.21_×_ 7.73_×_|4.85_×_ 4.29_×_ 3.09_×_ 2.85_×_ 7.61_×_ 7.59_×_ 7.21_×_ 6.57_×_|1.57_×_ 1.82_×_ 1.33_×_ 2.64_×_ 2.63_×_ 2.63_×_|
+
+by 2.3 points for Hyena-s. These improvements in quality are similar in magnitude to the effect of doubling the number of parameters in the model (see Appendix C for reference results).
+
+**Longer Sequence Models** Next, we show how increased efficiency can lead to higher quality via longer sequence lengths. We evaluate long convolution models on Path-X and Path-512, high-resolution imaging tasks from the long range arena (LRA) benchmark (Tay et al., 2020).[1] These tasks take an image (128 _×_ 128 for Path-X and 512 _×_ 512 for Path-512), flatten it out, and require a sequence model to classify whether two dots in the image are connected by a path.
+
+Existing PyTorch implementations of convolutional sequence models (or even prior optimized implementations (Fu et al., 2023b)) fail to achieve better-than-random (50%) accuracy on Path-512 due to out of memory errors and a lack of support for such long sequences. Table 2 shows that FLASHFFTCONV allows a convolutional sequence model to solve Path-512 for the first time simply by increasing the available sequence length and reducing the memory footprint of the model through fusion.
+
+## 4.2 EFFICIENCY
+
+We evaluate FLASHFFTCONV on how fast it computes convolutions compared to PyTorch and how much speedup it yields for convolutional sequence models end-to-end. We also evaluate memory savings compared to PyTorch and compare against Transformers using FlashAttention-v2 (Dao, 2023).
+
+**FLASHFFTCONV Provides Speedup and Memory Savings** We benchmark the speed of the convolution compared against an FFT convolution implemented in PyTorch. We also benchmark ablations evaluating kernel fusion without using tensor cores—which recovers the strong baseline of using Nvidia’s cuFFTdx kernel fusion library (NVIDIA, 2023a)—and FLASHFFTCONV without its domainspecific optimizations.
+
+Table 3 shows that FLASHFFTCONV outperforms PyTorch FFT convolution across all sequence lengths, by up to 6.54 _×_ . Appendix C shows further speedup, up to 7.93 _×_ , for domain-specific optimizations. Speedups are greatest for short sequences, where the PyTorch FFT convolution is dominated by I/O costs. Speedup is more modest for longer sequences, which incur additional I/O costs (between registers and SRAM for the _p_ =3 and between SRAM and HBM for _p_ =4). Without using
+
+> 1We refer to Path-512 as a scaled-up version of Path-256.
+
+7
+
+Table 4: End-to-end throughput ( _↑_ ) of convolutional sequence models against PyTorch.
+
+|**Model (size, seqlen, unit)**|**PyTorch**|**FlashFFTConv**|**Speedup**|
+|---|---|---|---|
+|M2-BERT-base (110M, 128, seqs/s)|4,480|**8,580**|1.9_×_|
+|Hyena-s-4K (155M, 4K, seqs/s)|84.1|**147**|1.7_×_|
+|Long convs, Path-X (102M, 16K, images/s)|126|**308**|2.4_×_|
+|SaShiMi (5.4M, 64K, audio clips/s)|38.7|**50.3**|1.3_×_|
+|HyenaDNA (1M, seqs/s)|0.69|**3.03**|4.4_×_|
+
+Table 5: End-to-end throughput ( _↑_ ) in thousands of tokens per second, FLOP utilization, and speedup of Hyena against GPT running FlashAttention-v2 (Dao, 2023) across sequence lengths for A100.
+
+|**Model**|**2K**|**8K**|**16K**|
+|---|---|---|---|
+|GPT-2.7B, FA-v2 (Dao,2023)|33.8|27.8|21.6|
+|Hyena-2.7B, FLASHFFTCONV|**35.2**|**35.2**|**32.3**|
+|FA-v2 FLOP Utilization|65.7|72.1|78.5|
+|FLASHFFTCONVFLOP Utilization|62.3|61.9|56.5|
+|FLASHFFTCONVSpeedup|1.1_×_|1.3_×_|1.5_×_|
+
+the Monarch decomposition for tensor cores (fusion-only), FLASHFFTCONV becomes bottlenecked by the speed of general arithmetic operations on GPUs and the size of SRAM. Table 3 also shows memory savings over PyTorch. FLASHFFTCONV reduces the memory footprint of convolutions via recomputation in the backward pass and kernel fusion.
+
+**FLASHFFTCONV Speeds Up Convolutional Sequence Models** We benchmark end-to-end throughput of convolutional sequence models across various modalities and sequence lengths spanning four orders of magnitude. We benchmark M2-BERT-base (Fu et al., 2023a), a BERT-style language model that has sequence length 128; Hyena-s-4K (Poli et al., 2023), a GPT-style language model with sequence length 4K; a long-convolutional model (Fu et al., 2023c) trained on Path-X with sequence length 16K (Tay et al., 2020); SaShiMi (Goel et al., 2022), an audio generation model trained on 1-second audio clips sampled at 64 KHz; and HyenaDNA-1M (Nguyen et al., 2023), a DNA modeling model trained on 1M sequence length. Details of the architectures and architecture-specific optimizations (such as fusing multiplicative gating for M2 and Hyena models) are given in Appendix D.
+
+Table 4 shows that FLASHFFTCONV speeds up these models end-to-end. Speedup varies vary by the size of the models and the relative amount of time spent computing the convolution compared to other parts of the models. FLASHFFTCONV only speeds up the SaShiMi model by 1.3 _×_ , since the model interleaves convolutions with SSM-based filter generation, pooling layers, and MLPs, which reduces the relative amount of time spent computing the convolution itself. Speedup is greatest for HyenaDNA, where PyTorch is bottlenecked by small batch size. The PyTorch implementation only allows batch size 1 on an 80GB GPU, whereas FLASHFFTCONV allows batch size 4—yielding significant speedup.
+
+**FLASHFFTCONV is Faster than FlashAttention-v2** We compare end-to-end efficiency of a 2.7B-parameter Hyena model using FLASHFFTCONV against a 2.7B-parameter GPT model using FlashAttention-v2 (Dao, 2023) at three sequence lengths. Table 5 shows throughput, end-to-end FLOP utilization, and speedup. FLASHFFTCONV achieves lower end-to-end FLOP utilization than FlashAttention-v2 but achieves higher throughput, since convolutions incur fewer overall FLOPs.
+
+4.3 PARTIAL AND FREQUENCY-SPARSE CONVOLUTIONS
+
+We evaluate the impact of partial convolutions on downstream quality and memory footprint and on how well they can extend the sequence length of existing models. We evaluate the impact of frequencysparse convolutions on downstream quality, and we show that frequency-sparse convolutions can yield up to 1.4 _×_ additional speedup in the convolution without impacting quality.
+
+**Partial Convolutions Reduce Memory Footprint and Increase Sequence Length** Partial convolutions reduce the memory footprint of models, in both language modeling and DNA modeling. A large proportion of the convolution filters can be pruned without impacting downstream quality. Table 6
+
+8
+
+Table 6: Quality and memory footprint of partial convolutions during training across sequence lengths.
+
+|**Hyena-s-8K**|**8K**|**4K**|**2K**|**1K**|**512**|**256**|
+|---|---|---|---|---|---|---|
+|PPL (_↓_)|13.8|13.8|13.8|13.9|14.0|14.2|
+|Memory Footprint (_↓_)|32.5G|15.3G|11.8G|8.4G|6.1G|5.8G|
+
+Table 7: PPL ( _↓_ ) from using partial convolutions to extend the sequence length of HyenaDNA to longer sequences. At 4M sequence length, the models are able to embed the longest human genes.
+
+|**Base Filter Length**|**1M**|**2M**|**4M**|
+|---|---|---|---|
+|HyenaDNA-450K|2.91|2.91|2.91|
+|HyenaDNA-1M|2.91|2.91|2.90|
+
+Table 8: Applying frequency-sparsity to the filters of a pretrained HyenaDNA-1M model.
+
+|**Sparsity Fraction**|**0%**|**50%**|**75%**|**79%**|**84%**|**91%**|
+|---|---|---|---|---|---|---|
+|PPL (_↓_)|2.91|2.91|2.90|2.91|2.93|2.98|
+|Convolution Speedup (_↑_)|1.0_×_|1.2_×_|1.3_×_|1.4_×_|1.5_×_|1.8_×_|
+
+shows that a Hyena-s-8K model can be pretrained with a much shorter convolution kernel—as short as 2K—without negatively impacting quality.
+
+Partial convolutions yield another benefit: we can naturally extend the sequence length of existing pretrained models. We extend a pretrained HyenaDNA-1M model to 4M sequence length with promising PPL results (Table 7)—yielding the first model that can embed the longest human genes at single-nucleotide resolution (2.3M base pairs) (See Appendix C for a visualization of gene embeddings).
+
+**Frequency-Sparse Convolutions Increase Throughput** Frequency-sparse convolutions can increase the speed of convolutions—and may also have positive effects on quality. Table 8 shows that we can set up to 79% of the entries of the kernel _kf_ to zero without losing quality. Sparsification in frequency space may even improve the quality of pretrained models slightly; the PPL of a pretrained HyenaDNA-1M model improves by 0.01 points after its kernels are 75% sparsified in frequency space—potentially as a result of removing high-frequency noise. Sparsification also yields up to 1.4 _×_ speedup in the convolution via skipping entire blocks of the matrix-matrix multiplies in the Monarch decomposition. Appendix D provides more details about the sparsity patterns used in Table 8.
+
+## 5 RELATED WORK
+
+We provide an abbreviated summary of related work. An extended related work can be found in Appendix A. **Long convolutional models** have emerged as a promising alternative to Transformers for sequence modeling (Gu et al., 2021; Romero et al., 2021b; Poli et al., 2023; Ma et al., 2022; Hasani et al., 2022; Smith et al., 2023), particularly for for **long-context applications** such as DNA modeling and speech synthesis (Nguyen et al., 2022; Goel et al., 2022). Our work is related a long history of **efficient FFT algorithms** , ranging from Cooley-Tukey (Cooley & Tukey, 1965) to more recent FFT algorithms (Ayinala et al., 2011; Chu & George, 1999; Bahn et al., 2009; Bailey, 1989). Our work builds and extends these algorithms to adapt them to convolutions. Finally, partial and frequency-sparse convolutions relate to a long history of **sparsity in deep learning** , from pruning (Han et al., 2015a;b; Sanh et al., 2020) to sparse structured matrices (De Sa et al., 2018; Sindhwani et al., 2015).
+
+## 6 CONCLUSION
+
+We present FLASHFFTCONV, a new system for optimizing FFT convolutions for long sequences. We show that FLASHFFTCONV improves quality under a fixed compute budget, enables longer-sequence models, and improves the efficiency of long convolutions. We also show that analogues of sparsity in convolution filters map naturally on to FLASHFFTCONV’s compute model, and can reduce memory footprint and runtime. We hope that our work will help support further adoption of convolutional sequence models, and that our insights can help inform the design of future architectures.
+
+9
+
+## REFERENCES
+
+- Gustaf Ahdritz, Nazim Bouatta, Sachin Kadyan, Qinghui Xia, William Gerecke, Timothy J O’Donnell, Daniel Berenberg, Ian Fisk, Niccolo Zanichelli, Bo Zhang, et al.` Openfold: Retraining alphafold2 yields new insights into its learning mechanisms and capacity for generalization. _bioRxiv_ , pp. 2022–11, 2022.
+
+- Ben Athiwaratkun, Sujan Kumar Gonugondla, Sanjay Krishna Gouda, Haifeng Qian, Hantian Ding, Qing Sun, Jun Wang, Liangfu Chen, Jiacheng Guo, Parminder Bhatia, et al. On io-efficient attention mechanisms: Context-aware bifurcated attention and the generalized multi-group attention. In _Workshop on Efficient Systems for Foundation Models@ ICML2023_ , 2023.
+
+- Ziga Avsec, Vikram Agarwal, Daniel Visentin, Joseph R Ledsam, Agnieszka Grabska-Barwinska,ˇ Kyle R Taylor, Yannis Assael, John Jumper, Pushmeet Kohli, and David R Kelley. Effective gene expression prediction from sequence by integrating long-range interactions. _Nature methods_ , 18 (10):1196–1203, 2021.
+
+- Manohar Ayinala, Michael Brown, and Keshab K Parhi. Pipelined parallel fft architectures via folding transformation. _IEEE Transactions on Very Large Scale Integration (VLSI) Systems_ , 20(6): 1068–1081, 2011.
+
+- Jun Ho Bahn, Jung Sook Yang, Wen-Hsiang Hu, and Nader Bagherzadeh. Parallel fft algorithms on network-on-chips. _Journal of Circuits, Systems, and Computers_ , 18(02):255–269, 2009.
+
+- David H Bailey. Ffts in external of hierarchical memory. In _Proceedings of the 1989 ACM/IEEE conference on Supercomputing_ , pp. 234–242, 1989.
+
+- AJAA Bekele. Cooley-tukey fft algorithms. _Advanced algorithms_ , 2016.
+
+- Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. _arXiv preprint arXiv:2004.05150_ , 2020.
+
+- Alberto Bietti and Julien Mairal. Invariance and stability of deep convolutional representations. _Advances in neural information processing systems_ , 30, 2017.
+
+- Mikołaj Binkowski, Jeff Donahue, Sander Dieleman, Aidan Clark, Erich Elsen, Norman Casagrande,´ Luis C Cobo, and Karen Simonyan. High fidelity speech synthesis with adversarial networks. In _International Conference on Learning Representations_ , 2019.
+
+- Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. _arXiv preprint arXiv:2108.07258_ , 2021.
+
+- E Oran Brigham. _The fast Fourier transform and its applications_ . Prentice-Hall, Inc., 1988.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020.
+
+10
+
+Beidi Chen, Tri Dao, Kaizhao Liang, Jiaming Yang, Zhao Song, Atri Rudra, and Christopher Re.´ Pixelated butterfly: Simple and efficient sparse training for neural network models. 2021a.
+
+- Beidi Chen, Tri Dao, Eric Winsor, Zhao Song, Atri Rudra, and Christopher Re.´ Scatterbrain: Unifying sparse and low-rank attention. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2021b.
+
+- Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. _arXiv preprint arXiv:2009.14794_ , 2020.
+
+- Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. _arXiv preprint arXiv:2204.02311_ , 2022.
+
+- Eleanor Chu and Alan George. _Inside the FFT black box: serial and parallel fast Fourier transform algorithms_ . CRC press, 1999.
+
+- James W Cooley and John W Tukey. An algorithm for the machine calculation of complex fourier series. _Mathematics of computation_ , 19(90):297–301, 1965.
+
+- Fiona Cunningham, James E Allen, Jamie Allen, Jorge Alvarez-Jarreta, M Ridwan Amode, Irina M Armean, Olanrewaju Austine-Orimoloye, Andrey G Azov, If Barnes, Ruth Bennett, et al. Ensembl 2022. _Nucleic acids research_ , 50(D1):D988–D995, 2022.
+
+- Zihang Dai, Guokun Lai, Yiming Yang, and Quoc Le. Funnel-transformer: Filtering out sequential redundancy for efficient language processing. _Advances in neural information processing systems_ , 33:4271–4282, 2020.
+
+- Tri Dao. Flashattention-2: Faster attention with better parallelism and work partitioning. _arXiv preprint arXiv:2307.08691_ , 2023.
+
+- Tri Dao, Albert Gu, Matthew Eichhorn, Atri Rudra, and Christopher Re.´ Learning fast algorithms for linear transforms using butterfly factorizations. _arXiv preprint arXiv:1903.05895_ , 2020.
+
+- Tri Dao, Nimit S. Sohoni, Albert Gu, Matthew Eichhorn, Amit Blonder, Megan Leszczynski, Atri Rudra, and Christopher Re.´ Kaleidoscope: An efficient, learnable representation for all structured linear maps. _arXiv preprint arXiv:2012.14966_ , 2021.
+
+- Tri Dao, Beidi Chen, Nimit S Sohoni, Arjun Desai, Michael Poli, Jessica Grogan, Alexander Liu, Aniruddh Rao, Atri Rudra, and Christopher Re.´ Monarch: Expressive structured matrices for efficient and accurate training. In _International Conference on Machine Learning_ . PMLR, 2022a.
+
+- Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Re.´ FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In _Advances in Neural Information Processing Systems_ , 2022b.
+
+- Shmuel Bar David, Itamar Zimerman, Eliya Nachmani, and Lior Wolf. Decision s4: Efficient sequence-based rl via state spaces layers. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Christopher De Sa, Albert Gu, Rohan Puttagunta, Christopher Re, and Atri Rudra.´ A two-pronged progress in structured dense matrix vector multiplication. In _Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms_ , pp. 1060–1079. SIAM, 2018.
+
+- Tim Dettmers and Luke Zettlemoyer. Sparse networks from scratch: Faster training without losing performance. _arXiv preprint arXiv:1907.04840_ , 2019.
+
+- Prafulla Dhariwal, Heewoo Jun, Christine Payne, Jong Wook Kim, Alec Radford, and Ilya Sutskever. Jukebox: A generative model for music. _arXiv preprint arXiv:2005.00341_ , 2020.
+
+- Sander Dieleman, Aaron van den Oord, and Karen Simonyan. The challenge of realistic music generation: modelling raw audio at scale. _Advances in neural information processing systems_ , 31, 2018.
+
+11
+
+Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. _Advances in Neural Information Processing Systems_ , 30, 2017.
+
+- Nan Du, Yanping Huang, Andrew M Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, et al. Glam: Efficient scaling of language models with mixture-of-experts. In _International Conference on Machine Learning_ , pp. 5547–5569. PMLR, 2022.
+
+Yuli Eidelman and Israel Gohberg. On a new class of structured matrices. _Integral Equations and Operator Theory_ , 34(3):293–324, 1999.
+
+- Murali Emani, Venkatram Vishwanath, Corey Adams, Michael E Papka, Rick Stevens, Laura Florescu, Sumti Jairath, William Liu, Tejas Nama, and Arvind Sujeeth. Accelerating scientific applications with sambanova reconfigurable dataflow architecture. _Computing in Science & Engineering_ , 23(2): 114–119, 2021.
+
+- Yassir Fathullah, Chunyang Wu, Yuan Shangguan, Junteng Jia, Wenhan Xiong, Jay Mahadeokar, Chunxi Liu, Yangyang Shi, Ozlem Kalinli, Mike Seltzer, et al. Multi-head state space model for speech recognition. _arXiv preprint arXiv:2305.12498_ , 2023.
+
+- William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. _The Journal of Machine Learning Research_ , 23(1): 5232–5270, 2022.
+
+- Quentin Fournier, Gaetan Marceau Caron, and Daniel Aloise.´ A practical survey on faster and lighter transformers. _ACM Computing Surveys_ , 2021.
+
+- Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. _arXiv preprint arXiv:1803.03635_ , 2018.
+
+- Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M Roy, and Michael Carbin. Stabilizing the lottery ticket hypothesis. _arXiv preprint arXiv:1903.01611_ , 2019.
+
+- Jonathan Frankle, Gintare Karolina Dziugaite, Daniel Roy, and Michael Carbin. Linear mode connectivity and the lottery ticket hypothesis. In _International Conference on Machine Learning_ , pp. 3259–3269. PMLR, 2020.
+
+- Daniel Y. Fu, Simran Arora, Jessica Grogan, Isys Johnson, Sabri Eyuboglu, Armin W. Thomas, Benjamin F. Spector, Michael Poli, Atri Rudra, and Christopher Re.´ Monarch Mixer: A simple sub-quadratic GEMM-based architecture. In _Advances in Neural Information Processing Systems_ , 2023a.
+
+- Daniel Y. Fu, Tri Dao, Khaled K. Saab, Armin W. Thomas, Atri Rudra, and Christopher Re.´ Hungry Hungry Hippos: Towards language modeling with state space models. In _International Conference on Learning Representations_ , 2023b.
+
+- Daniel Y. Fu, Elliot L. Epstein, Eric Nguyen, Armin W. Thomas, Michael Zhang, Tri Dao, Atri Rudra, and Christopher Re.´ Simple hardware-efficient long convolutions for sequence modeling. _International Conference on Machine Learning_ , 2023c.
+
+- Karan Goel, Albert Gu, Chris Donahue, and Christopher Re. It’s raw! audio generation with state-space´ models. _arXiv preprint arXiv:2202.09729_ , 2022.
+
+- Albert Gu, Karan Goel, and Christopher Re. Efficiently modeling long sequences with structured state spaces. In _International Conference on Learning Representations_ , 2021.
+
+- Albert Gu, Ankit Gupta, Karan Goel, and Christopher Re.´ On the parameterization and initialization of diagonal state space models. In _Advances in Neural Information Processing Systems_ , 2022a.
+
+- Albert Gu, Isys Johnson, Aman Timalsina, Atri Rudra, and Christopher Re.´ How to train your hippo: State space models with generalized orthogonal basis projections. _arXiv preprint arXiv:2206.12037_ , 2022b.
+
+12
+
+Ankit Gupta, Albert Gu, and Jonathan Berant. Diagonal state spaces are as effective as structured state spaces. In _Advances in Neural Information Processing Systems_ , 2022.
+
+- Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. _arXiv preprint arXiv:1510.00149_ , 2015a.
+
+- Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. _Advances in neural information processing systems_ , 28, 2015b.
+
+Ramin Hasani, Mathias Lechner, Tsun-Huang Wang, Makram Chahine, Alexander Amini, and Daniela Rus. Liquid structural state-space models. _arXiv preprint arXiv:2209.12951_ , 2022.
+
+- KaimingHe, XiangyuZhang, ShaoqingRen, andJianSun. Deepresiduallearningforimagerecognition. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 770–778, 2016.
+
+- John L Hennessy and David A Patterson. _Computer architecture: a quantitative approach_ . Elsevier, 2011.
+
+- Md Mohaiminul Islam, Mahmudul Hasan, Kishan Shamsundar Athrey, Tony Braskich, and Gedas Bertasius. Efficient movie scene detection using state-space transformers. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 18749–18758, 2023.
+
+- Yanrong Ji, Zhihan Zhou, Han Liu, and Ramana V Davuluri. DNABERT: pre-trained bidirectional encoder representations from transformers model for DNA-language in genome. _Bioinformatics_ , 37 (15):2112–2120, 2021.
+
+- Norm Jouppi, George Kurian, Sheng Li, Peter Ma, Rahul Nagarajan, Lifeng Nai, Nishant Patil, Suvinay Subramanian, Andy Swing, Brian Towles, et al. Tpu v4: An optically reconfigurable supercomputer for machine learning with hardware support for embeddings. In _Proceedings of the 50th Annual International Symposium on Computer Architecture_ , pp. 1–14, 2023.
+
+Thomas Kailath, Sun-Yuan Kung, and Martin Morf. Displacement ranks of matrices and linear equations. _Journal of Mathematical Analysis and Applications_ , 68(2):395–407, 1979.
+
+- Nal Kalchbrenner, Erich Elsen, Karen Simonyan, Seb Noury, Norman Casagrande, Edward Lockhart, Florian Stimberg, Aaron Oord, Sander Dieleman, and Koray Kavukcuoglu. Efficient neural audio synthesis. In _International Conference on Machine Learning_ , pp. 2410–2419. PMLR, 2018.
+
+- Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Franc¸ois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In _International Conference on Machine Learning_ , pp. 5156–5165. PMLR, 2020.
+
+- Sanghyeon Kim and Eunbyung Park. Smpconv: Self-moving point representations for continuous convolution. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 10289–10299, 2023.
+
+- Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. _arXiv preprint arXiv:2001.04451_ , 2020.
+
+- Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. _Advances in neural information processing systems_ , 25, 2012.
+
+- Kundan Kumar, Rithesh Kumar, Thibault De Boissiere, Lucas Gestin, Wei Zhen Teoh, Jose Sotelo, Alexandre De Brebisson, Yoshua Bengio, and Aaron C Courville. Melgan: Generative adversarial networks for conditional waveform synthesis. _Advances in neural information processing systems_ , 32, 2019.
+
+- Mitsuru Kusumoto, Takuya Inoue, Gentaro Watanabe, Takuya Akiba, and Masanori Koyama. A graph theoretic framework of recomputation algorithms for memory-efficient backpropagation. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+13
+
+- Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In _Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles_ , 2023.
+
+- Kushal Lakhotia, Eugene Kharitonov, Wei-Ning Hsu, Yossi Adi, Adam Polyak, Benjamin Bolte, Tu-Anh Nguyen, Jade Copet, Alexei Baevski, Abdelrahman Mohamed, et al. On generative spoken language modeling from raw audio. _Transactions of the Association for Computational Linguistics_ , 9:1336–1354, 2021.
+
+- Adam Lavely. Powering extreme-scale hpc with cerebras wafer-scale accelerators. _Cerebras White Paper_ , 2022.
+
+- Binrui Li, Shenggan Cheng, and James Lin. tcfft: Accelerating half-precision fft through tensor cores. _arXiv preprint arXiv:2104.11471_ , 2021.
+
+- Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, et al. Starcoder: may the source be with you! _arXiv preprint arXiv:2305.06161_ , 2023.
+
+- Yuhong Li, Tianle Cai, Yi Zhang, Deming Chen, and Debadeepta Dey. What makes convolutional models great on long sequence modeling? _arXiv preprint arXiv:2210.09298_ , 2022.
+
+- JiLin, YongmingRao, JiwenLu, andJieZhou. Runtimeneuralpruning. _Advancesinneuralinformation processing systems_ , 30, 2017.
+
+- Hao Liu and Pieter Abbeel. Blockwise parallel transformer for long context large models. _arXiv preprint arXiv:2305.19370_ , 2023.
+
+- Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A convnet for the 2020s. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 11976–11986, 2022.
+
+- Xuezhe Ma, Xiang Kong, Sinong Wang, Chunting Zhou, Jonathan May, Hao Ma, and Luke Zettlemoyer. Luna: Linear unified nested attention. _Advances in Neural Information Processing Systems_ , 34: 2441–2453, 2021.
+
+- Xuezhe Ma, Chunting Zhou, Xiang Kong, Junxian He, Liangke Gui, Graham Neubig, Jonathan May, and Luke Zettlemoyer. Mega: moving average equipped gated attention. _arXiv preprint arXiv:2209.10655_ , 2022.
+
+- Temesgen Mehari and Nils Strodthoff. Towards quantitative precision for ecg analysis: Leveraging state space models, self-supervision and patient metadata. _IEEE Journal of Biomedical and Health Informatics_ , 2023.
+
+- Harsh Mehta, Ankit Gupta, Ashok Cutkosky, and Behnam Neyshabur. Long range language modeling via gated state spaces. _arXiv preprint arXiv:2206.13947_ , 2022.
+
+- Maxim Milakov and Natalia Gimelshein. Online normalizer calculation for softmax. _arXiv preprint arXiv:1805.02867_ , 2018.
+
+- Koichi Miyazaki, Masato Murata, and Tomoki Koriyama. Structured state space decoder for speech recognition and synthesis. In _ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 1–5. IEEE, 2023.
+
+- Eric Nguyen, Karan Goel, Albert Gu, Gordon Downs, Preey Shah, Tri Dao, Stephen Baccus, and Christopher Re.´ S4nd: Modeling images and videos as multidimensional signals with state spaces. In _Advances in neural information processing systems_ , 2022.
+
+- Eric Nguyen, Michael Poli, Marjan Faizi, Armin Thomas, Callum Birch-Sykes, Michael Wornow, Aman Patel, Clayton Rabideau, Stefano Massaroli, Yoshua Bengio, et al. Hyenadna: Long-range genomic sequence modeling at single nucleotide resolution. In _Advances in Neural Information Processing Systems_ , 2023.
+
+14
+
+NVIDIA. Nvidia Tesla V100 GPU architecture, 2017.
+
+NVIDIA. Nvidia A100 tensor core GPU architecture, 2020.
+
+NVIDIA. Nvidia H100 tensor core GPU architecture, 2022.
+
+NVIDIA. cufftdx v1.1.0 documentation, 2023a. [URL removed]
+
+NVIDIA. Cutlass 3.2, 2023b. [URL removed]
+
+- NVIDIA. Cuda c++ programming guide, 2023c. [URL removed]
+
+- Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. _arXiv preprint arXiv:1609.03499_ , 2016.
+
+- Alan V Oppenheim. Applications of digital signal processing. _Englewood Cliffs_ , 1978.
+
+- Alan V Oppenheim, John R Buck, and Ronald W Schafer. _Discrete-time signal processing. Vol. 2_ . Upper Saddle River, NJ: Prentice Hall, 2001.
+
+- Daniele Paliotta, Matteo Pagliardini, Martin Jaggi, and Franc¸ois Fleuret. Fast causal attention with dynamic sparsity. In _Workshop on Efficient Systems for Foundation Models@ ICML2023_ , 2023.
+
+- Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, highperformance deep learning library. _Advances in neural information processing systems_ , 32, 2019.
+
+- Michael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y Fu, Tri Dao, Stephen Baccus, Yoshua Bengio, Stefano Ermon, and Christopher Re.´ Hyena hierarchy: Towards larger convolutional language models. _Proceedings of the 40th International Conference on Machine Learning (ICML 2023)_ , 2023.
+
+- Ryan Prenger, Rafael Valle, and Bryan Catanzaro. Waveglow: A flow-based generative network for speech synthesis. In _ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 3617–3621. IEEE, 2019.
+
+- David W Romero, Robert-Jan Bruintjes, Jakub M Tomczak, Erik J Bekkers, Mark Hoogendoorn, and Jan C van Gemert. Flexconv: Continuous kernel convolutions with differentiable kernel sizes. _arXiv preprint arXiv:2110.08059_ , 2021a.
+
+- David W Romero, Anna Kuzina, Erik J Bekkers, Jakub Mikolaj Tomczak, and Mark Hoogendoorn. Ckconv: Continuous kernel convolution for sequential data. In _International Conference on Learning Representations_ , 2021b.
+
+Victor Sanh, Thomas Wolf, and Alexander Rush. Movement pruning: Adaptive sparsity by fine-tuning. _Advances in Neural Information Processing Systems_ , 33:20378–20389, 2020.
+
+- Jonathan Shen, Ruoming Pang, Ron J Weiss, Mike Schuster, Navdeep Jaitly, Zongheng Yang, Zhifeng Chen, Yu Zhang, Yuxuan Wang, Rj Skerrv-Ryan, et al. Natural tts synthesis by conditioning wavenet on mel spectrogram predictions. In _2018 IEEE international conference on acoustics, speech and signal processing (ICASSP)_ , pp. 4779–4783. IEEE, 2018.
+
+- Vikas Sindhwani, Tara Sainath, and Sanjiv Kumar. Structured transforms for small-footprint deep learning. _Advances in Neural Information Processing Systems_ , 28, 2015.
+
+- Jimmy TH Smith, Andrew Warrington, and Scott Linderman. Simplified state space layers for sequence modeling. In _The Eleventh International Conference on Learning Representations_ , 2023.
+
+- H V Sorensen, D Jones, Michael Heideman, and C Burrus. Real-valued fast fourier transform algorithms. _IEEE Transactions on acoustics, speech, and signal processing_ , 35(6):849–863, 1987.
+
+15
+
+Siyi Tang, Jared A Dunnmon, Liangqiong Qu, Khaled K Saab, Christopher Lee-Messer, and Daniel L Rubin. Spatiotemporal modeling of multivariate signals with graph neural networks and structured state space models. _arXiv preprint arXiv:2211.11176_ , 2022.
+
+- Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. In _International Conference on Learning Representations_ , 2020.
+
+- Yi Tay, Mostafa Dehghani, Jai Prakash Gupta, Vamsi Aribandi, Dara Bahri, Zhen Qin, and Donald Metzler. Are pretrained convolutions better than pretrained transformers? In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pp. 4349–4359, 2021a.
+
+- Yi Tay, Vinh Q Tran, Sebastian Ruder, Jai Gupta, Hyung Won Chung, Dara Bahri, Zhen Qin, Simon Baumgartner, Cong Yu, and Donald Metzler. Charformer: Fast character transformers via gradientbased subword tokenization. _arXiv preprint arXiv:2106.12672_ , 2021b.
+
+- Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. _ACM Computing Surveys_ , 55(6):1–28, 2022.
+
+- Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. _Advances in neural information processing systems_ , 30, 2017.
+
+- Jue Wang, Wentao Zhu, Pichao Wang, Xiang Yu, Linda Liu, Mohamed Omar, and Raffay Hamid. Selectivestructuredstate-spacesforlong-formvideounderstanding. In _ProceedingsoftheIEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 6387–6397, 2023.
+
+- Junxiong Wang, Jing Nathan Yan, Albert Gu, and Alexander M Rush. Pretraining without attention. _arXiv preprint arXiv:2212.10544_ , 2022a.
+
+- Qipeng Wang, Mengwei Xu, Chao Jin, Xinran Dong, Jinliang Yuan, Xin Jin, Gang Huang, Yunxin Liu, and Xuanzhe Liu. Melon: Breaking the memory wall for resource-efficient on-device machine learning. In _Proceedings of the 20th Annual International Conference on Mobile Systems, Applications and Services_ , pp. 450–463, 2022b.
+
+- Sinong Wang, Belinda Z Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. _arXiv preprint arXiv:2006.04768_ , 2020.
+
+- Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. _Advances in neural information processing systems_ , 33:17283–17297, 2020.
+
+- Dan Zhang, Safeen Huda, Ebrahim Songhori, Kartik Prabhu, Quoc Le, Anna Goldie, and Azalia Mirhoseini. A full-stack search technique for domain optimized deep learning accelerators. In _Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems_ , pp. 27–42, 2022a.
+
+- Michael Zhang, Khaled Kamal Saab, Michael Poli, Tri Dao, Karan Goel, and Christopher Re. Effectively modeling time series with simple discrete state spaces. In _International Conference on Learning Representations_ , 2022b.
+
+- Chen Zhu, Wei Ping, Chaowei Xiao, Mohammad Shoeybi, Tom Goldstein, Anima Anandkumar, and Bryan Catanzaro. Long-short transformer: Efficient transformers for language and vision. _Advances in Neural Information Processing Systems_ , 34:17723–17736, 2021.
+
+16
+
+## APPENDIX
+
+Wepresentextendedrelatedwork(Appendix A),additionalalgorithmicdetails(Appendix B),additional experimental results (Appendix C), and experimental details (Appendix D).
+
+## A EXTENDED RELATED WORK
+
+**Long Convolutions in Sequence Modeling** Long convolutional models have emerged as a promising alternative to Transformers for sequence modeling (Gu et al., 2021; 2022a;b; Romero et al., 2021b;a; Poli et al., 2023; Ma et al., 2022; Fu et al., 2023c;b;a; Nguyen et al., 2023; Hasani et al., 2022; Smith et al., 2023). These methods differ in how they generate the convolutional kernels; for example, the S4 line of work uses learned state space models (Gu et al., 2021; Mehta et al., 2022; Gupta et al., 2022; Ma et al., 2022), while other works (Poli et al., 2023; Romero et al., 2021a;b) parameterize the convolution using an MLP from positional encodings. However, all the models operate by taking a convolution over the input sequence with a kernel as long as the input: _y_ = _u∗k_ , where _u ∈_ R _[B][×][H][×][N] ,k ∈_ R _[H][×][N]_ , and the kernel _k_ is broadcast along the _B_ dimension. When used for language modeling, these models often incorporate elementwise multiplicative gating as well: _y_ = _f_ ( _u_ ) _⊙_ (( _g_ ( _u_ ) _⊙h_ ( _u_ )) _∗k_ ), where _f_ , _g_ , and _h_ are linear maps along the _H_ dimension (Poli et al., 2023; Fu et al., 2023b;a; Mehta et al., 2022; Wang et al., 2022a).
+
+**Long-Context Applications** Long convolutional models have especially been helpful for longcontext applications, such as DNA modeling and speech synthesis. In DNA modeling, most longercontext genomic models have relied on either tokenization (Ji et al., 2021; Zaheer et al., 2020; Tay et al., 2021b) or downsampling (Fournier et al., 2021; Avsec et al., 2021). However, recent work has suggested that modeling DNA directly from base pairs can yield downstream improvements in quality, which requires long sequence lengths (Nguyen et al., 2023).
+
+Like DNA modeling, speech synthesis has also benefited from long-context modeling. While traditional speech synthesis pipelines use intermediate representations such as spectrograms (Kumar et al., 2019; Prenger et al., 2019; Shen et al., 2018), linguistic features (Binkowski et al.´ , 2019; Kalchbrenner et al., 2018; Oord et al., 2016), or discrete audio codes (Dhariwal et al., 2020; Dieleman et al., 2018; Lakhotia et al., 2021; Van Den Oord et al., 2017), recent work has shown that modeling the speech directly from the raw waveform can yield downstream improvements in quality (Goel et al., 2022). Again, such models require long sequences to model audio at the rate at which it is naturally sampled, necessitating long-sequence modeling.
+
+**FFT Algorithms** There is a long history of efficient FFT algorithms, ranging from the Cooley-Tukey FFT algorithm published in 1965 (Cooley & Tukey, 1965) to parallel FFT algorithms (Ayinala et al., 2011) and more (Chu & George, 1999; Bahn et al., 2009; Bailey, 1989). These algorithms have enabled fundamental progress in a range of disciplines, from control theory (Brigham, 1988; Bekele, 2016) to signal processing (Oppenheim, 1978; Oppenheim et al., 2001). As FFTs prove more useful for modern deep learning applications, such as long convolutions, new techniques are required to run them efficiently on modern accelerators. Our work continues a line of work exploring how to use tensor cores for the FFT convolution (Fu et al., 2023c;b; Li et al., 2021), and extends the algorithmic capabilities to much longer sequences.
+
+**Sparsity in Deep Learning** As deep learning models have grown larger and deeper (Bommasani et al., 2021; Brown et al., 2020; Chowdhery et al., 2022), there is increasing interest in reducing the cost of training and running models. Sparsity in particular has received a great deal of attention, and has a long history in machine learning, including work in pruning neural networks (Han et al., 2015a;b; Sanh et al., 2020; Lin et al., 2017; Dong et al., 2017) and finding lottery tickets (Frankle & Carbin, 2018; Frankle et al., 2019; 2020). Our work in partial convolutions and frequency-sparse convolutions relates to this line of work, as an analogue of sparsity in convolutional filters. The Monarch decomposition is also closely related to structured matrices. Structured matrices have subquadratic ( _o_ ( _n_[2] ) for dimension _n×n_ ) parameters and runtime, such as sparse and low-rank matrices, and fast transforms (Fourier, Chebyshev, sine/cosine, orthogonal polynomials) (Dao et al., 2022a). Structured matrices can often be computed with simple divide-and-conquer schemes, and can be used to represent many fast transforms (De Sa et al., 2018; Sindhwani et al., 2015; Kailath et al., 1979; Eidelman & Gohberg, 1999).
+
+17
+
+**Optimization of deep learning primitives** There is a rich history of optimizing deep learning primitives. Many techniques, such as kernel fusion, aim to reduce data movement. Recently, libraries such as PyTorch 2.0 Paszke et al. (2019) have added kernel fusion automatically. Other techniques include checkpointing, wherein one stores fewer intermediate results and recomputes the others on-thefly where they are needed, trading additional compute for memory Kusumoto et al. (2019); Wang et al. (2022b). Many algorithms also have hand-optimizations that can remove unnecessary computation or memory accesses Milakov & Gimelshein (2018).
+
+Another line of optimization techniques aims to reduce FLOPs. MLPs and attention are particularly popular targets of FLOP reduction, via sparse factorizations of weights (Cooley & Tukey, 1965; Frankle & Carbin, 2018; Dao et al., 2022a; 2020; Zhu et al., 2021; Dao et al., 2021; Dettmers & Zettlemoyer, 2019; Chen et al., 2021a), or sparse/low-rank approximations of attention Beltagy et al. (2020); Kitaev et al. (2020); Ma et al. (2021); Fedus et al. (2022); Du et al. (2022); Wang et al. (2020); Dai et al. (2020); Zhu et al. (2021); Choromanski et al. (2020); Katharopoulos et al. (2020) and their combinations (Chen et al., 2021b; Tay et al., 2022).
+
+## B ALGORITHM DETAILS
+
+## B.1 DOMAIN-SPECIFIC OPTIMIZATIONS
+
+We review the details of how to compute a real-to-real FFT of size _N_ using a complex FFT of size _N/_ 2, following a tutorial by (Sorensen et al., 1987).
+
+For this section, we adopt notation common in describing FFT algorithms. Let _x_ ( _n_ ) be an input sequence of length _N_ , and let _X_ ( _k_ ) be the result of its discrete Fourier transform. Recall that:
+
+**==> picture [246 x 30] intentionally omitted <==**
+
+for _k_ =0 _,_ 1 _,...,N −_ 1, where _WN_ = _e[−]_[2] _[πi/N]_ is the _N_ th root of unity.
+
+First, if _x_ ( _n_ ) is real, then symmetries emerge in _X_ ( _k_ ). In particular, we have _X_ ( _k_ ) = _X[∗]_ ( _−k_ ) = _X[∗]_ ( _N −k_ ), where _[∗]_ denotes complex conjugation. These symmetries allow us to have an algorithm for computing _X_ ( _k_ ) using a single complex DFT of size _N/_ 2.
+
+In particular:
+
+**==> picture [222 x 66] intentionally omitted <==**
+
+for _k_ = 0 _,_ 1 _,...,N −_ 1. The DFT is now decomposed into two parts: a DFT over the even-indexed elements of _x_ ( _n_ ), and over the odd-indexed elements of _x_ ( _n_ ).
+
+We can now create a third complex sequence, of length _N/_ 2, and put the even-indexed elements of _x_ ( _n_ ) in the real part, and the odd-indexed elements of _x_ ( _n_ ) in the imaginary part. Let:
+
+_z_ ( _n_ )= _x_ (2 _n_ )+ _ix_ (2 _n_ +1) _,_
+
+for _n_ =0 _,_ 1 _,...,N/_ 2 _−_ 1. Then, we compute the _N/_ 2-sized DFT _Z_ ( _k_ ), and we can recover the DFT over the even and odd parts of _x_ ( _n_ ) ( _Xe_ [ _k_ ] and _Xo_ [ _k_ ], respectively):
+
+**==> picture [128 x 47] intentionally omitted <==**
+
+We can now recover _X_ [ _k_ ] _,k_ =0 _...,N −_ 1 using:
+
+**==> picture [206 x 12] intentionally omitted <==**
+
+The inverse FFT proceeds similarly. The goal is to recover _x_ ( _n_ ) given an input _X_ [ _k_ ], using a simple complex inverse DFT of length _N/_ 2.
+
+First, we recover _Xe_ [ _k_ ] and _Xo_ [ _k_ ]:
+
+18
+
+**==> picture [138 x 47] intentionally omitted <==**
+
+for _k_ =0 _,...,N/_ 2 _−_ 1. Then, we construct _Z_ [ _k_ ]:
+
+_Z_ [ _k_ ]= _Xe_ [ _k_ ]+ _iXo_ [ _k_ ] _,k_ =0 _...,N/_ 2 _−_ 1 _._
+
+We use the inverse DFT to recover _z_ ( _n_ ), and then recover _x_ ( _n_ ) from the real and imaginary parts of _z_ ( _n_ ):
+
+**==> picture [80 x 25] intentionally omitted <==**
+
+for _n_ =0 _,...,N/_ 2 _−_ 1.
+
+To implement these in our kernels, we perform the bookkeeping after reading the inputs or before writing the output, and then use the FFT/iFFT implementations as detailed in Algorithm 1 and others.
+
+## B.2 LOW-LEVEL CUDA DETAILS
+
+To ensure high performance, we implement CUDA kernels for each specific sequence length, allowing us to cater to specific performance nuances that arise from the decomposition at that sequence length. In this section, we dive into some of the low-level implementation details for FLASHFFTCONV.
+
+**Matrix Multiplication Using CUDA Tensor cores** CUDA Tensor cores can perform the multiplication of two _m × k_ and _k × n_ matrices for bfloat16 or float16 elements, using around the same number of cycles as is required for the multiplication of two scalars. _m×k×n_ must be of one of the following: 16 _×_ 16 _×_ 16, 32 _×_ 8 _×_ 16, 8 _×_ 32 _×_ 16. This informs our choice of radix for decomposition when performing the FFT and iFFT. In particular our implementation breaks down matrix-matrix multiplications into blocked matrix-matrix multiplications where _m×k×n_ =16 _×_ 16 _×_ 16. We note the following about matrix-matrix multiplication on tensor cores (NVIDIA, 2023c):
+
+- Tensor cores are utilized at the level of the warp and programmatic access of the tensor cores is via the Warp Level Matrix Multiply Accumulate (WMMA) API.
+
+- Tensor core operands are held in register fragments ( _wmma_ :: _matrix_ ~~_a_~~ , and _wmma_ :: _matrix_ ~~_b_~~ ) and results are written to a register fragment ( _wmma_ :: _accumulator_ ).
+
+- The operand fragments can hold data in row-major or column-major format and data in the _wmma_ :: _accumulator_ fragment can be written to memory in row-major or column-major format.
+
+- The specific mapping of items in a fragment to threads in warp is unspecified, however, the mapping of items to threads in the _wmma_ :: _accumulator_ fragment exactly matches that for the _wmma_ :: _matrix_ ~~_a_~~ fragment read row-major, allowing us to directly copy the results of a matrix-matrix multiplication and use as the operand for another matrix-matrix multiply.
+
+To perform a matrix-matrix multiplication _C_ = _A × B_ using the tensor cores, a warp loads the contents of _A_ and _B_ into registers (WMMA fragments in CUDA parlance), performs the matrix-matrix multiplication, and writes the results which are stored in an accumulator fragment back to memory.
+
+**Register Reuse** A key part of ensuring high performance is minimizing I/O across different levels of the memory hierarchy: from HBM to SRAM and from SRAM to registers. To ensure this, we move the output from the _accumulator_ fragment directly into _matrix_ ~~_a_~~ fragment for use in subsequent matrix multiplications, avoiding an extra trip to SRAM. However, this is only possible if the output from the previous matrix-matrix multiply does not need to be transposed before using it as an operand for the next one. When this is not the case, we need to make a trip to SRAM and back. In Algorithm 2 we detail I/O from SRAM to registers.
+
+**Locality and Tiling** The algorithm is trivially parallelizable across _B_ and _H_ , allowing us to tile in both dimensions at the threadblock level. In Algorithm 3 , all loops from _i ←_ 1 to _N_ 1 are warp-tiled.
+
+19
+
+**Algorithm 2** Detailed Annotation of FLASHFFTCONV core algorithm showing I/O from SRAM to register fragments, with two-way Monarch decomposition. We assume _N_ = _N_ 1[2][for simplicity here.]
+
+**Input:** Input _u ∈_ R _[B][×][H][×][N]_ , convolution kernel _kf ∈_ C _[H][×][N]_ , FFT matrices **F** _∈_ C _[N]_[1] _[×][N]_[1] , **F** _[−]_ **[1]** _∈_ C _[N]_[1] _[×][N]_[1] , Twiddle factors _t ∈_ C _[N]_ , _tinv ∈_ C _[N]_ , _B_ tile size _Btile_ , _H_ tile size _Htile_ . **Output:** Output _y ∈_ R _[B][×][H][×][N]_ . **for** SMs in parallel across _B/Btile ×H/Htile_ **do** Load **F** , **F** _[−]_ **[1]** , _t_ , _tinv_ from HBM. **for** _h ←_ 1 to _Htile_ **do** Load **Kf** _← kf_ [ _h_ ] from HBM, reshaped to _N_ 1 _×N_ 1. **for** _b ←_ 1 to _Btile_ **do** Load **X** _← u_ [ _b,h_ ] from HBM, reshaped to _N_ 1 _×N_ 1. **X** _←_ **F** _[⊤]_ **X** _▷_ **F** _[⊤]_ ( _matrix_ ~~_a_~~ ), **X** ( _matrix_ ~~_b_~~ ) output to _accumulator_ Load **X** from _accumulator_ to _matrix_ ~~_a_~~ **X** _←_ **X** _∗t ▷_ Elementwise multiply directly in _matrix_ ~~_a_~~ **X** _←_ **XF** _▷_ **X** ( _matrix_ ~~_a_~~ ), **F** ( _matrix_ ~~_b_~~ ) output to _accumulator_ Load **X** from _accumulator_ to _matrix_ ~~_a_~~ _⊤_ **X** _←_ **X** _∗_ **Kf** _▷_ Elementwise multiply with _kf_ directly in _matrix_ ~~_a_~~ **X** _←_ **XF** _[−]_[1] _▷_ **X** ( _matrix_ ~~_a_~~ ), **F** _[−]_[1] ( _matrix_ ~~_b_~~ ) output to _accumulator_ Write **X** from _accumulator_ fragment to SRAM Load **X** _[⊤]_ from SRAM to _matrix_ ~~_a_~~ fragment **X** _←_ **X** _[⊤] ∗tinv ▷_ Elementwise multiply with _tinv_ directly in _matrix_ ~~_a_~~ **Y** _←_ **XF** _[−]_[1] _▷_ **X** ( _matrix_ ~~_a_~~ ), **F** _[−]_[1] ( _matrix_ ~~_b_~~ ) output to _accumulator_ Write **Y** _[⊤]_ to HBM.
+
+**Miscellaneous optimizations** In addition to the above optimizations, we also perform some other optimizations that provide marginal speedup. These include: utilizing vector intrinsics/types for performing memory reads/writes and arithmetic for 16-bit floating point (fp16) and brain float point (bf16), allowing non-tensor core operations on these types to be performed at around twice the normal speed. Furthermore, we double buffer I/O movements across all levels of the memory hierarchy, reducing warp stalls. We also aggressively tune our kernel hyperparameters such as block and tile dimensions, and loop unrolling factors for the best performance on the specific underlying hardware.
+
+B.3 GENERALIZATION TO 3-WAY AND 4-WAY MONARCH DECOMPOSITIONS
+
+We provide algorithm listings for 3-way and 4-way Monarch Decompositions.
+
+**3-Way Decomposition** Algorithm 3 shows the algorithm for a 3-way Monarch decomposition. It involves one extra matrix multiply operation on either side of the FFT and iFFT, and proceeds over the algorithm in Algorithm 1 in an inner loop.
+
+**4-way Decomposition** For the 4-way decomposition, we assume that we need to write intermediate outputs to HBM. Here, we treat the 3-way decomposition as a sub-routine, and assume it has a fused kernel (i.e., Algorithm 3). We compute one matrix multiply for the FFT and one for the iFFT, and then call the kernel for the 3-way decomposition over the rows of the output. The algorithm is listed in Algorithm 4.
+
+B.4 FREQUENCY-SPARSE PATTERNS
+
+We describe frequency-sparse patterns and the matmul savings in more detail here. We use the full 4-way decomposition case, since the algorithms generalize to lower-order decompositions.
+
+Let _N_ = _N_ 1[4][, and consider a kernel] _[ k][f][∈]_ **[C]** _[N]_[. Consider the matrix multiply and looping operations that] occur when computing the FFT portions of FLASHFFTCONV ( _u_ , _kf_ ) (the iFFT portions are the same, in the opposite order):
+
+1. In Algorithm 4, there is one FFT operation over the columns of _u_ , reshaped to _N_ 1 _×N/N_ 1, and a Twiddle correction..
+
+2. Then, Algorithm 3 iterates over the rows of _u_ for _α_ := _N_ 1 steps.
+
+20
+
+**Algorithm 3** FLASHFFTCONV algorithm for 3-way decomposition. We assume _N_ = _N_ 1[3][for simplicity] here. **Input:** Input _u ∈_ R _[B][×][H][×][N]_ , convolution kernel _kf ∈_ C _[H][×][N]_ , FFT matrices **F** _∈_ C _[N]_[1] _[×][N]_[1] , **F** _[−]_ **[1]** _∈_ C _[N]_[1] _[×][N]_[1] , Twiddle factors _t_ 1 _∈_ C _[N]_ 1[2] , _t_ 1 _,inv ∈_ C⊮ _N_ 1[2] , _t_ 2 _∈_ C _[N]_ , _t_ 2 _,inv ∈_ C _[N]_ , _B_ tile size _Btile_ , _H_ tile size _Htile_ . **Output:** Output _y ∈_ R _[B][×][H][×][N]_ . **for** SMs in parallel across _B/Btile ×H/Htile_ **do** Load **F** , **F** _[−]_ **[1]** , _t_ , _tinv_ from HBM. **for** _h ←_ 1 to _Htile_ **do** Load **Kf** _← kf_ [ _h_ ] from HBM, reshaped to _N_ 1[2] _[×][N]_[1][.] **Kf** _← Kf[T]_[.] _▷_ Transpose last two dimensions. Reshape **Kf** to _N_ 1 _×N_ 1[2][.] **for** _b ←_ 1 to _Btile_ **do** Load **X** _← u_ [ _b,h_ ] from HBM, reshaped to _N_ 1 _×N_ 1 _×N_ 1. **for** _i ←_ 1 to _N_ 1 **do X** _[′] ←_ **FX** [: _,i∗N_ 1 :( _i_ +1) _∗N_ 1] **X** [: _,_ **i** _∗_ **N1** :( **i** + **1** ) _∗_ **N1** ] _←_ **X** _[′] ▷_ Transpose, matmul, transpose. **X** _←_ **X** _∗t_ 2 **for** _i ←_ 1 to _N_ 1 **do** _▷_ Loop over rows **X** _[′] ←_ **FX** [ _i_ ] Reshape **X** _[′]_ to _N_ 1 _×N_ 1 **X** _[′] ←_ (( **F** _[⊤]_ **X** _[′]_ ) _∗t_ ) **F** _▷_ FFT, decomposed into two steps **X** _[′] ←_ **X** _[′] ∗_ **Kf** [ _i_ ] _[⊤] ▷_ Elementwise multiply with _kf_ **Y** _[′] ←_ (( **X** _[′]_ **F** _[−]_[1] ) _[⊤] ∗tinv_ ) **F** _[−]_[1] _▷_ Inverse FFT, decomposed into two steps **Y** _[′] ←_ **Y** _[′⊤]_ **Y** [ _i_ ] _←_ **Y** _[′] ▷_ Finish inner loop **Y** _←_ **Y** _∗t_ 2 _,inv_ **for** _i ←_ 1 to _N_ 1 **do Y** _[′] ←_ **FY** [: _,i∗N_ 1 :( _i_ +1) _∗N_ 1] **Y** [: _,_ **i** _∗_ **N1** :( **i** + **1** ) _∗_ **N1** ] _←_ **Y** _[′] ▷_ Transpose, matmul, transpose. Write **Y** to HBM.
+
+3. Let _u[′]_ be the row in a specific iteration. In Algorithm 3, there is an FFT over the columns of _u[′]_ , reshaped to _N_ 1 _×N_ 1[2][, and a Twiddle correction.]
+
+4. Then, the inner loop iterates over the rows of _u[′]_ for _β_ := _N_ 1 steps.
+
+5. In each loop, _u[′]_ has one FFT operation with a twiddle factor correction. Let the matrix of this FFT operation be denoted **A** .
+
+6. Then there is a second FFT operation. Let the matrix of this FFT operation be denoted **B** .
+
+Now, reshape _kf_ to _N_ 1 _× N_ 1 _× N_ 1 _× N_ 1. Let us consider how sparsity along the each of the four dimensions of _kf_ lets us skip operations in the above steps.
+
+- Sparsity in the first dimension allows us to skip computation in **B** , exactly in proportion to how much of the first dimension we eliminate. This can result in cost savings, as long as **B** can still be expressed using the tensor cores on-chip after skipping the computation. For example, if **B** is 32 _×_ 32, then _N_ 1 =32, and it does not make sense to eliminate more than half of the
+
+- Sparsity in the second dimension works exactly the same way, except it allows us to skip computation in **A** .
+
+- Sparsity in the third dimension lets us reduce _β_ . Each row of the third dimension that we remove lets us skip one iteration of the inner loop in step 4 above.
+
+- Sparsity in the fourth dimension lets us reduce _α_ . Each row of the fourth dimension that we remove lets us skip one iteration of the outer loop in step 2 above.
+
+21
+
+**Algorithm 4** FLASHFFTCONV algorithm for 4-way decomposition. We assume _N_ = _N_ 1[4][for simplicity] here.
+
+**Input:** Input _u ∈_ R _[B][×][H][×][N]_ , convolution kernel _kf ∈_ C _[H][×][N]_ , FFT matrices **F** _∈_ C _[N]_[1] _[×][N]_[1] , **F** _[−]_ **[1]** _∈_ C _[N]_[1] _[×][N]_[1] , Twiddle factors _t ∈_ C _[N]_ , _tinv ∈_ C⊮ _N_ , _t_ 2 _∈_ C _N_ , _t_ 2 _,inv ∈_ C _N_ . **Output:** Output _y ∈_ R _[B][×][H][×][N]_ . Reshape _u_ to _B ×H ×N_ 1 _×_ ( _N/N_ 1). Reshape _kf_ to _H ×N_ 1 _×_ ( _N/N_ 1). _kf ← kf[⊤]_[.] _▷_ Transpose last two dimensions. Reshape _kf_ to _HN_ 1 _×N/N_ 1. _u ←_ **F** _u ▷_ Computes the FFT over the columns of _u_ . Reshape _u_ to _B ×_ ( _HN_ 1) _×_ ( _N/N_ 1). _▷_ Move _N_ 1 into _H_ dimension. Reshape _kf_ to ( _HN_ 1) _×_ ( _N/N_ 1). Call FLASHFFTCONV ( _u_ , _kf_ ). _▷_ Call 3-way FLASHFFTCONV. Reshape _u_ to _B ×H ×N_ 1 _×_ ( _N/N_ 1). _y ←_ **F** _[−]_ **[1]** _u ▷_ Computes the iFFT over the columns of _u_ . Return _y_ .
+
+Table 9: Sparsity patterns for _kf_ and sparsity fraction for the frequency-sparse convolution experiment in Table 8.
+
+|**Sparsity Pattern**|**S**|
+|---|---|
+|a=0,b=0,c=0,d=0|0|
+|a=16,b=0,c=0,d=0|50|
+|a=16,b=16,c=0,d=0|75|
+|a=16,b=16,c=4,d=4|79|
+|a=16,b=16,c=8,d=8|84|
+|a=16,b=16,c=16,d=16|91|
+
+Table 10: Time ( _↓_ ) to compute the forward pass of a gated convolution with FLASHFFTCONV in milliseconds on one H100-SXM. We also show memory savings. All results scaled to batch size 64, hidden dimension 768. _p_ indicates the order of the Monarch decomposition.
+
+|Sequence Length|_p_=2|_p_=3 **4K** **8K** **16K** **32K**|_p_=4 **1M** **2M** **4M**|
+|---|---|---|---|
+||**256** **1K**|||
+|PyTorch FLASHFFTCONV|0.62 2.30 **0.11** **0.29**|9.49 19.4 29.9 84.8 **1.43** **3.58** **12.2** **26.3**|3,071.4 6,342.6 13,031.2 **1,768.9** **4,623.5** **10,049.4**|
+|Speedup Memory Savings|5.64_×_ 7.93_×_ 6.65_×_ 6.40_×_|6.64_×_ 5.42_×_ 2.45_×_ 3.22_×_ 6.35_×_ 6.34_×_ 6.17_×_ 5.87_×_|1.74_×_ 1.37_×_ 1.30_×_ 2.82_×_ 2.81_×_ 2.81_×_|
+
+As an example, we reveal the sparsity dimensions that we applied in the experiment detailed in Table 8 in the main paper. Conceptually, we use the full 2-million length kernel _kf_ , and reshape it to 32 _×_ 32 _×_ 32 _×_ 64. Let _a_ , _b_ , _c_ , and _d_ be variables describing how much of each dimension we set to zero. Specifically, we set _kf_ [ _a_ : _,_ : _,_ : _,_ :] = 0, _kf_ [: _,b_ : _,_ : _,_ :] = 0, _kf_ [: _,_ : _,c_ : _,_ :] = 0, and _kf_ [: _,_ : _,_ : _,d_ :] = 0 sequentially. The formula the sparsity fraction _S_ given _a,b,c,d_ in this case is given by:
+
+_S_ =1 _−_ (32 _−a_ )(32 _−b_ )(32 _−c_ )(64 _−d_ ) _,_
+
+or more generally, 1 minus the product of the fraction of each dimension that is removed. Table 9 lists the configurations of the sparsity patterns and the sparsity fractions used for the experiment in Table 8.
+
+B.5 HARDWARE SUPPORT
+
+FLASHFFTCONV was developed on A100 GPUs, and tested on A100 and H100 GPUs. Older generations of GPU such as V100 are not supported, since the sizes of the tensor cores are different. We look forward to integrating more general libraries such as Cutlass (NVIDIA, 2023b) to support a wider range of GPUs, and developing support for non-GPU accelerators.
+
+C ADDITIONAL RESULTS
+
+22
+
+Table 11: Full results for the forward pass of a convolution with FLASHFFTCONV compared to PyTorch in milliseconds on one H100-SXM. Batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Speedup**|
+|---|---|---|---|
+|**256**|0.43|0.09|4.69|
+|**512**|0.81|0.15|5.34|
+|**1024**|1.57|0.24|6.61|
+|**2048**|3.27|0.55|5.95|
+|**4096**|6.65|1.37|4.87|
+|**8192**|13.72|3.19|4.30|
+|**16384**|28.58|9.27|3.09|
+|**32768**|62.09|21.84|2.84|
+|**65536**|141.15|67.96|2.08|
+|**131072**|292.26|147.26|1.98|
+|**262144**|582.76|308.48|1.89|
+|**524288**|1,167.28|742.26|1.57|
+|**1048576**|2,346.26|1,492.84|1.57|
+|**2097152**|4,892.09|2,695.51|1.81|
+|**4194304**|10,127.56|7,586.96|1.33|
+
+Table 12: Full results for the forward pass of a gated convolution with FLASHFFTCONV compared to PyTorch in milliseconds on one H100-SXM. Batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Speedup**|
+|---|---|---|---|
+|**256**|0.62|0.11|5.76|
+|**512**|1.18|0.19|6.14|
+|**1024**|2.30|0.29|7.81|
+|**2048**|4.70|0.67|7.05|
+|**4096**|9.49|1.43|6.65|
+|**8192**|19.38|3.58|5.42|
+|**16384**|39.91|12.18|3.28|
+|**32768**|84.79|26.32|3.22|
+|**65536**|186.69|79.84|2.34|
+|**131072**|382.98|181.51|2.11|
+|**262144**|764.08|376.96|2.03|
+|**524288**|1,530.34|878.93|1.74|
+|**1048576**|3,071.37|1,768.94|1.74|
+|**2097152**|6,342.58|4,623.46|1.37|
+|**4194304**|13,031.21|10,049.42|1.30|
+
+## C.1 SPEEDUP FROM DOMAIN-SPECIFIC OPTIMIZATIONS
+
+We benchmark domain-specific optimizations in FLASHFFTCONV. Table 10 shows the performance of a gated convolution _y_ = _v⊙_ (( _u⊙w_ ) _∗k_ ), where _v_ and _w_ are linear projections of the input _u_ . This pattern is common in convolutional and SSM-based architectures for language modeling (Fu et al., 2023c;b; Poli et al., 2023; Mehta et al., 2022). A PyTorch implementation of a gated convolution incurs additional I/O overhead from the gating operations, whereas FLASHFFTCONV fuses the gating operations into the convolution. This fusion results in further speedup over PyTorch, up to 7.93 _×_ .
+
+C.2 FULL RESULTS FOR ALL SEQUENCE LENGTHS AND SETTINGS
+
+We report full results for all sequence lengths in powers of two between 256 and 4M. We report full
+
+- Table 11: Standard forward pass, where the FFT size is the same as the input size. This is equivalent to a circular convolution.
+
+- Table 12: Gated forward pass, where the FFT size is the same as the input size.
+
+23
+
+Table 13: Full results for the forward pass of a convolution where the input is half the length of the convolution size with FLASHFFTCONV compared to PyTorch in milliseconds on one H100-SXM. Batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Speedup**|
+|---|---|---|---|
+|**256**|0.44|0.09|4.64|
+|**512**|0.82|0.16|5.03|
+|**1024**|1.57|0.24|6.45|
+|**2048**|3.25|0.53|6.08|
+|**4096**|6.59|1.37|4.83|
+|**8192**|13.60|3.13|4.34|
+|**16384**|28.37|8.82|3.22|
+|**32768**|61.87|21.34|2.90|
+|**65536**|141.42|77.32|1.83|
+|**131072**|292.26|151.28|1.93|
+|**262144**|582.82|315.99|1.84|
+|**524288**|1,167.21|757.33|1.54|
+|**1048576**|2,343.55|1,525.13|1.54|
+|**2097152**|4,922.63|3,321.71|1.48|
+|**4194304**|10,179.86|7,305.61|1.39|
+
+Table 14: Full results for the forward pass of a gated convolution where the input is half the length of the convolution size with FLASHFFTCONV compared to PyTorch in milliseconds on one H100-SXM. Batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Speedup**|
+|---|---|---|---|
+|**256**|0.54|0.11|4.71|
+|**512**|1.01|0.19|5.27|
+|**1024**|1.94|0.29|6.75|
+|**2048**|3.97|0.59|6.69|
+|**4096**|8.01|1.41|5.68|
+|**8192**|16.42|3.46|4.75|
+|**16384**|34.04|10.62|3.21|
+|**32768**|73.15|25.03|2.92|
+|**65536**|163.75|78.88|2.08|
+|**131072**|337.37|153.13|2.20|
+|**262144**|672.48|319.47|2.10|
+|**524288**|1,346.99|763.97|1.76|
+|**1048576**|2,704.91|1,538.89|1.76|
+|**2097152**|5,644.20|3,545.79|1.59|
+|**4194304**|11,625.79|8,132.32|1.43|
+
+- Table 13: Forward pass, where the input size is half the FFT size. This is equivalent to a causal convolution.
+
+- Table 14: Gated forward pass, where the input size is half the FFT size.
+
+- Table 15 Standard backward pass, where the FFT size is the same as the input size.
+
+- Table 16 Memory use for FLASHFFTCONV compared to PyTorch for a convolution, scaled to batch size 64, hidden dimension 768.
+
+- Table 17 Memory use for a gated convolution using FLASHFFTCONV compared to PyTorch for a convolution, scaled to batch size 64, hidden dimension 768.
+
+Speedups vary, but generally follow the trend from the results in the body of the paper. FLASHFFTCONV achieves significant memory savings over PyTorch due to recomputation in the backward pass and kernel fusion. To measure memory savings, we measure the relative additional memory from calling the convolution operations (we do not measure the footprint of hte original inputs).
+
+24
+
+Table 15: Full results for the backward pass of a convolution with FLASHFFTCONV compared to PyTorch in milliseconds on one H100-SXM. Batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Speedup**|
+|---|---|---|---|
+|**256**|0.76|0.24|3.24|
+|**512**|1.45|0.22|6.43|
+|**1024**|2.83|0.65|4.37|
+|**2048**|5.76|1.48|3.90|
+|**4096**|11.56|2.86|4.05|
+|**8192**|23.11|6.16|3.75|
+|**16384**|46.85|18.57|2.52|
+|**32768**|103.85|57.68|1.80|
+|**65536**|241.81|111.76|2.16|
+|**131072**|489.38|239.32|2.04|
+|**262144**|976.24|519.49|1.88|
+|**524288**|1,960.31|1,240.95|1.58|
+|**1048576**|3,938.92|2,708.36|1.45|
+|**2097152**|7,909.27|4,977.93|1.59|
+|**4194304**|16,552.21|12,932.02|1.28|
+
+Table 16: Memory usage in GB for FLASHFFTCONV compared to PyTorch. Scaled up to batch size 64, hidden dimension 768.
+
+|ension 768.||||
+|---|---|---|---|
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Memory Reduction**|
+|**256**|0.42|0.05|8.21_×_|
+|**512**|0.80|0.10|8.19_×_|
+|**1024**|1.58|0.20|7.73_×_|
+|**2048**|3.12|0.39|7.94_×_|
+|**4096**|6.21|0.82|7.61_×_|
+|**8192**|12.39|1.63|7.59_×_|
+|**16384**|24.93|3.46|7.21_×_|
+|**32768**|50.43|7.68|6.57_×_|
+|**65536**|121.60|46.08|2.64_×_|
+|**131072**|243.21|92.18|2.64_×_|
+|**262144**|486.41|184.39|2.64_×_|
+|**524288**|972.83|368.91|2.64_×_|
+|**1048576**|1945.65|738.34|2.64_×_|
+|**2097152**|3889.23|1477.69|2.63_×_|
+|**4194304**|7778.45|2961.56|2.63_×_|
+
+## C.3 REFERENCE LARGER MODELS
+
+Table 18 gives performance numbers for larger models trained for the same number of tokens and steps as the reference PyTorch models in Table 1 in the main paper.
+
+The GPT-style PyTorch models are trained for 5B tokens, with batch size 512K tokens. The BERTstyle PyTorch models are trained for 16000 steps, with batch size 64K tokens. In contrast, the FLASHFFTCONV models, with higher training throughput, are trained for 15B tokens and 70000 steps in the same compute budget, respectively.
+
+## C.4 DNA EMBEDDINGS
+
+We use our 4M-sequence length HyenaDNA model to generate embeddings for various DNA segments following the procedure from (Nguyen et al., 2023). The DNA classes include human genes corresponding to different biological function annotations from the Ensembl genome dataset known as biotypes (Cunningham et al., 2022). The longest human gene, the dystrophin gene, is annotated.
+
+25
+
+Table 17: Memory usage in GB for FLASHFFTCONV for a gated convolution compared to PyTorch. Scaled up to batch size 64, hidden dimension 768.
+
+|**Seq Len**|**PyTorch**|**FLASHFFTCONV**|**Memory Reduction**|
+|---|---|---|---|
+|**256**|0.66|0.10|6.65_×_|
+|**512**|1.28|0.19|6.61_×_|
+|**1024**|2.54|0.40|6.40_×_|
+|**2048**|5.04|0.78|6.49_×_|
+|**4096**|10.05|1.58|6.35_×_|
+|**8192**|20.07|3.17|6.34_×_|
+|**16384**|40.29|6.53|6.17_×_|
+|**32768**|81.15|13.83|5.87_×_|
+|**65536**|164.61|58.37|2.82_×_|
+|**131072**|329.22|116.75|2.82_×_|
+|**262144**|658.44|233.54|2.82_×_|
+|**524288**|1316.89|467.21|2.82_×_|
+|**1048576**|2633.78|934.95|2.82_×_|
+|**2097152**|5265.48|1870.90|2.81_×_|
+|**4194304**|10530.97|3747.99|2.81_×_|
+
+Table 18: Reference quality numbers for models when trained for the same number of steps and training data.
+
+|**Model (Metric)**||
+|---|---|
+|M2-BERT-base-110M (GLUE Score_↑_)|77.6|
+|M2-BERT-large-260M (GLUE Score_↑_)|81.0|
+|Hyena-s-155M (PPL_↓_)|13.4|
+|Hyena-m-355M (PPL_↓_)|11.1|
+
+Table 19: _L∞_ error for FLASHFFTCONV compared to PyTorch FFT convolution in fp32 across sequence lengths, for fp16 and bf16.
+
+|p16 and|bf16.|||||
+|---|---|---|---|---|---|
+||**256**|**1K**|**4K**|**32K**|**1M**|
+|**fp16**|3.8e-6|7.6e-6|1.5e-5|6.5e-5|4.0e-4|
+|**bf16**|3.1e-5|3.1e-5|6.1e-5|6.1e-5|6.1e-5|
+
+Table 20: Time spent in the convolution operation for the models in Table 4, on H100.
+
+|**Model**|**% Time in Convolution**|**Speedup**|
+|---|---|---|
+|**M2-BERT**|48.5%|1.9x|
+|**Hyena**|38.4%|1.7x|
+|**Long Convs**|64.3%|2.4x|
+|**SaShiMi**|22.1%|1.3x|
+|**HyenaDNA**|81.8%|4.4x|
+
+## C.5 PRECISION OF FLASHFFTCONV
+
+FLASHFFTCONV operates over inputs in fp16 or bf16, which enables faster execution (tensor cores 2 _×_ faster than fp32 matrix multiply) at the cost of lower-precision computation. We measure the error from computing an FFT convolution using FLASHFFTCONV compared to computing it in PyTorch in fp32 precision. Table 19 shows the results, using an _L∞_ norm. Error increases with sequence length, but is still small even for sequences up to 1M.
+
+26
+
+Unprocessed Pseudogene miRNA IncRNA Protein Coding Processed Pseudogene snRNA Miscellaneous RNA TEC snoRNA Dystrophin Gene **Longest Human Gene Dystrophin, 2.3M Base Pairs**
+
+**==> picture [118 x 128] intentionally omitted <==**
+
+Figure 4: t-SNE visualization of various genes and DNA segments using our new HyenaDNA-4M. The longest human gene, Dystrophin, is annotated.
+
+## C.6 PERCENTAGE OF TIME SPENT IN CONVOLUTION
+
+Table 4 shows different amounts of speedup for different models end-to-end. Speedup varies by the amount of time each model spends computing the convolution, compared to other operations like MLP and convolution kernel generation.
+
+Table 20 presents the amount of time a PyTorch implementation of each model spends computing convolutions. We profile each model on H100 using the PyTorch CUDA profiler and manually inspect the amount of time spent in the convolution. Speedup is closely correlated with how much time the PyTorch implementation spends in convolution.
+
+## D EXPERIMENT DETAILS
+
+D.1 COMPUTE
+
+All experiments were conducted on a box with 8xA100-40GB GPUs or a box with 8xH100-SXM GPUs.
+
+D.2 FIXED COMPUTE BUDGET EXPERIMENT
+
+For the experiment in Table 1, we train an M2-BERT-base model from scratch, and a Hyena-s-155M model from scratch.
+
+We train the M2-BERT-base model using masked language modeling of 30% on the C4 dataset, and fine-tune it on GLUE using the protocol from (Fu et al., 2023a). The FLASHFFTCONV model has higher training throughput, so it trains for more tokens; we train the FLASHFFTCONV model for 70,000 steps with a batch size of 64K tokens. The PyTorch model, with lower training throughput, only trains for 16,000 steps, with the same batch size. The M2-BERT-base model we use is parameter-matched with a Transformer BERT-base. It has 12 hidden layers, with a model dimension of 960, and an expansion factor of four. It also uses a block-diagonal MLP with four blocks. The M2 Hyena filter has embedding dimension 5, filter order 128, and initial sine activation factor of 10. We train with learning rate 8e-4, weight decay 1e-5, and 6% warmup with a cosine decay.
+
+We train the Hyena-s-155M model using a causal language modeling objective on the Pile. We train the FLASHFFTCONV model for 15M tokens, and the PyTorch model for 5M tokens. The Hyena-s-155M model matches the configuration from (Poli et al., 2023) and has 18 layers, with a hidden dimension of 864, and an expansion factor of 4. The Hyena filter has embedding dimension 33, filter order 64, and
+
+27
+
+initial sine activation factor of 14. We train with learning rate 6e-4, with 1% warmup time and a cosine decay.
+
+## D.3 PATH-X AND PATH-512 EXPERIMENTS
+
+For the experiment in Table 2, we use simple convolutional language models, as in (Fu et al., 2023c).
+
+For Path-X, we use the same model and hyperparameters as the convolutional model from (Fu et al., 2023c). We use a convolutional model with 6 layers, prenorm batch norm, and hidden dimension of 256. For the convolution filter parameters, we use kernel dropout 0.3, kernel learning rate 0.0005, _λ_ factor 0.001, and two channels on the filter. We use an overall learning rate of 0.0005 and weight decay 0.05. We train for 500000 steps, with 10000 steps of warmup with a cosine decay, and global batch size 16.
+
+For Path-512, we scale up the resolution of Path-256. We train for 200000 steps, with 10000 steps warmup, learning rate 0.0005, and weight decay 0.05. For the model, we train with 4 layers, and hidden dimension 256. We use kernel dropout 0.1, kernel learning rate 0.0005, _λ_ factor 0.001, and two channels on the filter. We keep the filter length to be 65536.
+
+## D.4 CONVOLUTION BENCHMARKS
+
+For the experiments in Table 3, we time the forward pass of a convolution with batch size 64, hidden dimension 768, and varying sequence length. If we run out of memory for a sequence length, we split the batch and hidden dimension and call the forward pass multiple times. We time each call 30 times and take the average of the runs. We use the same protocol for the backward pass in Table **??** .
+
+## D.5 END-TO-END MODELING DETAILS
+
+For the experiments in Table 4, we run forward pass of each model, and use it to compute throughput. Batch sizes vary by model, and we check throughput calculations with a few batch sizes to make sure the result is consistent. For the M2-BERT-base model, we use a 110M model from Monarch Mixer (Fu et al., 2023a). For the Hyena-s-4K model, we use an identical model to the one in Table 1, but with a filter length of 4K. For the long convs Path-X model, we use the same model as in Table 2. For the SaShiMi model, we use the standalone SaShiMi model from the official implementation (Goel et al., 2022), and we use 8 layers with hidden dimension 64, and 4 up pool and down pool layers. For the HyenaDNA model, we use the official 1M-sequence length checkpoint from (Nguyen et al., 2023). For M2-BERT-base, Hyena-s-4K, and HyenaDNA, we additionally use a fast depthwise convolution kernel for short kernels. For M2-BERT-base, Hyena-s-4K, and HyenaDNA, we report results benchmarked on one H100-SXM. For the others, we report performance on one A100-40GB.
+
+## D.6 COMPARISON TO TRANSFORMERS
+
+For the comparison against Transformers in Table 5, we use the official implementations with the FlashAttention-v2 release (Dao, 2023). We use a Hyena model, and match the number of layers, hidden dimension, and expansion factor to the 2.7B Transformer model. To compute the FLOP usage, we take the formula:
+
+2 _∗_ num tokens _∗_ num parameters
+
+for the parametric FLOPs. For the non-parameter FLOPs, we add the raw FLOP count from our cost model in Equation 2 (without the adjustment for speed of tensor core FLOPs).
+
+## D.7 PARTIAL CONVOLUTIONS FOR HYENA
+
+For the measurement of memory footprint reduction in Table 6, we use the same Hyena-s model as in Tables 1 and 4, except we cut the filter short. This lets us offload parts of the input, which reduces the memory footprint.
+
+## D.8 EXTENDING HYENADNA-1M
+
+In Table 7, we use a sliding window approach to extend the HyenaDNA-1M and HyenaDNA-450K models to longer sequences. This mimics training a 4M-sequence HyenaDNA with a short filter.
+
+## D.9 FREQUENCY-SPARSE CONVOLUTIONS
+
+To evaluate frequency-sparse convolutions, we take the pretrained HyenaDNA-1M model, and sparsify _kf_ using the strategy described in Appendix B.4. We then run standard validation using the validation set from (Nguyen et al., 2023).
+
+28
+
+Table 21: Measured Constants for Cost Model for A100-40GB.
+
+|Constant|A100-40GB|
+|---|---|
+|_σH_|1.35 TB/s|
+|_σS_|9.5 TB/s|
+|_τM_|234 TFLOPs|
+|_τG_|17.6 TFLOPs|
+
+## D.10 EMPIRICAL GPU PROFILING
+
+Table 21 gives empirically-measured GPU stats for an A100-40GB, which we used to generate Figure 3. The statistics are specialized to the Monarch decomposition workload. To measure the achievable tensor core FLOPs, we measured the utilization of real fp16 matrix multiply. To measure achievable general arithmetic FLOPs, we measured the utilization of continuously applying Twiddle factors. To measure the achievable HBM bandwidth, we measured the speed of torch.clone of a tensor. To measure the achievable SRAM bandwidth, we measured the slow down from writing intermediate results to SRAM between matrix multiply instructions.
+
+29
+
diff --git a/open_review/iclr2024_8589.json b/open_review/iclr2024_8589.json
new file mode 100644
index 0000000000000000000000000000000000000000..5bff2cddd16327418d4c4b668edd201eb22fa121
--- /dev/null
+++ b/open_review/iclr2024_8589.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8589",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Independent-Set Design of Experiments for Estimating Treatment and Spillover Effects under Network Interference",
+ "abstract": "Interference is ubiquitous when conducting causal experiments over networks. Except for certain network structures, causal inference on the network in the presence of interference is difficult due to the entanglement between the treatment assignments and the interference levels. In this article, we conduct causal inference under interference on an observed, sparse, but connected network, and we propose a novel design of experiments based on an independent set. Compared to conventional designs, the independent-set design focuses on an independent subset of data and controls their interference exposures through the assignments to the rest (auxiliary set). We provide a lower bound on the size of the independent set from a greedy algorithm and justify the theoretical performance of estimators under the proposed design. Our approach is capable of estimating both spillover effects and treatment effects. We justify its superiority over conventional methods and illustrate the empirical performance through simulations.",
+ "rebuttal": "We thank the reviewer for the careful comments on our manuscript. For the weakness part, the reviewer commented on the few assumptions that are proposed in the paper. We list our responses as below:\n1. In our paper, we assume the network is observed at least before the partitioning step. This is usually the case. For example, the interference can the friendship network in social networks or the transportation network for the supply chain problems. It is a common assumption (see Ugander et al., 2013; Forastiere et at., 2021; Cai et al., 2022) Our work focuses on observed network, and the design of experiment is on observed networks, but it is a good direction for the future work when network G is misspecified, and we include that in our discussion as future work.\n 2. We agree it is always helpful to inspect models on real data. However, the paper focus more on the design and theory— while in real data we never know the true potential outcomes and true effects. Therefore, we compare our design with other designs on the synthetic datasets, where we can artificially set the truth and compare the performances. \n 3. If we understand the reviewer’s question correctly, it is about the representativeness of the outcomes after a deterministic assignment of the treatments. We admit that, for a given sample set (that is a fixed potential outcomes and a fixed observed network), the greedy algorithm and the optimization of assignments do indeed weaken the representativeness of the observed outcomes because the vertices has unequal probabilities of being assigned to treated or being partitioned to the independent set. This is why we are NOT claiming our estimation is unbiased for the given sample set of data. Instead, we DO claim the unbiasedness from the super-population perspective (Assumption 2), where all samples along with their potential outcomes and their network are assumed to be sampled from the population. We would refer to Section 7.3 of Imbens and Rubin (2015) for the super-population framework. This is related to our response to point 9 of reviewer DrFU.\n4. See the response to question 3\n\nReference:\n\n- Johan Ugander, Brian Karrer, Lars Backstrom, and Jon Kleinberg. Graph cluster randomization: Network exposure to multiple universes. In Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’13, pp. 329–337, 2013.\n- Laura Forastiere, Edoardo M Airoldi, and Fabrizia Mealli. Identification and estimation of treatment and interference effects in observational studies on networks. Journal of the American Statistical Association, 116(534):901–918, 2021.\n- Chencheng Cai, Jean Pouget-Abadie, and Edoardo M Airoldi. Optimizing randomized and deterministic saturation designs under interference. arXiv preprint arXiv:2203.09682, 2022.\n- Imbens, G. W. and Rubin, D. B., Causal Inference for Statistics, Social, and\nBiomedical Sciences: An Introduction, Cambridge University Press, 2015.\n\nWe are most grateful for the constructive comments from the reviewer on our manuscript. For the weakness part, we would like to clarify the questions the reviewer commented on in a point-to-point fashion. \n1. Figure 2 illustrates a detailed visualization of confidence intervals to show how bias and variance for different designs change when interference gamma increases. We use n = 60 as an illustration example. Table 2 provides more comparisons of different designs on distinct random graphs when interference is fixed, hence we let n = {100, 200, 400} to introduce diversity.\n2. We add the simul [...]\n\nWe appreciate the reviewer for his/her detailed and insightful comments. We list our point-to-point responses to the weaknesses and questions:\n 1. We listed a few other designs in the manuscripts for comparison, which includes the completely randomized design (CRD), randomized saturation design/graph clustering design (RSD), ego-clusters design (ECD). Neither of CRD or RSD is suitable for the networks described in the manuscript, which are well, though sparsely, connected. The reasons are (1) in CRD, most of the vertices receive an interference level as 1/2, resulting in a huge variance in th [...]\n\nWe thank the reviewer for the detailed comments and would like to clarify the weakness the reviewer commented in a point-to-point fashion. \n\n1. \n- Assumption 1 (interference on the proportion) is a very common assumption in experimental designs over networks (see Ugander et al., 2013; Forastiere et at., 2021; Cai et al., 2022). The assumption has two advantages. (1) it simplifies the heterogeneous interference effects from neighbors to a summary statistics (the proportion of treated neighbors) (2) it ensures that the interference received from neighbors are bounded as the proportion is a numbe [...]",
+ "initial_scores": [
+ 6,
+ 5,
+ 6,
+ 5
+ ],
+ "score_mean": 5.5,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "The paper addresses interference in causal experiments over social networks by proposing a novel experimental design based on independent sets. This design focuses on controlling interference exposures through treatment assignments, enhancing causal estimator performance by prioritizing sample quality over quantity. The approach demonstrates efficacy across various causal inference tasks, surpassing conventional methods, and is supported by empirical performance in simulations.\n\nThe key strength include: The paper provides a novel algorithm for treating units to minimize the effects of interference and maximizing sample efficiency for specific graph classes. Theoretical results are provided with good descriptions of the assumptions and limitations.\n\nThe key weakness:\nThere are some concerns over validity of assumptions, in particular, Assumption 2.",
+ "forum_id": "w50MQ9Vfty",
+ "primary_area": "causal reasoning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_pw71",
+ "review_id": "swH9CYTmLb",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 3344,
+ "edit_detected": true,
+ "edit_delta_seconds": 759208,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_vRUq",
+ "review_id": "MkiJ4SGd7Q",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1602,
+ "edit_detected": true,
+ "edit_delta_seconds": 847811,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_DrFU",
+ "review_id": "SD5DWK2x4X",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1964,
+ "edit_detected": true,
+ "edit_delta_seconds": 874556,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_hHf8",
+ "review_id": "kkwOYYLkxF",
+ "scores": {
+ "rating": 5,
+ "soundness": 4,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2847,
+ "edit_detected": true,
+ "edit_delta_seconds": 1689138,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8589.md b/open_review/iclr2024_8589.md
new file mode 100644
index 0000000000000000000000000000000000000000..0f7cbb127b2f08d12f39eed39fd77a1fcb586180
--- /dev/null
+++ b/open_review/iclr2024_8589.md
@@ -0,0 +1,481 @@
+
+
+## INDEPENDENT-SET DESIGN OF EXPERIMENTS FOR ESTIMATING TREATMENT AND SPILLOVER EFFECTS UNDER NETWORK INTERFERENCE
+
+Authors withheld for review
+
+## ABSTRACT
+
+Interference is ubiquitous when conducting causal experiments over networks. Except for certain network structures, causal inference on the network in the presence of interference is difficult due to the entanglement between the treatment assignments and the interference levels. In this article, we conduct causal inference under interference on an observed, sparse, but connected network, and we propose a novel design of experiments based on an independent set. Compared to conventional designs, the independent-set design focuses on an independent subset of data and controls their interference exposures through the assignments to the rest (auxiliary set). We provide a lower bound on the size of the independent set from a greedy algorithm and justify the theoretical performance of estimators under the proposed design. Our approach is capable of estimating both spillover effects and treatment effects. We justify its superiority over conventional methods and illustrate the empirical performance through simulations.
+
+## 1 INTRODUCTION
+
+Randomized experiments are widely regarded as the gold standard for estimating causal effects. However, the spillover effect is ubiquitous in experiments when one unit’s treatment affects others’ outcomes, where the stable unit treatment value assumption (SUTVA) (Imbens & Rubin, 2015) is violated. Examples include the traditional agricultural field experiments (Zaller & K¨opke, 2004), educational studies (Rosenbaum, 2007), econometric assumptions (Banerjee et al., 2013; Johari et al., 2020), and social networks (Phan & Airoldi, 2015). The spillover effect is also called “interference”, and the two names are used interchangeably in the literature.
+
+Estimating causal effects in the presence of interference is usually difficult, except for certain special cases. For instance, when the population of units can be well-partitioned into several isolated clusters, randomized saturation design (Hudgens & Halloran, 2008) and its variations (for example, Eckles et al. (2017), Owen & Varian (2020)) has shown success in estimating causal effects involving interference by controlling the interference level at each cluster with a pre-determined saturation. The difficulties in estimating spillover effects on a well-connected network are two-fold. The first is the entanglement between the treatment assignments and the spillover effects received by the units. Because the spillover effects received by the units are determined by the interference relationships and the assignment of all units, one cannot achieve separate controls on the treatment and the spillover of all units. The second difficulty comes from the collapse of the spillover effect. A completely randomized experiment on all units anchors the spillover effect received by each unit at its expectation for large networks because of the law of large numbers. In estimating spillover effects or total treatment effects, where we prefer diversified interference levels for the units, the collapse gives rise to an increase in variance and a reduction in power.
+
+Although the individual treatment assignments and the interference received cannot be controlled independently for the whole dataset, an approximately separate control is feasible for a subset of
+
+1
+
+the dataset. We propose a novel design of experiments on the network, where we focus on a highquality subset of units. The subset contains non-interfering units and is called the “independent set”, where we borrow the name from graph theory to emphasize that there is no edge in the independent set. The rest of the units form the “auxiliary set”, which provides interference to the units in the independent set. The partitioning of the independent and auxiliary sets re-gains separate controls over the treatment and the interference on the independent set. The approach can be viewed as a trade-off between the quantity and the quality of data. The independent set has a smaller sample size compared to the full dataset. However, due to the possibility of separate controls of their treatments and interference, observed outcomes from the independent set units provide more information for the causal effect and, therefore, are more efficient for causal inference purposes.
+
+This paper is organized as follows: Section 2 discusses related studies and summarizes our contribution. We formally define the causal effect under interference and introduce the independent set design in Section 3. Section 4 provides the theoretical foundation and quantifies the performance. In Section 5, we evaluate the performance of our approach on simulated data. In Section 6, we discuss and highlight potential future work. Theorem proofs are provided in the Appendix.
+
+## 2 RELATED WORK AND OUR CONTRIBUTION
+
+In classical methods for randomized experiments, a key assumption is that there is no interference among the units, and the outcome of each unit does not depend on the treatments assigned to the other units (SUTVA). However, this no-interference assumption is not plausible on networks. Many approaches are proposed to address the interference problem. First, researchers improve experimental designs to reduce interference, such as the cluster-based randomized design (Bland, 2004), group-level experimental designs (Sinclair et al., 2012; Basse et al., 2019), randomized saturation design (Hudgens & Halloran, 2008), and graph cluster randomization (Ugander et al., 2013; Eckles et al., 2017; Ugander & Yin, 2023). These approaches aim to reduce interference by clustering and assume that interference only exists within units in the cluster and that there is no interference between clusters (known as partial interference (Sobel, 2006)). However, when the isolated cluster assumption is violated, the randomized saturation design fails to estimate effects accurately (Cai et al., 2022). To extend the cluster-based randomized design, ego-clusters design (Saint-Jacques et al., 2019) is proposed to estimate spillover effects, which requires non-overlapping ego-clusters. Karwa & Airoldi (2018) introduced a simple independent set design, which only focuses on estimating treatment effect and has no control of bias/variance of the estimator. Unlike graph cluster randomization and ego-cluster randomization, which require non-overlapping clusters, our design allows units to share neighbors. Furthermore, recent studies incorporate network structure in the experiment based primarily on the measurement of local neighbors of units (Awan et al., 2020), and they estimate causal effects by matching the units with similar network structures. Some studies use special network structures in designs to relax SUTVA assumption and estimate causal effects (Aronow & Samii, 2017; Toulis & Kao, 2013; Yuan et al., 2021). In another direction, some studies leverage inference strategies, and they conduct a variety of hypotheses under network inference (Athey et al., 2018; Rosenbaum, 2007; Pouget-Abadie et al., 2019b; Sussman & Airoldi, 2017). When there exists a two-sided network or two-sided market for units, for example, consumers and suppliers, researchers proposed bipartite experiments (Pouget-Abadie et al., 2019a; Holtz et al., 2020; Doudchenko et al., 2020; Zigler & Papadogeorgou, 2021) to mitigate spillover effects. In bipartite experiments, two distinct groups of units are connected together and form a bipartite graph. In contrast, our approach generates two sets from units that belong to one group in a network. In addition, an increasing number of studies focus on observational studies on networks (Liu et al., 2016; Ogburn & VanderWeele, 2017; Forastiere et al., 2021). However, these methods require structural models and need to identify confounders.
+
+Our method makes several key contributions: First, we propose a novel design that partitions data into two disjoint sets to gain separate controls on the treatment and the interference. Second, in contrast to most previous studies, which only focus on estimating the treatment effect or spillover effect, our design works as a general framework for network experiments involving interference and is capable of various causal tasks (estimating both treatment and spillover effects). Third, the treatment assignments on the two sets can be optimized directly to control the bias/variance of the estimator. The connection between the objective function and the bias/variance is discussed in Section 4. Fourth, we provide theoretical guarantees, including an almost-sure lower bound on
+
+2
+
+Table 1: Comparison of designs for estimating spillover effects
+
+|Design|Network Assumption|Sample Size_∗_|Interference Control|
+|---|---|---|---|
+|**Independent Set**|random, sparse|(_n_log_s_)_/s_|high|
+|Ego-clusters|random, sparse|_n/_(_s_+ 1)|full|
+|Randomized Saturation|isolated clusters|_n_|partial|
+|Completely Randomized|no|_n_|no|
+
+_∗_ : number of units used for inference, _n_ : network size, _s_ : average degree
+
+the sample size and the analytic bias/variance for the estimators. Finally, unlike previous studies, which require SUTVA assumptions and no interference between units or are restricted to special network structures to mitigate the spillover effects, our approach does not require SUTVA and could be implemented in arbitrary networks.
+
+In Table 1, we compare our method to a few competitive designs in terms of assumptions on networks, effective sample size, and the ability to control interference.
+
+## 3 INDEPENDENT-SET DESIGN
+
+## 3.1 POTENTIAL OUTCOMES AND CAUSAL EFFECTS UNDER INTERFERENCE
+
+Consider a set of _n_ experimental units labeled with _i_ = 1 _, . . . , n_ . Each of them is assigned with a treatment _Zi ∈{_ 0 _,_ 1 _}_ , for which we denote _Zi_ = 1 for treated, _Zi_ = 0 for control, and _**Z**_ := ( _Z_ 1 _, . . . , Zn_ ) for the full treatment vector. Under Rubin’s framework of potential outcomes (Imbens & Rubin, 2015), we assume _Yi_ ( _**Z**_ ) is the potential outcome of unit _i_ that would be observed if the units **were** assigned with the treatment vector _**Z**_ . We say ”unit _i_ is interfered by unit _j_ ” when _Yi_ depends on _Zj_ , for _i_ = _j_ . All the pairwise interference relationships can be represented by a graph _G_ = ( _V, E_ ), where _V_ = _{_ 1 _, . . . , n}_ is the vertex set, and ( _i, j_ ) _∈ E_ if units _i_ and _j_ interfere with each other. Here, we assume all pairwise interference is symmetric such that _G_ can be reduced to an undirected graph with each undirected edge representing the original bi-directed edges. The left panel in Figure 1 shows a diagram of 12 units and 18 interfering pairs.
+
+Given the graph _G_ , we write the unit _i_ ’s potential outcome as _Yi_ ( _Zi,_ _**Z** Ni_ ), where _Ni_ := _{j ∈ V_ : ( _i, j_ ) _∈ E}_ is the neighbor of unit _i_ , and _**Z** Ni_ := ( _Zj_ ) _j∈Ni_ is the neighbor treatment (sub-)vector. Following Forastiere et al. (2021); Cai et al. (2022), we further assume that _Yi_ depends on unit _i_ ’s neighbor through the proportion of treated neighbors, which is defined by
+
+**==> picture [244 x 24] intentionally omitted <==**
+
+Assumption 1 assumes the interference on the proportion of treated neighbor assumption. In this paper, we simply write _Yi_ ( _Zi, ρi_ ) : _{_ 0 _,_ 1 _} ×_ [0 _,_ 1] _→_ R as the potential outcome of unit _i_ .
+
+**Assumption 1 (interference on the proportion of treated neighbors)** _Let_ _**z** and_ _**z**[′] be two treatment vectors, and let Yi_ ( _**Z**_ ) _be the potential outcome of unit i. We assume_
+
+_Yi_ ( _**z**_ ) = _Yi_ ( _**z**[′]_ ) _whenever zi_ = _zi[′][and][ ρ][i]_[=] _[ ρ][′] i[,]_
+
+_where ρi and ρ[′] i[are the proportion of treated neighbors induced from]_ _**[ z]**[ and]_ _**[ z]**[′][, correspondingly.]_
+
+Furthermore, for any two tuples ( _z, ρ_ ) _,_ ( _z[′] , ρ[′]_ ) _∈{_ 0 _,_ 1 _}×_ [0 _,_ 1], we define the unit-level causal effect as _τi_ ( _z, ρ, z[′] , ρ[′]_ ) := _Yi_ ( _z, ρ_ ) _− Yi_ ( _z[′] , ρ[′]_ ), with certain special cases defined as
+
+**==> picture [292 x 49] intentionally omitted <==**
+
+The direct effect measures the marginal effect of _zi_ under a given level of interference. The indirect effect relates to the effect of interference and is often called the “spillover effect”. The total treatment
+
+3
+
+**==> picture [396 x 118] intentionally omitted <==**
+
+**----- Start of picture text -----**
+3 4 2 1 2 1 2 5 1 3 5 3 5 4 6 4 6 6 12 7 8 7 8 7 11 9 11 9 11 8 10 10 12 10 12 9 Independent Set Auxiliary Set Z I Z A **----- End of picture text -----**
+
+Figure 1: Illustration of Independent Set design. (Left) Example graph. (Middle) The graph is partitioned into an independent set and an auxiliary set. (Right) Conduct an experiment on the independent set and the auxiliary set. Shaded nodes denote the treated nodes.
+
+effect measures the change in outcome when all units are treated vs all units are controlled. Note that the total treatment effect can be decomposed as a combination of direct and indirect effects such that _τi_[(] _[t]_[)] = _τi_[(] _[d]_[)] (0) + _τi_[(] _[i]_[)][(1] _[,]_[ 1] _[,]_[ 0)][.]
+
+Experimenters are usually interested in the population-level average effects, which are defined as _τ_ ¯( _z, ρ, z[′] , ρ[′]_ ) := _n[−]_[1][ �] _[n] i_ =1 _[τ][i]_[(] _[z, ρ, z][′][, ρ][′]_[)][.][The average direct / spillover / total treatment effect is] defined in a similar way. The average total treatment effect _τ_ ¯[(] _[t]_[)] is of particular interest because it measures the average change in outcomes when all units are assigned to treatment. Further discussions on causal effects under interference can be found in Forastiere et al. (2021).
+
+## 3.2 INDEPENDENT-SET DESIGN
+
+We disentangle the unit-level treatments and the interference by partitioning the units _V_ into two sets, _VI_ and _VA_ . Let _GI_ = ( _VI , EI_ ) be the sub-graph of _G_ by restricting it to the vertex set _VI_ , and _GA_ = ( _VA, EA_ ) be the sub-graph by restricting to _VA_ . Specifically, we require _GI_ to be a null graph such that _EI_ = ∅, or equivalently, _VI_ is an **independent set** of _G_ . We call the counterpart _VA_ as the **auxiliary set** . The middle panel in Figure 1 gives one such partition for the interference graph in the left panel. We will later see that the two sets play different roles in the inference.
+
+Denote the treatment vectors on the independent set _VI_ and on the auxiliary set _VA_ by _**Z** I_ and _**Z** A_ , correspondingly. Define the _|VI | × |VA|_ interference matrix **Γ** between _VI_ and _VA_ by [ **Γ** ] _ij_ := _d[−] i_[1][I] _[{]_[(] _[i, j]_[)] _[∈][E][}]_[,][for][all] _[i][∈][V][I][, j][∈][V][A]_[,][where] _[d][i]_[is][the][degree][of][unit] _[i]_[in] _[G]_[,][and][I] _[{·}]_[is] the indicator function. The interference vector on independent set _**ρ** I_ := ( _ρi_ ) _i∈VI_ is given by _**ρ** I_ = **Γ** _**Z** A_ . Because **Γ** is a constant matrix when the graph _G_ is observed, _**ρ** I_ is determined by the auxiliary set’s treatment vector _**Z** A_ . If we restrict our estimation to the independent set _VI_ , the unit-level treatments _**Z** I_ and the interference _**ρ** I_ can be separately controlled through _**Z** I_ and _**Z** A_ , respectively. We call such a design ”independent set design”, which partitions the dataset into the independent set and the auxiliary set, controls the treatment and interference separately, and constructs an estimator based on the observed outcomes from the independent set.
+
+The assignments for _**Z** I_ and _**Z** A_ can be designed to accomplish different causal inference goals. For example, to estimate the average direct effect _τ_ ¯[(] _[d]_[)] ( _ρ_ ), one can assign _**Z** I_ by completely random- _τ_ ized design and optimize¯( _z,_ 1 _,_ 0), one can assign _**Z** ZAi_ =by minimizing _z_ for all _i ∈ ∥V_ **Γ** _I_ _**Z**_ and _A −_ optimize _ρ∥_ 1. To estimate the average indirect effect _**Z** A_ by maximizing Var[ **Γ** _**Z** A_ ]. To estimate the average total treatment effect, one can optimize _**Z** A_ by maximizing Var[ **Γ** _**Z** A_ ] and let _Zi_ = **1** _{ρi>_ 0 _._ 5 _}_ for all _i ∈ VI_ . In the right panel of Figure 1, we provide one such assignment of _**Z** I_ and _**Z** A_ for estimating the total treatment effect. The next sections will discuss the implementations for different causal inference tasks.
+
+Two aspects are compromised to improve the independent set’s data quality. The first one is the sample size. Independent set design restricts estimation by using only observations of the independent set, which is usually a fraction of the dataset but of higher quality in estimation. The second aspect that is compromised is the bias from the representativity of the independent set because the
+
+4
+
+average effect on the independent set is not necessarily identical to the one on the whole dataset. The unbiasedness is achieved when we assume the observed interference graph is random and is unconfounded with the potential outcomes. We discuss the assumptions in Section 4.1.
+
+**Algorithm 1:** Greedy algorithm for finding independent set
+
+**Input:** graph _G_ = ( _V, E_ ) **Output:** independent set _VI VI ←_ ∅ **while** _|V | >_ 0 **do** Choose _i_ from _V_ uniformly _VI ← VI ∪{i} V ← V \ {j ∈ V_ : ( _i, j_ ) _∈ E_ or _i_ = _j}_ **return** _VI_
+
+Before proceeding to different design implementations, we give a greedy algorithm for finding a locally largest independent set in Algorithm 1. The independent set of a graph is not unique in general — any subset of an independent set is another independent set. For inference purposes, one would expect the variance of the estimator scales as _O_ ( _|VI |[−]_[1] ). Therefore, the goal is to find the largest independent set, which is known as NP-hard (Robson, 1986). In practice, we adopt the fast greedy algorithm that can find the local largest independent set in linear time.
+
+## 3.3 INFERENCE
+
+In this section, we assume the two sets _VI_ and _VA_ have been obtained through the aforementioned greedy algorithm and discuss the designs of the assignments on _**Z** I_ and _**Z** A_ for different inference tasks. For simplicity, we denote their sizes _|VI |_ and _|VA|_ by _nI_ and _nA_ , respectively. Next, we discuss the estimations of the direct treatment effect and spillover effect separately.
+
+## 3.3.1 ESTIMATING AVERAGE DIRECT EFFECTS
+
+To estimate the average direct effects _τ_ ¯[(] _[d]_[)] ( _ρ_ ), one wishes to find an assignment vector _**Z** A_ on the auxiliary set such that all independent units’ interference received is close to _ρ_ . The optimal assignment vector can be found by the following optimization.
+
+**==> picture [254 x 17] intentionally omitted <==**
+
+On the other hand, the treatment vector _**Z** I_ for the independent set can be assigned randomly with a completely randomized design such that half of the units are randomly assigned to treated. The difference-in-means estimator on the independent set can be constructed as
+
+**==> picture [320 x 27] intentionally omitted <==**
+
+where _Yi_[(] _[obs]_[)] is the observed outcome of unit _i_ .
+
+The optimization in equation 2 is a convex programming on a binary/integer space with an objective function bounded below by 0. When _ρ_ = 0 or 1, the optimization equation 2 has a trivial but perfect solution as _**Z** A_ = _ρ_ **1** such that all the interference of independent units matches _ρ_ exactly. However, this lower bound is not attainable for general 0 _< ρ <_ 1. As we will later see in Section 4.3.1, the objective function in equation 2 is directly related to the bias of the estimator in equation 3.
+
+## 3.3.2 ESTIMATING AVERAGE SPILLOVER EFFECTS AND TOTAL TREATMENT EFFECTS
+
+When estimating the average indirect effect _τ_ ¯[(] _[i]_[)] ( _z,_ 1 _,_ 0) or the average total treatment effect _τ_ ¯[(] _[t]_[)] , we hope the interference received by the independent set units spreads to the two extremes: either _ρi_ = 0 for empty interference or _ρi_ = 1 for saturated interference. Therefore, we propose to maximize the variance of ( _ρi_ ) _i∈VI_ in the following optimization:
+
+**==> picture [281 x 25] intentionally omitted <==**
+
+5
+
+The above optimization is a concave quadratic programming, and the support can be expanded to its convex hull: [0 _,_ 1] _[n][A]_ while keeping the same solution. The objective function in equation 4 is bounded below by _nI /_ 4, the largest eigenvalue of _**I** − n[−] I_[1] **[11]** _[T]_[ ,][by][taking] **[Γ]** _**[Z]**[A]_[=] (1 _, . . . ,_ 1 _,_ 0 _, . . . ,_ 0). The optimum may not be attainable when it is outside the manifold of **Γ** .
+
+Consider a linear additive structure of the potential outcomes such that
+
+**==> picture [138 x 11] intentionally omitted <==**
+
+(5)
+
+where _ϵi_ represents the heterogeneity in potential outcomes and we assume Var[ _ϵi_ ] = _σ_[2] .
+
+With the additive linear model in equation 5, the causal effects are written in a parametric form such that the direct effect is _β_ , the spillover effect is _γ_ , and the total treatment effect is _β_ + _γ_ . The coefficients can be estimated through standard linear regression estimators for the units in the independent set. Specifically, the estimators are
+
+(ˆ _α, β,_[ˆ] ˆ _γ_ ) _[T]_ = ( _**X**[T]_ _**X**_ ) _[−]_[1] _**X**[T]_ _**Y** I ,_
+
+where _**X**_ = [ **1** _,_ _**Z** I ,_ _**ρ** I_ ] is the design matrix and _**Y** I_ is the outcome vector on the independent set.
+
+The variance of the estimators _β_[ˆ] and ˆ _γ_ depend inversely on the variance of _**Z** I_ and _**ρ** I_ , respectively. The optimization in equation 4 minimizes the variance of linear regression estimators. Detailed discussions on the variance of _**ρ** I_ and the variance of the estimator are provided in Section 4.3.2.
+
+Notice that difference-in-means estimators can be used nonparametrically to estimate spillover or total treatment effects. However, this results in fewer units with the required interference levels and, therefore, a large variance.
+
+## 4 THEORETICAL RESULTS
+
+## 4.1 ASSUMPTIONS
+
+We first list a few more assumptions that are necessary for subsequent analysis.
+
+**Assumption 2 (super-population perspective)** _We view the n units from the super-population perspective such that their potential outcomes are i.i.d. from some super-population distribution._
+
+In Assumption 2, we assume the sample units are i.i.d. from a super-population such that both _VI_ and _V_ can be viewed as representative finite samples. Furthermore, if we denote ¯ _τI_ as the average causal effects on the independent set _VI_ , then under Assumption 2, we have E[¯ _τI_ ] = E[¯ _τ_ ], which gives the unbiasedness of average causal effect on _VI_ with respect to the (full) sample average effects.
+
+**Assumption 3 (unconfoundedness of network)** _We assume the observed network G is a realization of random network, which is unconfounded with the units’ potential outcomes such that G ⊥⊥Y, where Y_ := _{Yi_ ( _Zi, ρi_ ) : _i ∈_ [ _n_ ] _, Zi ∈{_ 0 _,_ 1 _}, ρi ∈_ [0 _,_ 1] _} is the table of potential outcomes._
+
+Furthermore, we assume the network formation is independent of the potential outcomes in Assumption 3. Note that the greedy algorithm of finding the independent set in Algorithm 1, and the optimizations of _**Z** A_ as in equation 2 and equation 4 are not node-symmetric — vertices with different degrees have different probabilities of being assigned to _VI_ . It gives rise to the selection bias of the set _VI_ . Assuming the network unconfoundedness, the selection bias from a single sample is averaged if we consider multiple sampling repetitions and network randomization.
+
+## 4.2 THE GREEDY ALGORITHM
+
+The first question at hand is how large the set _VI_ we can find from a random graph _G_ . Such a graph always exists that one can hardly find a large independent set (for example, the complete graph). Due to the randomness of graph _G_ , we can show such extreme cases occur with a negligible probability as _n →∞_ . We consider the Erd¨os-R´enyi random graph where each pair of units independently forms an edge with probability _p_ = _s/n_ . The random graph has an expected average degree of _pn_ = _s_ . Note that most networks of interest (e.g., social networks) are connected and sparse networks. Therefore, we assume _s_ = _o_ ( _n_ ) for sparsity and assume _s_ = Ω(log _n_ ) for connectivity. Theorem 1 gives a lower bound on the size of the independent set _VI_ resulting from Algorithm 1.
+
+6
+
+**Theorem 1 (lower bound on the greedy algorithm)** _Consider an Erd¨os-R´enyi random graph G with n vertices and edge probability p_ = _s/n for s ∈_ Ω(log _n_ ) _. Then, with high probability, the independent set VI from the greedy algorithm yields a size at least_[lo] _s_[g] _[ s][n][.]_
+
+Note that Algorithm 1 is a greedy approximation in finding the locally largest independent set. Dani & Moore (2011) discussed the size of the globally largest independent set for random graphs. The resulting independent set has a similar order of size compared to the globally optimal one. In the egocentric design (Saint-Jacques et al., 2019), the number of ego-clusters is upper bounded by _n/_ ( _s_ + 1), which is smaller than ours by a factor of log _s_ .
+
+## 4.3 ESTIMATION PERFORMANCE
+
+In this section, we analyze the performance of the causal estimators for the tasks discussed in Section 3.3 and provide additional insights into the optimizations in equation 2 and equation 4.
+
+## 4.3.1 ESTIMATING AVERAGE DIRECT EFFECT
+
+We first investigate the performance of the difference-in-means estimator in equation 3 for the direct effect. Recall that in order to construct _τ_ ˆ[(] _[d]_[)] ( _ρ_ ), we first determine _**Z** A_ through the optimization in equation 2, and then randomly assign half of _VI_ to treated through a completely randomized design. Given the sample set, including the potential outcomes _Y_ and the graph _G_ , for any assignment _**Z** A_ on the auxiliary set, we provide an upper bound for the (conditional) bias and variance in Theorem 2.
+
+**Theorem 2 (bias and variance for estimating direct effects)** _Suppose Assumptions 1, 2 and 3 hold, and the potential outcomes Yi_ ( _z, ρ_ ) _is uniformly Lipschitz in ρ such that there exists L >_ 0 _satisfying |Yi_ ( _z, ρ_ 1) _− Yi_ ( _z, ρ_ 2) _| ≤ L|ρ_ 1 _− ρ_ 2 _| , for all i ∈_ [ _n_ ] _, z ∈{_ 0 _,_ 1 _} and ρ_ 1 _, ρ_ 2 _∈_ [0 _,_ 1] _. Consider the estimator in equation 3. We have_
+
+E[ˆ _τ_[(] _[d]_[)] ( _ρ_ ) _− τ_ ¯[(] _[d]_[)] ( _ρ_ ) _| Y, G,_ _**Z** A_ ] _≤_[2] _[L] ∥_ **∆** _∥_ 1 _, and nI_ ����Var[ˆ _τ_ ( _d_ )( _ρ_ ) _| Y, G,_ _**Z** A_ ] _− n_ 1 _I_ S _I_ [ _Yi_ (1 _, ρ_ ) + _Yi_ (0 _, ρ_ )]���� _≤ nI_ ( _nI_ 4 _−_ 1) � _LYmax∥_ **∆** _∥_ 1 + _L_[2] _∥_ **∆** _∥_ 1[2] � _, where_ **∆** = **Γ** _**Z** A − ρ_ **1** _is the deviation of interference from the target ρ,_ S _I_ [ _Yi_ (1 _, ρ_ ) + _Yi_ (0 _, ρ_ )] = ( _nI −_ 1) _[−]_[1][ �] _i∈VI_[(] _[Y][i]_[(1] _[, ρ]_[) +] _[ Y][i]_[(0] _[, ρ]_[)] _[ −][Y]_[¯][ (1] _[, ρ]_[)] _[ −][Y]_[¯][ (0] _[, ρ]_[))][2] _[ with][Y]_[¯][ (] _[z, ρ]_[) =] _[ n][−] I_[1] � _i∈VI[Y][i]_[(] _[z, ρ]_[)] _[ is] the sample variance of the potential outcomes onY_ ¯ (1 _, ρ_ ) _− Y_ ¯ (0 _, ρ_ ) _| is the maximum deviation of potential outcomes from their mean on VI , and Ymax_ = max _i∈VI |Yi_ (1 _, ρ_ ) + _V YI .i_ (0 _, ρ_ ) _−_
+
+**∆** represents the distance between the interference received by the independent units and the target value _ρ_ . When **∆** = **0** , the design is equivalent to a completely randomized experiment. In the general case, the optimization in equation 2 minimizes the upper bound for potential bias. Theorem 2 also tells the variance of _τ_ ˆ[(] _[d]_[)] is close to the completely randomized design on _VI_ if _∥_ **∆** _∥_ 1 is small.
+
+## 4.3.2 ESTIMATING SPILLOVER EFFECT AND TOTAL TREATMENT EFFECT
+
+This section considers the two treatment effects discussed in Section 3.3.2. We focus on the linear additive model in equation 5 such that the effects can be estimated through linear regression. Recall that, for estimating either the spillover effect or the total treatment effect, the assignment _**Z** A_ on the auxiliary set is determined through the variance maximization in equation 4. We set _**Z** I_ to _z_ for estimating the spillover effect and set _**Z** I_ depending on _**ρ** I_ for the total treatment effect.
+
+The following theorem gives the bias and variance for the linear regression estimator for the spillover effects. The spillover effect estimator is always unbiased, and its conditional variance depends inversely on the variance of the interference _**ρ** I_ of the independent units. The optimization in 4 corresponds to the minimization of the conditional variance of the linear regression estimator.
+
+**Theorem 3 (bias and variance for estimating spillover effects)** _Assume Assumptions 1, 2 and 3. Consider a linear regression over the parametric potential outcome model equation 5 with estimated_ ˆ ˆ _parameters β,_[ˆ] ˆ _γ. Set VI_ = _z_ **1** _and let τ_[(] _[i]_[)] ( _z,_ 1 _,_ 0) = _γ. Then we have_
+
+**==> picture [364 x 25] intentionally omitted <==**
+
+7
+
+Theorem 4 gives the unbiasedness of the total treatment effect estimator and provides a lower bound on the variance. Such a lower bound is, in general, not attainable in the binary support of _**Z** A_ , but it provides the reciprocal dependence on Var[ _**ρ** I_ ], which was maximized in the optimization 4 as well.
+
+**Theorem 4 (bias and variance for estimating total treatment effects)** _Assume Assumptions 1, 2 and 3. Consider a linear regression over the parametric potential outcome model equation 5 with_ ˆ _estimated parameters β,_[ˆ] ˆ _γ. Let τ_[(] _[t]_[)] = _β_[ˆ] + ˆ _γ. If |_ Corr( _**Z** I ,_ _**ρ** I_ ) _| <_ 1 _, we have_
+
+**==> picture [366 x 26] intentionally omitted <==**
+
+_The variance is lower bounded by σ_[2] _/_ ( _nI_ Var[ _**ρ** I_ ]) _._
+
+## 5 EXPERIMENTS
+
+In this section, we implement the independent set design and validate results empirically on synthetic graphs. In order to evaluate the performance of the proposed design, we conduct simulations under a variety of simulated settings. The bias and variance of estimators are compared for completely randomized design on the independent set (CR), completely randomized design on the full graph (Full), ego-clusters, graph cluster, and Independent Set design (IS), which optimizes the assignments on the auxiliary set. To illustrate the benefits of IS design, we implement the design to estimate average spillover effects and average direct effects, respectively.
+
+## 5.1 ESTIMATING AVERAGE SPILLOVER EFFECTS
+
+First, we examine the performance of estimating average spillover effects for different designs. We run experiments on 50 Erd¨os-R´enyi random graphs (Erd˝os & R´enyi, 1959) with _n_ = 60 _, p_ = 0 _._ 1, and estimate the spillover effects. The potential outcomes are randomly generated by _Yi_ ( _Zi, ρi_ ) = _α_ + _βZi_ + _γρi_ + _U_ + _ϵi, ∀i ∈ V_ , and we let baseline _α_ = 1, treatment parameter _β_ = 20, interference parameter _γ_ = 5 _,_ 10 _,_ 15 _,_ 20, _U ∼_ Unif(0 _,_ 1) and _ϵi ∼ N_ (0 _,_ 0 _._ 5).
+
+Results are displayed in Figure 2. The independent-set design outperforms all other methods in estimating the average spillover effects. At different levels of interference, IS design shows the lowest bias and variance. We notice that the IS design is more stable than the other methods, and the variance of the IS design stabilizes at a very low level as spillover effects increase.
+
+**==> picture [160 x 119] intentionally omitted <==**
+
+**==> picture [160 x 119] intentionally omitted <==**
+
+**==> picture [236 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Bias (b) Variance **----- End of picture text -----**
+
+Figure 2: Bias and variance to estimate the average spillover effects. The bands around the lines represent the errors of the estimator for each value of Gamma.
+
+To introduce diversity, we run experiments on distinct random graphs: Erd¨os-R´enyi (Erd˝os & R´enyi, 1959) _G_ ( _n, p_ ) , Barab´asi–Albert (Barab´asi & Albert, 1999) _G_ ( _n, m_ ) and small-world (Watts & Strogatz, 1998) _G_ ( _n, p_ ). The potential outcomes are based on _Yi_ ( _Zi, ρi_ ) = _αi_ + _βZi_ + _γρi_ + _ϵi, ∀i ∈ V_ , and _αi_ = 1 _, β_ = 20 _, γ_ = 10 _. ϵi ∼ N_ (0 _,_ 0 _._ 5). Each configuration is run 2,000 times. The results of estimating spillover effects are summarized in Tables 2. As shown in Tables 2, IS design outperforms all other methods on distinct settings and achieves the lowest bias and variance.
+
+8
+
+Table 2: Performance in estimating average spillover effects under distinct random graphs.
+
+|Graph Parameters|CR IS Full Graph Cluster Ego-Clusters|
+|---|---|
+||Bias Variance Bias Variance Bias Variance Bias Variance Bias Variance|
+|n = 100, p = 0.10 n = 200, p = 0.15 Erd¨os-R´enyi n = 400, p = 0.15|0.598 0.468 0.398 0.242 0.473 0.399 0.497 0.418 0.428 0.491 0.392 0.188 0.315 0.124 0.366 0.178 0.384 0.192 0.342 0.187 0.246 0.096 0.225 0.067 0.266 0.094 0.242 0.089 0.239 0.091|
+|n = 100, m = 1 Barab´asi–Albert n = 75, m = 1|0.192 0.064 0.152 0.032 0.168 0.049 0.177 0.056 0.159 0.072 0.239 0.055 0.135 0.041 0.181 0.051 0.185 0.067 0.176 0.079|
+|n = 80, p = 0.05 Small world n = 50, p = 0.05|0.303 0.165 0.212 0.087 0.263 0.089 0.274 0.093 0.232 0.117 0.351 0.093 0.243 0.036 0.277 0.044 0.296 0.061 0.264 0.089|
+
+## 5.2 ESTIMATING AVERAGE DIRECT EFFECTS
+
+We will next implement an IS design to estimate average direct effects and evaluate performance under various settings. Here, the potential outcomes are randomly generated according to _Yi_ ( _Zi, ρi_ ) = _αi_ + _βZi_ + _γρi_ + _ϵi, ∀i ∈ V_ , and we have _αi_ = 1 _, β_ = 20 _, γ_ = 10. _ϵi ∼ N_ (0 _,_ 0 _._ 5). We run experiments 2,000 times and record the bias and variance of estimators. Table 3 shows the results of estimating average direct effects. In the presence of spillover effects, IS design achieves the best performance (the lowest bias and variance). When SUTVA is violated, network interference impairs the performance of conventional approaches. In this case, estimators in classical designs are biased in estimating average direct effects. In contrast, IS design could mitigate the spillover effects and improve performance by controlling treatment assignments on the auxiliary set.
+
+Table 3: Performance of designs in estimating average direct effects under distinct random graphs.
+
+|Graph Parameters|CR IS Full Graph Cluster|
+|---|---|
+||Bias Variance Bias Variance Bias Variance Bias Variance|
+|n = 100, p = 0.1 n = 200, p = 0.1 Erd¨os-R´enyi n = 400, p = 0.1|0.262 0.035 0.117 0.009 0.261 0.023 0.221 0.024 0.193 0.038 0.094 0.005 0.188 0.015 0.156 0.013 0.098 0.006 0.062 0.002 0.086 0.004 0.081 0.005|
+|n = 80, m = 1 Barab´asi–Albert n = 100, m = 1|1.145 0.851 0.237 0.034 1.130 0.949 1.031 0.815 1.207 0.693 0.278 0.026 1.296 0.832 1.139 0.742|
+|n = 100, p = 0.05 Small world n = 50, p = 0.05|0.961 0.556 0.278 0.024 1.184 0.791 1.105 0.716 1.101 0.869 0.225 0.029 1.115 0.877 1.013 0.854|
+
+## 6 DISCUSSION AND CONCLUSION
+
+Randomization experiments on networks can be biased due to interference among units, making causal inference on units challenging. In this study, we propose a new randomized design that separates units into independent and auxiliary sets to control interference. Our design can be applied to any network and provides accurate estimations with good interpretability.
+
+Whilst IS design allows us to improve the estimation of causal effects on networks, there are several limitations. Due to the segmentation of units in a network, we can only estimate causal effects on the independent set. The experiment’s sample size will be smaller than using the full network. Moreover, the computational cost depends on the size of the auxiliary set, so it may take more time to optimize the assignments on the auxiliary set. Another limitation is that our design depends on observed networks. The performance of the proposed design on a misspecified network is unknown. Future research includes improving the computational efficiency of the algorithm to optimize the assignments on the auxiliary set and further extending it when the network is misspecified.
+
+## REFERENCES
+
+- Peter M. Aronow and Cyrus Samii. Estimating average causal effects under general interference, with application to a social network experiment. _The Annals of Applied Statistics_ , 11(4):1912 – 1947, 2017.
+
+- Susan Athey, Dean Eckles, and Guido W Imbens. Exact p-values for network interference. _Journal of the American Statistical Association_ , 113(521):230–240, 2018.
+
+- Usaid Awan, Marco Morucci, Vittorio Orlandi, Sudeepa Roy, Cynthia Rudin, and Alexander Volfovsky. Almost-matching-exactly for treatment effect estimation under network interference. In _Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics_ , volume 108, pp. 3252–3262. PMLR, 2020.
+
+- Abhijit Banerjee, Arun G. Chandrasekhar, Esther Duflo, and Matthew O. Jackson. The diffusion of microfinance. _Science_ , 341(6144):1236498, 2013.
+
+- Albert-L´aszl´o Barab´asi and R´eka Albert. Emergence of scaling in random networks. _Science_ , 286 (5439):509–512, 1999.
+
+- Guillaume W Basse, Avi Feller, and Panos Toulis. Randomization tests of causal effects under interference. _Biometrika_ , 106(2):487–494, 2019.
+
+- J Martin Bland. Cluster randomised trials in the medical literature: two bibliometric surveys. _BMC Medical Research Methodology_ , 4(1):1–6, 2004.
+
+- Chencheng Cai, Jean Pouget-Abadie, and Edoardo M Airoldi. Optimizing randomized and deterministic saturation designs under interference. _arXiv preprint arXiv:2203.09682_ , 2022.
+
+- Varsha Dani and Cristopher Moore. Independent sets in random graphs from the weighted second moment method. In _Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques_ , pp. 472–482, 2011.
+
+- Nick Doudchenko, Minzhengxiong Zhang, Evgeni Drynkin, Edoardo Airoldi, Vahab Mirrokni, and Jean Pouget-Abadie. Causal inference with bipartite designs. _arXiv preprint arXiv:2010.02108_ , 2020.
+
+- Dean Eckles, Brian Karrer, and Johan Ugander. Design and analysis of experiments in networks: Reducing bias from interference. _Journal of Causal Inference_ , 5(1), 2017.
+
+- Paul Erd˝os and Alfr´ed R´enyi. On random graphs i. _Publicationes Mathematicae Debrecen_ , 6(290297):18, 1959.
+
+- Laura Forastiere, Edoardo M Airoldi, and Fabrizia Mealli. Identification and estimation of treatment and interference effects in observational studies on networks. _Journal of the American Statistical Association_ , 116(534):901–918, 2021.
+
+- Alan Frieze and Michał Karo´nski. _Introduction to random graphs_ . Cambridge University Press, 2016.
+
+- David Holtz, Ruben Lobel, Inessa Liskovich, and Sinan Aral. Reducing interference bias in online marketplace pricing experiments. _arXiv preprint arXiv:2004.12489_ , 2020.
+
+- Michael G Hudgens and M Elizabeth Halloran. Toward causal inference with interference. _Journal of the American Statistical Association_ , pp. 832–842, 2008.
+
+- Guido W. Imbens and Donald B. Rubin. _Causal Inference in Statistics, Social, and Biomedical Sciences_ . Cambridge University Press, 2015.
+
+- Ramesh Johari, Hannah Li, and Gabriel Weintraub. Experiment design in two-sided platforms: An analysis of bias. In _Proceedings of the 21st ACM Conference on Economics and Computation_ , EC ’20, 2020.
+
+10
+
+- Vishesh Karwa and Edoardo M Airoldi. A systematic investigation of classical causal inference strategies under mis-specification due to network interference. _arXiv preprint arXiv:1810.08259_ , 2018.
+
+- Lan Liu, Michael G Hudgens, and Sylvia Becker-Dreps. On inverse probability-weighted estimators in the presence of interference. _Biometrika_ , 103(4):829–842, 2016.
+
+- Elizabeth L Ogburn and Tyler J VanderWeele. Vaccines, contagion, and social networks. _The Annals of Applied Statistics_ , 11(2):919–948, 2017.
+
+- Art B. Owen and Hal Varian. Optimizing the tie-breaker regression discontinuity design. _Electronic Journal of Statistics_ , 14(2):4004–4027, 2020.
+
+- Tuan Q Phan and Edoardo M Airoldi. A natural experiment of social network formation and dynamics. _Proceedings of the National Academy of Sciences_ , 112(21):6595–6600, 2015.
+
+- Jean Pouget-Abadie, Kevin Aydin, Warren Schudy, Kay Brodersen, and Vahab Mirrokni. Variance reduction in bipartite experiments through correlation clustering. In _Advances in Neural Information Processing Systems_ , volume 32, 2019a.
+
+- Jean Pouget-Abadie, Guillaume Saint-Jacques, Martin Saveski, Weitao Duan, Souvik Ghosh, Ya Xu, and Edoardo M Airoldi. Testing for arbitrary interference on experimentation platforms. _Biometrika_ , 106(4):929–940, 2019b.
+
+- John Michael Robson. Algorithms for maximum independent sets. _Journal of Algorithms_ , 7(3): 425–440, 1986.
+
+- Paul R Rosenbaum. Interference between units in randomized experiments. _Journal of the American Statistical Association_ , 102(477), 2007.
+
+- Guillaume Saint-Jacques, Maneesh Varshney, Jeremy Simpson, and Ya Xu. Using ego-clusters to measure network effects at linkedin. _arXiv preprint arXiv:1903.08755_ , 2019.
+
+- Betsy Sinclair, Margaret McConnell, and Donald P. Green. Detecting spillover effects: Design and analysis of multilevel experiments. _American Journal of Political Science_ , 56(4):1055–1069, 2012.
+
+- Michael E Sobel. What do randomized studies of housing mobility demonstrate? causal inference in the face of interference. _Journal of the American Statistical Association_ , 101(476):1398–1407, 2006.
+
+- D. L. Sussman and E. M. Airoldi. Elements of estimation theory for causal effects in the presence of network interference. arXiv:1702.03578, February 2017.
+
+- Panos Toulis and Edward Kao. Estimation of causal peer influence effects. In _Proceedings of the 30th International Conference on Machine Learning_ , pp. 1489–1497, 2013.
+
+- Johan Ugander and Hao Yin. Randomized graph cluster randomization. _Journal of Causal Inference_ , 11(1), 2023.
+
+- Johan Ugander, Brian Karrer, Lars Backstrom, and Jon Kleinberg. Graph cluster randomization: Network exposure to multiple universes. In _Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining_ , KDD ’13, pp. 329–337, 2013.
+
+- Martin J Wainwright. _High-dimensional statistics: A non-asymptotic viewpoint_ , volume 48. Cambridge university press, 2019.
+
+- Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’networks. _Nature_ , 393 (6684):440–442, 1998.
+
+- Yuan Yuan, Kristen Altenburger, and Farshad Kooti. Causal network motifs: Identifying heterogeneous spillover effects in a/b tests. In _Proceedings of the Web Conference 2021_ , WWW ’21, pp. 3359–3370, 2021.
+
+11
+
+Johann G Zaller and Ulrich K¨opke. Effects of traditional and biodynamic farmyard manure amendment on yields, soil chemical, biochemical and biological properties in a long-term field experiment. _Biology and Fertility of Soils_ , 40(4):222–229, 2004.
+
+Corwin M. Zigler and Georgia Papadogeorgou. Bipartite causal inference with interference. _Statistical Science_ , 36(1):109 – 123, 2021.
+
+12
+
+## Appendix
+
+## A PROOF OF THEOREM 1
+
+In order to prove the lower bound, we follow the differential equation method in (Frieze & Karo´nski, 2016, Chapter 24).
+
+Recall Algorithm 1, and let _vt, t_ = 1 _, . . . , |VI |_ be the selected independent unit at step _t_ . Denote _V_ ( _t_ ) the set of vertices after step _t_ in the algorithm such that _V_ (0) = _n_ and _V_ ( _|VI |_ ) = 0. Write _X_ ( _t_ ) = _|V_ ( _t_ ) _|_ as the number of remaining units after picking out _t_ independent units. Then the algorithm gives
+
+**==> picture [262 x 11] intentionally omitted <==**
+
+where _d_ ( _vt_ +1 _| V_ ( _t_ )) is the degree of _vt_ +1 in the subgraph containing the vertex set _V_ ( _t_ ). Let _f_ ( _t, x_ ) = _−sx −_ (1 _− p_ ) and
+
+**==> picture [170 x 25] intentionally omitted <==**
+
+We now show the conditions (P1)-(P4) in (Frieze & Karo´nski, 2016, Chapter 24) are satisfied.
+
+**(P1)** : It is obvious _X_ ( _t_ ) _< X_ (0) = _n_ . Therefore, (P1) is satisfied with _C_ 0 = 1.
+
+**(P2)** : Since _|X_ ( _t_ + 1) _− X_ ( _t_ ) _|_ = _d_ ( _vt_ +1 _| V_ ( _t_ )) + 1 _≤ d_ ( _vt_ +1 _| V_ 0) + 1, where _vt_ is the vertex deleted at step _t_ . We claim with high probability,
+
+**==> picture [206 x 16] intentionally omitted <==**
+
+It follows from
+
+**==> picture [364 x 86] intentionally omitted <==**
+
+where ( _i_ ) follows from the Chernoff bound of binomial distributions (see, for example, Chapter 2 in Wainwright (2019)).
+
+By setting _ξ_ = _e_[2] ( _s_ + log _n_ ) _−_ 1 _> e_[2] _s_ , we have
+
+**==> picture [264 x 25] intentionally omitted <==**
+
+Therefore,
+
+**==> picture [144 x 12] intentionally omitted <==**
+
+is satisfied with probability at least 1 _− n_[1] _[−][e]_[2] _e_[1] _[−][e]_[2] _[s] ≥_ 1 _− n[−]_[6] _e[−]_[6] _[s]_ .
+
+**(P3)** :Let _E_ be the event that (P2) holds. Then,
+
+**==> picture [226 x 11] intentionally omitted <==**
+
+**(P4)** : It is immediate that _|f_ ( _t, x_ ) _− f_ ( _t[′] , x[′]_ ) _|_ = _s|x − x[′] |._
+
+To use Theorem 24.1 in Frieze & Karo´nski (2016), we set
+
+**==> picture [100 x 72] intentionally omitted <==**
+
+13
+
+Then we have _X_ ( _t_ ) = _nz_ ( _t/n_ ) + _O_ ( _n[ϵ]_[+2] _[/]_[3] ( _s_ + log _n_ )) uniformly on 0 _≤ t ≤ σt_ , with probability at least 1 _− O_ ( _n[−]_[6] _e[−]_[6] _[s]_ + _n_[1] _[/]_[3] _[−][ϵ] e[−][n]_[3] _[ϵ][e][−]_[6] ) = 1 _− O_ ( _n[−]_[6] _e[−]_[6] _[s]_ ) _≥_ 1 _− O_ ( _n[−]_[12] ). _z_ ( _t_ ) satisfies the following ODE that:
+
+**==> picture [158 x 11] intentionally omitted <==**
+
+with initial condition that _z_ (0) = _X_ (0) = _n_ . The solution is
+
+**==> picture [154 x 25] intentionally omitted <==**
+
+We have _z_ ( _t_ ) _>_ 0 on �0 _,_[1] _s_[log] _[s]_[+] 1 _−_[1] _[−] p[p]_ � _⊃_ �0 _,_[lo] _s_[g] _[ s]_ �. Therefore, with high probability, _X_ ( _t_ ) _≥_ 0 for _t ≤_[lo] _s_[g] _[ s][n]_[.]
+
+In conclusion, we have at least[lo] _s_[g] _[ s][n]_[ iterations in the greedy algorithm, resulting in an independent] set of size at least[lo] _s_[g] _[ s][n]_[ with probability at least][ 1] _[ −][O]_[(] _[n][−]_[12][)][.]
+
+## B PROOF OF THEOREM 2
+
+We fix the potential outcomes _Y_ , the graph _G_ , and the assignment _**Z** A_ for the auxiliary set. Recall the difference-in-means estimator:
+
+**==> picture [242 x 27] intentionally omitted <==**
+
+We have the expectation:
+
+**==> picture [252 x 28] intentionally omitted <==**
+
+where we use the facts that _ρi_ is fixed given _G_ and _**Z** A_ , and E[ _Zi_ ] = 1 _/_ 2. Therefore, the bias is
+
+**==> picture [399 x 90] intentionally omitted <==**
+
+Next, we give the variance.
+
+**==> picture [399 x 169] intentionally omitted <==**
+
+14
+
+Therefore, we have
+
+**==> picture [272 x 184] intentionally omitted <==**
+
+where _δi_ = _Yi_ (1 _, ρi_ ) + _Yi_ (0 _, ρi_ ) _− Yi_ (1 _, ρ_ ) + _Yi_ (0 _, ρ_ ) _≤_ 2 _L_ ∆ _i_ , and
+
+.
+
+## C PROOF OF THEOREM 3
+
+Consider the linear regression _Yi ∼ α_ + _βZi_ + _γρi_ for _i ∈ VI_ . When _Zi_ is a constant as in the design, the linear regression is equivalent to _Yi ∼ α_ ˜ + _γρi_ , where _α_ ˜ := _α_ + _βz_ . By observing _τ_ ˆ[(] _[i]_[)] ( _z,_ 1 _,_ 0) = _γ_ ˆ, the result follows immediately from univariate linear regression.
+
+## D PROOF OF THEOREM 4
+
+Let _**Y** I_ be the observed outcomes on the independent set such that _**Y** I_ = _α_ **1** + _β_ _**Z** I_ + _γ_ _**ρ** I_ + _**ϵ** I_ . We write the design matrix as
+
+**==> picture [214 x 37] intentionally omitted <==**
+
+where _Z_[¯] _I_ and _ρ_ ¯ _I_ are sample means of _**Z** I_ and _**ρ** I_ , correspondingly, and _**Z**_[˜] _I_ and _**ρ**_ ˜ _I_ are de-meaned versions of _**Z** I_ and _**ρ** I_ , correspondingly.
+
+Let _α_ ˆ, _β_[ˆ] , _γ_ ˆ be the regression estimators. The unbiasedness of _β_[ˆ] + _γ_ ˆ to the true value _β_ + _γ_ is immediate. Now we calculate the covariance matrix such that
+
+Cov[(ˆ _α, β,_[ˆ] ˆ _γ_ )] = _σ_[2] [ _**X**[T]_ _**X**_ ] _[−]_[1]
+
+**==> picture [338 x 79] intentionally omitted <==**
+
+where _S_ = Var[ _**Z** I_ ]Var[ _**ρ** I_ ] _−_ Cov[2] [ _**Z** I ,_ _**ρ** I_ ]. Therefore, we have
+
+**==> picture [222 x 26] intentionally omitted <==**
+
+Consider the function _f_ ( _λ_ ):
+
+**==> picture [128 x 24] intentionally omitted <==**
+
+15
+
+Then we have
+
+**==> picture [183 x 26] intentionally omitted <==**
+
+Therefore, when _λ_[2] _<_ Var[ _**Z** I_ ]Var[ _**ρ** I_ ], _f_ ( _λ_ ) takes its minimum at _λ[∗]_ = Var[ _**Z** I_ ] _∧_ Var[ _**ρ** I_ ] such that
+
+**==> picture [168 x 24] intentionally omitted <==**
+
+Therefore, we have
+
+**==> picture [106 x 25] intentionally omitted <==**
+
+The lower bound can be obtained by choosing _**Z** I_ = _**ρ** I ∈_ [0 _,_ 1] _[n][I]_ , generally outside the binary support for _**Z** I_ .
+
+16
+
diff --git a/open_review/iclr2024_8590.json b/open_review/iclr2024_8590.json
new file mode 100644
index 0000000000000000000000000000000000000000..33f5375aec93dba0c8f6c24f9952fd707827d6bf
--- /dev/null
+++ b/open_review/iclr2024_8590.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8590",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Llamas Know What GPTs Don't Show: Surrogate Models for Selective Classification",
+ "abstract": "To maintain user trust, large language models (LLMs) should signal low confidence on examples they get incorrect, instead of misleading the user.\nThe standard approach of estimating confidence is to use the softmax probabilities of these models, but state-of-the-art LLMs such as GPT-4 and Claude do not provide access to these probabilities.\nWe first study eliciting confidence linguistically---asking an LLM for its confidence in its answer---but we find that this leaves a lot of room for improvement (79\\% AUC on GPT-4 averaged across 12 question-answering datasets---only 5\\% above a random baseline).\nWe then explore using a \\emph{surrogate} confidence model---using a model where we do have probabilities to evaluate the original model's confidence in a given question.\nSurprisingly, even though these probabilities come from a different model, this method leads to higher AUC than linguistic confidences on 10 out of 12 datasets.\nOur best method mixing linguistic confidences and surrogate model probabilities gives state-of-the-art performance on all 12 datasets (85\\% average AUC on GPT-4).",
+ "rebuttal": "### Official Comment by Authors\n> Exact values of $\\alpha$ and process to arrive at them\n\nWe apologize for not detailing the exact values of $\\alpha$ (weight on the surrogate probabilities in the mixture algorithm - Algorithm 1). We placed less importance on the exact value, since it could differ depending on the selected surrogate model. The optimal values of alpha using our best surrogate model (Llama-2-70B) are: \n\n| | GPT-3.5-Turbo | Claude-v1.3 | GPT-4 (Mixture) | GPT-4 (SC Mixture) |\n| ----------- | ----------------- | --------------- | ------------------- | ------------------------ |\n| $\\alpha$ | 0.6 | 0.6 | 0.4 | 0.3 |\n\nWe select the alpha hyperparameter by **sweeping over values from 0 to 1 at increments of 0.1 and optimizing for the alpha which leads to the highest AUC value per model**, averaged over 12 datasets. We have added these details to Appendix A.8 of the paper.\n\n> Confusion in wording that “very small alpha values are sufficient”\n\nWe appreciate the reviewer’s note and have updated the header of the subsection to be 'Why Does Tiebreaking Work Well' in Analysis (Section 6) accordingly. Although the absolute AUC and AUROC metrics for the 'tiebreak' and 'mixture of model' methods are different, we mention that small alpha values are sufficient given that **for GPT-4 tiebreaking is able to achieve 90% of the AUC gains and 86% of the AUROC gains that the mixture method produces** over linguistic confidences. Furthermore, tiebreaking is highlighted in this paper to provide an **intuitive understanding of why combining linguistic confidences and surrogate probabilities is valuable** — linguistic confidence provides a lower bound anchor of the confidence for each example and even incorporating a small fraction of surrogate probabilities can help modulate the linguistic confidence score and hone in on a more fine-grained confidence value. \n\n> “What do the “+” symbols at the end of many methods in tables 2 and 3 mean?”\n\nWe apologize for the confusion – the dagger (+) symbol after the method names in Tables 2 and 3 is used to indicate the methods we propose. Conversely, the grayed out rows in the tables are the baseline results we compare against.\n\n### Official Comment by Authors\n> “evaluations for the validity of the linguistic confidence.” \n\nThough there can be different interpretations of the notion of validity of confidence scores, based on the comment we presume that the reviewer may be referring to an evaluation of the ECE (calibration error) of the linguistic confidence scores. We report ECE measurements for both linguistic confidences and model probabilities in Appendix A.6. Based on the ECE scores, we see that on average, for **Llama-2 linguistic confidences are less well calibrated than the model’s probabilities, but for text-d [...]\n\n### Official Comment by Authors\nWe thank the reviewer for the constructive feedback and questions, and for expressing that our experiments and ablation studies are “extensive”, and that our approach is “elegant” and “works well”. Following we respond to each of the reviewer’s comments — discussing why linguistic confidences are useful for mixture of models, adding experiments combining multiple surrogate models, highlighting ECE measurements for linguistic confidences, adding analysis of correlation between linguistic confidences and model probabilities, specifying the exact values of alpha a [...]\n\n### Official Comment by Authors\n> “study also touches on the critiquability of LLMs and LLM evaluation”, the reviewer suggests contrasting our work with others in the LLM evaluation domain\n\nThank you for highlighting the connection of our work to recent works in the LLM self-evaluation and self-critique domains. We have updated our Related Work section and Appendix A.15 to discuss the suggested references and contextualize our work with regards to the self-evaluation space. We provide a summary below: \n\nLLMs have shown progress in self-critiquing and improving using their own feedback or other [...]\n\n### Official Comment by Authors\n> “approach of using surrogate models to interpret black-box models isn't novel”\n\nWe have reviewed the references suggested by the reviewer, however none of these seem to discuss the use of surrogate models to interpret black-box models. [1] focuses on optimizing different parts of an NLP pipeline for better calibration, [2] studies uncertainty quantification for black-box models on NLG tasks through sampling generations and estimating uncertainty through dissimilarity in generations, and [3]-[5] focus on LLM self-evaluation. We welcome references to other works [...]\n\n### Official Comment by Authors\nWe thank the reviewer for the thoughtful feedback and questions, expressing that our work studies a “significant and intriguing research direction”, that our techniques are “intuitive”, our results are “comprehensive”, and that our “findings will be valuable for future researchers”. Below we have tried to address each of the reviewer’s comments — comparing our work with more types of certainty scorers, further discussing the novelty and uniqueness of our approach, contrasting with the LLM self-evaluation space, and providing a few clarifications.\nPlease let us k [...]\n\n### Official Comment by Authors\n**Success of surrogate confidences highlights a *transferability phenomenon* between models:**\n\nAdditionally, we feel that it is crucial to highlight that our findings are also important and interesting from a scientific perspective — they shine light on an aspect of *transferability* that exists between language models. It is unexpected and surprising that a transfer of confidence estimates between *different* language models (different sizes, different model families) should hold. We are among the first papers to demonstrate such transfer and provide intuition [...]\n\n### Official Comment by Authors\nWe thank the reviewer for the thoughtful feedback and questions, and expressing that ou\n[rebuttal truncated]",
+ "initial_scores": [
+ 3,
+ 3,
+ 5,
+ 5
+ ],
+ "score_mean": 4.0,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "",
+ "forum_id": "D8DAQhpznu",
+ "primary_area": "general machine learning (i.e., none of the above)",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_78gw",
+ "review_id": "oE1bmEeCIi",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2057,
+ "edit_detected": true,
+ "edit_delta_seconds": 666391,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_mEr2",
+ "review_id": "TzX0LFaMfq",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1417,
+ "edit_detected": true,
+ "edit_delta_seconds": 741965,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_RfxS",
+ "review_id": "rbRGRUtBFT",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 2728,
+ "edit_detected": true,
+ "edit_delta_seconds": 863044,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_LeSy",
+ "review_id": "48u9U7wpJL",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2655,
+ "edit_detected": true,
+ "edit_delta_seconds": 1028005,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8590.md b/open_review/iclr2024_8590.md
new file mode 100644
index 0000000000000000000000000000000000000000..061891e8f16f7efe759a6e2dd322f7817741e8bf
--- /dev/null
+++ b/open_review/iclr2024_8590.md
@@ -0,0 +1,606 @@
+
+
+## ’ - LLAMAS KNOW WHAT GPTS DON T SHOW: SURRO GATE MODELS FOR SELECTIVE CLASSIFICATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+To maintain user trust, large language models (LLMs) should signal low confidence on examples they get incorrect, instead of misleading the user. The standard approach of estimating confidence is to use the softmax probabilities of these models, but state-of-the-art LLMs such as GPT-4 and Claude do not provide access to these probabilities. We first study eliciting confidence linguistically—asking an LLM for its confidence in its answer—but we find that this leaves a lot of room for improvement (79% AUC on GPT-4 averaged across 12 question-answering datasets—only 5% above a random baseline). We then explore using a _surrogate_ confidence model—using a model where we do have probabilities to evaluate the original model’s confidence in a given question. Surprisingly, even though these probabilities come from a different model, this method leads to higher AUC than linguistic confidences on 10 out of 12 datasets. Our best method mixing linguistic confidences and surrogate model probabilities gives state-of-the-art performance on all 12 datasets (85% average AUC on GPT-4).
+
+## 1 INTRODUCTION
+
+As large language models (LLMs) are increasingly deployed, it is important that they signal low confidence on examples where they make mistakes. This problem is called selective classification (or classification with a reject option) and is widely studied in machine learning (Cordella et al., 1995; Geifman & El-Yaniv, 2017; Feng et al., 2019; Jones et al., 2021), learning theory (El-Yaniv & Wiener, 2010; Bartlett & Wegkamp, 2008), and natural language processing (Kamath et al., 2020; Liang et al., 2022; Xiong et al., 2023). Traditional approaches leverage the model’s softmax probability (Hendrycks & Gimpel, 2017; Jones et al., 2021; Liang et al., 2022) or the model’s representations (Lee et al., 2018). This paper’s goal is to produce _good confidence estimates for state-of-the-art LLMs_ such as GPT-4 and Claude, which _do not provide model probabilities_ or representations.
+
+We first examine a natural idea of eliciting linguistic confidence scores (Tian et al., 2023; Lin et al., 2022; Xiong et al., 2023)—prompting the LLM to ask for its confidence that its answer is correct (Figure 1, GPT-4 Linguistic). We find that while linguistic confidences work better than a random guessing baseline, it leaves a lot of room for improvement. Our results hold across 12 standard datasets (8 MMLU datasets, TruthfulQA, CommonsenseQA, OpenbookQA, and MedQA), 5 models (GPT-4, Claude, GPT-3.5, Llama-2, and text-davinci-003), and 24 different prompt formats (e.g., chain-of-thought, different instructions, fake few-shot prompts). Averaged across the datasets, GPT4 achieves a modest selective classification AUC of 78.8%, which is only 5.3% above a random guessing baseline. When model probabilities are available (for less accurate models such as Llama2), the linguistic confidences perform much worse than using model probabilities (60.9% vs. 73.1% AUC on Llama-2).
+
+Instead, we propose a surrogate model approach of taking the answer from GPT-4 or Claude, but the _confidence from a different model_ such as Llama 2 (Figure 1, Surrogate). The surrogate model method improves the average selective classification AUC for GPT-4 to 81.8%. Even using a much smaller Llama-13B model improves the AUC for models such as GPT-4, Claude, and GPT-3.5. Intriguingly, the model generating the confidence score is different (and much worse) than the model generating the answer, but its confidence scores transfer over.
+
+We find that the linguistic confidence scores are still useful: adding these scores to the surrogate model’s probabilities leads to further gains (Figure 1, Mixture). For example, this mixture method increases the selective classification AUC of GPT-4 to 83.0%. The mixture method also outperforms
+
+1
+
+**==> picture [397 x 141] intentionally omitted <==**
+
+Figure 1: Our goal is to provide good confidence estimates for state-of-the-art LLMs such as GPT-4 and Claude which do not give access to internal model probabilities. One natural approach (GPT-4 linguistic) is to prompt the model and ask for its confidence. Interestingly, we find that taking the answer from GPT-4, but the internal model probability from a different surrogate model (e.g., an open model such as Llama-2) gets even better results (0.82 AUC). Mixing GPT-4’s linguistic probabilities with the surrogate model probabilities gives further gains (0.83 AUC). Our AUC numbers are better than concurrent work (Xiong et al., 2023), but combining these approaches leads to the best results (Mixture++; 0.85 AUC). Our findings also hold for Claude and GPT-3.5 (Section 4 and 5).
+
+concurrent work (Xiong et al., 2023) on self-consistency (AUC: 82.6%), which is more expensive (involves sampling GPT-4 five times per input) and involves post-processing. Combining our method with self-consistency leads to the _best results: average AUC of 84.5%_ .
+
+Our analysis suggests that linguistic confidence scores do not work well by themselves because they are very coarse-grained—for example, GPT-4 outputs the exact same confidence (0.9) on 50% of examples, which limits its ability to separate correct and incorrect answers. Surrogate model probabilities appear to work well even on a different model, because the examples that are challenging for one model transfer over to a different model. Finally, mixing in just a small fraction of surrogate model probabilities allow answers which previously had the same linguistic confidence to be separable through different composite confidence scores, boosting the overall performance.
+
+## 2 SETUP
+
+Our goal is selective classification: outputting confidence scores that are higher on inputs where the model is correct, than inputs where the model is incorrect (El-Yaniv & Wiener, 2010; Geifman & El-Yaniv, 2017). We focus on state-of-the-art language models such as GPT-4 and Claude, which do not expose probabilities computed in their softmax output layer.
+
+**Task.** Given a text input _x_ , a model outputs a (possibly stochastic) answer _y_ ( _x_ ). Let _R_ ( _x, y_ ) = 1 if an answer _y_ is correct for input _x_ , and 0 otherwise. Our goal is to output a _confidence score C_ ( _x_ ) _∈_ [0 _,_ 1]. Good confidence scores are essential in real world machine learning systems: for inputs when _C_ ( _x_ ) is lower, we can defer to a human expert or alert the user, instead of misleading the user with an incorrect answer.
+
+**Metrics.** A popular metric for selective classification is the _AUC_ (area under the coverage-accuracy curve) (El-Yaniv & Wiener, 2010; Liang et al., 2022), which examines how accurate the model is if allowed to abstain (say "I don’t know") on some examples. Let _A_ ( _c_ ) be the selective accuracy at coverage _c_ : the accuracy if the model only makes a prediction on the _c_ proportion of data with highest confidence scores[1] . The AUC is the average selective accuracy _A_ ( _c_ ) over all _c_ :
+
+**==> picture [251 x 26] intentionally omitted <==**
+
+A random baseline (outputting uniform random probabilities for each input) achieves AUC( _C, y_ ) = Accuracy, so a model with good confidence scores should achieve a higher AUC than accuracy.
+
+> 1 The classifier used to select the _c_ proportion of examples can be deterministic or randomized. We report results with a deterministic classifier, but also compute results with a randomized classifier in A.16.
+
+2
+
+We also examine the _AUROC (area under the receiver operator curve)_ , a standard metric (Hendrycks & Gimpel, 2017; Xiong et al., 2023) which examines how well the confidence scores can distinguish between correct and incorrect examples. Outputting random confidence scores gets an AUROC of 0.5, so a model with good confidence scores should achieve AUROC above 0.5.
+
+We also report _ECE (expected calibration error)_ numbers in Appendix A.6. ECE examines if a model’s confidence aligns with its accuracy, but does not indicate the model’s ability to distinguish between correct and incorrect examples, so we focus on the AUC and AUROC metrics.[2]
+
+**Datasets.** We study model performance and confidence on twelve standard question answering datasets: _TruthfulQA_ (TQA) (Lin et al., 2021), _CommonsenseQA_ (CSQA) (Talmor et al., 2019), _OpenbookQA_ (OBQA) (Mihaylov et al., 2018), _MedQA_ (Jin et al., 2021), and 8 _MMLU_ (Hendrycks et al., 2021) datasets - professional law (Law), business ethics (Ethics), conceptual physics (Physics), econometrics (Econ), abstract algebra (Algebra), college chemistry (Chem), computer security (Security), and US Foreign Policy (Policy). These datasets span several diverse categories including math reasoning, scientific knowledge, computer science, social science, and commonsense reasoning. We sample 250 questions from the test split of each dataset to report results on (if the test set is smaller, we use the full test set). See Appendix A.1 for more details.
+
+**Models.** We study state-of-the-art language models, most of which _do not_ provide access to internal probabilities as of the writing of this paper - _GPT-4_ (OpenAI, 2023a), _Claude-v1.3_ (Anthropic, 2023), and _GPT-3.5-Turbo_ (OpenAI, 2022) (June 13th, 2023, snapshot). We also study a few recent models which _do_ provide model probabilities for systematic comparisons— _Llama-2_ and _Llama-2chat_ (70b and 13b sizes) (Touvron et al., 2023) and _text-davinci-003_ OpenAI (2023b). If Llama-2 is mentioned in the text without further identifiers, we refer to the Llama-2-70b base model.
+
+## 2.1 CONFIDENCE ELICITATION METHODS
+
+**Linguistic Confidences.** We zero-shot prompt models to elicit linguistic confidences, sampling the answer and confidence together in a single generation, greedily at temperature _T_ = 0. We experiment with 24 different prompts across various categories (chain-of-thought, different instructions, fake few shot examples) and found the results to be consistent across prompts. We report results on our best prompt (see more details on the exact prompt in Appendix A.3).
+
+**Model Probabilities.** Weaker models such as Llama-2 and text-davinci-003 provide token-level probabilities for text. We let the confidence score be the probability of the generated answer choice.
+
+**Surrogate models for confidences.** Since models such as GPT-4 do not give a confidence estimate, we propose using a surrogate model (e.g., Llama-2) to provide confidence estimates. Formally, given an input _x_ we output _y_ ( _x_ ) = _y_ gpt-4( _x_ ) (GPT-4’s answer) and _C_ ( _x_ ) = _C_ llama-2( _x_ ) (Llama-2’s confidence). Even though these confidence scores come from a _different_ model, Section 4 shows that the surrogate method outperforms linguistic confidence scores.
+
+**Mixture of models.** We also propose a mixture of models method where we combine the linguistic confidence from the main model and the surrogate model’s confidence score: Algorithm 1: Mixture of Models Confidence given input _x_ we output (1 _−α_ ) _CM_ ( _x_ )+ _αCS_ ( _x_ ) **Data:** A question _x_ where _M_ is the main model and _S_ is the surro- **Result:** � A prediction � _y_ , a confidence score _c_ gate model (Algorithm 1). We use Llama-2-70b _y_ , _c_ 1 = MainModel ( _x_ ) ; as our surrogate model since that performs the _c_ 2 = SurrogateModel ( _x_ ) ; best, and optimize _α_ to minimize AUC. Interest- _c_ = (1 _− α_ ) _c_ 1 + _αc_ 2 ; ingly, in Section 5, we show that even _α_ = 0 _._ 001 works well. For details on the optimal _α_ values for each model, see Appendix A.8.
+
+## 3 LINGUISTIC CONFIDENCES: ASKING THE MODEL FOR ITS CONFIDENCE
+
+State-of-the-art language models such as GPT-4 and Claude do not give access to internal model probabilities. In this section, we examine linguistically eliciting confidence: prompt models to assign their answers a confidence score between 0 and 1. We find that these linguistic confidences
+
+> 2Intuitively, calibration requires that if we output a 0 _._ 6 confidence on 100 examples, then we should get 0 _._ 6 _·_ 100 = 60 of them correct. For a classifier with accuracy _A_ , one (degenerate) way to have perfect calibration (best possible ECE) is to output confidence _C_ ( _x_ ) = _A_ for every example _x_ .
+
+3
+
+|Metric|Metric|Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|---|---|---|
+|AUC||Text-davinci Linguistic 0.484 0.504 0.713 0.775 0.532 0.590 0.579 Text-davinci Prob **0.608** **0.656** **0.861** **0.929** **0.714** **0.783** **0.697**|||
+|||Llama-2 Linguistic 0.583 0.584 0.689 0.803 0.581 0.639 0.628 Llama-2 Prob **0.711** **0.735** **0.804** **0.923** **0.749** **0.834** **0.763**|||
+|||GPT-3.5 Linguistic 0.590 0.536 0.684 0.781 0.508 0.674 0.526 Claude Linguistic 0.679 0.687 **0.788** 0.874 0.647 **0.863** 0.713 GPT-4 Linguistic **0.883** **0.828** 0.786 **0.958** **0.711** 0.850 **0.819**|||
+|AUROC||Text-davinci Linguistic 0.525 0.500 0.503 0.509 0.500 0.500 0.500 Text-davinci Prob **0.718** **0.696** **0.806** **0.840** **0.715** **0.758** **0.637**|||
+|||Llama-2 Linguistic 0.618 0.541 0.555 0.484 0.517 0.602 0.593 Llama-2 Prob **0.745** **0.722** **0.731** **0.777** **0.733** **0.868** **0.732**|||
+|||GPT-3.5 Linguistic 0.535 0.500 0.520 0.516 0.508 0.509 0.504 Claude Linguistic **0.669** 0.584 **0.631** 0.647 0.586 **0.760** **0.652** GPT-4 Linguistic 0.665 **0.716** 0.547 **0.656** **0.591** 0.720 0.522|||
+||||Confdence Type Econ Algebra Chem Security Policy **Avg** Text-davinci Linguistic 0.412 0.300 0.440 0.690 0.851 0.573 Text-davinci Prob **0.431** **0.338** **0.644** **0.890** **0.939** **0.708** Llama-2 Linguistic 0.402 0.212 0.470 0.792 0.922 0.609 Llama-2 Prob **0.498** **0.263** **0.647** **0.866** **0.981** **0.731** GPT-3.5 Linguistic 0.412 0.330 0.460 0.737 0.806 0.587 Claude Linguistic 0.621 0.339 0.591 0.823 0.918 0.712 GPT-4 Linguistic **0.628** **0.534** **0.616** **0.886** **0.955** **0.788** Text-davinci Linguistic 0.500 0.500 0.500 0.500 0.506 0.504 Text-davinci Prob **0.549** **0.532** **0.695** **0.858** **0.795** **0.717** Llama-2 Linguistic 0.533 0.424 0.520 0.613 0.576 0.548 Llama-2 Prob **0.622** **0.546** **0.732** **0.775** **0.871** **0.738** GPT-3.5 Linguistic 0.518 0.522 0.500 0.519 0.519 0.514 Claude Linguistic **0.573** 0.543 0.668 0.687 0.645 0.637 GPT-4 Linguistic 0.551 **0.599** **0.691** **0.750** **0.753** **0.647**||
+||Metric||||
+||||||
+||AUC||Text-davinci Linguistic 0.412 0.300 0.440 0.690 0.851 Text-davinci Prob **0.431** **0.338** **0.644** **0.890** **0.939**|0.573 **0.708**|
+||||Llama-2 Linguistic 0.402 0.212 0.470 0.792 0.922 Llama-2 Prob **0.498** **0.263** **0.647** **0.866** **0.981**|0.609 **0.731**|
+||||GPT-3.5 Linguistic 0.412 0.330 0.460 0.737 0.806 Claude Linguistic 0.621 0.339 0.591 0.823 0.918 GPT-4 Linguistic **0.628** **0.534** **0.616** **0.886** **0.955**|0.587 0.712 **0.788**|
+||||||
+||AUROC||Text-davinci Linguistic 0.500 0.500 0.500 0.500 0.506 Text-davinci Prob **0.549** **0.532** **0.695** **0.858** **0.795**|0.504 **0.717**|
+||||Llama-2 Linguistic 0.533 0.424 0.520 0.613 0.576 Llama-2 Prob **0.622** **0.546** **0.732** **0.775** **0.871**|0.548 **0.738**|
+||||GPT-3.5 Linguistic 0.518 0.522 0.500 0.519 0.519 Claude Linguistic **0.573** 0.543 0.668 0.687 0.645 GPT-4 Linguistic 0.551 **0.599** **0.691** **0.750** **0.753**|0.514 0.637 **0.647**|
+
+Table 1: **AUC and AUROC - Linguistic Confidences vs Model Probabilities** We compare the AUC and AUROC values for linguistic confidences and model probabilities in weaker models (textdavinci-003 and Llama-2-70b), and find that model probabilities consistently outperform linguistic confidences. For closed source models (which don’t provide model probabilities), we see that Claude and GPT-4 provide the best linguistic confidences in both AUC and AUROC. The same model is used to provide both the answer and the confidence estimate.
+
+leave a lot of room for improvement (around 50-65% AUROC, compared to 50% for a random guessing baseline). These linguistic confidences are also much worse than internal model probabilities when available (for weaker models such as text-davinci-003 and Llama-2). We show AUC and AUROC results on all datasets and models in Table 1.
+
+**Linguistic confidences are mediocre.** The AUROC values of linguistic confidences from textdavinci, Llama-2-70b, and GPT-3.5 are close to 50% (Table 1), which is the score achieved by guessing a random confidence, indicating that linguistic confidences are not a reliable means of separating correct and incorrect examples. The linguistic confidences of the strongest models, Claude and GPT-4, are better and result in AUROCs in the 60-65% range, but still leave a lot of room for improvement. AUC values show a similar story: the AUC of linguistic confidences are close to their accuracy (which is the score achieved by a random guessing baseline). Averaged over the datasets,
+
+4
+
+Llama-2 has an accuracy of 58.8% and AUC of 62.8%; GPT-4 has an accuracy of 73.5% and AUC of 78.8%; and Claude has an accuracy of 65.5% and AUC of 71.3%.
+
+**Linguistic confidences are worse than model probabilities.** The best current models (GPT-4 and Claude) do not provide model probabilities, but we compare the quality of model probabilities and linguistic confidences for text-davinci-003 and the Llama-2 models. For these models, the model probabilities result in better AUC and AUROC values for all of our datasets (Table 1). For Llama-2, the model probabilities achieve a _13.5% higher AUC and 19% higher AUROC_ than the linguistic confidences. The Chat model (Llama-2-70b-Chat) shows similar trends (Appendix A.5). We measure the correlation between linguistic confidences and model probabilities in Appendix A.14.
+
+**Linguistic confidences are robust to prompts.** We examine linguistic confidences using 24 distinct prompts, including asking for numerical confidence or probability scores, asking the model to categorize its confidence into ‘not sure’, ‘sure’, and ‘very sure’, allowing the model to explain confidences with chain-of-thought, asking the model for its confidence in a follow-up question, and varying the prompt instructions. We show results for the best prompt, as there was very little difference in performance across prompts—our results hold for other prompts as well (Appendix A.3).
+
+**Linguistic confidences improve with scale, but not enough.** The quality of linguistic confidences improves with model scale. We see that GPT-4 and Claude have the best linguistic confidences, followed by the Llama-2-70b models, GPT-3.5, and finally text-davinci-003. While the _linguistic confidences_ from GPT-4 are not bad (65% average AUROC), they are worse than _model probabilities_ from Llama-2-70b (74%) and even text-davinci-003 (72%). Note that AUC scores increase with accuracy—GPT-4 Linguistic has the highest AUC because GPT-4 has much higher accuracy than Llama-2. The overall utility of a selective classifier depends on both its accuracy and confidence quality, so in the next section we examine ways to improve the confidences of GPT-4 and Claude.
+
+## 4 SURROGATE MODELS ARE RELIABLE CONFIDENCE ESTIMATORS
+
+In the previous section we found that linguistic confidences leave a lot of room for improvement. Here we show that model probabilities from a separate ‘surrogate’ model can surprisingly provide better confidence estimates for a model than its own linguistic confidence scores, even though the probabilities come from a different model.
+
+## 4.1 RESULTS
+
+**Surrogate model confidences outperform linguistic confidences.** AUC improves for all models when probabilities from any surrogate model are used, as opposed to using the model’s own linguistic confidences. Figure 8 shows a heatmap of the AUC for different main models (on the _x_ -axis) as we vary the surrogate model (on the _y_ -axis). We see that model probabilities (bottom three rows) lead to higher AUC (are darker) than linguistic confidences (top 5 rows) even when the probabilities come from a different model. For example, using Llama-2-70B probabilities as a surrogate improves AUC from 78.8% to 81.8% for GPT-4, 71.2% to 75.6% for Claude, and 58.7% to 71.9% for GPT-3.5, and the AUROC also shows similar increases for all models (Table 2, Figure 3).
+
+**Weak surrogates are also good confidence estimators.** Even using Llama-2-13B or text-davinci003 as a surrogate leads to comparable or better performance than using a model’s own linguistic confidences. We found this intriguing because these models are much smaller and less accurate, e.g., Llama-2-13B has an average accuracy of 47.2% vs. 65.5% for Claude and 73.5% for GPT-4. As we might expect, better models (such as Llama-2-70b) are better surrogates.
+
+**Other findings.** Recent work suggests RLHF’ed chat models may be less calibrated than base models. Llama-2-70B Base has better linguistic confidences and probabilities than the Chat model, but both perform similarly as surrogates (Appendix A.11, A.5). Finally, we find that _linguistic confidences_ from stronger models can be good surrogates for weaker models—the AUC of textdavinci-003 improves by 5% when using GPT-4’s linguistic confidences instead of its own.
+
+## 5 MIXTURES OF MODELS FOR BETTER CONFIDENCE ESTIMATES
+
+In the previous section, we proposed the use of surrogate models—using a main model to produce answers and a separate, surrogate to estimate the main model’s confidence in the answers—and found surrogates to outperform linguistic confidence scores elicited from the main model. In this
+
+5
+
+**==> picture [322 x 256] intentionally omitted <==**
+
+Figure 2: **AUCs for Different Surrogate Models.** We plot the AUC as we vary the main model (on the _x_ -axis) and the surrogate model (on the _y_ -axis). Using surrogate model probabilities as confidence estimates improves AUCs for all models over their own linguistic confidences—the bottom 3 rows (surrogate probabilities) are darker than the top 5 rows (linguistic confidences). Even model probabilities from a smaller and less accurate Llama-13B model improves AUCs for all models.
+
+||Text-davinci GPT-3.5 Llama-2 Claude GPT-4|
+|---|---|
+||Ling. Conf. 0.573 0.587 0.609 0.712 0.788 |
+||AUC Surrogate_†_ 0.708 0.719 **0.731** 0.753 0.818 Tiebreak_†_ **0.711** 0.718 0.715 0.754 0.826 Mixture of Models_†_ **0.711** **0.721** **0.731** **0.762** **0.830**|
+||Ling. Conf. 0.504 0.515 0.548 0.637 0.647 |
+||AUROC Surrogate_†_ 0.717 0.705 **0.738** 0.671 0.654 Tiebreak_†_ **0.719** 0.707 0.700 0.677 0.689 Mixture of Models_†_ **0.719** **0.708** 0.737 **0.685** **0.696**|
+
+Table 2: **AUC and AUROC of Surrogate and Mixture of Model Methods.** We compare the performance of our proposed methods _[†]_ with the baseline linguistic confidence method (gray). For both AUC and AUROC, our proposed methods outperform linguistic confidences on all models. Mixture of models improves the AUC of Claude by 5% and GPT-4 by 4.2%.
+
+section, we find that the linguistic confidences are still useful—they can be composed with a surrogate model’s confidences to get state of the art confidence estimates for all models.
+
+## 5.1 RESULTS
+
+**Mixtures of models provide best confidences.** Mixing surrogate and linguistic confidences (Algorithm 1) leads to the best confidence estimates for all models—AUCs increase from 78.7% to 83.0% for GPT-4 and 71.2% to 76.2% for Claude. AUROCs also increase for these models, by 5.2% for GPT-4 and 4.8% for Claude (Table 2). We plot selective accuracy against coverage, where the mixture and surrogate method lie above the linguistic confidences curve (Figure 3).
+
+6
+
+||Method TQA MedQA CSQA OBQA Law Ethics Physics|Method TQA MedQA CSQA OBQA Law Ethics Physics|Method TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|---|---|
+||Ling. Conf. 0.883 0.828 0.786 0.958 0.711 0.850 0.819|||
+||SC Vanilla Ling. Conf. 0.857 0.763 0.798 0.942 0.693 0.785 0.830|||
+||SCHybridLing. Conf. 0.902 **0.883** 0.837 0.977 0.729 **0.900** 0.845 |||
+||AUC Surrogate_†_ 0.866 0.844 0.843 0.965 0.762 0.848 **0.891** Tiebreak_†_ 0.902 0.871 0.826 0.967 0.768 0.889 0.861 Mixture_†_ 0.895 0.864 0.842 0.969 **0.780** 0.881 0.886 SC Mixture_†_ **0.921** 0.873 **0.873** **0.979** 0.757 0.894 0.881|||
+||Ling. Conf. 0.665 0.716 0.547 0.656 0.591 0.720 0.522|||
+||SC Vanilla Ling. Conf. 0.549 0.550 0.540 0.607 0.571 0.612 0.570|||
+||SCHybridLing. Conf. 0.698 **0.767** 0.623 0.833 0.619 **0.817** 0.592 |||
+||AUROC Surrogate_†_ 0.543 0.666 0.652 0.683 0.619 0.617 0.648 Tiebreak_†_ 0.671 0.750 0.607 0.716 0.628 0.740 0.589 Mixture_†_ 0.642 0.731 0.642 0.731 0.655 0.711 0.648 SC Mixture_†_ **0.702** 0.747 **0.677** **0.838** **0.655** 0.783 **0.663** Method Econ Algebra Chem Security Policy **Avg** AUC Ling. Conf. 0.628 0.534 0.616 0.886 0.955 0.788 SC Vanilla Ling. Conf. 0.619 0.575 0.639 0.860 0.919 0.773 SCHybridLing. Conf. 0.658 0.585 0.726 0.912 0.964 0.826 Surrogate_†_ **0.667** 0.571 0.693 0.888 0.971 0.817 Tiebreak_†_ 0.654 0.581 0.714 0.910 0.974 0.826 Mixture_†_ 0.664 0.581 0.718 0.908 **0.976** 0.830 SC Mixture_†_ 0.657 **0.645** **0.763** **0.926** 0.973 **0.845** AUROC Ling. Conf. 0.551 0.599 0.691 0.750 0.753 0.647 SC Vanilla Ling. Conf. 0.562 0.662 0.699 0.634 0.556 0.593 SCHybridLing. Conf. **0.617** 0.682 0.818 0.798 0.755 0.718 Surrogate_†_ 0.578 0.621 0.676 0.779 0.764 0.654 Tiebreak_†_ 0.569 0.648 0.730 0.815 0.805 0.689 Mixture_†_ 0.578 0.648 0.729 0.814 **0.822** 0.696 SC Mixture_†_ 0.590 **0.763** **0.819** **0.839** 0.810 **0.740**|||
+|||||
+|||Method Econ Algebra Chem Security Policy **Avg**||
+|||Ling. Conf. 0.628 0.534 0.616 0.886 0.955|0.788|
+|||SC Vanilla Ling. Conf. 0.619 0.575 0.639 0.860 0.919|0.773|
+|||SCHybridLing. Conf. 0.658 0.585 0.726 0.912 0.964 |0.826|
+|||AUC Surrogate_†_ **0.667** 0.571 0.693 0.888 0.971 0.817 Tiebreak_†_ 0.654 0.581 0.714 0.910 0.974 0.826 Mixture_†_ 0.664 0.581 0.718 0.908 **0.976** 0.830 SC Mixture_†_ 0.657 **0.645** **0.763** **0.926** 0.973 **0.845**||
+|||Ling. Conf. 0.551 0.599 0.691 0.750 0.753|0.647|
+|||SC Vanilla Ling. Conf. 0.562 0.662 0.699 0.634 0.556|0.593|
+|||SCHybridLing. Conf. **0.617** 0.682 0.818 0.798 0.755 |0.718|
+|||AUROC Surrogate_†_ 0.578 0.621 0.676 0.779 0.764 Tiebreak_†_ 0.569 0.648 0.730 0.815 0.805 Mixture_†_ 0.578 0.648 0.729 0.814 **0.822** SC Mixture_†_ 0.590 **0.763** **0.819** **0.839** 0.810|0.654 0.689 0.696 **0.740**|
+
+Table 3: **AUC and AUROC of All Confidence Methods for GPT-4.** Our proposed surrogate model method outperforms linguistic confidences on 10/12 datasets on AUC. Mixing surrogate probabilities and linguistic confidences outperforms vanilla linguistic confidences on all 12 datasets. The mixture of surrogate probabilities also outperforms self-consistency and hybrid self-consistency confidences, the best method in Xiong et al. (2023), on average (AUC 83.0% vs. 82.6%). Mixing surrogate probabilities with hybrid self-consistency linguistic confidences leads to the best confidence estimates overall, outperforming all methods with an average 84.5% AUC and 74.0% AUROC, which is a gain of 5.7% and 9.3% respectively over vanilla linguistic confidences.
+
+**Epsilon is all you need.** We study a special case of Algorithm 1 called Tiebreaking, where we set _α_ to a small value _ϵ →_ 0. Adding only 0.1% of a surrogate model’s probabilities to a model’s linguistic confidences performs better than linguistic confidences or surrogate probabilities alone, and closely matches performance of the optimal _α_ (Table 2). For GPT-4, Tiebreaking achieves 90% of the AUC gains (over linguistic confidences) of the optimal _α_ , and 85.7% of the AUROC gains.
+
+**Mixing surrogate and self-consistency confidences leads to further gains.** Concurrent work (Xiong et al., 2023) on eliciting linguistic confidences uses self-consistency (SC) to sample multiple linguistic confidence scores for each answer and aggregates them through a post processing technique (SC Hybrid). This method is more expensive than our surrogate method and only works with additional post-processing steps (Appendix A.7). We experiment with leveraging these SC-based linguistic confidences for GPT-4 in _c_ 1 in Algorithm 1. This leads to state-of-the-art confidence estimates, also outperforming their hybrid self-consistency technique (Table 3), with an 5.7% gain in AUC for GPT-4 over vanilla linguistic confidences, and a 9.3% gain in AUROC.
+
+7
+
+**==> picture [199 x 150] intentionally omitted <==**
+
+**==> picture [199 x 150] intentionally omitted <==**
+
+**==> picture [311 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) MMLU - Professional Law (b) MMLU - US Foreign Policy **----- End of picture text -----**
+
+Figure 3: **Selective Accuracy vs. Coverage for GPT-4.** Our surrogate and mixture methods have a higher area under the selective accuracy vs coverage curve (AUC) than the linguistic confidence and random confidence baselines. We plot the coverage _c_ on the _x_ -axis and the selective accuracy (accuracy on the top _c_ fraction of examples) on the _y_ -axis, for two representative tasks. Notice that the mixture (green solid) and surrogate (purple dashed) lines are above the linguistic confidence (blue dashed/dotted) and random guessing baseline (black dotted).
+
+**Other findings.** Probabilities of smaller surrogate models can also be composed with linguistic confidences—composing Llama-2-13b’s probabilities with GPT-4’s linguistic confidences retains 88% of the AUC gains seen from composing Llama-2-70b’s probabilities. Composing GPT-4 and Claude’s linguistic confidences can boost GPT-4’s AUC and AUROC by 3% each, indicating that linguistic confidences from different models can also be complementary. Appendix A.10 details experiments on composing confidences from multiple surrogate models.
+
+## 6 ANALYSIS
+
+**Why Are Vanilla Linguistic Confidences Worse Than Model Probabilities?** In Section 3, we showed that linguistic confidences underperformed model probabilities. Here we provide some intuitions for this behavior. We observe that the distribution of model probabilities is quite varied (1456 unique values for Llama-2-70b across 12 datasets), while the distribution of linguistic confidences is clustered (only 8 unique values for GPT-4 across 12 datasets). This clustering may be because training corpora contain high frequencies of “nice” probabilities such as 90% or 100% (Zhou et al., 2023). The repetitiveness of linguistic confidences, compared to model probabilities, hinders relative confidence ordering and good AUC/AUROC performance—GPT-4 repetitively generates 0.9 for 50% of examples across 12 tasks, so it cannot separate them.
+
+**Why Do Surrogate Methods Improve Confidence Scores?** In section 4, we demonstrate that models can receive good quality confidence estimates from other surrogate models. Here we provide some intuitions for our results. We find that for a main model _M_ , a model _S_ tends to be a better surrogate when there is a higher correlation in the questions answered correctly by _M_ and _S_ . The questions GPT-4 answers correctly are more correlated with those that Llama-2-70b answers correctly (Pearson correlation of 0.39), than those that Llama-2-13b answers correctly (correlation 0.19) (Appendix A.12). In Figure 4, we plot the embeddings of questions that GPT-4 gets incorrect (blue dots) and the questions two potential surrogates Llama-2-70b and Llama-2-13b get incorrect (green dots) (see Appendix A.9 for more details). GPT-4 and Llama-2-70b tend to make mistakes on more of the same questions (more black dots on the left plot). We also see more spatial similarity in their mistakes. So better surrogates _S_ and their corresponding main models _M_ may struggle with _semantically related_ concepts, causing them to have low confidences on similar types of questions.
+
+**Why Does Tiebreaking Work Well?** Linguistic confidences tend to be clustered at only a few values (e.g., 0.9), limiting their ability to separate correct and incorrect answers. Since a surrogate model’s probabilities for each example are nearly unique, composing just a small fraction of them can allow answers which previously had the same linguistic confidence to now be separable.
+
+8
+
+**==> picture [180 x 135] intentionally omitted <==**
+
+**==> picture [179 x 135] intentionally omitted <==**
+
+**==> picture [280 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) GPT-4 and Llama-2-70b (b) GPT-4 and Llama-2-13b **----- End of picture text -----**
+
+Figure 4: **Embeddings of Incorrect Questions for GPT-4 and Surrogate Models** Plots of the embeddings of questions GPT-4 and two surrogate models (Llama-2-70b and Llama-2-13b) answer incorrectly on two representative datasets - TruthfulQA and College Chemistry. Questions only GPT-4 answers incorrectly are in blue, questions GPT-4 and the surrogate answer incorrectly are in black, and questions only the surrogate answers incorrectly are in green. There are more questions that both GPT-4 and Llama-2-70b answer incorrectly and more semantic similarity in their incorrect questions. This indicates that Llama-2-70b and GPT-4 struggle with semantically related concepts and that the 70b model may more closely represent GPT-4’s uncertainty than the 13b model.
+
+## 7 RELATED WORK
+
+**Confidence Estimation for LLMs.** Several studies explore confidence estimation for LLMs. Kadavath et al. (2022) show that Claude’s probabilities are calibrated on MC tasks, while Zhou et al. (2023) investigate the impact of uncertainty expressions on model accuracy. (Lin et al., 2022) finetune LLMs to improve confidence estimates (Appendix A.4). Our work focuses on confidence estimation for models that don’t provide log probabilities. Concurrent work (Xiong et al., 2023) studies LLM-generated confidences, but focuses on self-consistency based methods which are expensive in prompting GPT-4 multiple times, and add complexity by requiring post-processing steps. Our methods show gains over their best method and are less expensive, since probabilities from smaller models (Llama-2) are used to improve the confidences of larger models (GPT-4) (Appendix A.7).
+
+**Selective Classification and OOD Detection.** Our paper focuses on selective classification, which is a classical problem in machine learning (El-Yaniv & Wiener, 2010; Khani et al., 2016; Feng et al., 2019; Jones et al., 2021) and statistics (Chow, 1970; Hellman & Raviv, 1970). A related problem is out-of-distribution detection (Pimentel et al., 2014; Liang et al., 2018; Ovadia et al., 2019), where the goal is to detect examples very different from training (where the model may make mistakes). Prior work uses internals of the models—probability outputs (Hendrycks & Gimpel, 2017), model representations (Lee et al., 2018), or even updates the training procedure (Bartlett & Wegkamp, 2008; Mozannar & Sontag, 2020)—which state-of-the-art LLMs do not provide access to.
+
+**Calibration.** The general idea of confidence estimation is also studied in calibration (Murphy & Winkler, 1977; DeGroot & Fienberg, 1983; Naeini et al., 2014; Guo et al., 2017). While related, the focus is different—a model which outputs its accuracy on every example has 0 calibration error (ECE), but cannot _separate_ correct and incorrect examples (Kuleshov & Liang, 2015).
+
+**LLM Self-Evaluation.** LLMs have shown progress in improving generations through self-critiques (Madaan et al., 2023; Chang et al., 2023), or validating generations using tools (Gou et al., 2023). Better confidence estimation may allow models to produce more reliable critiques (Appendix A.15).
+
+## 8 CONCLUSION
+
+Our work aims to address the open challenge of eliciting good confidence estimates from state-ofthe-art LLMs such as GPT-4 and Claude, which don’t provide access to their internal probabilities. We show that using probabilities from weaker surrogate models provide effective confidence estimates for larger models, and find that interpolating these with linguistic confidences leads to even better confidence estimates.
+
+9
+
+## REFERENCES
+
+Anthropic. Introducing claude. _[URL removed] , 2023.
+
+Peter L Bartlett and Marten H Wegkamp. Classification with a reject option using a hinge loss. _Journal of Machine Learning Research (JMLR)_ , 9(0):1823–1840, 2008.
+
+Yupeng Chang, Xu Wang, Jindong Wang, Yuan Wu, Linyi Yang, Kaijie Zhu, Hao Chen, Xiaoyuan Yi, Cunxiang Wang, Yidong Wang, Wei Ye, Yue Zhang, Yi Chang, Philip S. Yu, Qiang Yang, and Xing Xie. A survey on evaluation of large language models, 2023.
+
+- Chao K Chow. On optimum recognition error and reject tradeoff. _IEEE Transactions on Information Theory_ , 16(1):41–46, 1970.
+
+- Luigi Pietro Cordella, Claudio De Stefano, Francesco Tortorella, and Mario Vento. A method for improving classification reliability of multilayer perceptrons. _IEEE Transactions on Neural Networks_ , 6(5):1140–1147, 1995.
+
+- Morris H. DeGroot and Stephen E. Fienberg. The comparison and evaluation of forecasters. _Journal of the Royal Statistical Society. Series D (The Statistician)_ , 32:12–22, 1983.
+
+- Ran El-Yaniv and Yair Wiener. On the foundations of noise-free selective classification. _Journal of Machine Learning Research (JMLR)_ , 11, 2010.
+
+- Jean Feng, Arjun Sondhi, Jessica Perry, and Noah Simon. Selective prediction-set models with coverage guarantees. _arXiv preprint arXiv:1906.05473_ , 2019.
+
+- Yonatan Geifman and Ran El-Yaniv. Selective classification for deep neural networks. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2017.
+
+- Zhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen, Yujiu Yang, Nan Duan, and Weizhu Chen. Critic: Large language models can self-correct with tool-interactive critiquing, 2023.
+
+- Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In _International Conference on Machine Learning (ICML)_ , pp. 1321–1330, 2017.
+
+Martin Hellman and Josef Raviv. Probability of error, equivocation, and the chernoff bound. _IEEE Transactions on Information Theory_ , 16(4):368–372, 1970.
+
+- Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In _International Conference on Learning Representations (ICLR)_ , 2017.
+
+- Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. In _International Conference on Learning Representations (ICLR)_ , 2021.
+
+- Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. Large language models cannot self-correct reasoning yet, 2023.
+
+- Di Jin, Eileen Pan, Nassim Oufattole, Wei-Hung Weng, Hanyi Fang, and Peter Szolovits. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. In _arXiv preprint arXiv:2009.13081_ , 2021.
+
+- Erik Jones, Shiori Sagawa, Pang Wei Koh, Ananya Kumar, and Percy Liang. Selective classification can magnify disparities across groups. In _International Conference on Learning Representations (ICLR)_ , 2021.
+
+- Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, Deep Ganguli, Danny Hernandez, Josh Jacobson, Jackson Kernion, Shauna Kravec, Liane Lovitt, Kamal Ndousse, Catherine Olsson, Sam Ringer, Dario Amodei, Tom Brown, Jack Clark, Nicholas Joseph, Ben Mann, Sam McCandlish, Chris Olah, and Jared Kaplan. Language models (mostly) know what they know, 2022.
+
+10
+
+- Amita Kamath, Robin Jia, and Percy Liang. Selective question answering under domain shift. In _Association for Computational Linguistics (ACL)_ , 2020.
+
+- Fereshte Khani, Martin Rinard, and Percy Liang. Unanimous prediction for 100% precision with application to learning semantic mappings. In _Association for Computational Linguistics (ACL)_ , 2016.
+
+- Volodymyr Kuleshov and Percy Liang. Calibrated structured prediction. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2015.
+
+- Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-of-distribution samples and adversarial attacks. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2018.
+
+- Percy Liang, Rishi Bommasani, Tony Lee, Dimitris Tsipras, Dilara Soylu, Michihiro Yasunaga, Yian Zhang, D. Narayanan, Yuhuai Wu, Ananya Kumar, Benjamin Newman, Binhang Yuan, Bobby Yan, Ce Zhang, Christian Cosgrove, Christopher D. Manning, Christopher Ré, Diana Acosta-Navas, Drew A. Hudson, E. Zelikman, Esin Durmus, Faisal Ladhak, Frieda Rong, Hongyu Ren, Huaxiu Yao, Jue Wang, Keshav Santhanam, Laurel J. Orr, Lucia Zheng, Mert Yuksekgonul, Mirac Suzgun, Nathan S. Kim, Neel Guha, Niladri S. Chatterji, O. Khattab, Peter Henderson, Qian Huang, Ryan Chi, Sang Michael Xie, Shibani Santurkar, S. Ganguli, Tatsunori Hashimoto, Thomas F. Icard, Tianyi Zhang, Vishrav Chaudhary, William Wang, Xuechen Li, Yifan Mai, Yuhui Zhang, and Yuta Koreeda. Holistic evaluation of language models. _arXiv preprint arXiv:2211.09110_ , 2022.
+
+- Shiyu Liang, Yixuan Li, and R. Srikant. Enhancing the reliability of out-of-distribution image detection in neural networks. In _International Conference on Learning Representations (ICLR)_ , 2018.
+
+- Stephanie Lin, Jacob Hilton, and Owain Evans. Truthfulqa: Measuring how models mimic human falsehoods. _arXiv preprint arXiv:2109.07958_ , 2021.
+
+- Stephanie Lin, Jacob Hilton, and Owain Evans. Teaching models to express their uncertainty in words. _Transactions on Machine Learning Research_ , 2022. ISSN 2835-8856. URL https: //openreview.net/forum?id=8s8K2UZGTZ.
+
+- Zhen Lin, Shubhendu Trivedi, and Jimeng Sun. Generating with confidence: Uncertainty quantification for black-box large language models, 2023.
+
+- Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. Self-refine: Iterative refinement with self-feedback. _Conference on Neural Information Processing Systems_ , 2023. URL [URL removed]
+
+- Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. In _Empirical Methods in Natural Language Processing (EMNLP)_ , 2018.
+
+- Hussein Mozannar and David Sontag. Consistent estimators for learning to defer to an expert. _arXiv preprint arXiv:2006.01862_ , 2020.
+
+- Allan H. Murphy and Robert L. Winkler. Reliability of subjective probability forecasts of precipitation and temperature. _Journal of the Royal Statistical Society. Series C (Applied Statistics)_ , 26: 41–47, 1977.
+
+- Mahdi Pakdaman Naeini, Gregory F. Cooper, and Milos Hauskrecht. Binary classifier calibration: Non-parametric approach. _arXiv_ , 2014.
+
+- OpenAI. Introducing ChatGPT. [URL removed] 2022.
+
+OpenAI. GPT-4 technical report. _arXiv preprint arXiv:2303.08774_ , 2023a.
+
+OpenAI. Text-davinci-003 api reference. _[URL removed] , 2023b.
+
+11
+
+- Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, D Sculley, Sebastian Nowozin, Joshua V. Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. In _Advances in Neural Information Processing Systems (NeurIPS)_ , 2019.
+
+- Marco AF Pimentel, David A Clifton, Lei Clifton, and Lionel Tarassenko. A review of novelty detection. _Signal Processing_ , 99:215–249, 2014.
+
+- Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. Commonsenseqa: A question answering challenge targeting commonsense knowledge. In _North American Association for Computational Linguistics (NAACL)_ , 2019.
+
+- Katherine Tian, Eric Mitchell, Allan Zhou, Archit Sharma, Rafael Rafailov, Huaxiu Yao, Chelsea Finn, and Christopher D. Manning. Just ask for calibration: Strategies for eliciting calibrated confidence scores from language models fine-tuned with human feedback, 2023.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models. _arXiv_ , 2023.
+
+- Yuxin Xiao, Paul Pu Liang, Umang Bhatt, Willie Neiswanger, Ruslan Salakhutdinov, and LouisPhilippe Morency. Uncertainty quantification with pre-trained language models: A large-scale empirical analysis, 2022.
+
+- Miao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li, Jie Fu, Junxian He, and Bryan Hooi. Can llms express their uncertainty? an empirical evaluation of confidence elicitation in llms. _arXiv preprint arXiv:2306.13063_ , 2023. URL [URL removed]
+
+- Kaitlyn Zhou, Dan Jurafsky, and Tatsunori Hashimoto. Navigating the grey area: Expressions of overconfidence and uncertainty in language models, 2023.
+
+12
+
+## A APPENDIX
+
+## A.1 DATASET DETAILS
+
+**TruthfulQA** is a multiple choice benchmark designed to check the truthfulness of large language models by testing them on questions across 38 different categories like health and politics where humans might provide incorrect responses due to implicit biases or incorrect beliefs. This task is challenging for language models because they may imbibe these same misconceptions from training corpora.
+
+**MedQA** is a challenging dataset testing medical knowledge with questions based on the United States Medical License Exams (USMLE) and other medical board exams.
+
+**CommonsenseQA** is a multiple choice benchmark testing commonsense reasoning, with challenging associations extracted from concept net to find many target concepts for a single source concept.
+
+**OpenbookQA** is a multiple choice dataset requiring multi-step reasoning over common and commonsense knowledge requiring deeper understanding of a diverse set of topics.
+
+**MMLU** is a massive benchmark covering 57 subjects from a diverse set of areas including STEM, humanties, and social sciences. This benchmark tests both more rudiementary and more advanced sets of knowledge for these topics covering great breadth and depth.
+
+## A.2 MODEL ACCURACIES
+
+Following are the accuracies for each of the models on the 12 datasets. Answers are elicited using the prompt format specified in A.3. As expected the GPT-4 model has the highest accuracies on all 12 datasets, followed by Claude v1.3. Llama-2-Chat and Base have comparable accuracy to GPT-3.5. Text-davinci-003 has the lowest accuracies.
+
+|Model TQA MedQA CSQA OBQA Law Ethics Physics|Model TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|
+|Text-davinci 0.472 0.504 0.712 0.772 0.532 0.590 0.579 Llama-2 0.524 0.564 0.664 0.808 0.572 0.590 0.583 Llama-2 Chat 0.480 0.512 0.684 0.728 0.528 0.600 0.528 GPT-3.5 0.572 0.536 0.676 0.776 0.504 0.670 0.523 Claude 0.596 0.640 0.736 0.832 0.604 0.760 0.638 GPT-4 **0.836** **0.736** **0.768** **0.940** **0.664** **0.760** **0.813**||
+||Econ Algebra Chem Security Policy Avg Text-davinci 0.412 0.300 0.440 0.690 0.850 0.571 Llama-2 0.386 0.240 0.460 0.750 0.910 0.588 Llama-2 0.333 0.310 0.420 0.670 0.850 0.554 GPT-3.5 0.404 0.320 0.460 0.730 0.800 0.581 Claude 0.579 0.330 0.500 0.760 0.880 0.655 GPT-4 **0.596** **0.480** **0.520** **0.800** **0.910** **0.735**|
+
+Table 4: **Model Accuracies** Accuracies of all 6 models on all 12 tasks. GPT-4 is the highest performing model for all tasks.
+
+## A.3 LINGUISTIC CONFIDENCE PROMPTS
+
+We study 24 different prompt formats to elicit linguistic confidences. These include prompts eliciting numerical confidences (score from 0-1, 0-10, 0-100), probabilities from 0-100%, linguistic categorization of confidences into varying numbers of confidence buckets (‘not sure’, ‘sure’, ‘very sure’), eliciting chain-of-thought explanations of confidence in addition to confidence scores, and varying the confidence instructions. We measure the AUC performance of each prompt across the 12 datasets for all models, and select the prompt which reduces the sum of drops in AUC from the best prompt for each individual model. This prompt which we use for all of our experiments is described below (we chose this because it led to highest accuracy and near 0 extraction errors):
+
+13
+
+Answer the following question to the best of your ability, and provide a score between 0 and 1 to indicate the confidence you have in your answer. Confidence scores closer to 0 indicate you have less confidence in your answer, while scores closer to 1 indicate you have more confidence in your answer. You must answer the question with one of the valid choices. You must provide only a single answer.
+
+Question: This is a question (A) first answer (B) second answer (C) third answer (D) fourth answer (E) fifth answer Answer: (D) Confidence: 0.4 Question: This is another question (A) first answer (B) second answer (C) third answer (D) fourth answer (E) fifth answer Answer: (A) Confidence: 0.7 Question: {question} Answer:
+
+Following are a few of the several alternative prompts we tried:
+
+Answer the following question to the best of your ability. Indicate your confidence in your answer by saying ‘I am very sure.’, ‘I am sure.’, ‘I am not sure.’. Please provide the letter of your answer choice and your confidence assessment in the following format: Answer: (your answer) Confidence assessment: (your confidence score)
+
+Question: {question}
+
+Answer the following question to the best of your ability, and provide a probability between 0 and 100%, indicating the likelihood that your answer is correct. Please provide the letter of your answer choice and your probability estimate in the following format:
+
+Answer: (your answer) Probability of correctness: (your probability estimate)
+
+Question: {question}
+
+## A.4 COMPARISONS WITH OTHER CERTAINTY SCORERS
+
+While Lin et al. (2023) also study uncertainty quantification for black-box models, their work primarily focuses on NLG tasks – quantifying uncertainty by sampling generations and computing similarity scores. We instead study confidence estimation for discriminative tasks like MC question answering. Xiao et al. (2022) study reducing calibration error through choice of LLM, uncertainty quantifier, and fine-tuning loss. We study much larger LLMs, and do not study confidence estimation in a fine-tuning setting. Their work also suggests using temperature scaling for confidence estimates. We experiment with Platt scaling, but do not report results since it improves ECE but does not change AUC or AUROC, since scaling confidences does not affect their relative ordering.
+
+14
+
+## A.5 LLAMA-2-70B CHAT RESULTS
+
+We also experiment with the chat version of the Llama-2-70B model, evaluating both the AUC and AUROC for its linguistic confidences and model probabilities. We find that the Base version of the model slightly outperforms the Chat version in both linguistic confidences and model probabilities.
+
+|Metric Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|Metric Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|
+|AUC Llama-2 Chat Linguistic 0.574 0.520 0.685 0.742 0.529 0.630 0.561 Llama-2 Chat Prob **0.696** **0.604** **0.840** **0.869** **0.674** **0.823** **0.721**||
+|AUROC Llama-2 Chat Linguistic 0.679 0.517 0.506 0.535 0.501 0.562 0.568 Llama-2 Chat Prob **0.750** **0.609** **0.764** **0.776** **0.710** **0.821** **0.721**||
+||Metric Confdence Type Econ Algebra Chem Security Policy Avg AUC Llama-2 Chat Linguistic 0.357 0.304 0.442 0.698 0.846 0.574 Llama-2 Chat Prob **0.438** **0.348** **0.632** **0.850** **0.963** **0.705** AUROC Llama-2 Chat Linguistic 0.553 0.485 0.546 0.560 0.479 0.541 Llama-2 Chat Prob **0.634** **0.495** **0.721** **0.811** **0.858** **0.722**|
+
+Table 5: **AUC and AUROC Metrics for Llama-2-70b-chat linguistic confidences** and model
+
+probabilities.
+
+## A.6 ECE RESULTS
+
+We compute the expected calibration error metric (ECE) by dynamically binning examples based on their confidence scores into 10 bins with approximately equal numbers of examples. For each bin, compute the calibration error, which is the absolute difference between the mean predicted probability and the observed accuracy. This quantifies how well the predicted probabilities match the true probability of the positive class within each bin. We then calculate the weighted average of the calibration errors across all bins, where the weights are the proportion of examples in each bin relative to the total number of examples. A lower ECE indicates better calibration. If the predicted probabilities are well-calibrated, the ECE should be close to zero. Following are the ECEs for the linguistic confidence scores of each model and the ECEs of model probabilities for models which provide them.
+
+## A.6.1 GPT-4 ALL CONFIDENCE METHODS
+
+Following are the ECEs for each confidence method for the GPT-4 model. For 11 out of 12 tasks we find that one of our proposed methods leads to the lowest ECE value.
+
+||TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|
+||Ling. Conf. 0.104 0.118 0.118 0.038 0.187 0.114 0.109|
+||SC Ling. Conf. 0.126 0.163 0.120 0.036 0.246 0.204 0.120 |
+||Surrogate_†_ 0.395 0.212 0.297 0.370 0.156 0.205 0.317 Tiebreak_†_ 0.114 0.134 0.126 **0.032** 0.194 0.114 0.118 Mixture_†_ 0.096 **0.075** **0.061** 0.159 **0.064** **0.111** **0.088** SC Mixture_†_ **0.085** 0.120 0.108 0.029 0.216 0.186 0.098 Confdence Type Econ Algebra Chem Security Policy Avg Ling. Conf. 0.270 0.420 0.313 0.118 **0.053** 0.164 SC Ling. Conf. 0.323 0.379 0.331 0.136 0.063 0.187 Surrogate_†_ 0.129 **0.162** **0.187** 0.210 0.264 0.242 Tiebreak_†_ 0.270 0.419 0.332 0.158 0.068 0.173 Mixture_†_ **0.126** 0.224 0.229 **0.108** 0.138 **0.123** SC Mixture_†_ 0.287 0.358 0.286 0.129 0.068 0.164|
+|||
+
+Table 6: **ECE Values All Confidence Methods for GPT-4**
+
+15
+
+## A.6.2 COMPARING LINGUISTIC CONFIDENCES AND MODEL PROBABILITIES
+
+|Confdence Type TQA Medqa CSQA OBQA Law Ethics Physics|Confdence Type TQA Medqa CSQA OBQA Law Ethics Physics|
+|---|---|
+|Text-davinci Linguistic **0.422** **0.425** **0.161** **0.127** **0.380** **0.300** **0.299** Text-davinci Prob 0.461 0.454 0.235 0.191 0.388 0.338 0.338||
+|Llama-2 Linguistic 0.365 0.248 0.201 **0.073** 0.224 0.259 0.267 Llama-2 Prob **0.099** **0.084** **0.176** 0.235 **0.115** **0.145** **0.094**||
+|Llama-2 Chat Linguistic 0.357 0.391 0.125 0.101 0.350 **0.194** 0.337 Llama-2 Chat Prob **0.284** **0.228** **0.124** **0.092** **0.264** 0.213 **0.210**||
+|GPT-3.5 Linguistic 0.350 0.380 0.192 0.091 0.388 0.176 0.363 Claude Linguistic 0.187 **0.086** **0.042** **0.033** **0.098** **0.052** 0.162 GPT-4 Linguistic **0.104** 0.118 0.118 0.038 0.187 0.114 **0.109**||
+||Confdence Type Econ Algebra Chem Security Policy Avg Text-davinci Linguistic **0.482** 0.625 0.475 **0.213** **0.038** **0.329** Text-davinci Prob 0.478 **0.576** **0.385** 0.263 0.112 0.352 Llama-2 Linguistic 0.453 0.561 0.435 **0.079** **0.093** 0.272 Llama-2 Prob **0.205** **0.091** **0.100** 0.172 0.264 **0.148** Llama-2 Chat Linguistic 0.505 0.480 0.480 **0.165** **0.055** 0.295 Llama-2 Chat Prob **0.403** **0.361** **0.272** 0.187 0.073 **0.226** GPT-3.5 Linguistic 0.515 0.560 0.432 0.173 **0.094** 0.309 Claude Linguistic **0.132** **0.319** **0.175** **0.058** 0.162 **0.126** GPT-4 Linguistic 0.270 0.420 0.313 0.118 0.053 0.164|
+
+Table 7: **ECE Values Linguistic Confidences vs Model Probabilities**
+
+A.7 SURROGATE CONFIDENCES VS SAMPLED LINGUISTIC CONFIDENCES
+
+**Surrogate confidences are cheaper and more reliable than sampling.** While black-box models do support sampling, sampling to get linguistic confidences is actually far more expensive than our proposed surrogate model method. With the best performing sampling method (SC Hybrid Ling. Conf., Table 3) eliciting linguistic confidences (Xiong et al., 2023) from GPT-4 requires sampling _five_ times from GPT-4, while our surrogate method requires sampling only _once_ from GPT-4 for an answer and _once_ from a much smaller and cheaper model like Llama-2-70B for a confidence — so our surrogate method significantly reduces computational cost and complexity over sampling.
+
+**Sampling for confidences only works well with additional post-processing.** The best performing sampling method (SC Hybrid Ling. Conf., Table 3) requires further updating and post-processing steps on top of the sampled confidence scores, adding additional complexity and reducing interpretability. It is also unclear if sampled confidences only perform well in conjunction with Xiong et al. (2023)’s update rule or if the performance can generalize to other forms of post-processing.
+
+To study how well sampling for confidences performs without post-processings, we sample confidences from GPT-4, following Xiong et al. (2023)’s procedure (sampling 5 times at _T_ = 0 _._ 7 and applying self-consistency), and applying no additional post-processing steps to the sampled confidences (SC Vanilla Ling. Conf., Table 3). We find that across 12 datasets, vanilla confidence sampling _significantly underperforms_ our surrogate model method for GPT-4 — resulting in an average AUC of only 77.3% (compared to 81.7% average AUC for our surrogate method, and 83% for our mixture method) and an average AUROC of only 59.3% (compared to 65.4% for our surrogate method and 69.6% for our best mixture method) (Table 3).
+
+**Surrogate confidences can be combined with sampled confidences for further gains.** Surrogate confidences are complementary to the sampled, post-processed confidences from Xiong et al. (2023). Interestingly, we are able to derive further improvements in confidence estimation by composing the surrogate probabilities and sampled, post-processed linguistic confidences (SC
+
+16
+
+mixture) — average AUC of 84.5% and average AUROC of 74%, with up to 6% improvement in AUC and 7% improvement in AUROC for individual tasks (Table 3).
+
+A.8 OPTIMIZING ALPHA FOR MIXTURE OF MODELS Following are the optimal values of _α_ for the mixture of models method (Algorithm 1) using the best surrogate model (Llama-2-70b Base).
+
+||GPT-3.5-Turbo|Claude-v1.3|GPT-4|(Mixture)|GPT-4|(SC Mixture)|
+|---|---|---|---|---|---|---|
+|_α_|0.6|0.6||0.4||0.3|
+
+## Table 8: **Optimal Alphas for Mixture of Models**
+
+We select a single _α_ for each model to be used across tasks, by sweeping over values of _α_ from 0 to 1 at increments of 0.1 and optimizing for the value which leads to the highest AUC per model, averaged over the 12 tasks. Results reported in Table 2 and Table 3 leverage these values of _α_ .
+
+## A.9 GOOD SURROGATES MAKE SIMILAR MISTAKES AS MAIN MODELS
+
+We generate embeddings for questions that GPT-4 answers incorrectly, questions that a strong surrogate, Llama-2-70B, answers incorrectly, and finally questions that a weaker surrogate, Llama-213B, answers incorrectly. We use OpenAI’s embedding API to generate these embeddings using the text-embedding-ada-002 model. Any model of reasonable quality could be used to produce these embeddings. We then use PCA to represent the embeddings in a 2D space for visualization. Finally, we plot the embeddings of questions answered incorrectly by these models from two representative datasets, TruthfulQA and MMLU - College Chemistry, and study the semantic similarity of mistakes made as approximated by the 2D spatial similarity of embeddings of their incorrectly answered questions (Figure 4). See Figure 4 for further details on how to interpret the plots. We find that there is greater semantic similarity in the mistakes made by GPT-4 and Llama-2-70B, than those made by GPT-4 and Llama-2-13B — suggesting that GPT-4 and Llama-2-70B may find similar questions to be difficult, allowing Llama-2-70B’s confidence scores to better transfer to GPT-4.
+
+## A.10 COMBINING MULTIPLE SURROGATES
+
+The key contribution of the mixture of models technique (Section 5) was demonstrating that confidence signals from different models are _composeable_ . We expect the optimal composition of surrogate models to vary depending on the task and the main model used to produce the answers.
+
+**Experiments.** To investigate the utility of combining multiple surrogate models, we compute confidence estimates for GPT-4 using a linear regression model to learn a weighted combination of confidence scores from multiple surrogates. The weights are _not_ constrained to be positive or to sum to one. We conduct these experiments on two representative datasets, MedQA and CommonsenseQA, and explore combinations of the following surrogate confidences: Llama-2-70B Base probabilities, Llama-2-70B Chat probabilities, GPT-4 linguistic confidences, GPT-4 hybrid self-consistency linguistic confidences (Section 5), Claude-v1.3 linguistic confidences, and GPT3.5-Turbo linguistic confidences. The regression model is trained on 500 examples, and we evaluate on 250 held-out examples for each dataset.
+
+**Results.** For MedQA, we find that composing surrogate confidences from multiple models (probabilities from Llama-2-70B Base and Chat, linguistic confidences from Claude-v1.3, and hybrid SC linguistic confidences from GPT-4) with GPT-4’s linguistic confidence scores leads to a 1.8% improvement in AUC and a 4% improvement in AUROC over just composing Llama 2 70B’s probabilities with GPT-4’s linguistic confidences (Table 3). However, for CommonsenseQA, we find that composing confidences from multiple surrogate models harms confidence estimation compared to just composing Llama-2-70B’s surrogate probabilities with GPT-4’s confidences (Table 3). This suggests that the benefits of composing multiple surrogate models are task dependent — there may be more value to combining multiple surrogates for tasks where the differences in confidence signals from models are substantive without encoding noise.
+
+## A.11 EXTENDED SURROGATE MODEL RESULTS
+
+We present detailed results on the effect of varying surrogate confidence models on the AUC and AUROC of the corresponding main models.
+
+17
+
+**==> picture [318 x 254] intentionally omitted <==**
+
+Figure 5: **AUCs For All Surrogate Models** We compute the AUC metric for each model considering surrogate confidences from both model probabilities and linguistic confidence scores from all other models. We find that all models benefit from using surrogate model probabilities over their own linguistic confidences.
+
+**==> picture [320 x 253] intentionally omitted <==**
+
+Figure 6: **AUROCs For All Surrogate Models** We also compute the AUROC metric for each model considering surrogate confidences from both model probabilities and linguistic confidence scores from all other models. In general, we find that using surrogate model probabilities instead of a model’s own linguistic confidences improves AUROC values.
+
+18
+
+## A.12 ANALYSIS
+
+We compute correlations and covariances between the answer correctness (set of binary scores indicating a model answered a question correctly or not) for every pair of main model and potential surrogate model. We find that in general if a surrogate model _S_ has a high degree of correlation in answer correctness with a main model _M_ , then _S_ is likely to be a good surrogate for _M_ . Similar trends also hold for covariances.
+
+**==> picture [322 x 250] intentionally omitted <==**
+
+Figure 7: **Correlations For All Main and Surrogate Models**
+
+**==> picture [322 x 250] intentionally omitted <==**
+
+Figure 8: **Covariances For All Main and Surrogate Models**
+
+19
+
+## A.13 CALIBRATION OF MIXTURE OF MODELS
+
+We also plot the distribution of confidence scores in equally spaced buckets from 0 to 1 and the corresponding accuracies of those buckets in reliability diagrams to study the change in calibration between linguistic confidences and our best mixture of models methods and find that our methods better calibrate the confidence scores.
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+**==> picture [128 x 96] intentionally omitted <==**
+
+Figure 9: **Calibration of GPT-4 with Linguistic Confidence and Mixture of Models** In the first row we see the calibration of GPT-4 on MedQA, Professional Law, and US Foreign Policy when using linguistic confidences. In the second row, we see GPT-4’s calibration using our mixture of models confidence method. A perfectly calibrated model would have all bars aligned with the red line. We can see that calibration improves demonstrably, when using mixture of models.
+
+A.14 CORRELATION BETWEEN LINGUISTIC CONFIDENCES AND MODEL PROBABILITIES
+
+|Dataset|Llama-2-70B Base|Llama-2-70B Chat|
+|---|---|---|
+|TQA|0.357|0.293|
+|MedQA|0.176|0.174|
+|CSQA|0.308|0.166|
+|OBQA|0.218|0.251|
+|Law|0.041|0.120|
+|Ethics|0.407|0.210|
+|Physics|0.310|0.227|
+|Econ|0.266|0.137|
+|Algebra|0.134|-0.222|
+|Chem|0.173|-0.063|
+|Security|0.477|0.325|
+|Policy|0.355|0.254|
+|**Avg**|**0.269**|0.156|
+
+Table 9: **Correlation Between Linguistic Confidences and Model Probabilities**
+
+We measure the Pearson correlation coefficient between linguistic confidences and model probabilities for models that provide access to internal probabilities and report the correlation coefficient for each model and task in Table 9. We do not report results for text-davinci-003 because for many tasks it outputs the same linguistic confidence score for each example, resulting in an undefined correlation coefficient. Both the Base and Chat Llama-2-70B models have a slight positive correlation in their linguistic confidences and model probabilities. We observe that the correlation between
+
+20
+
+linguistic confidences and model probabilities is stronger for Llama-2-70B Base, than for Llama2-70B Chat — average Pearson correlation coefficient of 0.269 vs 0.156. However, the correlation is not very strong for either model indicating that linguistic confidences do not fully capture the confidence signal of model probabilities.
+
+## A.15 CONFIDENCE ESTIMATION AND SELF-CRITIQUING
+
+Several studies have demonstrated that LLMs can generate feedback and self-improve (Madaan et al., 2023; Chang et al., 2023). However, other research has indicated that these models may not be proficient at self-evaluation, as they can sometimes hallucinate or generate incorrect feedback (Huang et al., 2023). The definition of self-evaluation is largely dependent on the task at hand. For instance, in creative, open-ended generation tasks such as story writing, there may not always be a clear standard of correctness, so the goal of self-evaluation or feedback generation may be to iteratively improve some other aspect of the generation. However, in cases where model generations are more factual — such as using an LLM to generate a math proof and allowing it to critique and iterate on each of its reasoning steps — calibrated confidence estimation becomes more important for self-evaluation. If a model could produce good quality confidence estimates for its self-critiques, these could guide the model in deciding when to trust and act on its own feedback, thereby enhancing its performance and reliability.
+
+## A.16 RANDOMIZED AUC RESULTS
+
+**AUC with Randomized or Deterministic Classifiers.** To plot the accuracy-coverage curve we compute _A_ ( _c_ ), the selective accuracy at coverage _c_ across different values of _c_ . _A_ ( _c_ ) is the accuracy if the model only makes a prediction on the _c_ proportion of data with highest confidence scores. for different values of _c_ . When making a prediction on _c_ proportion of data, for each example _x_ we use a binary classifier on the confidence score _C_ ( _x_ ) decide if we are making a prediction for _x_ (1 if making a prediction and 0 if abstaining from prediction). Such a classifier can either be deterministic or randomized.
+
+_Deterministic Classifiers._ A deterministic classifier _f_ returns identical outputs for identical inputs — resulting in consistent treatment of examples with the same confidence score (either predict on all or abstain on all). Using a deterministic classifier to select _c_ portion of examples to predict on means we find the highest confidence threshold _t_ such that _P_ ( _C_ ( _x_ ) _≥ t_ ) _≥ c_ — _t_ is the highest confidence threshold where the proportion of examples with confidence greater than or equal to _t_ is greater than or equal to the required coverage _c_ . With a deterministic classifier, we predict on _P_ ( _C_ ( _x_ ) _≥ t_ ) proportion of examples, which may be greater than the required coverage _c_ .
+
+**==> picture [235 x 11] intentionally omitted <==**
+
+_Randomized Classifiers._ A randomized classifier _h_ can return different outputs for the same input. Since models can output the same linguistic confidences for multiple examples, a randomized classifier can allow us to achieve exactly a coverage of _c_ by making predictions on some examples with a given confidence, and abstaining on other examples with the same confidence. To enable _h_ to break ties and make different predictions for examples with the same confidence score, we add a small amount of Gaussian noise to each confidence score _N_ (0 _, ϵ_ ) _, ϵ →_ 0 to enforce a confidence-based ordering of examples.
+
+**==> picture [257 x 11] intentionally omitted <==**
+
+_Deterministic vs Randomized AUC Example._ Suppose a model assigns half of the examples a confidence of 1 and gets them all right, and the other half of examples a confidence of 0.5 and gets 50% of them right. What is the selective accuracy at coverage 75%? A deterministic classifier would select 0.5 as _t_ and predict on all examples with _C_ ( _x_ ) _≥ t_ , which in this case is all of the examples (notably leading to a coverage of 100% instead of 75%). This would lead to an accuracy of 75%. A randomized classifier would predict on all examples of confidence 1, but to meet the 75% coverage threshold, it would predict on half of the examples which have confidence 0.5 —
+
+21
+
+|||Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|Confdence Type TQA MedQA CSQA OBQA Law Ethics Physics|
+|---|---|---|---|
+|AUC||Text-davinci Linguistic 0.523 0.504 0.718 0.775 0.532 0.590 0.579 Text-davinci Prob **0.607** **0.656** **0.861** **0.929** **0.714** **0.783** **0.697**||
+|||Llama 2 Linguistic 0.600 0.616 0.693 0.802 0.605 0.707 0.638 Llama 2 Prob **0.711** **0.735** **0.804** **0.923** **0.749** **0.834** **0.763**||
+|||GPT-3.5 Linguistic 0.620 0.536 0.693 0.776 0.508 0.674 0.526 Claude-v1.3 Linguistic 0.741 0.718 **0.807** 0.879 0.669 **0.894** 0.736 GPT-4 Linguistic **0.889** **0.841** 0.802 **0.960** **0.732** 0.869 **0.819**||
+|AUROC||Text-davinci Linguistic 0.525 0.500 0.503 0.509 0.500 0.500 0.500 Text-davinci Prob **0.718** **0.696** **0.806** **0.840** **0.715** **0.758** **0.637**||
+|||Llama 2 Linguistic 0.618 0.541 0.555 0.484 0.517 0.602 0.593 Llama 2 Prob **0.745** **0.722** **0.731** **0.777** **0.733** **0.868** **0.732**||
+|||GPT-3.5 Linguistic 0.535 0.500 0.526 0.518 0.508 0.509 0.504 Claude-v1.3 Linguistic **0.701** 0.586 **0.639** 0.647 **0.586** **0.760** **0.652** GPT-4 Linguistic 0.665 **0.716** 0.551 **0.656** 0.591 0.720 0.522||
+||||Confdence Type Econ Algebra Chem Security Policy Avg Text-davinci Linguistic 0.412 0.300 0.440 0.690 0.856 0.577 Text-davinci Prob **0.431** **0.338** **0.644** **0.891** **0.939** **0.707** Llama 2 Linguistic 0.415 0.189 0.474 0.817 0.930 0.624 Llama 2 Prob **0.498** **0.263** **0.647** **0.866** **0.981** **0.731** GPT-3.5 Linguistic 0.430 0.319 0.465 0.724 0.806 0.590 Claude-v1.3 Linguistic 0.640 0.333 0.653 0.812 0.934 0.735 GPT-4 Linguistic **0.643** **0.551** **0.683** **0.903** **0.965** **0.805** Text-davinci Linguistic 0.500 0.500 0.500 0.500 0.506 0.504 Text-davinci Prob **0.549** **0.532** **0.695** **0.858** **0.795** **0.717** Llama 2 Linguistic 0.533 0.424 0.520 0.613 0.576 0.548 Llama 2 Prob **0.622** **0.546** **0.732** **0.775** **0.871** **0.738** GPT-3.5 Linguistic 0.518 0.522 0.505 0.519 0.519 0.515 Claude-v1.3 Linguistic **0.573** 0.543 0.708 0.687 0.645 0.644 GPT-4 Linguistic 0.551 **0.599** **0.721** **0.750** **0.753** **0.650**|
+||AUC|||
+||AUROC|||
+
+Table 10: **AUC and AUROC - Linguistic Confidences vs Model Probabilities** We compare the AUC and AUROC values for linguistic confidences and model probabilities in weaker models (textdavinci-003 and Llama 2 70B), and find that model probabilities consistently outperform linguistic confidences. For closed source models (which don’t provide model probabilities), we see that Claude-v1.3 and GPT-4 provide the best linguistic confidences in both AUC and AUROC.
+
+selecting the top half after adding random noise. This would lead to an accuracy of approximately 83%.
+
+Our main results are presented computing AUC with a deterministic classifier, in accordance with several works in the selective classification space (El-Yaniv & Wiener, 2010; Liang et al., 2022). AUC computed with a randomized or deterministic classifier would be equivalent if confidence estimates for all examples were distinct. But since models can output the same linguistic confidences for multiple examples, and randomized AUC computation can improve the AUC in these cases, we also present results with a randomized classifier. Using a randomized classifier leads to slight improvements for both linguistic confidences and our mixture of models method (since it incorporates linguistic confidences), but does not change any of our qualitative results.
+
+22
+
+|||Text-davinci|GPT-3.5|Llama 2|Claude-v1.3|GPT-4|
+|---|---|---|---|---|---|---|
+||Ling. Conf.|0.577|0.590|0.624|0.735|0.805|
+|AUC|Surrogate_†_ Tiebreak_†_|0.707 **0.711**|0.719 0.719|**0.731** 0.715|0.763 0.764|0.821 0.830|
+||Mixture of Models_†_|**0.711**|**0.722**|**0.731**|**0.772**|**0.834**|
+||Ling. Conf.|0.504|0.514|0.548|0.637|0.646|
+|AUROC|Surrogate_†_ Tiebreak_†_|0.717 **0.718**|0.708 0.708|**0.738** 0.699|0.671 0.683|0.657 0.692|
+||Mixture of Models_†_|**0.718**|**0.709**|0.737|**0.687**|**0.699**|
+
+Table 11: **AUC and AUROC of Surrogate and Mixture of Model Methods.** We compare the performance of our proposed methods _[†]_ with the baseline linguistic confidence method (gray). For both AUC and AUROC, our proposed methods outperform linguistic confidences on all models. Mixture of models improves the AUC of GPT-4 by 3% and AUROC by 5%.
+
+||Method|TQA MedQA|CSQA OBQA|Law Ethics Physics|Law Ethics Physics|
+|---|---|---|---|---|---|
+||Ling. Conf.|0.889 0.841|0.802 0.960|0.732 0.869 0.819||
+||SC Ling. Conf.|0.903 **0.887**|0.841 0.978|0.729 **0.902** 0.846||
+|AUC|Surrogate_†_ Tiebreak_†_|0.866 0.844 0.902 0.871|0.849 0.965 0.833 0.967|0.762 0.849 **0.891** 0.768 0.889 0.861||
+||Mixture_†_|0.895 0.864|0.849 0.969|**0.780** 0.882 0.886||
+||SC Mixture_†_|**0.921** 0.873|**0.877** **0.979**|0.757 0.894 0.881||
+||Ling. Conf.|0.665 0.716|0.551 0.656|0.591 0.720 0.522||
+||SC Ling. Conf.|0.698 **0.767**|0.625 0.833|0.619 **0.817** 0.592||
+|AUROC|Surrogate_†_ Tiebreak_†_|0.543 0.666 0.671 0.750|0.656 0.683 0.611 0.716|0.619 0.617 0.648 0.628 0.740 0.589||
+||Mixture_†_|0.642 0.731|0.646 0.731|0.655 0.711 0.648||
+||SC Mixture_†_|**0.702** 0.747|**0.679** **0.838**|**0.655** 0.783 **0.663**||
+||Method|Econ Algebra Chem Security Policy|||**Avg**|
+||Ling. Conf.|0.643 0.551 0.683 0.903 0.965|||0.805|
+||SC Ling. Conf. 0.663 0.584 0.726 0.915 0.965||||0.828|
+|AUC Surrogate_†_ Tiebreak_†_||**0.667** 0.572 0.724 0.888 0.971 0.654 0.580 0.746 0.910 0.974|||0.821 0.830|
+||Mixture_†_|0.664 0.581 0.749 0.908 **0.976**|||0.834|
+||SC Mixture_†_ 0.662 **0.645** **0.763** **0.926** 0.973||||**0.846**|
+||Ling. Conf.|0.551 0.599 0.721 0.750 0.753|||0.650|
+||SC Ling. Conf. 0.622 0.682 0.818 0.798 0.755||||0.719|
+|AUROC Surrogate_†_ Tiebreak_†_||0.578 0.621 0.706 0.779 0.764 0.569 0.648 0.760 0.815 0.805|||0.657 0.692|
+||Mixture_†_|0.578 0.648 0.759 0.814 **0.822**|||0.699|
+||SC Mixture_†_ **0.595** **0.763** **0.819** **0.839** 0.810||||**0.741**|
+
+Table 12: **AUC and AUROC of All Confidence Methods for GPT-4.** Our proposed surrogate model method outperforms linguistic confidences on 9/12 datasets on AUC. Mixing surrogate probabilities and linguistic confidences outperforms vanilla linguistic confidences on AUC for all 12 datasets. The mixture of surrogate probabilities also outperforms hybrid self-consistency confidences, the best method in Xiong et al. (2023), on average (AUC 83.4% vs 82.8%. Mixing surrogate probabilities with self-consistency linguistic confidences leads to the best confidence estimates overall, outperforming all methods with an average 84.6% AUC and 74.1% AUROC, which is a gain of 4.1% and 9.1% respectively over vanilla linguistic confidences.
+
+23
+
diff --git a/open_review/iclr2024_8594.json b/open_review/iclr2024_8594.json
new file mode 100644
index 0000000000000000000000000000000000000000..c92b5ccf32a65ba611b48802d2abc2f6dd083833
--- /dev/null
+++ b/open_review/iclr2024_8594.json
@@ -0,0 +1,117 @@
+{
+ "paper_id": "iclr2024_8594",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Towards Foundational Models for Molecular Learning on Large-Scale Multi-Task Datasets",
+ "abstract": "Recently, pre-trained foundation models have enabled significant advancements in multiple fields. In molecular machine learning, however, where datasets are often hand-curated, and hence typically small, the lack of datasets with labeled features, and codebases to manage those datasets, has hindered the development of foundation models. In this work, we present seven novel datasets categorized by size into three distinct categories: ToyMix, LargeMix and UltraLarge. These datasets push the boundaries in both the scale and the diversity of supervised labels for molecular learning. They cover nearly 100 million molecules and over 3000 sparsely defined tasks, totaling more than 13 billion individual labels of both quantum and biological nature. In comparison, our datasets contain 300 times more data points than the widely used OGB-LSC PCQM4Mv2 dataset, and 13 times more than the quantum-only QM1B dataset. In addition, to support the development of foundational models based on our proposed datasets, we present the Graphium graph machine learning library which simplifies the process of building and training molecular machine learning models for multi-task and multi-level molecular datasets. Finally, we present a range of baseline results as a starting point of multi-task and multi-level training on these datasets. Empirically, we observe that performance on low-resource biological datasets show improvement by also training on large amounts of quantum data. This indicates that there may be potential in multi-task and multi-level training of a foundation model and fine-tuning it to resource-constrained downstream tasks. The Graphium library is publicly available on Github and the dataset links are available in Part 1 and Part 2.",
+ "rebuttal": "### Answering Additional questions\n###Q1. More illustrations\n\n\n>... they only use a small fraction of the data to train the ULTRALARGE models; can they discuss how would the results change if the entire dataset is used? ... Would the model overfit those tasks when trained with larger datasets and show degradation in performance for biological tasks?\n\n**Answer**\nThis is a great point that we have carefully thought about in the design of Graphium. Indeed, regarding the question of imbalance and skew, Graphium currently supports the parameter `epoch_sampling_fraction` for each dataset. This parameter allows to sub-sample only a fraction of a dataset at any given epoch and can be used to re-balance the amount of molecules seen for each task. Therefore, we believe we can tune this parameter to avoid degradation on biological tasks. \n\nFor example, selecting it to be `=0.05` would yield to about the same number of QM datapoints for both the UltraLarge and LargeMix datasets at each epoch, but would also yield to better generalization since it will take 20 epochs to see the entire dataset.\n\nIn the interests of robustness and confidence of results provided the core experiments were priorities, and some experiments were not conducted due to finite compute resources. However, we agree this is an interesting future direction to explore. \n\n### Q2. More illustrations\n\n\n>It's unclear if the paper shows that the model can generalize to unseen tasks in the downstream setting.\n\n**Answer**\n\nIndeed, generalizing unseen tasks from a large pre-trained model is an important direction. In this work, we focus on curating the dataset and supporting library required to train a foundational model. We believe future work can pre-train with our proposed dataset and investigate the effectiveness on downstream unseen tasks. \n\nHowever, the Graphium library does include an easy access to the TDC API for fine-tuning with a tutorial in the file graphium/notebooks/finetuning-on-tdc-admet-benchmark.ipynb. \n\n### Q3. More illustrations\n> Minor point: I am curious to see how the newer equivariant GNNs [3, 4] (specifically in the molecular modeling space) interact with having more data available to them.\n[3] E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials https://arxiv.org/pdf/2101.03164.pdf [4] Equivariant Graph Attention Networks for Molecular Property Prediction https://arxiv.org/pdf/2202.09891.pdf\n\n**Answer**\nThe Graphium library is meant for 2D GNNs, not 3D-GNNs or E-GNNs, so direct comparison cannot be made. Here, the QM dataset only comprises a single lowest-energy conformation, which is used to complement the information of the biological tasks. This is not suited for MD, which requires learning energies and forces outside of local-minima, and which requires the full 3D structure as input.\n\n### Clarifying the splits\n>my question about unclear empirical setting is that, we are not sure whether for each task, all the baselines employ the same setting, e.g. data split strategy or scaffold spit strategy\n\nThank you for following up on your question. Each of the datasets within LargeMix and ToyMix has its own train/val/test split, with the indices defined in a pickle file. When training in a multi-task setting, each dataset is split into train/val/test according to its own indices; then all the train are merged together, all the val together, and all the test together. This means that [...]\n\n### Manuscript Updated\nBased on the constructive feedbacks from the reviewers as well as recent experiments, we have revised the manuscript to reflect the following changes (changes marked by blue):\n\n* Added Scaling law experiment details in Appendix H including experimental setting, results discussion and hyperparameters for reproducibility.\n* Added details and screenshot of the documentation website for Graphium in Appendix E.2.\n* Additional visualization of 24 molecules from each dataset added in Appendix I. \n* Updated the [anonymized repo](https://anonymous.4open.science/r/graphium-5F12/RE [...]\n\n### Thank you for the feedback!\nWe thank you for your feedback, for highlighting the importance of supervised learning for activity cliffs, of the combined quantum/bio tasks, and for finding the Graphium library \"reliable and tidy\".\n\nBelow, we hope to answer your remaining concerns.\n\n### W1. Labels description\n> It's not clear what are exact labels collected for each sample and how they can be useful.\n\n**Answer**\n\nDescription of the labels are in `Appendix D DEEPER DIVE INTO THE LARGEMIX AND ULTRALARGE DATASETS`. For the PCBA_1328, it is impossible to provide a description of all 1328 labels, [...]\n\n### Thank you for the questions\n### Q1. Lack of biological task\n> ... It would be more comprehensive if it included more biological tasks, such as ADMET properties.\n\n**Answer**\n\nWe want to point out that our contributed datasets contain a total over 3000 tasks thus are highly diverse in nature. When examining the balance between biological tasks and quantum tasks, one must first consider the data availability. Note that ADMET properties are generally only found in very small amounts as it requires lab experiments. The well-known TDC benchmark[1] contains a number of ADMET properties however ea [...]\n\n### Thank you for the review\nWe are happy to see that the Reviewer found the datasets and library useful, and allow users to \"easily focus on innovating model architectures\". Below, we hope to answer the concerns and questions.\n\n\n### W1. Noise in PCBA1328\n>One minor weakness is that the potential noise in the bioassay data. For the PCBA1328 dataset of LargeMix, the authors curated the data from PubChem by collecting molecules and their properties with regard to different bioassays. Due to the inherent noise associated with the data generation process with bioassay, model training (especially m [...]\n\n### Thank you for the review\nWe would like to thank Reviewer jQ36 for their thorough review, and for highli\n[rebuttal truncated]",
+ "initial_scores": [
+ 3,
+ 6,
+ 8,
+ 6,
+ 8
+ ],
+ "score_mean": 6.2,
+ "score_variance": 4.2,
+ "score_spread": 5,
+ "score_min": 3,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This work introduces seven new datasets for molecular machine learning, covering nearly 100 million molecules and over 3000 tasks, and presents the Graphium library for building and training models, with initial results indicating potential benefits from multi-task and multi-level training. Reviewers generally appreciate introducing of such a dataset to the community.",
+ "forum_id": "Zc2aIcucwc",
+ "primary_area": "learning on graphs and other geometries & topologies",
+ "n_reviews": 5,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_Zdj5",
+ "review_id": "LjHoqbxCuk",
+ "scores": {
+ "rating": 3,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 3294,
+ "edit_detected": true,
+ "edit_delta_seconds": 441477,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_jQ36",
+ "review_id": "DdjcChUWWu",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2720,
+ "edit_detected": true,
+ "edit_delta_seconds": 503944,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_qFVJ",
+ "review_id": "urQMwpeHS3",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 4,
+ "confidence": 2
+ },
+ "review_text_chars": 1473,
+ "edit_detected": true,
+ "edit_delta_seconds": 761430,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_BQyU",
+ "review_id": "Hzy2uRPXHN",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4260,
+ "edit_detected": true,
+ "edit_delta_seconds": 1895650,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_43gK",
+ "review_id": "shRPd8uu46",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2546,
+ "edit_detected": true,
+ "edit_delta_seconds": 1012270,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8594.md b/open_review/iclr2024_8594.md
new file mode 100644
index 0000000000000000000000000000000000000000..0fa1552631a2e21fb38988129928b06ec50bf99f
--- /dev/null
+++ b/open_review/iclr2024_8594.md
@@ -0,0 +1,864 @@
+
+
+## TOWARDS FOUNDATIONAL MODELS FOR MOLECULAR LEARNING ON LARGE-SCALE MULTI-TASK DATASETS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Recently, pre-trained foundation models have enabled significant advancements in multiple fields. In molecular machine learning, however, where datasets are often hand-curated, and hence typically small, the lack of datasets with labeled features, and codebases to manage those datasets, has hindered the development of foundation models. In this work, we present seven novel datasets categorized by size into three distinct categories: ToyMix, LargeMix and UltraLarge. These datasets push the boundaries in both the scale and the diversity of supervised labels for molecular learning. They cover nearly 100 million molecules and over 3000 sparsely defined tasks, totaling more than 13 billion individual labels of both quantum and biological nature. In comparison, our datasets contain 300 times more data points than the widely used OGB-LSC PCQM4Mv2 dataset, and 13 times more than the quantum-only QM1B dataset. In addition, to support the development of foundational models based on our proposed datasets, we present the Graphium graph machine learning library which simplifies the process of building and training molecular machine learning models for multi-task and multi-level molecular datasets. Finally, we present a range of baseline results as a starting point of multi-task and multi-level training on these datasets. Empirically, we observe that performance on low-resource biological datasets shows improvement by also training on large amounts of quantum data. This indicates that there may be potential in multi-task and multi-level training of a foundation model and fine-tuning it to resource-constrained downstream tasks. The Graphium library is publicly available on Github and the dataset links are available in Part 1 and Part 2.
+
+## 1 INTRODUCTION
+
+Graph and geometric deep learning models have been a key component in the recent successes of machine learning in drug discovery (Gasteiger et al.; Masters et al., 2023; Rampášek et al., 2022; Ying et al., 2021). These methods have demonstrated considerable performance in molecular representation learning (in the 2D (Rampášek et al., 2022), 3D (Gasteiger et al.; 2021), and 4D (Wu et al., 2022) cases), activity and property prediction (Huang et al., 2021), force field development (Batatia et al., 2022), molecular generation (Bilodeau et al., 2022), and the modeling of atomistic interactions (Corso et al., 2022). Like other deep learning methods, they require significant training data for high modeling accuracy. However, in the current therapeutics literature, most training datasets have limited samples (Huang et al., 2021). Tantalizingly, recent progress in self-supervised learning and
+
+1
+
+foundation models in natural language processing (NLP) (Brown et al., 2020a; Liu et al., 2023b) and computer vision (CV) (Dosovitskiy et al.) has drastically improved data efficiency in deep learning. In fact, by investing upfront in pre-training large models with lots of data, a one-time cost, it is proven that the learned inductive bias lowers the data requirements for downstream tasks.
+
+Following these successes, many studies have explored the pre-training of large molecular graph neural networks and their benefits in low-data molecular modeling (Lin et al., 2022; Méndez-Lucio et al., 2022; Zhou et al., 2023). However, due to the scarcity of large and labeled molecular datasets, these studies could only leverage self-supervised techniques such as contrastive learning, autoencoders, or denoising tasks (Hu et al., 2020a; Xia et al., 2023). Low-data modeling efforts by fine-tuning from these models have, as yet, yielded just a fraction of the advancement achieved by self-supervised models in NLP and CV (Sun et al., 2022). This is partially explained by the underspecification of molecules, and their conformers, as graphs, as their behavior is environmentdependent and mainly governed by quantum physics. For example, it is well known that structurally similar molecules may have vastly different bioactivity, known as _activity cliffs_ , and this limits graph modeling based only on structural information (van Tilborg et al., 2022). We argue that building effective foundation models for molecular modeling requires supervised training with _both_ quantum mechanical (QM) descriptions _and_ biological environment-dependent data.
+
+## 1.1 CONTRIBUTIONS
+
+This study advances molecular research in three ways. First, we introduce a new family of multi-task datasets, orders of magnitude larger than the current state-of-the-art. Second, we describe a graph machine learning library called Graphium to facilitate efficient training on these extensive datasets. Third, a range of baseline models are implemented, supporting the value of training on a diverse collection of tasks.
+
+**Datasets** We introduce three extensive and meticulously curated multi-label datasets that cover nearly 100 million molecules and over 3000 sparsely defined tasks, totaling more than 13 billion individual labels, currently the largest of their kind. These datasets have been designed for the supervised training of foundation models by combining labels representing quantum and biological properties acquired through both simulation and wet lab experimentation. The labels are also multi-level, encompassing both node-level and graph-level tasks. The diversity of labels facilitates efficient transfer learning and enables the construction of foundational models by improving their generalization ability for a wide range of downstream molecular modeling tasks.
+
+To create these comprehensive datasets, we carefully curated and enhanced existing data with additional information. As a result, each molecule in our collection is accompanied by descriptions of its quantum mechanical (QM) properties and/or biological activities. The QM properties cover energetic, electronic, and geometric aspects, computed using various advanced methods, including density functional theory (DFT) methods like B3LYP (Nakata & Shimazaki, 2017), as well as semi-empirical methods like PM6 (Nakata et al., 2020). On the biological activity side, our datasets include molecular signatures obtained from dose-response bioassays, gene expression profiling, and toxicological profiling, as depicted in Figure 1. The joint modeling of quantum and biological effects promotes the ability to describe complex environment-dependent properties of molecules that would be infeasible to extract from what are typically limited experimental datasets.
+
+**The Graphium Library** We have developed a comprehensive graph machine learning library called Graphium to facilitate efficient training on these extensive multi-task datasets. This novel library simplifies the process of building and training molecular graph foundation models by incorporating feature ensembles and complex feature interactions. By treating features (both positional and structural) and representations as fundamental building blocks and implementing state-of-the-art GNN layers, Graphium overcomes the challenges posed by existing frameworks that were primarily designed for sequential samples with limited interactions among node, edge, and graph features. Additionally, by providing features such as dataset combination, missing data handling, and joint training, Graphium handles the critical and otherwise complex engineering of training models on large dataset ensembles in a straightforward and highly customizable way.
+
+**Baseline Results** We train a range of models in both single-dataset and multi-dataset scenarios for the dataset mixes presented. These provide solid baselines that can help guide future users of these datasets, but also give some indication of the value of training in this multi-dataset paradigm.
+
+2
+
+**==> picture [397 x 86] intentionally omitted <==**
+
+**----- Start of picture text -----**
+QM9 Tox21 ZINC12k PCQM4M_G25_N4 PCBA_1328 L1000_VCAP PM6_83M Floa�ng point Missing data Posi�ve class Neutral class 12 G-labels 978 G-labels Nega�ve class 3 G-labels L1000_MCF7 G-labels 19 G-labels TOYMIX 1,328 G-labels Graph-level labels N-labels Node-level labels 25 G-labels 4 N-labels LARGEMIX 978 G-labels 62 G-labels, 7 N-labels ULTRALARGE 8k mols 12k mols 15k mols 134k mols 1.56M mols 3.81M mols 83M mols 12k mols **----- End of picture text -----**
+
+Figure 1: Visual summary of the proposed collections of molecular datasets. The “mixes” are meant to be predicted simultaneously in a multi-task fashion. They include quantum, chemical, and biological properties, categorical and continuous data points, graph-level and node-level tasks.
+
+Specifically, the results on these models show that training of low-resource tasks can be significantly improved by training in combination with larger datasets.
+
+In summary, our study introduces the largest 2D molecular datasets to date, specifically designed to train foundation models that can effectively comprehend molecules’ quantum properties and biological adaptability and therefore be fine-tuned to a wide range of downstream tasks. In addition, we have developed the Graphium library to streamline the training process of these models and show a range of baseline results that highlight the effectiveness of both the datasets and library presented.
+
+## 1.2 RELATED WORK
+
+**Molecular Datasets** Several molecular datasets are available for node- and graph-level supervised learning tasks. A few notable examples are MoleculeNet (Wu et al., 2018), which is a collection of smaller datasets; QM9, which consists of quantum properties of 134k molecular conformers (Ramakrishnan et al., 2014; Wu et al., 2018); ZINC comprising the difference between the partition coefficient (clogP) and the synthetic accessibility score (SAS) of 12k molecules (Dwivedi et al., 2020); PCQM4M(V2) including the HOMO-LUMO gap (the lowest excitation energy of a molecule) of _∼_ 3 _._ 6M graphs (Hu et al., 2021b). Furthermore, Open Graph Benchmark’s (OGB) (Hu et al., 2020b) large molecular datasets are OGBG-MOLHIV ( _∼_ 40k) and OGBG-MOLPCBA ( _∼_ 437k). And PCQM4M, the largest dataset, is still inadequate for large-scale supervised molecular pre-training, especially since it only contains a single property per molecule.
+
+Several examples of large-scale datasets for self-supervised training exist, notably the 1.2 million molecule GUACAMOL(Brown et al., 2019) dataset, and the _∼_ 880 million molecule ZINC20 dataset (Irwin et al., 2020), and while these provide a valuable training platform they lack experimental labels. Examples of curated self-supervised datasets of 72 million molecules are used in Winter et al. (2019), however these datasets typically use computable quantum or chemical properties rather than environment-dependent labels. Some work in this direction, as proposed by Mayr et al. (2018), shows supervised datasets can be extracted from the large CHEMBL dataset, and in Méndez-Lucio et al. (2022) a dataset of some 0.5 million molecules with over 1000 labels is produced. Recent work on accelerating DFT calculations in Mathiasen et al. (2023) offers a tantalizing avenue to increasing the size of available 3D quantum datasets with 1 billion data points, albeit quantum-only. Finally, the GDB17 dataset (Ruddigkeit et al. (2012)) does enumerate some 166 billion chemically possible molecules, but does not provide labels or features associated with them.
+
+However, none of these datasets are both sufficiently large, and provided with enough high quality experimental labels, to reflect the indirect properties relevant to developing a foundation model for drug discovery.
+
+As such, our dataset collection departs from previous ones as it encompasses multiple graph-level and node-level tasks, in addition to complex environment-dependent properties.
+
+**Pre-trained Chemical Foundation Models** Recent works explored pre-training for molecular property prediction via self-supervised learning techniques such as denoising (Zaidi et al., 2022); auto-encoders (Honda et al., 2019) and contrastive learning (Suresh et al., 2021). For a comprehensive
+
+3
+
+overview of self-supervised approaches to pre-training on molecular graphs, see Xia et al. (2023). As already discussed in Section 1, self-supervised pre-training does not take into account the quantum and biochemical characteristics of the molecules, necessitating pre-training in a supervised fashion. There have been some efforts at few-shot learning (Stanley et al., 2021; Schimunek et al., 2023), but the applicability of such methods is still limited both by a proper molecular featurization and a proper task featurization, the former of which we aim to tackle in our current work.
+
+**Graph Learning Libraries** In recent years, many libraries have emerged to speed up the development of graph-learning models. PyTorch Geometric (PyG) (Fey & Lenssen, 2019) is built on PyTorch and provides essential functions for graph machine learning, including a custom data format for fast processing and loading of graph data, as well as various model implementations. DGL (Wang et al., 2019) is a general-purpose graph learning library that works with PyTorch, TensorFlow, or Jax and supports various model implementations and a custom data loading format. Jraph (Godwin* et al., 2020) for Jax, tf_geometric (Hu et al., 2021a) for TensorFlow, StellarGraph (Data61, 2018) built on Keras, GraphNets (Battaglia et al., 2018) for TensorFlow and Sonnet, and CogDL (Cen et al., 2023) are other libraries that provide building blocks for graph learning operations. In addition, GraphGym (You et al., 2020) is an experimental platform for graph learning experiments and model design, based on PyG. Although these libraries provide the fundamental components for creating and training graph learning models, extra engineering work is essential to construct scalable training and inference pipelines. In addition, there are specialized libraries that cater to drug discovery, including TorchDrug (Zhu et al., 2022) and DeepChem (Ramsundar et al., 2019). At the same time, GraphGPS (Rampášek et al., 2022) is dedicated to experiment and model design for graph transformers, and DIG (Liu et al., 2021) offers a toolkit for experimental design and model evaluation.
+
+However, training and inference across multiple tasks and levels are yet to be explored in the context of molecular learning. Furthermore, existing libraries fail to tackle the difficulties of pre-training large-scale models, such as loading and managing large amounts of graph data efficiently. Thus, our datasets are accompanied by the Graphium library to facilitate the use of state-of-the-art GNNs in a large-scale multi-task setting. Graphium enables researchers to effortlessly apply GNN models to large-scale molecular datasets while paving the way towards foundational GNNs for chemistry.
+
+## 2 PROPOSED DATASETS
+
+Instead of proposing a single task dataset, we suggest a collection or “mix” of datasets enabling multitask learning across relevant chemical tasks helpful in learning quantum chemistry and biochemistry and building foundation models. The datasets are visualised in Figure 1, complemented with statistics in Table 1. See Appendix B.2 and the Reproducibility section for details on datasets’ licenses and availability, and see Appendix D for a deeper dive into the datasets.
+
+Firstly, we propose a smaller TOYMIX dataset to enable fast iterations of the architecture while also providing valuable insight. Secondly, we propose the LARGEMIX, a mix of well-curated datasets with data for millions of chemical compounds over thousands of biological or quantum labels. Finally, we propose the ultra-large PM6_83M dataset, which pushes the limit of dataset scale with over 12 billion labels defined for 83 million molecules. In the following section, the three dataset categories are described in detail.
+
+Table 1: Dataset statistics. G. / N. denote graph-level / node-level tasks, respectively, and C., R., and RC. denote _classification_ , _regression_ and _ranked classification_ respectively. See Table 5 for detailed statistics.
+
+||**Dataset**|**Type**|**Task**|**# mol.**|**# G. labels**|**# G. data** **points**|**# N. labels**|**# N. data** **points**|
+|---|---|---|---|---|---|---|---|---|
+||QM9|Quantum|R.|134k|19|2.5M|-|-|
+|TOYMIX|ZINC12K|Computed|R.|12k|3|36k|-|-|
+||TOX21|Bio-assays|C.|8k|12|75k|-|-|
+||PCQM4M_G25_N4|Quantum|R.|3.8M|25|93M|4|197.7M|
+|LARGEMIX|PCBA_1328 L1000_VCAP|Bio-assays Transcriptomics|C. RC.|1.6M 15k|1,328 978|224.4M 15M|- -|- -|
+||L1000_MCF7|Transcriptomics|RC.|12k|978|11M|-|-|
+|ULTRALARGE|PM6_83M|Quantum|R.|83M|62|4,003M|7|8,509.2M|
+
+4
+
+## 2.1 **TOYMIX (QM9 + TOX21 + ZINC12K)**
+
+The TOYMIX dataset combines the QM9, TOX21, and ZINC12K datasets. These datasets are well-known in the literature and used as toy datasets, or very simple datasets, in various contexts to make it easy to iterate quickly on models. By regrouping toy datasets from quantum ML, drug discovery, and GNN expressivity, we hope that the learned model will be representative of the model performance we can expect on the larger datasets. As can be seen in Figure 1, the TOYMIX collection contains 34 labels per molecule across the three datasets, containing a mix of floating point properties and class labels.
+
+**Train/Validation/Test Splits** for all the datasets in TOYMIX are split randomly with a ratio of 0.8/0.1/0.1. Random splitting, rather than the more complex schemes we discuss below, is used since it is the simplest and fits the idea of having a toy dataset well.
+
+**QM9** is a well-known dataset in the field of 3D GNNs (Gasteiger et al., 2021; Gasteiger et al.). It consists of 19 graph-level quantum properties associated to an energy-minimized 3D conformation of the molecules (Ramakrishnan et al., 2014). It is considered a simple dataset since all the molecules have at most 9 heavy atoms. We chose QM9 in our TOYMIX since it is very similar to the larger proposed quantum datasets, PCQM4M_multitask and PM6_83M, but with smaller molecules.
+
+**Tox21** is a well-known dataset for researchers in machine learning for drug discovery (Huang et al., 2021; Tice et al., 2013). It consists of a multi-label classification task with 12 labels, with most labels missing and a strong imbalance towards the negative class. We chose TOX21 in our TOYMIX since it is very similar to the larger proposed bioassay dataset, PCBA_1328_1564K both in terms of sparsity and imbalance and to the L1000 datasets in terms of imbalance.
+
+**ZINC12k** is a commonly used dataset in the GNN expressivity literature, especially for evaluating positional encodings, graph Transformers, and message passing for complexes (Beaini et al., 2021; Dwivedi et al., 2020; Rampášek et al., 2022; Bodnar et al., 2021). We include it in our TOYMIX as substructure understanding and positional encodings are important for generalization, especially in the case of graph Transformers where structural biases are missing. Hence, we hope that performance on this task will correlate well with performance when scaling graph Transformers.
+
+## 2.2 **LARGEMIX (PCQM4M + PCBA1328 + L1000)**
+
+In this section, we present the LARGEMIX dataset, comprised of four different datasets with tasks taken from quantum chemistry (PCQM4M), bio-assays (PCBA) and transcriptomics.
+
+**Train/validation/test/test_seen Splits** For the PCQM4M_G25_N4, we create a 0.92/0.04/0.04 split. Then, for all the other datasets in LARGEMIX, we first create a "test_seen" split by taking the set of molecules from L1000 and PCBA1328 that are also present in the training set of PCQM4M_G25_N4, such that we can evaluate whether having the quantum properties of a molecule helps generalize for biological properties. For the remaining parts, we split randomly with a ratio of 0.92/0.04/0.04.
+
+**L1000 VCAP and MCF7** The LINCS L1000 is a database generated using high-throughput transcriptomics. More than 30,000 perturbations on a set of 978 landmark genes (Subramanian et al., 2017) from multiple cell lines were screened. VCAP and MCF7 are, respectively, prostate cancer and human breast cancer cell lines. In L1000, most of the perturbagens are chemical, meaning that small drug-like molecules are added to the cell lines to observe how the gene expressions change. This allows the generation of biological signatures of the molecules, which are known to correlate with drug activity and side effects (Wang et al., 2016). To process the data into our two datasets comprising the VCAP and MCF7 cell lines, we used their "level 5" data composed of the cleanup data converted to z-scores (Subramanian et al., 2017), and applied a filter to keep only chemical perturbagens. However, we were left with multiple data points per molecule since some variables could change (e.g., incubation time) and generate a new measure. Given our objective of generating a single signature per molecule, we decided to take the measurements with the strongest global activity such that the variance over the 978 genes is maximal. Then, since these signatures are generally noisy, we binned them into five classes corresponding to z-scores based on the thresholds _±_ 2.
+
+5
+
+The cell lines VCAP and MCF7 were selected since they have a higher number of unique molecule perturbagens than other cell lines. They also have a relatively low data imbalance, with _∼_ 92% falling in the "neutral class" (where the z-score is between -2 and 2).
+
+**PCBA1328** This dataset is very similar to the OGBG-PCBA dataset (Hu et al., 2020b), but instead of being limited to 128 assays and 437k molecules, it comprises 1,328 assays and 1.56M molecules. This dataset is very interesting for pre-training molecular models since it contains information about a molecule’s behavior in various settings relevant to biochemists, with evidence that it improves binding predictions (Laufkötter et al., 2019). Analogous to the gene expression, we obtain a bioassay-expression of each molecule. To gather the data, we have looped over the PubChem index of bioassays (Kim et al., 2016) and collected every dataset such that it contains more than 6,000 molecules annotated with either “Active” or “Inactive” and at least 10 of each. Then, we converted all the molecular IDs to canonical SMILES and used that to merge all of the bioassays into one dataset.
+
+**PCQM4M_G25_N4** This dataset comes from the same data source as the OGBG-PCQM4M dataset, famously known for being part of the OGB large-scale challenge (Hu et al., 2021b) and being one of the only graph datasets where pure Transformers have proven successful (Luo et al., 2022; Ying et al., 2021). The data source is the PubChemQC project (Nakata & Shimazaki, 2017) that computed DFT properties on the energy-minimized conformation of 3.8M small molecules from PubChem. In contrast to the OGB challenge, we aim to provide enough data for pre-training graph ML models, so we do not limit ourselves to the HOMO-LUMO gap prediction (Hu et al., 2021b). Instead, we gather properties directly given by the DFT calculations (e.g., energies) and compute other 3D descriptors from the conformation (e.g., inertia, the plane of best fit). We also gather node-level properties, in this case the Mulliken and Lowdin charges at each atom. Furthermore, about half of the molecules have time-dependent DFT calculations to help inform about the molecule’s excited state. Looking forward, we plan on adding edge-level tasks to enable the prediction of bond properties, such as their lengths and the gradient of the charges.
+
+## 2.3 ULTRALARGE DATASET
+
+**PM6_83M** This dataset is similar to PCQM4M and comes from the same PubChemQC project. However, it uses the PM6 semi-empirical computation of the quantum properties, which is orders of magnitude faster than DFT computation at the expense of lower accuracy (Nakata & Shimazaki, 2017; Nakata et al., 2020).
+
+This dataset covers 83M unique molecules, 62 graph-level tasks, and 7 node-level tasks. To our knowledge, this is the largest dataset available for training 2D-GNNs regarding the number of unique molecules. The various tasks come from four different molecular states, namely “S0” for the ground state, “T0” for the lowest energy triplet excited state, “cation” for the positively charged state, and “anion” for the negatively charged state. There are 221M PM6 computations (Nakata et al., 2020).
+
+## 3 THE GR A P H I U M LIBRARY
+
+Drug discovery is a field with rich, multi-faceted datasets. Data is often inherently multi-tasked, containing label information at various levels, from nodes and edges to pairs of nodes and entire graphs. Hence, training models on such complex datasets requires a strategy for jointly learning on multiple task levels, presenting a unique challenge. To leverage the rich information contained in these dataset mixes and to benefit from their scale, dedicated software is necessary to facilitate efficient training in a multi-task fashion. To this end, we introduce the Graphium library, designed explicitly for large-scale multi-task and multi-level ML models within the molecular domain.
+
+Key features of the Graphium library are summarised here, with further details to be found in Appendix E, with the relevant sections indicated in the text. The entire training procedure is defined in a modular configuration file, for example this allows users to swap out architecture, datasets or metrics for quick experimentation. The core novel feature of the Graphium library is the multi-level multi-task learning that facilitates training a model over multiple datasets with disparate and sparse labels through modular dataloading, task head, and loss functions. More details can be found in Appendix E.1. The flexible and modular modeling is detailed in Appendix E.2. Positional encoding methods, which provide node level information about location within the subgraph, are integral to many advanced molecular models. Key methods, including random walk and laplacian eigenvectors,
+
+6
+
+are provided in Graphium, this is detailed in Appendix E.3. Label normalisation (Appendix E.4), ranked classification loss (Appendix E.5) and the handling of missing data (Appendix E.6) are important details of the library that facilitate the combination of multiple sources of data across a range of tasks and the inevitable sparsity in the dataset. To make training large models resource efficient much attention is paid to the possibility of tuning model parameters on small models and applying these to larger models. One such approach called _µ_ P introduced in Yang et al. (2022) is included in Graphium to reduce the cost of hyper-parameter tuning. More details are given in Appendix E.7. The library supports CPU, GPU and IPU [§E.8] hardware to accelerate training. Further library optimisations are detailed in Appendix E.9.
+
+## 4 EXPERIMENTS ON BASELINE MODELS
+
+To demonstrate the capabilities of the Graphium library in a multi-task setting with thousands of labels, a set of standard baselines were run with simple hyperparameter sweeps using 3 popular GNNs, namely GCN (Kipf & Welling, 2017), GIN (Xu et al., 2019), and GINE (Hu et al., 2020a). A basic hyper-parameter sweep was conducted for each model and multiple random seeds used for initialisation to provide a performance baseline for future experiments to be evaluated against. In Appendix H, we report scaling law experiments on our proposed datasets and observed significantly improved results as models include more parameters.
+
+In addition to the node features (and edge features in the case of GINE) provided with the datasets, we use (the first 8) eigenvalues and eigenvectors of the graph Laplacian as node-level PEs. Combining eigenvalues and eigenvectors and embedding them using an MLP offers a PE informed by the graph’s spectral properties (Kreuzer et al., 2021). We further use random walk return probabilities (i.e., the probability of a random walk starting at a specific node and returning to the said node after _k ∈_ N steps), again, in combination with an MLP encoder (Dwivedi et al., 2021). This can indicate the presence of cycles within molecules, which can be informative in the context of some molecular tasks, e.g., the regression of the solubility (logP) score on the ZINC dataset (Dwivedi et al., 2020). We finally compare the results from the multi-task model to a single-task model. Details of hardware and computational resources can be found in Appendix G.
+
+## 4.1 TOYMIX
+
+**Experimental setting.** For all baseline models, the GNN module uses 4 GNN layers with a hidden size chosen to approximately balance the number of trainable parameters across models (reported in Tab. 2). For TOYMIX, the models have approximately 150k parameters. We train a model on each dataset individually and on the combined versions, with the results reported respectively in columns _Single Dataset_ and _Multi Dataset_ . For these cases we fix both the learning rate and total number of epochs (300) used. Importantly this means that the total number of training steps will be larger for the combined dataset since there are more unique molecules.
+
+**Losses and metrics computation.** The multi-task loss is built by combining the loss function for each task. For the regression tasks, the models are trained with Mean Average Error (MAE) and evaluated using the Pearson correlation coefficient and the coefficient of determination _R_[2] . For the classification tasks, the loss is the binary cross entropy (BCE) and the metrics are area under the receiver operating characteristic curve (AUROC) and the average precision (AP) for the precision-recall curve. The MAE and BCE are computed on the flattened tensor, but the other metrics are computed _per label_ and then averaged. All "NaNs" are filtered out from the computation. Also, we calculate the Mean Average Error (MAE) on regression tasks using the _normalized_ outputs and labels so the results are not skewed by the magnitude of the labels themselves. Normalisation constants can be found with the dataset and future users should use these values to ensure results can be compared.
+
+**Comparability to results in previous works.** It should be noted that for the TOYMIX dataset, while the component datasets are well studied, the results present here are not directly comparable to prior work. Here QM9 has an extended list of 19 labels, that are normalized and aggregated, compared to 12 non-normalized labels typically reported in prior work. ZINC12K also uses 3 labels compared to the standard single label. Finally TOX21 uses a simple random split data split compared to the _scaffold split_ used in prior literature.
+
+7
+
+Table 2: Results for GNN baselines on the proposed TOYMIX dataset. We report performance metrics on the test set (mean _±_ std over 3 seeds) per dataset contained in TOYMIX and for the dataset overall. The best score for each metric per dataset _across all three models_ is in marked **green** , with the best result _per model_ marked in **orange** .
+
+|||Single Dataset|Single Dataset||Multi Dataset|Multi Dataset||
+|---|---|---|---|---|---|---|---|
+|Dataset|Model|MAE_↓_|Pearson_↑_|_R_2 _↑_|MAE_↓_|Pearson_↑_|_R_2 _↑_|
+||GCN|**.102** _±_**.0003**|**.958** _±_**.0007**|**.920** _±_**.002**|.119 _±_.01|.955 _±_.001|.915 _±_.001|
+|QM9|GIN|**.0976** _±_**.0006 **|**.959** _±._0002|**.922** _±_**.0004**|.117 _±_.01|.950 _±_.002|.908 _±_.003|
+||GINE|**.0959** _±_**.0002**|.955 _±_.002|**.918** _±_**.004**|.102 _±_.01|**.956** _±_**.0009 **|**.918** _±_**.002**|
+||GCN|.348 _±_.02|.941 _±_.002|.863 _±_.01|**.226** _±_**.004**|**.973** _±_**.0005 **|**.940** _±_**.003**|
+|ZINC12K|GIN|.303 _±_.007|.950 _±_.003|.889 _±_.003|**.189** _±_**.004**|**.978** _±_**.006**|**.953** _±_**.002**|
+||GINE|.266 _±_.02|.961 _±_.003|.915 _±_.01|**.147** _±_**.009**|**.987** _±_**.001**|**.971** _±_**.003**|
+|||BCE_↓_|AUROC_↑_|AP_↑_|BCE_↓_|AUROC_↑_|AP_↑_|
+||GCN|.202 _±_.005|.773 _±_.006|.334 _±_.03|**.176** _±_**.001**|**.850** _±_**.006**|**.446** _±_**.01**|
+|TOX21|GIN|.200 _±_.002|.789 _±_.009|.350 _±_.01|**.176** _±_**.001**|**.841** _±_**.005**|**.454** _±_**.009**|
+||GINE|.201 _±_.007|.783 _±_.007|.345 _±_.02|**.177** _±_**.0008**|**.836** _±_**.004**|**.455**_±_**.008**|
+
+**Results discussion.** TOYMIX results can be found in Table 2. We compare 3 different models and find that across all of the different settings, GINE outperforms GIN, which in turn outperforms GCN. To investigate the impact of using the union of multiple datasets we compare the performance for single dataset training with those in a multi dataset context. Interestingly we find that for the smaller ZINC12K and TOX21 datasets there is a clear advantage to also training them with the additional data. This is striking as these tasks are not highly related and the chemical spaces don’t intersect much. This highlights that learning in unison with other molecular tasks alone may be beneficial, especially knowing that quantum data like QM9 and chemoinformatics data like ZINC12K are much cheaper to obtain than TOX21 or other bioassay data. For the larger dataset QM9, which takes up nearly 87% of the molecules, however, we do see a minor reduction in the performance in the multi dataset context, which suggests that there is some degree of compromise when using this setup.
+
+## 4.2 LARGEMIX
+
+**Experimental setting.** In the case of LARGEMIX, we provide results for the same GNN baselines with 4 GNN layers and model sizes between 4M and 6M parameter. We present results of models trained for 200 epochs and average across 3 seeds. The remaining setup is the same as for TOYMIX (Section 4.1), reporting metrics on the _Single Dataset_ and _Multi Dataset_ are the same.
+
+**Results discussion.** LARGEMIX results can be found in Table 3. On the L100 datasets VCAP and MCF7, similar to TOYMIX, we observe a clear advantage of our _Multi Dataset_ approach compared to training on a single dataset. While not the case for the significantly larger PCQM4M and PCBA_1328 datasets. This again indicates the smaller datasets benefit more from the multidataset training approach. We believe that this is due to underfitting, as e.g., for PCBA_1328, a 10M parameter model is used to train on more than 3000 tasks jointly. Indeed, in Table 7, we observe that as we increase the model size, the results for PCQM4M_N4 and PCBA_1328 significantly improve.
+
+## 4.3 ULTRALARGE
+
+**Experimental setting.** For ULTRALARGE, we provide results for the same GNN baselines as for LARGEMIX. Each model is trained for 50 epochs and results are averaged over 3 seeds. The remaining setup is the same as for TOYMIX (Section 4.1), reporting metrics on the _Single Dataset_ and _Multi Dataset_ using the same performance metrics. We further use the same models (in terms of size) as used for LARGEMIX. However due to resource constraints we have trained only on a 5% subset of the data.
+
+**Results discussion.** ULTRALARGE results can be found in Table 4. Interestingly, on both graphand node-level tasks we observe that there is no advantage of multi-tasking in terms of performance. However, we expect the major benefits of this dataset to be found when used at scale and when either fine-tuning to other quantum tasks or when used in conjunction with a more diverse array of datasets.
+
+8
+
+Table 3: Results for GNN baselines on the proposed LARGEMIX dataset. We report performance metrics on the test set (mean _±_ std over 3 seeds) per dataset contained in LARGEMIX and for the dataset overall. The best score for each metric per dataset _across all three models_ is in marked **green** , with the best result _per model_ marked in **orange** .
+
+||||Single Dataset|||Multi Dataset||
+|---|---|---|---|---|---|---|---|
+|Dataset|Model|MAE_↓_|Pearson_↑_|_R_2 _↑_|MAE_↓_|Pearson_↑_|_R_2 _↑_|
+||GCN|**.2362**_±_**.0003**|**.8781**_±_**.0005**|**.7803**_±_**.0006**|.2458_±_.0007|.8701_±_ .0002|.7678_±_.0004|
+|PCQM4M_G25|GIN|**.2270**_±_**.0003**|**.8854**_±_**.0004**|**.7912**_±_**.0006**|.2352_±_.0006|.8802_±_.0007|.7827_±_.0005|
+||GINE|**.2223**_±_**.0007**|**.8874**_±_**.0003**|**.7949**_±_**.0001**|.2315_±_.0002|.8823_±_.0002|.7864_±_.0008|
+||GCN|.2080_±_.0003|**.5497**_±_**.0010**|**.2942**_±_**.0007**|**.2040**_±_ **.0001**|.4796_±_ .0006|.2185_±_ .0002|
+|PCQM4M_N4|GIN|**.1912**_±_**.0027**|**.6138**_±_**.0088**|**.3688**_±_**.0116**|.1966_±_.0003|.5198_±_.0008|.2602_±_.0012|
+||GINE|**.1910**_±_**.0001**|**.6127**_±_**.0003**|**.3666**_±_**.0008**|.1941_±_.0003|.5303_±_.0023|.2701_±_.0034|
+|||CE_↓_|AUROC_↑_|AP_↑_|CE_↓_|AUROC_↑_|AP_↑_|
+||GCN|**.0316** _±_**.0000 **|**.7960** _±_**.0020 **|**.3368** _±_**.0027**|.0349_±_ .0002|.7661_±_ .0031|.2527_±_.0041|
+|PCBA_1328|GIN|**.0324** _±_**.0000 **|**.7941** _±_**.0018 **|**.3328** _±_**.0019**|.0342_±_.0001|.7747_±_ .0025|.2650_±_.0020|
+||GINE|**.0320** _±_**.0001 **|**.7944** _±_**.0023 **|**.3337** _±_**.0027**|.0341_±_.0001|.7737_±_ .0007|.2611_±_.0043|
+||GCN|.1900 _±_.0002|.5788 _±_.0034|.3708 _±_.0007|**.1872**_±_**.002**|**.6362**_±_ **.0012 **|**.4022**_±_ **.0008**|
+|L1000_VCAP|GIN|.1909 _±_.0005|.5734 _±_.0029|.3731 _±_.0014|**.1870**_±_**.001**|**.6351**_±_ **.0014 **|**.4062**_±_ **.0001**|
+||GINE|.1907 _±_.0006|.5708 _±_.0079|.3705 _±_.0015|**.1862**_±_**.0007 **|**.6398**_±_ **.0043 **|**.4068**_±_ **.0023**|
+||GCN|.1869 _±_.0003|.6123 _±_.0051|.3866 _±_.0010|**.1863**_±_ **.0011 **|**.6401**_±_ **.0021 **|**.4194**_±_**.0004**|
+|L1000_MCF7|GIN|**.1862** _±_**.0003**|.6202_±_.0091|.3876 _±_.0017|.1874_±_ .0013|**.6367**_±_ **.0066 **|**.4198**_±_**.0036**|
+||GINE|**.1856** _±_**.0005**|.6166 _±_.0017|.3892 _±_.0035|.1873_±_ .0009|**.6347**_±_ **.0048 **|**.4177**_±_**.0024**|
+
+Table 4: Results for GNN baselines on a 5% subset of the proposed ULTRALARGE dataset. We report performance metrics on the test set (mean _±_ std over 3 seeds) per dataset contained in ULTRALARGE and for the dataset overall. The best score for each metric per dataset _across all three models_ is in marked **green** , with the best result _per model_ marked in **orange** .
+
+||||Single Dataset|||Multi Dataset||
+|---|---|---|---|---|---|---|---|
+|Dataset|Model|MAE_↓_|Pearson_↑_|_R_2 _↑_|MAE_↓_|Pearson_↑_|_R_2 _↑_|
+||GCN|**.2606**_±_**.0011 **|**.9004**_±_**.0004 **|**.7997**_±_**.0009**|.2625_±_.0011|.8993_±_ .0005|.7977_±_.0008|
+|PM6_83M_G62|GIN|**.2541**_±_**.0017 **|**.9053**_±_**.0013 **|**.8069**_±_**.0028**|.2578_±_.0014|.8981_±_ .007|.8031_±_.0027|
+||GINE|**.2538**_±_**.0006**|**.9057**_±_**.008**|**.8078**_±_**.0013**|.2575_±_.0009|.9043_±_ .0002|.8052_±_.0003|
+||GCN|**.5803**_±_**.0001 **|**.3372**_±_**.0003 **|**.1188**_±_**.0005**|.5971_±_ .0002|.3164_±_.0009|.1019_±_.0011|
+|PM6_83M_N7|GIN|**.5729**_±_**.0002 **|**.3480**_±_**.0003 **|**.1271**_±_**.0003**|.5831_±_ .0001|.3314_±_.0004|.114_±_.0008|
+||GINE|**.5721**_±_**.0004 **|**.3484**_±_**.0006 **|**.1262**_±_**.0006**|.5839_±_ .0004|.3294_±_.0003|.1108_±_.0004|
+
+## 5 CONCLUSION
+
+In this work, we curated a novel collection of molecular datasets with an unprecedented number of data points for supervised learning, thereby significantly enhancing the resources available for research in the field of drug discovery. These datasets are naturally multi-task and multi-level, posing unique challenges for machine learning models. To facilitate the study of these complex datasets, we presented the Graphium library, a framework designed to process and efficiently load large-scale molecular data and perform multi-task learning across various task levels. The library takes advantage of the unique features and properties presented by our datasets and build towards the training of a large foundational model for molecular learning.
+
+Furthermore, we present a number of baseline results on our proposed datasets and show that performance on small biological datasets benefits from being trained on large amounts of quantum data. We hypothesise that this improved generalization will help foundation models perform well when fine-tuned to the low-resource downstream tasks commonly encountered in Drug Discovery.
+
+9
+
+## REPRODUCIBILITY
+
+In line with ICLR’s commitment to promoting reproducibility in research, we have taken diligent steps to ensure the reproducibility of our work presented in this paper. The Graphium library code can be accessed on Github: [URL removed] This code allows fellow researchers to reproduce and build upon our experimental results.
+
+All datasets from TOYMIX, LARGEMIX and ultra-large can be found below. Datasets are provided either as _.csv_ for smaller datasets or _.parquet_ for larger datasets. Splits are provided as _.pt_ files, meant to be read via _torch.load_ , and containing a dictionary with keys "train", "val", "test" and "test-seen", each containing a list of indices corresponding to the split.
+
+Download links for the _ToyMix_ , _LargeMix_ and _UltraLarge_ datasets are found in Zenodo Part 1([URL removed]) and Part 2([URL removed] records/8370547).
+
+## ETHICS STATEMENT
+
+We confirm that we adhere to the ICLR Code of Ethics as stated here. This research primarily involves the analysis and prediction of molecular data using machine learning techniques. We have taken ethical considerations into account at various stages of our work. Our experiments do not involve human subjects, and we have not accessed any sensitive or private information. The licenses for the datasets contributed in this work are discussed in Appendix B.2.
+
+## REFERENCES
+
+Simon Axelrod and Rafael Gomez-Bombarelli. Geom, energy-annotated molecular conformations for property prediction and molecular generation. _Scientific Data_ , 9(1):185, 2022.
+
+- Ilyes Batatia, David P Kovacs, Gregor Simm, Christoph Ortner, and Gábor Csányi. Mace: Higher order equivariant message passing neural networks for fast and accurate force fields. _Advances in Neural Information Processing Systems_ , 35:11423–11436, 2022.
+
+- Peter W. Battaglia, Jessica B. Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinícius Flores Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, Çaglar Gülçehre, H. Francis Song, Andrew J. Ballard, Justin Gilmer, George E. Dahl, Ashish Vaswani, Kelsey R. Allen, Charles Nash, Victoria Langston, Chris Dyer, Nicolas Heess, Daan Wierstra, Pushmeet Kohli, Matthew M. Botvinick, Oriol Vinyals, Yujia Li, and Razvan Pascanu. Relational inductive biases, deep learning, and graph networks. _CoRR_ , abs/1806.01261, 2018. URL [URL removed]
+
+- Dominique Beaini, Saro Passaro, Vincent Létourneau, Will Hamilton, Gabriele Corso, and Pietro Liò. Directional graph networks. In _International Conference on Machine Learning_ , pp. 748–758. PMLR, 2021.
+
+- Camille Bilodeau, Wengong Jin, Tommi Jaakkola, Regina Barzilay, and Klavs Jensen. Generative models for molecular discovery: Recent advances and challenges. _Wiley Interdisciplinary Reviews: Computational Molecular Science_ , 12, 03 2022.
+
+- Cristian Bodnar, Fabrizio Frasca, Nina Otter, Yuguang Wang, Pietro Lio, Guido F Montufar, and Michael Bronstein. Weisfeiler and lehman go cellular: Cw networks. _Advances in Neural Information Processing Systems_ , 34:2625–2640, 2021.
+
+- Nathan Brown, Marco Fiscato, Marwin H. S. Segler, and Alain C. Vaucher. Guacamol: Benchmarking models for de novo molecular design. _Journal of Chemical Information and Modeling_ , 59 (3):1096–1108, March 2019. ISSN 1549-9596, 1549-960X. doi: 10.1021/acs.jcim.8b00839. arXiv:1811.09621 [physics, q-bio].
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020a.
+
+- Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In _Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual_ , 2020b.
+
+- Yukuo Cen, Zhenyu Hou, Yan Wang, Qibin Chen, Yizhen Luo, Zhongming Yu, Hengrui Zhang, Xingcheng Yao, Aohan Zeng, Shiguang Guo, Yuxiao Dong, Yang Yang, Peng Zhang, Guohao Dai, Yu Wang, Chang Zhou, Hongxia Yang, and Jie Tang. Cogdl: A comprehensive library for graph deep learning. In _Proceedings of the ACM Web Conference 2023 (WWW’23)_ , 2023.
+
+- Lowik Chanussot, Abhishek Das, Siddharth Goyal, Thibaut Lavril, Muhammed Shuaibi, Morgane Riviere, Kevin Tran, Javier Heras-Domingo, Caleb Ho, Weihua Hu, et al. Open catalyst 2020 (oc20) dataset and community challenges. _Acs Catalysis_ , 11(10):6059–6072, 2021.
+
+- Gabriele Corso, Hannes Stärk, Bowen Jing, Regina Barzilay, and Tommi Jaakkola. Diffdock: Diffusion steps, twists, and turns for molecular docking. _arXiv preprint arXiv:2210.01776_ , 2022.
+
+- CSIRO’s Data61. Stellargraph machine learning library. [URL removed] stellargraph/stellargraph, 2018.
+
+11
+
+- Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In _International Conference on Learning Representations_ .
+
+- Vijay Prakash Dwivedi, Chaitanya K. Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. _CoRR_ , abs/2003.00982, 2020. URL [URL removed] org/abs/2003.00982.
+
+- Vijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Graph neural networks with learnable structural and positional representations. _arXiv preprint arXiv:2110.07875_ , 2021.
+
+- Peter Eastman, Pavan Kumar Behara, David L Dotson, Raimondas Galvelis, John E Herr, Josh T Horton, Yuezhi Mao, John D Chodera, Benjamin P Pritchard, Yuanqing Wang, et al. Spice, a dataset of drug-like molecules and peptides for training machine learning potentials. _Scientific Data_ , 10(1):11, 2023.
+
+- Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In _ICLR Workshop on Representation Learning on Graphs and Manifolds_ , 2019.
+
+- Johannes Gasteiger, Janek Groß, and Stephan Günnemann. Directional message passing for molecular graphs. In _International Conference on Learning Representations_ .
+
+- Johannes Gasteiger, Florian Becker, and Stephan Günnemann. Gemnet: Universal directional graph neural networks for molecules. _Advances in Neural Information Processing Systems_ , 34: 6790–6802, 2021.
+
+- Jonathan Godwin*, Thomas Keck*, Peter Battaglia, Victor Bapst, Thomas Kipf, Yujia Li, Kimberly Stachenfeld, Petar Veliˇckovi´c, and Alvaro Sanchez-Gonzalez. Jraph: A library for graph neural networks in jax., 2020. URL [URL removed]
+
+- Hatem Helal, Jesun Firoz, Jenna Bilbrey, Mario Michael Krell, Tom Murray, Ang Li, Sotiris Xantheas, and Sutanay Choudhury. Extreme acceleration of graph neural network-based prediction models for quantum chemistry, 2022.
+
+- Shion Honda, Shoi Shi, and Hiroki R. Ueda. SMILES transformer: Pre-trained molecular fingerprint for low data drug discovery. _CoRR_ , abs/1911.04738, 2019. URL [URL removed] 1911.04738.
+
+- Jun Hu, Shengsheng Qian, Quan Fang, Youze Wang, Quan Zhao, Huaiwen Zhang, and Changsheng Xu. Efficient graph deep learning in tensorflow with tf_geometric. In Heng Tao Shen, Yueting Zhuang, John R. Smith, Yang Yang, Pablo Cesar, Florian Metze, and Balakrishnan Prabhakaran (eds.), _MM ’21: ACM Multimedia Conference, Virtual Event, China, October 20 - 24, 2021_ , pp. 3775–3778. ACM, 2021a. doi: 10.1145/3474085.3478322. URL [URL removed] 1145/3474085.3478322.
+
+- W Hu, B Liu, J Gomes, M Zitnik, P Liang, V Pande, and J Leskovec. Strategies for pre-training graph neural networks. In _International Conference on Learning Representations (ICLR)_ , 2020a.
+
+- Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin (eds.), _Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual_ , 2020b. URL [URL removed] fb60d411a5c5b72b2e7d3527cfc84fd0-Abstract.html.
+
+- Weihua Hu, Matthias Fey, Hongyu Ren, Maho Nakata, Yuxiao Dong, and Jure Leskovec. OGB-LSC: A large-scale challenge for machine learning on graphs. In Joaquin Vanschoren and Sai-Kit Yeung (eds.), _Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, NeurIPS Datasets and Benchmarks 2021, December 2021, virtual_ , 2021b. URL [URL removed] hash/db8e1af0cb3aca1ae2d0018624204529-Abstract-round2.html.
+
+12
+
+Kexin Huang, Tianfan Fu, Wenhao Gao, Yue Zhao, Yusuf Roohani, Jure Leskovec, Connor W Coley, Cao Xiao, Jimeng Sun, and Marinka Zitnik. Therapeutics data commons: Machine learning datasets and tasks for drug discovery and development. _arXiv preprint arXiv:2102.09548_ , 2021.
+
+- John J. Irwin, Khanh G. Tang, Jennifer Young, Chinzorig Dandarchuluun, Benjamin R. Wong, Munkhzul Khurelbaatar, Yurii S. Moroz, John Mayfield, and Roger A. Sayle. Zinc20—a free ultralarge-scale chemical database for ligand discovery. _Journal of Chemical Information and Modeling_ , 60(12):6065–6073, December 2020. ISSN 1549-9596. doi: 10.1021/acs.jcim.0c00675.
+
+Zhe Jia, Blake Tillman, Marco Maggioni, and Daniele Paolo Scarpazza. Dissecting the graphcore ipu architecture via microbenchmarking, 2019.
+
+- Kuzma Khrabrov, Ilya Shenbin, Alexander Ryabov, Artem Tsypin, Alexander Telepov, Anton Alekseev, Alexander Grishin, Pavel Strashnov, Petr Zhilyaev, Sergey Nikolenko, et al. nabladft: Large-scale conformational energy and hamiltonian prediction benchmark and dataset. _Physical Chemistry Chemical Physics_ , 24(42):25853–25863, 2022.
+
+- Sunghwan Kim, Paul A Thiessen, Evan E Bolton, Jie Chen, Gang Fu, Asta Gindulyte, Lianyi Han, Jane He, Siqian He, Benjamin A Shoemaker, et al. Pubchem substance and compound databases. _Nucleic acids research_ , 44(D1):D1202–D1213, 2016.
+
+- Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In _5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 2426, 2017, Conference Track Proceedings_ . OpenReview.net, 2017. URL [URL removed] net/forum?id=SJU4ayYgl.
+
+- Devin Kreuzer, Dominique Beaini, Will Hamilton, Vincent Létourneau, and Prudencio Tossou. Rethinking graph transformers with spectral attention. _Advances in Neural Information Processing Systems_ , 34:21618–21629, 2021.
+
+- Oliver Laufkötter, Noé Sturm, Jürgen Bajorath, Hongming Chen, and Ola Engkvist. Combining structural and bioactivity-based fingerprints improves prediction performance and scaffold hopping capability. _Journal of cheminformatics_ , 11:1–14, 2019.
+
+- Xinyuan Lin, Chi Xu, Zhaoping Xiong, Xinfeng Zhang, Ningxi Ni, Bolin Ni, Jianlong Chang, Ruiqing Pan, Zidong Wang, Fan Yu, et al. Pangu drug model: learn a molecule like a human. _bioRxiv_ , pp. 2022–03, 2022.
+
+- Meng Liu, Youzhi Luo, Limei Wang, Yaochen Xie, Hao Yuan, Shurui Gui, Haiyang Yu, Zhao Xu, Jingtun Zhang, Yi Liu, Keqiang Yan, Haoran Liu, Cong Fu, Bora M Oztekin, Xuan Zhang, and Shuiwang Ji. DIG: A turnkey library for diving into graph deep learning research. _Journal of Machine Learning Research_ , 22(240):1–9, 2021. URL [URL removed] 21-0343.html.
+
+- Shengchao Liu, Hongyu Guo, and Jian Tang. Molecular geometry pretraining with se(3)-invariant denoising distance matching, 2023a.
+
+- Yiheng Liu, Tianle Han, Siyuan Ma, Jiayue Zhang, Yuanyuan Yang, Jiaming Tian, Hao He, Antong Li, Mengshen He, Zhengliang Liu, et al. Summary of chatgpt/gpt-4 research and perspective towards the future of large language models. _arXiv preprint arXiv:2304.01852_ , 2023b.
+
+- Shengjie Luo, Tianlang Chen, Yixian Xu, Shuxin Zheng, Tie-Yan Liu, Liwei Wang, and Di He. One transformer can understand both 2D & 3D molecular data. _arXiv:2210.01765_ , 2022.
+
+- Dominic Masters, Josef Dean, Kerstin Klaser, Zhiyi Li, Sam Maddrell-Mander, Adam Sanders, Hatem Helal, Deniz Beker, Andrew Fitzgibbon, Shenyang Huang, et al. Gps++: Reviving the art of message passing for molecular property prediction. _arXiv preprint arXiv:2302.02947_ , 2023.
+
+- Alexander Mathiasen, Hatem Helal, Kerstin Klaeser, Paul Balanca, Josef Dean, Carlo Luschi, Dominique Beaini, Andrew William Fitzgibbon, and Dominic Masters. Generating QM1b with PySCFipu. In _Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track_ , 2023. URL [URL removed]
+
+13
+
+- Andreas Mayr, Günter Klambauer, Thomas Unterthiner, Marvin Steijaert, Jörg K. Wegner, Hugo Ceulemans, Djork-Arné Clevert, and Sepp Hochreiter. Large-scale comparison of machine learning methods for drug target prediction on chembl. _Chemical Science_ , 9(24):5441–5451, June 2018. ISSN 2041-6539. doi: 10.1039/C8SC00148K.
+
+- Oscar Méndez-Lucio, Christos Nicolaou, and Berton Earnshaw. Mole: a molecular foundation model for drug discovery. _arXiv preprint arXiv:2211.02657_ , 2022.
+
+- Maho Nakata and Tomomi Shimazaki. Pubchemqc project: a large-scale first-principles electronic structure database for data-driven chemistry. _Journal of chemical information and modeling_ , 57(6): 1300–1308, 2017.
+
+- Maho Nakata, Tomomi Shimazaki, Masatomo Hashimoto, and Toshiyuki Maeda. Pubchemqc pm6: Data sets of 221 million molecules with optimized molecular geometries and electronic properties. _Journal of Chemical Information and Modeling_ , 60(12):5891–5899, 2020.
+
+- Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
+
+- R. Ramakrishnan, O. Dral, P., M. Rupp, and O. Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. _Scientific Data_ , 1, 2014. Nature.
+
+- Ladislav Rampášek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. Recipe for a general, powerful, scalable graph transformer. _Advances in Neural Information Processing Systems_ , 35:14501–14515, 2022.
+
+- Bharath Ramsundar, Peter Eastman, Patrick Walters, Vijay Pande, Karl Leswing, and Zhenqin Wu. _Deep Learning for the Life Sciences_ . O’Reilly Media, 2019. [URL removed] Deep-Learning-Life-Sciences-Microscopy/dp/1492039837.
+
+- Lars Ruddigkeit, Ruud van Deursen, Lorenz C. Blum, and Jean-Louis Reymond. Enumeration of 166 billion organic small molecules in the chemical universe database gdb-17. _Journal of Chemical Information and Modeling_ , 52(11):2864–2875, 2012. doi: 10.1021/ci300415d.
+
+- Johannes Schimunek, Philipp Seidl, Lukas Friedrich, Daniel Kuhn, Friedrich Rippmann, Sepp Hochreiter, and Günter Klambauer. Context-enriched molecule representations improve few-shot drug discovery. _arXiv preprint arXiv:2305.09481_ , 2023.
+
+- Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers_ , 2016.
+
+- Till Siebenmorgen, Filipe Menezes, Sabrina Benassou, Erinc Merdivan, Stefan Kesselheim, Marie Piraud, Fabian J Theis, Michael Sattler, and Grzegorz M Popowicz. Misato-machine learning dataset of protein-ligand complexes for structure-based drug discovery. _bioRxiv_ , pp. 2023–05, 2023.
+
+- Megan Stanley, John F Bronskill, Krzysztof Maziarz, Hubert Misztela, Jessica Lanini, Marwin Segler, Nadine Schneider, and Marc Brockschmidt. Fs-mol: A few-shot learning dataset of molecules. In _Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2)_ , 2021.
+
+- Hannes Stärk, Dominique Beaini, Gabriele Corso, Prudencio Tossou, Christian Dallago, Stephan Günnemann, and Pietro Liò. 3d infomax improves gnns for molecular property prediction. In _International Conference on Machine Learning_ , pp. 20479–20502. PMLR, 2022.
+
+- Aravind Subramanian, Rajiv Narayan, Steven M Corsello, David D Peck, Ted E Natoli, Xiaodong Lu, Joshua Gould, John F Davis, Andrew A Tubelli, Jacob K Asiedu, et al. A next generation connectivity map: L1000 platform and the first 1,000,000 profiles. _Cell_ , 171(6):1437–1452, 2017.
+
+- Ruoxi Sun, Hanjun Dai, and Adams Wei Yu. Does gnn pretraining help molecular representation? _Advances in Neural Information Processing Systems_ , 35:12096–12109, 2022.
+
+14
+
+Susheel Suresh, Pan Li, Cong Hao, and Jennifer Neville. Adversarial graph augmentation to improve graph contrastive learning. In Marc’Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan (eds.), _Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual_ , pp. 15920–15933, 2021. URL [URL removed] paper/2021/hash/854f1fb6f65734d9e49f708d6cd84ad6-Abstract.html.
+
+- Raymond R Tice, Christopher P Austin, Robert J Kavlock, and John R Bucher. Improving the human hazard characterization of chemicals: a tox21 update. _Environmental health perspectives_ , 121(7): 756–765, 2013.
+
+- R. Todeschini and P. Gramatica. The whim theory: New 3d molecular descriptors for qsar in environmental modelling. _SAR and QSAR in Environmental Research_ , 7(1-4):89–115, 1997. doi: 10. 1080/10629369708039126. URL [URL removed]
+
+- Derek van Tilborg, Alisa Alenicheva, and Francesca Grisoni. Exposing the limitations of molecular machine learning with activity cliffs. _Journal of Chemical Information and Modeling_ , 62:5938– 5951, 2022. doi: 10.1021/acs.jcim.2c01073.
+
+- Minjie Wang, Da Zheng, Zihao Ye, Quan Gan, Mufei Li, Xiang Song, Jinjing Zhou, Chao Ma, Lingfan Yu, Yu Gai, Tianjun Xiao, Tong He, George Karypis, Jinyang Li, and Zheng Zhang. Deep graph library: A graph-centric, highly-performant package for graph neural networks. _arXiv preprint arXiv:1909.01315_ , 2019.
+
+- Zichen Wang, Neil R Clark, and Avi Ma’ayan. Drug-induced adverse events prediction with the lincs l1000 data. _Bioinformatics_ , 32(15):2338–2345, 2016.
+
+- Robin Winter, Floriane Montanari, Frank Noé, and Djork-Arné Clevert. Learning continuous and data-driven molecular descriptors by translating equivalent chemical representations. _Chemical Science_ , 10(6):1692–1701, February 2019. ISSN 2041-6539. doi: 10.1039/C8SC04175J.
+
+- Fang Wu, Shuting Jin, Yinghui Jiang, Xurui Jin, Bowen Tang, Zhangming Niu, Xiangrong Liu, Qiang Zhang, Xiangxiang Zeng, and Stan Z Li. Pre-training of equivariant graph matching networks with conformation flexibility for drug binding. _Advanced Science_ , 9(33):2203796, 2022.
+
+- Z. Wu, B. Ramsundar, E. N. Feinberg, J. Gomes, C. Geniesse, A. S. Pappu, K. Leswing, and V. Pande. MoleculeNet: A benchmark for molecular machine learning. _Chemical Science_ , 9:513–530, 2018.
+
+Jun Xia, Yanqiao Zhu, Yuanqi Du, Yue Liu, and Stan Z Li. A systematic survey of chemical pre-trained models. _IJCAI_ , 2023.
+
+- Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In _7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019_ . OpenReview.net, 2019. URL [URL removed] id=ryGs6iA5Km.
+
+- Ge Yang, Edward Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu, David Farhi, Nick Ryder, Jakub Pachocki, Weizhu Chen, and Jianfeng Gao. Tuning large neural networks via zero-shot hyperparameter transfer. _Advances in Neural Information Processing Systems_ , 34:17084–17097, 2021.
+
+- Greg Yang, Edward J. Hu, Igor Babuschkin, Szymon Sidor, Xiaodong Liu, David Farhi, Nick Ryder, Jakub Pachocki, Weizhu Chen, and Jianfeng Gao. Tensor programs V: tuning large neural networks via zero-shot hyperparameter transfer. _CoRR_ , abs/2203.03466, 2022. doi: 10.48550/arXiv.2203. 03466. URL [URL removed]
+
+- Xingyi Yang, Xuehai He, Yuxiao Liang, Yue Yang, Shanghang Zhang, and Pengtao Xie. Transfer learning or self-supervised learning? a tale of two pretraining paradigms. _arXiv preprint arXiv:2007.04234_ , 2020.
+
+- Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform badly for graph representation? _Advances in Neural Information Processing Systems_ , 34:28877–28888, 2021.
+
+15
+
+- Jiaxuan You, Rex Ying, and Jure Leskovec. Design space for graph neural networks. In _NeurIPS_ , 2020.
+
+- Sheheryar Zaidi, Michael Schaarschmidt, James Martens, Hyunjik Kim, Yee Whye Teh, Alvaro Sanchez-Gonzalez, Peter W. Battaglia, Razvan Pascanu, and Jonathan Godwin. Pre-training via denoising for molecular property prediction. _CoRR_ , abs/2206.00133, 2022. doi: 10.48550/arXiv. 2206.00133. URL [URL removed]
+
+- Gengmo Zhou, Zhifeng Gao, Qiankun Ding, Hang Zheng, Hongteng Xu, Zhewei Wei, Linfeng Zhang, and Guolin Ke. Uni-mol: A universal 3d molecular representation learning framework. 2023.
+
+- Zhaocheng Zhu, Chence Shi, Zuobai Zhang, Shengchao Liu, Minghao Xu, Xinyu Yuan, Yangtian Zhang, Junkun Chen, Huiyu Cai, Jiarui Lu, Chang Ma, Runcheng Liu, Louis-Pascal A. C. Xhonneux, Meng Qu, and Jian Tang. Torchdrug: A powerful and flexible machine learning platform for drug discovery. _CoRR_ , abs/2202.08320, 2022. URL [URL removed] 08320.
+
+16
+
+## A LIMITATIONS, FUTURE WORK AND SOCIETAL IMPACTS
+
+**Limitations and Future Work** Our proposed datasets currently do not contain edge- or nodepairlevel tasks, which we plan to include in the future. Also, our benchmark results are limited to a few baseline models, but we will continue to run experiments and ablations and eventually include more positional encodings and graph Transformers. Further, large-scale multi-task learning on millions of molecular data may pose a limitation in situations where extensive computing resources are unavailable. We will continue to work on optimization, including chip-specific accelerations, to help reduce the time and cost of training. On that same note, the ultra-large PM6_83M dataset is so large that using it in the LargeMix might be challenging since in the current Graphium framework, 95% of the molecules in any batch will come from that specific dataset, and under-sampling might be required. Finally, since the capability of a model trained on multiple tasks to adapt and perform well on new tasks is a crucial indicator of its robustness, we aim to investigate our multi-task framework’s ability to transfer to new tasks.
+
+**Societal Impact** Releasing our datasets and the Graphium library may not have immediate direct societal impacts. However, it is crucial to acknowledge the potential implications that arise when providing access to a foundation model for molecular graphs. One concerning possibility is the misuse of this technology for the development of chemical weapons, toxins, or unregulated drugs. To address these potential risks, we are committed to implementing robust mitigation strategies. Central to our approach is the active promotion of beneficial applications, particularly in the fields of material and drug discovery. By highlighting the positive utilization of this technology, we aim to channel its potential toward scientific advancements that contribute to societal well-being.
+
+## B DATASET DOCUMENTATION AND INTENDED USES
+
+## B.1 INTENDED USE
+
+The datasets are intended to be used in an academic setting for training molecular GNNs with orders of magnitude more parameters than current large models. Further, the TOYMIX and LARGEMIX datasets are intended to be used in a multi-task setting, meaning that a single model should be trained to predict them simultaneously. We invite users to use the Graphium library and contribute to it to simplify the development of state-of-the-art GNNs on multi-task and multi-label data.
+
+## B.2 DATASET LICENSES
+
+The licenses of the existing datasets used in this work is as follows:
+
+- **QM9** : Creative Commons Attribution Non-Commercial ShareAlike 4.0
+
+- **Tox21** : Attribution 4.0 International (CC BY 4.0)
+
+- **Zinc12k** : MIT license
+
+- **L1000** : free to use by all
+
+- **PCQM4M** and **PM6_83M** : Creative Commons Attribution 4.0 International license.
+
+- **PCBA1328** : Open access
+
+All datasets provided in this work are licensed under the Attribution Non-Commercial ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. We chose this license because some of the original datasets have this license and we provide our datasets with the same level of access.
+
+## B.3 MOLECULAR PROPERTIES
+
+For the PM6_83M dataset, we added many chemical properties using rdkit, which are predicted together with the quantum properties. This enables the trained model to learn a shared embedding between chemical and quantum properties.
+
+The computed chemical properties are:
+
+- MW: molecular weight.
+
+17
+
+- fsp3: fraction of sp3 carbon atoms
+
+- TPSA: topological polar surface area
+
+- QED: quantitative estimation of drug-likeness
+
+- clogp: partition coefficient for n-octanol/water (measure of lipophilicity)
+
+- SAS: synthetic accessibility score
+
+- n_lipinski_hba: number of hydrogen bond acceptors
+
+- n_lipinski_hbd: number of hydrogen bond donors
+
+- n_rings: number of ring structures
+
+- n_hetero_atoms: number of heteroatoms (non hydrogen or carbon atoms)
+
+- n_heavy_atoms: number of non-hydrogen atoms
+
+- n_rotatable_bonds: number of rotatable bonds
+
+- n_radical_electrons: number of radical electrons
+
+- n_aliphatic_carbocycles: number of aliphatic carbocycles
+
+- n_aliphatic_heterocyles: number of aliphatic heterocycles
+
+- n_aliphatic_rings: number of aliphatic rings
+
+- n_aromatic_carbocycles: number of aromatic carbocycles
+
+- n_aromatic_heterocyles: number of aromatic heterocycles
+
+- n_aromatic_rings: number of aromatic rings
+
+- n_saturated_carbocycles: number of saturated carbocycles
+
+- n_saturated_heterocyles: number of saturated heterocycles
+
+- n_saturated_rings: number of saturated rings
+
+## C VISUALIZING THE DATASETS
+
+## C.1 A FEW MOLECULES
+
+We randomly sample 5 molecules from each dataset and visualize them in Figure 2. The PM6_83M dataset is omitted since it includes the PCQM4M_G25_N4 and the PCBA_1328.
+
+## C.2 TOYMIX VISUALISATION
+
+The chemical spaces of the dataset mixes are visualised in Figure 3 showing the overlap between dataset components. In the TOYMIX, we observe that ZINC12k and Tox21 share part of the chemical space, although Tox21 is more diverse, but QM9 is very different from both of them. In the LARGEMIX, we observe that there is a strong intersection between the datasets at the center of the plot, but that the MCF7 and VCAP, despite being smaller, cover larger regions of the chemical space, justifying their usefulness for pre-training foundation models of chemistry.
+
+18
+
+**==> picture [396 x 561] intentionally omitted <==**
+
+**----- Start of picture text -----**
+QM9 Tox21 ZINC12k L1000_VCAP L1000_MCF7 PCBA_1328 PCQM4M_G25_N4 Figure 2: Visualizing random samples from the datasets. (a) ToyMix (b) LargeMix **----- End of picture text -----**
+
+Figure 3: UMAP visualizations for the dataset mixes, computed with the ECFP molecular fingerprints, showing the chemical spaces of the datasets.
+
+19
+
+|Mix Graph labels Node labels|Total|
+|---|---|
+|||
+|TOYMIX 2.6M - LARGEMIX 344M 197.7M ULTRALARGE 4B 8.5B|2.6M 541.7M 12.5B|
+|||
+|Total 4.3B 8.7B|**13.04B**|
+
+Table 6: Overview over the number of graph and node labels by mix.
+
+## C.3 DATASET STATISTICS
+
+Table 5: General statistics about the datasets, where G. / N. respectively indicate graph-level / nodelevel tasks, and where the sparsity indicates the % of missing data. h. atoms and h. bonds denote respectively the heavy atoms, and the bonds between 2 heavy atoms. For data type, Q. indicates it is Quantum, C. means it is Computed, B. means it is Bio-assays and T. means it is Transcriptomics. For task, C., R., and RC. denote _classification_ , _regression_ and _ranked classification_ respectively.
+
+|Mix||TOYMIX|||LARGEMIX|||ULTRALARGE|
+|---|---|---|---|---|---|---|---|---|
+|Dataset|QM9|ZINC12K|TOX21|PCQM4M_G25_N4|PCBA_1328 L1000_VCAP||L1000_MCF7|PM6_83M|
+|Type|Q.|C.|B.|Q.|B.|T.|T.|Q.|
+|Task|R.|R.|C.|R.|C|RC.|RC.|R.|
+|# mols|133.8k|12k|7.8k|3.8M|1.5M|15.2k|11.6k|83.7M|
+|# G. labels|19|3|12|25|1,328|978|978|62|
+|# G. data|2.5M|36k|74.9k|93.4M|224.3M|14.8k|11.3k|4.00B|
+|% G. sparsity|0|0|20.2|1.9|89.2|0|0|22.9|
+|# N. labels|-|-|-|4|-|-|-|7|
+|# N. data|-|-|-|197.7M|-|-|-|8.51B|
+|% N. sparsity|-|-|-|7.9|-|-|-|40.8|
+|# h. atoms|1.18M|278k|146k|53.7M|41.4M|509k|362k|2.06B|
+|# h. bonds|1.26M|299k|151k|55.2M|44.8M|550k|395k|2.20B|
+
+We analyze the different datasets by using a histogram over relevant chemical properties in Figure 4. There, we observe that the quantum datasets (QM9 and PCQM4M) contain much smaller molecules than the other datasets. This could hinder their ability to produce an embedding that generalizes well across the chemical space. However, the semi-empirical dataset PM6_83M, has very similar distribution to biologically relevant datasets, which makes it ideal for pre-training a foundation model.
+
+## D DEEPER DIVE INTO THE LARGEMIX AND ULTRALARGE DATASETS
+
+In this section, we go into further details to explain what labels are present in the datasets, and how they compare to the current literature.
+
+## D.1 PCQM4M_G25_N4
+
+As mentioned in section 2.2, this dataset comes from the same data source as the OGBG-PCQM4M, namely the PubChemQC project (Hu et al., 2021b), meaning that it comprises of the same molecules.
+
+However, this dataset differs from OGBG-PCQM4M since additional properties are included, and the 3D descriptors are provided as labels. This implies that we can’t use 3D structure as input, as done by OGB, since it is contained in the labels and would lead to data leaks. Further, the OGB challenge only provides labels for HOMO-LUMO gap predictions alongside the 3D structures for the training set. The reasoning behind OGB’s choice of including the 3D conformation only in the training set comes from their desire that a model learns to implicitly embed it when predicting its associated HOMO-LUMO gap. However, since we work in a multi-task setting, it is harder for us to use the same technique. For example, suppose that we are also predicting the binding affinity as another task, then the 3D conformation responsible for this affinity is not necessarily the same as the one provided in the PCQM4M dataset. Therefore, our choice of including the 3D conformation in the labels will allow the model to better associate different conformation to different tasks.
+
+20
+
+**==> picture [396 x 496] intentionally omitted <==**
+
+**----- Start of picture text -----**
+MW 1.5 1e6 TPSA 300000 QED SAS 750000 400000 1.0 200000 500000 200000 0.5 100000 250000 0 0.0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 1500 3000 400 1500 1000 2000 1000 200 500 1000 500 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 3000 750 2000 4000 2000 500 1000 2000 250 1000 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW 1e6 TPSA QED SAS 600000 1.0 60000 200000 400000 40000 0.5 100000 200000 20000 0 0.0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 400000 300000 600000 150000 200000 400000 200000 100000 200000 50000 100000 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 1000 2000 300 600 200 400 500 1000 100 200 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 600 600 600 750 400 400 400 500 200 200 200 250 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 MW TPSA QED SAS 40000 10000 10000 6000 20000 5000 5000 4000 2000 0 0 0 0 0 500 1000 1500 0 100 200 300 400 0.0 0.2 0.4 0.6 0.8 1.0 0 2 4 6 8 10 86M PM6_ L1000_MCF7 L1000_VCAP PCBA1328 PCQM4M_G25_N4 Tox21 ZINC12k QM9 **----- End of picture text -----**
+
+Figure 4: Histograms of the datasets for various properties relevant to chemists. These include molecular weights (MW), topological polar surface area (TPSA), quantitative estimation of druglikeness (QED), and synthetic accessibility score (SAS). MW is the sum total of the atomic weights for all atoms in a molecule. TPSA is the surface sum over all polar atoms (like oxygen and nitrogen) and estimates the surface area of a molecule that is available for interactions with polar groups in biological systems. QED measures how drug-like a given compound is and is based on various molecular properties like MW, lipophilicity, hydrogen bond donors/acceptors, TPSA and the presence of certain functional groups. SAS is a metric to assess the feasability of synthesizing a given compound and is calculated based on several descriptors, such as size, complexity and stereochemistry. For the PM6 dataset, we calculated and plotted the descriptors for _∼_ 10M molecules.
+
+21
+
+The DFT properties that we predict at the graph level are the following:
+
+- Alpha HOMO
+
+- Alpha HOMO-LUMO gap
+
+- Beta HOMO
+
+- Beta HOMO
+
+- Total energy
+
+It should be noted here that only the Alpha HOMO-LUMO gap is provided in the original OGBGPCQM4M dataset. For most molecules, the number of labels are duplicated for time-dependent DFT (TDDFT), which allows to also model the excitation states of the molecule.
+
+Using the 3D conformation optimized by the DFT, we further computed the following 3D descriptors as labels:
+
+- Spherocity
+
+- Plane of best fit
+
+- Principal length *
+
+- Mass inertia *
+
+- Valence inertia *
+
+- Mulliken charges inertia *
+
+- Lowdin charges inertia *
+
+Values denoted with "3D" means that the descriptors are computed alongside the 3 main axes of the molecule. The descriptors are inspired by existing 3D descriptors such as WHIM (Todeschini & Gramatica, 1997).
+
+Finally, the node property predictions are the atomic charges for both DFT and TDDFT when available.
+
+ - Mulliken charges
+
+ - Lowdin charges
+
+- D.2 L1000 VCAP AND MCF7
+
+As discussed in section 2.2, the LINCS L1000 is a database of high-throughput transcriptomics that screened more than 30,000 perturbations on a set of 978 landmark genes (Subramanian et al., 2017) from multiple cell lines. VCAP and MCF7 are, respectively, prostate cancer and human breast cancer cell lines, with more details given below.
+
+**MCF7** is a breast cancer cell line possessing drug-discovery relevant characteristics of differentiated mammary epithelium, such as estrogen receptors and dome formation3. Isolated in 1970 from a woman with metastatic adenocarcinoma of the breast, it became widely used as a model for breast cancer research and drug testing.
+
+**VCAP** is a prostate cancer cell line exhibiting drug-discovery relevant features of advanced prostate cancer, such as androgen receptor signaling and bone metastasis. Isolated in 1997 from a man with hormone refractory prostate cancer, it became widely used as a model for prostate cancer research and drug testing.
+
+Many perturbagens are used, but in our case, we focus only on small molecular perturbagens. Due to the high noise in the assays, we convert the task to a multi-class classification, with one class having a perturbation z-score _< −_ 2 and another _>_ 2, and the neutral class with a perturbation in the range [ _−_ 2 _,_ 2].
+
+There is a lot of noise in the L1000 regression dataset which can make it difficult to give accurate predictions, therefore, the floating-point dataset is converted into a binary classification task. By applying a threshold, we make the signal easier to distinguish from noise. While this can occasionally lead to mislabeled elements, our experience demonstrated that a classification task performed more reliably then a regression task.
+
+22
+
+## D.3 PCBA_1328
+
+This dataset is gathered in a similar way to the OGB-PCBA (Hu et al., 2020b), by scraping some of the largest assays from Pubchem, but at a much larger scale.
+
+Due to the unknown noise present in each assay, the variability between repeated experiments, and the difficulty associated with properly curating the datasets, we followed the same process as the OGB-PCBA data. Namely, we considered only the assays with author’s labeling that mention "Active" for the positive class and "Inactive" for the negative class. All other labels were considered as missing values, since they are often about experimental errors.
+
+As described in Appendix D.1, this dataset has several key differences to the original OGB-PCQM4M dataset. First, it covers 1328 assays, a 10-fold increase, and 1.5M unique molecules, a 3-fold increase. This is due to our less stringent process of selecting the assays. Indeed, every assay prior to 2022 with more than 6000 datapoints and more than 20 points in the positive class is selected. This implies that other popular datasets such as Tox21 (Huang et al., 2021) and OGB-HIV (Hu et al., 2020b) are also included in the dataset. Further, all 561 protein assays from the high-throughput fingerprints (Laufkötter et al., 2019) are present, with a prior demonstration of the meaningfulness of their molecular representation.
+
+We cannot name all the assays present since the process was automated. We further omitted assays from 2022 and 2023 to allow future work to use them for benchmarking purposes.
+
+## D.4 PM6_83M
+
+As discussed in section 2.3, this dataset contains PM6 semi-empirical computation of quantum properties, a faster but less accurate computation than DFT’s (Nakata & Shimazaki, 2017; Nakata et al., 2020). Covering 83M unique molecules, 62 graph-level tasks, and 7 node-level tasks, this is the largest dataset available for training 2D-GNNs regarding the number of unique molecules. In total, there are 221M PM6 computations (Nakata et al., 2020).
+
+Just like the PCQM4M_G25_N4 dataset contains an excited state, this one contains four different molecular states, namely “S0” for the ground state, “T0” for the lowest energy triplet excited state, “cation” for the positively charged state, and “anion” for the negatively charged state.
+
+The quantum properties that we predict at the graph level are the following. For many molecules, the number of labels are multiplied by 4 to account for the S0, T0, cation, and anion states of the molecule.
+
+- Alpha HOMO
+
+- Alpha HOMO-LUMO gap
+
+- Beta HOMO
+
+- Total energy
+
+It should be noted here that only the Alpha HOMO-LUMO gap is provided in the original OGBGPCQM4M dataset.
+
+Using the 3D conformation optimized by PM6, we further computed the following 3D descriptors as labels. Values denoted with "3D" means that the descriptors are computed alongside the 3 main axes of the molecule. We compute less descriptors than the PCQM4M to avoid having too many properties, especially considering that there are now 4 excited states and a lot more molecules.
+
+- Spherocity
+
+- Plane of best fit
+
+- Principal length *
+
+Then, the node property predictions are the atomic charges and spins for all S0, T0, anion and cation states.
+
+- Mulliken charges
+
+23
+
+## • Electronic spin
+
+Finally, all 22 properties from B.3 are also added as labels.
+
+## D.5 OTHER RELEVANT DATASETS IN THE LITERATURE
+
+There are many other large datasets in the literature of molecular discovery. In this section, we give a brief description of a few of these datasets and how they are different or not suited to our current problem.
+
+First, there are a few large molecular datasets aimed towards material discovery. For these, both the chemical space and the set of tasks / molecular properties don’t intersect. Such examples are **NablaDFT** (Khrabrov et al., 2022) and **OpenCatalyst** (Chanussot et al., 2021), with the former being focused on trajectories.
+
+Then, there are other datasets more related to drug discovery, but whose goals are to understand molecular dynamics within pockets **MISATO** (Siebenmorgen et al., 2023) or to learn more accurate force-fields **Spice** (Eastman et al., 2023). Both of these tasks are not suited for our current desire of training a large 2D-GNNs that work on the graph alone, although they could be suited for 3D-GNNs.
+
+Finally, datasets such as **GEOM** (Axelrod & Gomez-Bombarelli, 2022) were shown to be very useful for pre-training GNNs, however they require dedicated architectures and their performance remain limited (Stärk et al., 2022; Liu et al., 2023a).
+
+## D.6 RELATION BETWEEN THE DATASETS
+
+There are very little direct relations between the datasets as they cover a wide variety of tasks. However, our empirical results show that running in a multi-task setting improves the results compared to single-task experiments. This is because there are some relationships between them, and understanding one can lead to a better understanding of the other.
+
+First, the quantum simulation datasets, namely PCQM4M_G25_N4 and PM6_83M, contain information about the inner workings of molecules, how changing atoms affect the charges, the polarity, the 3D structure, the energy and excitation energies, the electronic densities, etc. All these are relevant when considering binding affinity to a protein, thus they are expected to help improve generalization on the binding assays that make up the majority of PCBA_1328.
+
+We further argue that many ADME (absorption, distribution, metabolism, and excretion) properties depend on the physics and shape of the molecules, and they are very relevant to both binding and cell assays. Hence, learning on the quantum datasets is likely to benefit the other ones.
+
+Second, learning the binding affinity alongside other assays in PCBA_1328 can lead to an improvement in transcriptomics predictions. Indeed, molecules mostly affect the cells via inhibition or activation of proteins, and this effect will often be visible via the changes in gene expression. Hence, we expect an improvement of the L1000 predictions when combining it to PCBA_1328, and by induction, to the other quantum datasets.
+
+Third, learning on L1000 transcriptomic is expected to lead to an improvement in the prediction of biological properties of molecules since the studied cell-lines are simpler models of the human biology and diseases. Hence, despite not providing such dataset in the current work, we expect that fine-tuning pre-trained models on such tasks will be beneficial.
+
+## E FURTHER DETAILS ON THE GRAPHIUM LIBRARY
+
+The following section provides further details about the Graphium library.
+
+## E.1 MULTI-LEVEL, MULTI-TASK AND MULTI-LABEL LEARNING IN GRAPHIUM
+
+Graphium provides an efficient mechanism for loading and processing multi-task datasets and handling tasks in parallel to enhance computational efficiency significantly. It supports multiple tasks, including node, edge, nodepair, and graph-level prediction tasks. Additionally, the library
+
+24
+
+incorporates multi-level positional encodings; see Appendix E.3. Such encodings enhance the model’s capacity to capture and learn from the inherent hierarchical relationships within the molecular data (Rampášek et al., 2022), providing a unified platform for handling diverse data requirements. In Graphium, we propose a multi-task, multi-level model framework as illustrated in Figure 5. After pooling, the architecture utilizes GNN layers to extract node, edge, nodepair, and graph-level features. The resulting features are subsequently fed into task-level specific MLPs, which, in turn, are fed into task-specific heads, generating predictions at node, edge, nodepair, and graph-level tasks. This multi-level prediction strategy accounts for complex hierarchical relationships within molecular data, allowing the model to perform simultaneous learning tasks at different scales.
+
+**Multi-level Learning:** In Graphium, The term _multi-level_ refers to a model’s capability to learn and output representations at various levels of the graph. Graphium supports four levels: node, edge, graph, and node-pair. To simplify this, let’s use molecular networks as an example.
+
+On the node level, the task is to predit a property of the individual nodes within a molecular graph. Each node often represents an atom; hence, a node-level task might involve learning representations of an atom’s properties or its role within a particular molecular graph. The edge level focuses the relationship between connected nodes in a graph. In molecular networks, the edge level aims to learn the embeddings of the type of bond (e.g. single, double or aromatic) or the relationship between atoms or proteins.
+
+On the graph level, a property of the entire graph is considered. In molecular networks, this involves learning the representations of molecular properties, like its solubility or stability.
+
+Lastly, the node-pair levels focuses on the interactions between arbitrary pairs of nodes. Examples including predicting the distance between all pairs of atoms in molecular graphs.
+
+In Graphium, task at each level starts with data featurization, then to the GNN layers (e.g. MPNN or Transformer layers), and lastly level-specific MLPs to get each level’s embedding. The graph level shares a similar path but uses pooled graph-level features as shown in figure 5. Data featurization such as positional encodings, architecture and metrics, and any configurations that are related to the levels are easily managed via configuration files.
+
+**Multi-task Learning:** Graphium supports multi-task learning where different tasks are learned jointly on the same dataset potentially at different levels. Each level can also support multiple tasks. Each task has its specific task output head (usually constructed as a MLP), allowing the model to handle diverse tasks. For instance, at the node level, tasks could range from "node task 1" to "node task N", with similar structures available for other levels. Beyond working on tasks within a single level, Graphium can concurrently optimize tasks across different levels. For example, it can be trained to predict an atom’s property (a node-level task) while also determining the type of bond (an edge-level task). Managing the losses and metrics (see section 4.1) for each task is straightforward, with everything organized within a single configuration file.
+
+**Multi-label Learning:** Multi-label refers to scenarios where each sample can belong to more than one class. Unlike traditional classification where each instance is associated with a singular label, in multi-label learning, each molecular instance can be associated with a set of labels. For example, a particular molecule might simultaneously be therapeutic and toxic, or have both antibacterial and antifungal properties. Graphium accommodates various tasks, including binary label, multi-label, regression, and multi-class classifications.
+
+## E.2 MODELING
+
+Graphium supports straightforward hyper-parameter sweeps, enabling users to fine-tune their models efficiently, improving performance across multiple tasks. Each task is tracked independently using its metrics, ensuring a detailed understanding of the model’s performance across different tasks. The library supports a variety of GNNs, including 2D, 3D, and graph transformers, providing a seamless user experience and facilitating easy switching between different model architectures.
+
+Expanding Graphium to support more expressive architectures, including transformer models, is a critical step in advancing foundation models for drug discovery. The transformer architecture is known for its capacity to capture complex, long-range dependencies and relationships within the data (Rampášek et al., 2022). In molecular graphs, such relationships often contain critical information
+
+25
+
+**==> picture [366 x 81] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Node Tasks MLP Node Task 1 Input Features Node MLP Predictions GNN Layers Embed MLP Node Task 2 Node Feat. Predictions Graph Feat.Edge Feat. EncoderManager FeaturizedPyG Graph TransformerMPNN or NodeEmbed Pooling GraphEmbedGraph Tasks MLP MLPMLP Graph Task 1PredictionsGraph Task 2 Predictions Conformer Feat. layers Edge Tasks MLP Edge Task 1 Positional Edge MLP Predictions Encodings Embed MLP Edge Task 2Predictions **----- End of picture text -----**
+
+Figure 5: **Flow chart of multi-level multi-task molecular learning library, Graphium** . The Graphium library offers a comprehensive pipeline for molecular learning, consisting of 1) advanced molecular featurization, 2) positional encodings, 3) state-of-the-art GNN and graph transformer layers, 4) multi-level MLPs, and 5) multi-task learning through task-specific MLPs at the node, edge, and graph levels.
+
+**==> picture [278 x 190] intentionally omitted <==**
+
+Figure 6: Documentation website layout for Graphium including API references, tutorials, dataset details and more.
+
+about a molecule’s properties. Additionally, due to their self-attention mechanism, transformer models can provide better interpretability, a component much needed in drug discovery. Thus, by supporting more expressive architectures, the library advances the development of foundation models that are not only highly accurate but also interpretable, fostering a broader adoption in the scientific community.
+
+To help users understand better the functionalities and APIs in Graphium, we constructed an extensive documentation website for Graphium where API references, tutorials, dataset details and more can be found. This website will be made publicly available and as an example, we include an overlook of the website in Figure 6.
+
+## E.3 POSITIONAL ENCODINGS
+
+> Graphium integrates multi-level positional encodings (PEs) at the node, edge, node-pair, and graph levels into a customizable molecular multi-level and multi-task graph learning framework. It enables flexible use of various PE combinations, easily managed through a compact configuration file. The library introduces novel _position transfer functions_ that facilitate information exchange across positional levels. The most prevalent PEs are on the node level and provide nodes with an understanding of their positions within a (sub)graph. We further encode relationships between pairs of nodes via edge and nodepair PEs and global graph structure through graph PEs. With a modular
+
+26
+
+design, Graphium supports easy integration of new PEs at all levels, enhancing its ability to handle complex multi-task learning scenarios effectively.
+
+## E.4 LABEL NORMALIZATION
+
+Label normalization is a well-known technique that improves the regression ability of a model by making the labels easier to learn. In a setting with thousands of labels coming from different datasets, the losses associated with each label can be very imbalanced. To counteract that problem, Graphium natively supports multiple normalization schemes, including min-max normalization and z-score standardization.
+
+## E.5 RANKED CLASSIFICATION (HYBRID REGRESSION + CLASSIFICATION LOSS)
+
+For the L1000 datasets, we converted the data from regression classification by binning it into 5 categories. To avoid losing the ranking of the classes, we use a hybrid between cross-entropy and MSE loss. Formally, we define this hybrid loss below, with _C_ denoting the number of classes, **x** _∈_ [0 _,_ 1] _[C]_ denoting the prediction, _y ∈{_ 0 _,_ 1 _, ..., C −_ 1 _}_ as the target, and _α_ as the weight of the CE loss, as
+
+**==> picture [340 x 30] intentionally omitted <==**
+
+## E.6 HANDLING OF MISSING DATA
+
+An essential component of our multi-tasking paradigm is processing graph data from multiple sources in the same batch. However, graphs in a dataset _D_ 1 will likely not appear in another dataset _D_ 2, resulting in missing labels. In addition, many of the proposed datasets are sparse. Hence, the per-task loss must be computed as if the batch consisted exclusively of predictions for which the targets are available.
+
+As a result, Graphium supports different strategies to ignore the missing data or NaNs. These include replacing NaNs with a constant number or filtering out NaNs. However, strategies involving filtering do not work when the code is compiled, which in turn, is necessary for faster training. In these cases, we weigh the missing targets with 0 to compute the desired per-task losses in a differentiable way, thereby allowing parallel graph processing from different sources and with missing targets. Specifically, for a task with predictions **x** _∈_ R _[T]_ and vector of targets **y** _∈_ R _[T]_ , we compute
+
+**==> picture [86 x 23] intentionally omitted <==**
+
+as the final task loss, where _L_ denotes the per-task loss, _T_ denotes the number of targets and _N_ nan _< T_ is the number of `nan` targets.
+
+## E.7 SUPPORT FOR SCALABLE HYPER-PARAMETER TUNING WITH µP
+
+To mitigate expensive hyper-parameter tuning, Graphium deeply integrates with _µ_ P, a pre-training paradigm that allows for tuning parameters on a small model, which can be subsequently transferred to a larger version with no or minimal additional tuning required (Yang et al., 2022). We support _µ_ P out of the box, thus enabling models to scale to billions of parameters efficiently. To the best of our knowledge, this is the first work enabling _µ_ P for GNNs.
+
+## E.8 IPU SUPPORT
+
+To maximize the throughput of training and inference in Graphium, we natively support Graphcore IPUs (Jia et al., 2019). The most recent BOW IPUs have 350 TFLOPs of float16 arithmetic at peak performance and nearly 900MB of high bandwidth on-chip SRAM distributed across 1,472 individual compute cores which can execute programs independently of all other cores. This has the general benefit of allowing model weights and activations to be stored directly on SRAM but also provides a highly flexible, fine-grained fabric for compute parallelization. Additionally, this has specific benefits for GNN-like model structures as it allows to accelerate sparse communication operations like gathers
+
+27
+
+and scatters (Helal et al., 2022) and efficiently parallelizes complex combinations of smaller matrix multiplications that can be found in SOTA GNNs (Masters et al., 2023). This makes it an ideal hardware platform for the model types targeted by Graphium.
+
+## E.9 LIBRARY OPTIMIZATION
+
+Graphium is optimized for large-scale molecular datasets and models, allowing for fast processing and loading, and is compatible with IPU accelerations while supporting traditional CPU and GPU resources; see below for details.
+
+**Dataloading Optimizations** are implemented to handle large-scale datasets efficiently, molecules are processed in parallel to apply a set of user-defined featurizers. Additional performance is obtained using a batched-parallel implementation, where each worker processes a batch of molecules, typically on the order of thousands. As the scale of the datasets grows, keeping the data in memory becomes a challenge, particularly as memory usage can grow linearly with the number of workers. To avoid these issues, in Graphium, each molecule is stored as a separate file on the disk. During data-loading, each worker receives the number of the molecule in the dataset to load, which directly corresponds to the filename to process, massively reducing data serialization and memory usage. Furthermore, storing molecules on disk provides an opportunity to skip pre-processing the dataset for every training run.
+
+**PE Caching** We implement caching of intermediate computations related to the PE derivations (e.g., eigendecomposition of the graph Laplacian and higher-order diffusion operations) that are relevant for the construction of several PEs. This is especially beneficial when a large selection of PEs is used in a model. Further, we can thereby use positional information across several positional levels (via the position transfer functions proposed in Appendix E.3) with minimal additional computations required.
+
+**IPU-specific Optimizations** are supported by Graphium, such as multiple device iterations (performing multiple training steps on the device, reducing synchronization between the host and the accelerator), buffer prefetch (placing multiple batches on the device ahead of time), IO tiles (dedicating a specified number of IPU tiles to data transfer), and loading data asynchronously on the host while the IPU is processing. The Poplar software stack used to run programs on the IPU requires that the shapes of tensors be fixed at compile time, so a packing strategy is also applied to the input data to minimize the padding data required. The library also supports pipelining large models over multiple processors.
+
+**Low Precision Training** in both mixed precision and true 16 bit floating point precision support in Graphium allows reducing training time and memory requirements.
+
+## F TOKEN COUNT AND COMPARISON TO GPT-2
+
+Here we compare our proposed datasets with datasets used to pre-train foundational models in language, in particular GPT-2, pre-trained on 40GB of text (Radford et al., 2019). Due to the differences in the learning objective and data domain, a direct comparison between the pre-training data of GPT-2 and our datasets is difficult. In addition, the notion of tokens for graph learning models is not clearly defined. For example, for a graph with _n_ nodes and _e_ edges, one may regard the _n_ as the number of tokens. Further, since the edges represent the structural information in a graph, defining the number of tokens as _n_ + _e_ might be more meaningful. This notion, however, might still not suffice to fully represent a meaningful token count, as we do not know beforehand the relative importance of node and edge tokens on pre-training graph learning models. Hence, we propose to additionally use the number of prediction targets or labels to compare the token count for two reasons: First, the number of labels has a direct influence on the number of gradient steps we can do per epoch, before the training data repeats. For example, pre-training on small graphs with many labels is likely favorable to pre-training on very large graphs with only very few labels. Second, when pre-training a transformer, such as GPT-2, on next-word prediction each input token can also be regarded as a prediction target, making the count of prediction targets an equally meaningful number for comparison.
+
+28
+
+Unfortunately, exact token counts for GPT-2 are not available. However, we estimate the number of pre-training tokens as follows. GPT-3, the successor model of GPT-2, was pre-trained on 570GB of text, resulting in 400B tokens (Brown et al., 2020b). Crucially, both GPT-2 and GPT-3 use Byte Pair Encodings (Sennrich et al., 2016), meaning that sentences are likely broken up into the same byte-pair encoded tokens. Hence, we estimate a GB-to-token conversion ratio of
+
+400B tokens _≈_[0] _[.]_[7][B tokens] 570GB GB
+
+resulting in roughly 28B tokens for GPT-2.
+
+For our proposed datasets, we present an overview over the available labels in Table 6 and arrive at a total of 13 _._ 04B across all mixes. Further, the number atoms and bonds per dataset can be found in Table 5. Here, we count a total of 4 _._ 5 atoms and bonds. While these numbers are still short of the 28B tokens of GPT-2, we argue that especially our labels can also be seen as more informative for the following reasons.
+
+First, in contrast to the training data of GPT-2, where each label is a classification target, our labels comprise both classification and regression targets. In particular, regression targets might provide the model with much more fine-grained information, a factor which should be taken into account.
+
+Second, the joint prediction of multiple labels, potentially even on multiple levels such as graph- and node-level, might provide additional information during training that is not easily captured with a simple count of the labels.
+
+Third, there is evidence in the literature that supervised pre-training outperforms self-supervised methods when the domain of adaptation is similar to the training domain (Yang et al., 2020). We expect this to hold in our case since we have gathered a very large diversity of training tasks, increasing the likelihood that at least one training label is close to the desired fine-tuning label. Further, our dataset covers most of the molecules in PubChem, which means that they should cover a big part of the chemical space that is usually covered in drug-discovery projects.
+
+## G COMPUTATIONAL RESOURCES AND HARDWARE
+
+**Hardware** Baseline results were trained on a Bow Pod-16 IPU system, made of 16 Bow IPU accelerators, with some additional results obtained using A100 and V100 GPUs.
+
+**TOYMIX Computational resources** The results presented for the TOYMIX baselines used approximately 142 IPU hours of compute but we estimate that we used approximately 10 times that amount in the development stages for these models.
+
+**LARGEMIX Computational resources.** The results presented for the LARGEMIX used approximately 600 IPU hours (for LARGEMIX, PCQM4M_N4, PCQM4M_G25) and 150 GPU hours (for PCBA_1328, L1000_VCAP, L1000_MCF7) of compute, with more compute used for development and hyperparameter search.
+
+**ULTRALARGE Computational resources.** The results presented for the ULTRALARGE used approximately 500 GPU hours of compute, with more compute used for development and hyperparameter search.
+
+## H SCALING LAWS ON LARGEMIX
+
+Table 7: Scaling Law Results for MPNN++ model on the proposed LARGEMIX datasets.
+
+|model size (hidden size)|AVPR _↑_||_R_2 _↑_|
+|---|---|---|---|
+||L1000_VCAP L1000_MCF7|PCBA_1328 PCQM4M_G25 PCQM4M_N4||
+|1 million (64) 3 million (67) 10 million (128) 30 million (225) 100 million (416) 300 million (726) 1 billion (1331)|.4074 _±_.0035 .4173 _±_.0036 .4060 _±_.0004 .4226 _±_.0026 .4219 _±_.0111 .4475 _±_.0138 .4608 _±_.0185 .4872 _±_.0202 .4914 _±_.0317 .5235 _±_.0369 .5280 _±_.0004 **.5657** _±_.0024 **.5285** _±_.0005 .5634 _±_.0007|.2116 _±_.0059 .7737 _±_.0014 .7816 _±_.0051 .2462 _±_.0054 .7900 _±_.0018 .8189 _±_.0066 .2997 _±_.0075 .7974 _±_.0004 .8505 _±_.0017 .3405 _±_.0122 .7959 _±_.0006 .8614 _±_.0014 .3667 _±_.0147 .7981 _±_.0004 .8639 _±_.0013 .3973 _±_.0011 **.8005** _±_.0005 .8658 _±_.0008 **.4064** _±_.0022 .7995 _±_.0007 **.8680** _±_.0007||
+
+29
+
+**Experimental setting.** Here we aim to investigate the effect of scaling law (number of trainable parameters) on our proposed datasets with the MPNN++ model Masters et al. (2023). We tested the zero-shot scaling and up-scaling using the mup implementation Yang et al. (2021), meaning that no parameters were changed except the hidden dimensions being scaled. To our knowledge, this is the first time that mup was used in graph neural networks, so its behavior was not known. The Graphium library provides access to this valuable tool to the community, making investigation into scaling laws and previously unexplored model sizes for GNNs. To our delight, mup worked very well, showcasing another advantage of Graphium, and we can observe great scaling laws and model improvements up to a billion parameters.
+
+**Results discussion.** As shown in Table 7, MPNN++ models with more parameters achieves significantly better results across the range of tasks. The top result is balded while the second place is placed with underline. Specifically, on the L1000_VCAP and L1000_MCF7, the avPR went up to 0.42 _→_ 0.53 and 0.44 _→_ 0.56 respectively, which is a large gain considering that 0.33 would be a random classifier. Further, PCBA_1328 went up from 0.30 _→_ 0.41, again a large improvement considering the OGB-PCBA leaderboard (a smaller but similar dataset) is at 0.32. We further see results going down when the network is scaled down to 3M or 1M parameters.
+
+**Hyperparameters.** The hyperparameters for the MPNN++ experiments are specified in Table 8 for reproducibility.
+
+|Hyperparameter|Description|
+|---|---|
+|||
+|GNN depth dropout aggregation method MLP expansion ratio node embedding combine method GNN normalization any other normalization gnn output dim virtual node gnn activation any other activation Graph output NN graph depth, hidden Graph output NN node depth, hidden task heads depth, hidden batch size learning rate optimizer epochs|16 0.01 sum 3 concatenation batch normalization layer normalization 512 log sum gelu relu 2, 512 2, 256 2, 128 8192 lr = 0.008 with 5 epoch warm up Adam 100|
+
+Table 8: Hyperparameters for the MPNN++ model in the scaling law experiment.
+
+## I ADDITIONAL VISUALIZATION ON MOLECULES
+
+In this section, we provide additional visualizations of 24 molecules for L1000_MCF7 in Figure 7,PCBA_1328_1564K in Figure 8, PCQM4M_G25_N4 in Figure 9, QM9 in Figure 10, TOX21 in Figure 11 and ZINC12K in Figure 12.
+
+30
+
+**==> picture [397 x 237] intentionally omitted <==**
+
+Figure 7: Molecule visualizations from L1000_VCAP dataset.
+
+**==> picture [397 x 238] intentionally omitted <==**
+
+Figure 8: Molecule visualizations from PCBA_1328_1564K dataset.
+
+31
+
+**==> picture [396 x 236] intentionally omitted <==**
+
+Figure 9: Molecule visualizations from PCQM4M_G25_N4 dataset.
+
+**==> picture [397 x 240] intentionally omitted <==**
+
+Figure 10: Molecule visualizations from QM9 dataset.
+
+32
+
+**==> picture [397 x 231] intentionally omitted <==**
+
+Figure 11: Molecule visualizations from TOX21 dataset.
+
+**==> picture [397 x 240] intentionally omitted <==**
+
+Figure 12: Molecule visualizations from ZINC12K dataset.
+
+33
+
diff --git a/open_review/iclr2024_8597.json b/open_review/iclr2024_8597.json
new file mode 100644
index 0000000000000000000000000000000000000000..7669efa4fd9c691c7adba491f3209fa4511f23c1
--- /dev/null
+++ b/open_review/iclr2024_8597.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8597",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "UniAudio: An Audio Foundation Model Toward Universal Audio Generation",
+ "abstract": "Language models (LMs) have demonstrated the capability to handle a variety of generative tasks. This paper presents the UniAudio system, which, unlike prior task-specific approaches, leverages LMs techniques to generate multiple types of audio (including speech, sounds, music, and singing) with given input conditions. \nUniAudio 1) first tokenizes all types of target audio along with other condition modalities, 2) concatenates source-target pair as a single sequence, and 3) performs next-token prediction using LMs. Also, a multi-scale Transformer model is proposed to handle the overly long sequences caused by the residual vector quantization based neural codec in tokenization. Training of UniAudio is scaled up to 165K hours of audio and 1B parameters, based on all generative tasks, aiming to obtain sufficient prior knowledge not only in the intrinsic properties of audio but also the inter-relationship between audio and other modalities. Therefore, the trained UniAudio model has the potential to become a foundation model for universal audio generation: it shows strong capability in all trained tasks and can seamlessly support new audio generation tasks after simple fine-tuning. Experiments demonstrate that UniAudio achieves state-of-the-art or at least competitive results on most of the 11 tasks. Demo and code are released\\footnote{\\url{https://uniaudio666.github.io/demo_UniAudio/}}",
+ "rebuttal": "### General Response\nWe thank the meta-reviewer for organizing this helpful peer review stage. We thank all reviewers for their time, patience, and constructive\ncomments to help us improve our paper. We have revised our manuscript to respond to all reviewers’ comments in a one-by-one style.\nNoticeable revisions are highlighted in blue text in the paper. \n**We also encourage the reviewers to check the PDF version of our response letter in the supplementary material for better readability**. \n\nBased on the helpful comments of the reviewers, the main revisions in this update are: \n\n(1) We reorganized the experiment section by adding the ablation study part to better present our experimental analysis; we added an\nextra appendix to systematically present our ablation study. \n\n(2) We revised our discussion on model architecture to provide a more comprehensive comparison with prior works in terms of the model\narchitecture. \n\n(3) We revised our related work section to better acknowledge the contributions of prior works. \n\n(4) We revised our limitation section based on issues raised by our reviewers. \n\n(5) We revised our tables and diagrams for better readability. \n\n(6) We update the demo page to show UniAudio’s capability in long audio generation. \n\n(7) We remove the content that can potentially over-claim our contributions. \n\nBased on the revised manuscript, we attempt to reach a consensus with the reviewers about our main contributions: \n\n(1) To achieve universal audio generation, UniAudio is a unified model that supports 11 audio generation tasks. Following the prior works\nthat support multiple audio generation tasks, UniAudio achieves an impressive coverage extension. \n\n(2) The proposed UniAudio can support 11 audio generation tasks due to multiple novel considerations, such as (i) sequential representations. of audio and other input modalities; (ii) uniform formulation for LLM-based audio generation tasks; and (iii) efficient model architecture specifically designed for audio generation. \n\n(3) In experiments, the overall performance of UniAudio is well validated. Further ablation studies demonstrate that (i) building a\njoint-trained audio generation model is beneficial to nearly all audio generation tasks included; (ii) the proposed multi-scale transformer\narchitecture is effective in modeling the audio token sequences. \n\n(4) Demo and code are released, in the hope that UniAudio can become a foundation model that supports emergent audio generation in\nfuture research. \n\nWe would also like to discuss with the reviewers why achieving universal audio generation is of sufficient interest and why UniAudio can\npotentially benefit the research community: \n\n(1) Compared with building independent models for each task and each domain, building a universal audio generation model can effectively save human efforts and resource input. \n\n(2) The universal audio generation models can potentially serve as foundation models that can generalized to unseen audio generation\ntasks. \n\n(3) The goal of this research, achieving universal generation, is aligned with the observations of the pioneer works (Wang et al, 2022, Sanh et al, 2022) in domains other than audio. These pioneer works demonstrate that multi-task learning leads to a more advanced understanding of the target domain and improves the generalization towards unseen tasks. \n\nReference: \n\nCopet et al, Simple and Controllable Music Generation, in NeurIPS 2023. \n\nWang et al, Generalization via Declarative Instructions on 1600+ NLP Tasks in EMNLP 2022. \n \nSanh et al, Multitask Prompted Training Enables Zero-Shot Task Generalization, in ICLR 2022.\n\n### Response to Review dsre\nWe thank the reviewer for recognizing our contributions. We do appreciate the constructive comments the reviewer provided to us to\nfurther improve our paper. We are delighted to have the following discussion with the reviewer. \n**Q1:** Discussion on the potential adoption of unlabeled data and domain-specific models. \n\n**A:** We believe the reviewer is most interested in this direction so we reply to it first. We do agree with the reviewer the paper should\nconsider the unlabeled data and domain-specific models. We summarize and respond to the reviewer’s comments i [...]\n\n### Response to Review dsre part 2\n**Q2:** Other than text-to-music, the tasks are all quite local, with no real dependencies longer than a few seconds. \n\n**A:** We are happy to discuss the local dependency issue with the reviewer, and we do agree with the reviewer the proposed model should be able to handle both local and global dependency. \n\n(1) Among the 11 audio generation tasks supported by UniAudio, many tasks are naturally local and attempt to translate the input into output in a verbatim-like manner, such as speech enhancement, voice conversion, etc. As mentioned by the reviewer, th [...]\n\n### Response to Review dsre part 3\n**Q5:** Discussion on the cross-task and cross-domain benefits of building a unified audio generation model. \n\n**A:** We are delighted that the reviewer reminds us to consider the benefits from both cross-task and cross-domain perspectives. We are happy to discuss with the reviewer that: \n\n**Cross-Task benefits:** (Without the considerations of unlabeled data and domain-specific models) the original manuscript attempts to demonstrate that the proposed UniAudio achieves consistently better performance than its task-specific counterparts. Some of these impro [...]\n\n### Response to Reviewer EAVx\nWe thank the reviewer for recognizing our contributions. We do appreciate the constructive comments the reviewer provided to us to\nfurther improve our paper. We are delighted to have the following discussion with the reviewer. \n\n**Q1:** The paper is a very dense read with some details relegated to the appendix while some details difficult to glean from the text. For\nexample, the details about the audio tokenizer is moved to the appendix and no specifics are mentioned in the\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 1,
+ 5,
+ 10
+ ],
+ "score_mean": 5.25,
+ "score_variance": 13.58,
+ "score_spread": 9,
+ "score_min": 1,
+ "score_max": 10,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The authors propose an LLM-like approach to generate multiple types of audio (speech, sounds, music, singing) all using a single model. The idea is to tokenize audio and other modalities (phones, textual description, and audio context), concatenate the source and target as a sequence and perform next-token prediction using LLM. The authors also propose using a multi-scale Transformer to handle longer sequences (since the tokenizer is based on residual vector quantization), consisting of a global transformer for modeling “semantics” (inter-frame) and local Transformer for finer scale “acoustics” (intra-frame). Results show that across 11 tasks, the proposed model is moderately competitive, outperforming other approaches in some metrics for some tasks to prior works.\n\nThe reviewers agreed that the idea of using a foundational model that covers all audio related tasks is interesting. Furthermore, this is likely the first work that covers the proposed set of tasks covering the domains of speech and music. They also found the multi-scale transformer architecture to be quite interesting in the context of modeling longer sequences. \n\nDuring the review, a few important concerns were also raised. While training on multiple tasks using a larger training set is in itself impressive, the results were not convincing enough to showcase the benefits of training on multiple tasks. The model works competitively on some tasks (speech related, e.g.), but not as well on some other (text-to-music",
+ "forum_id": "nhgTmx1TZJ",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_dsre",
+ "review_id": "FemtiwPq0R",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3755,
+ "edit_detected": true,
+ "edit_delta_seconds": 405259,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_kfiC",
+ "review_id": "ih66iSoj8e",
+ "scores": {
+ "rating": 1,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 5
+ },
+ "review_text_chars": 1393,
+ "edit_detected": true,
+ "edit_delta_seconds": 410851,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_EAVx",
+ "review_id": "R8nZGZXl50",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3645,
+ "edit_detected": true,
+ "edit_delta_seconds": 773934,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_gngw",
+ "review_id": "Ff1TtcnAsI",
+ "scores": {
+ "rating": 10,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 4,
+ "confidence": 3
+ },
+ "review_text_chars": 2557,
+ "edit_detected": true,
+ "edit_delta_seconds": 951116,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8597.md b/open_review/iclr2024_8597.md
new file mode 100644
index 0000000000000000000000000000000000000000..fc616d6d4db2518cfa6435a3cf043f1084cf25c2
--- /dev/null
+++ b/open_review/iclr2024_8597.md
@@ -0,0 +1,438 @@
+
+
+## UNIAUDIO: AN AUDIO FOUNDATION MODEL TOWARD UNIVERSAL AUDIO GENERATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+Large Language models (LLM) have demonstrated the capability to handle a variety of generative tasks. This paper presents the UniAudio system, which, unlike prior task-specific approaches, leverages LLM techniques to generate multiple types of audio (including speech, sounds, music, and singing) with given input conditions. UniAudio 1) first tokenizes all types of target audio along with other condition modalities, 2) concatenates source-target pair as a single sequence, and 3) performs next-token prediction using LLM. Also, a multi-scale Transformer model is proposed to handle the overly long sequences caused by the residual vector quantization-based neural codec in tokenization. Training of UniAudio is scaled up to 165K hours of audio and 1B parameters, based on all generative tasks, aiming to obtain sufficient prior knowledge not only in the intrinsic properties of audio but also the inter-relationship between audio and other modalities. Therefore, the trained UniAudio model has the potential to become a foundation model for universal audio generation: it shows strong capability in all trained tasks and can seamlessly support new audio generation tasks after simple fine-tuning. Experiments demonstrate that UniAudio achieves state-of-the-art or at least competitive results on most of the 11 audio generation tasks. Demo and code are released.[1] .
+
+## 1 INTRODUCTION
+
+Audio generation is an important component of generative AI. Recently, the popularity of generative AI has induced increasingly emergent and varying needs in audio generation: audio is expected to be generated based on humans’s demands, such as speech synthesis (TTS), voice conversion (VC), singing voice synthesis (SVS), text-to-sound, and text-to-music. Prior works on audio generation tasks are commonly task-specific: their designs heavily leverage domain knowledge and their usage is restricted to fixed setups (Tan et al., 2021; Luo & Mesgarani, 2019; Zmolikova et al., 2023; Huang et al., 2021b; Cho et al., 2021). Instead of taking care of each task independently, this work is an attempt to achieve universal audio generation, which intends to accomplish multiple audio generation tasks with only one unified model. The universal audio generation model is expected to obtain sufficient prior knowledge in audio and related modalities, which has the potential to provide simple and effective solutions for the increasing needs of generating diverse types of audio.
+
+The superiority of Large Languge Models (LLM) in text-generative tasks inspires a series of LLMbased models in audio generation (Wang et al., 2023a; Kharitonov et al., 2023; Huang et al., 2023b; Agostinelli et al., 2023; Borsos et al., 2023). Among these works, LLM’s capability in independent tasks has been extensively studied in tasks like text-to-speech (TTS) (Wang et al., 2023a; Kharitonov et al., 2023; Huang et al., 2023b) and music generation (Agostinelli et al., 2023; Copet et al., 2023), and achieves competitive performance. However, LLM’s ability to process multiple tasks with a unified model is less exploited in audio generation research: most existing LLM-based works are still designed for single tasks (Wang et al., 2023a; Kharitonov et al., 2023). We argue that achieving universality and versatility in audio generation through the LLM paradigm is promising but has not yet been comprehensively studied before this work.
+
+Toward universal audio generation, this work presents UniAudio, which adopts LLM techniques and is able to generate multiple types of audio (speech, sounds, music, and singing) conditioned on various input modalities, such as phoneme sequences, textual descriptions, and audio itself. The proposed UniAudio is mainly featured as follows: First, all types of audio, along with all other input
+
+> 1[URL removed]
+
+1
+
+modalities, are tokenized as discrete sequences. Specifically, a universal neural codec model is built to effectively tokenize audio regardless of the audio type, and other tokenizers are used to tokenize other different modalites. Then, UniAudio concatenates the source-target pair as a single sequence. Lastly, UniAudio performs next-token prediction using LLM. The residual vector quantization (Zeghidour et al., 2021) based on neural codecs is used in the tokenization process, resulting in overly long token sequences (one frame corresponding to multiple tokens) that cannot be processed efficiently by LLM. A multi-scale Transformer architecture is designed to reduce computational complexity by modeling the inter- and intra-frame correlation separately. Specifically, a global Transformer module is used to model the inter-frame correlation ( _e.g._ semantic level), and a local Transformer module is used to model the intra-frame correlation ( _e.g._ acoustic level).
+
+To demonstrate the scalability of UniAudio for new tasks, the building process of UniAudio takes two stages. Firstly, the proposed UniAudio is trained on multiple audio generation tasks jointly, which allows the model to obtain sufficient prior knowledge not only of the intrinsic properties of audio but also of the interrelationship between audio and other input modalities. Secondly, through fine-tuning, the trained model can seamlessly support more unseen audio generation tasks. Thus, UniAudio has the potential to become a foundation model for universal audio generation: it is able to continuously support emergent needs in audio generation. Experimentally, our UniAudio supports 11 audio generation tasks: the training stage includes 7 audio generation tasks, while 4 tasks are further added in the fine-tuning stage. The building process of UniAudio is scaled up to 165k hours of audio and 1B parameters. Among the 11 tasks, UniAudio consistently obtains competitive performance in both objective and subjective evaluations. State-of-the-art results are even achieved on most of these tasks. Further investigation suggests that training multiple tasks simultaneously in the training stage is mutually beneficial to each task involved. In addition, UniAudio can effectively adapt to new audio generation tasks and outperform task-specific models with a non-trivial gap.
+
+To sum up, this work reveals that building universal audio generation models is necessary, promising, and beneficial. The main contributions of this work are summarized as follows: (1) Toward universal audio generation, UniAudio is presented as a unified solution for 11 audio generation tasks.
+
+(2) Per methodology, UniAudio provides novel approaches for (i) sequential representations of audio and other input modalities; (ii) uniform formulation for LLM-based audio generation tasks; and (iii) efficient model architecture specifically designed for audio generation.
+
+(3) Per experiments, the overall performance of UniAudio is well validated, and the benefits of building a versatile audio generation model are verified by exhaustive experimental results.
+
+(4) Demo and code are released, in the hope that UniAudio can become a foundation model that supports emergent audio generation in future research.
+
+## 2 UNIAUDIO
+
+This section introduces the technical details of the proposed UniAudio. Section 2.1 explains how audio and other modalities are tokenized. Then, all considered audio generation tasks are uniformly formulated in Section 2.2. Subsequently, the multi-scale Transformer architecture is proposed in Section 2.3 to handle the overly long sequence challenge caused by the adoption of neural codecs.
+
+## 2.1 TOKENIZATION
+
+LLM are commonly used for sequential modeling, so audio and all other input modalities are tokenized before being processed. These processes for each modality are completed by independent modules. All of these modules are fixed in the optimization of UniAudio or parameter-free.
+
+## 2.1.1 AUDIO
+
+For all audio generation tasks considered in this work, audio, regardless of its types (speech, sounds, music, or singing), is the target to predict. Instead of modeling different types of audio separately, UniAudio intends to tokenize all types of audio as a single and unified modality (even though they commonly have distinct patterns, such as frequency span), which requires a model that is well-suited to mapping all audio types into a shared latent space. Following Wang et al. (2023a); Kharitonov et al. (2023), neural codec models (Défossez et al., 2022; Yang et al., 2023b; Kumar et al., 2023) are used in this work for audio tokenization. An audio signal of duration _d_ with sample rate _fs_ can be
+
+2
+
+represented by a sequence **x** _∈_ [ _−_ 1 _,_ 1] _[d][∗][f][s]_ . An audio neural codec intends to compress **x** and then recover it as **ˆx** using an encoder-decoder architecture with a quantization module:
+
+**h** = Encoder( **x** ) _∈R[T][ ∗][L]_ ; **ˆh** = Quantization( **h** ); **ˆx** = Decoder( **h[ˆ]** ) (1) where _T_ denotes the number of audio frames after down-sampling in the encoder, and _L_ denotes the feature dimension of the encoder. The discrete representations of audio are the intermediate product of the quantization process. Given any frame of hidden output **h** _t_ , the integer vector **z** _t_ = [ _zt_[1] _[, ..., z] t[n][q]_[]] is generated by Residual Vector Quantization (RVQ) (Zeghidour et al., 2021), where _nq_ denotes the number of vector quantization layers. Iteratively, each element _zt[k]_[is the index among all pre-learned] and fixed _k_ -th level quantizer vectors _{_ **q** _[∗] k[}]_[ that has the smallest L2 distance to the residual between] **h** _t_ and the sum of all previous chosen quantizer vectors _{_ **q** _[z] j t[j][, j]_[=][1] _[, ..., k][ −]_[1] _[}]_[.][With the discrete] representation **z** _t_ , **h[ˆ]** _t_ is reconstructed as a close estimation of **h** _t_ that can be used to recover **x** _t_ with the decoder.
+
+**==> picture [350 x 32] intentionally omitted <==**
+
+The discrete representation of all audio frames **z** _∈_ **Z** _[T][ ×][n][q]_ is a matrix and needs to be converted into a sequence before being processed by LM: it is simply flattened as a sequence, in which every _nq_ element for one frame is consecutive. Without specifically stated, we set _nq_ = 3 in our experiments. As the waveform can be recovered from **z** with a neural codec decoder, the rest of this paper mainly discusses how to predict the audio token sequence **z** using LLM techniques. As UniAudio intends to generate both speech and non-speech content, we build the codec model on our own and with broader data coverage. Details of our codec configuration is in Appendix E.
+
+## 2.1.2 OTHER MODALITIES
+
+Besides audio, other modalities considered in UniAudio also need to be represented as sequences. In addition, most of these sequences are transformed into discrete ones through tokenization. The serialization and tokenization of these input modalities, along with their key features, are briefly summarized as below.
+
+**Phoneme:** Phonemes are the basic units of speech pronunciation in linguistics. Phoneme sequences have multiple sources: (1) when only text is available, phoneme sequence without duration information can be obtained by text-to-phoneme mapping using a pronunciation dictionary; (2) when only speech is available, phoneme sequence with duration information is obtained by beam search of the DNN-HMM system (Hinton et al., 2012); (3) when both text and speech are available, phoneme sequence with duration information is obtained by forced alignment of the DNN-HMM system[2] .
+
+**MIDI:** MIDI (Zhang et al., 2022) is widely used for singing voice synthesis tasks. F0 and duration information are included in the MIDI. We use the duration information to flatten the F0 sequence, so that the frame-level F0 sequence is obtained.
+
+**Text:** Text acts as a effective carrier of human instructions in audio generation tasks (Yang et al., 2023a; Copet et al., 2023). In this work, these textual instructions are represented as continuous embeddings derived from pre-trained text LLM (Raffel et al., 2020), as these embeddings contain rich textual semantics. Processing these continuous embeddings with LLM is further clarified in Section 2.3[3] .
+
+**Semantic Token:** The semantic tokens are derived from the continuous embeddings output by audio self-supervised learning (SSL) models. These continuous representations are highly informative and can be adopted in both speech understanding (Rubenstein et al., 2023) and generative tasks (Borsos et al., 2023). Following Huang et al. (2023b), these continuous representations are tokenized by performing K-means clustering (Hsu et al., 2021) over these continuous representations. Since the continuous representations are frame-level, the semantic tokens also encode duration information[4] .
+
+2CMUDict ([URL removed]) is adopted as the pronunciation dict; kaldi recipe ([URL removed]) is adopted to build the deep neural network-hidden Markov model (DNN-HMM) system.
+
+3The encoder of T5 ([URL removed]) is used to extract the continuous text embeddings.
+
+4The 9-th layer hidden output of Hubert (Hsu et al., 2021) is adopted as the semantic token representations ([URL removed]). The number of clusters for K-means is 500.
+
+3
+
+## 2.2 UNIFIED TASK FORMULATION
+
+Table 1: Sequence formats of all tasks supported by UniAudio. Text color represents modality. black: audio; green: phoneme; blue: MIDI; purple: text; brown: semantic token. _♣_ means tasks that generate audio with deterministic length. _♢_ : means tasks that are only included in the fine-tuning stage. The speaker prompt is a 3-second speech and is used to represent the speaker identification.
+
+|Task|Conditions|Audio Target|
+|---|---|---|
+|Text-to-Speech (TTS) (Wang et al., 2023a)|phoneme, speaker prompt|speech|
+|Voice Conversion (VC) _♣_(Wang et al., 2023e)|semantic token, speaker prompt|speech|
+|Speech Enhancement (SE) _♣_(Wang et al., 2023b)|noisy speech|speech|
+|Target Speech Extraction (TSE) _♣_(Wang et al., 2018)|mixed speech, speaker prompt|speech|
+|Singing Voice Synthesis (SVS) (Liu et al., 2022)|phoneme(with duration), speaker prompt,MIDI|singing|
+|Text-to-Sound (Sound) (Yang et al., 2023c)|textual description|sounds|
+|Text-to-Music(Music) (Agostinelli et al.,2023)|textual description|music|
+|Audio Edit (A-Edit) _♣♢_(Wang et al., 2023d)|textual description, original sounds|sounds|
+|Speech dereverberation (SD) _♣♢_(Wu et al., 2016)|reverberant speech|speech|
+|Instruct TTS (I-TTS)_♢_(Guo et al., 2023)|phoneme,textual instruction|speech|
+|Speech Edit (S-Edit) _♢_(Tae et al., 2021)|phoneme(with duration), original speech|speech|
+
+For all tasks considered in UniAudio, the target audio is generated based on given conditions. With the same target modality, i.e., audio, it is the conditions that define different audio generation tasks. However, even with the variance in conditions, all tasks can still be uniformly formulated as sequential modeling tasks that can be processed by LLM: both the target audio and the conditions are first transformed as sub-sequences and spliced as [ _conditions_ , _target_ ] sequences to be processed.
+
+UniAudio supports 11 audio generation tasks in total. The sequential formats of each task are defined in Table 1, in which the sub-sequences of all modalities are derived as in Section 2.1. However, due to the unique configurations of each task, some of the condition sub-sequences are subject to task-specific pre-processing operations during the tokenization. For audio, these operations are mainly for data corruption, such as adding noise, reverberation, and speech mixed with other speakers in the raw audio before tokenization. For phoneme and semantic tokens, duration information is reserved by default but can also be removed. For singing voice synthesis and speech edit tasks, the duration information of phoneme is used. For TTS and I-TTS tasks, the duration information is not used. For MIDI, the duration information is used repeat the F0 sequence. For text embeddings, no operations are applied in this work.
+
+To avoid ambiguity, some special discrete tokens (enclosed by <>) are inserted to indicate (1) the start and end of the whole sequence; (2) the start and end of each sub-sequence of a certain modality; and (3) the task identifier. For example, for a text-to-sound task sequence that generates target audio based on textual description, the whole sequence is like: _ text_sequence audio_sequence _ .
+
+## 2.3 MULTI-SCALE TRANSFORMER
+
+Previous work on LLM-based audio generation (Copet et al., 2023) advocates to modeling the discrete audio tokens as flattened sequences. If so, these sequences are processed in the length of _T × nq_ , which is highly challenging considering the quadratic space complexity of Transformer (Vaswani et al., 2017) with respect to the lengths. Inspired by Yu et al. (2023), a multi-scale Transformer architecture is specifically designed for discrete audio sequences, which is a hierarchical model that processes the inter- and intra-frame correlation by global and local Transformer modules separately. An overview of the proposed architecture is in Figure 1. Instead of processing the whole flattened sequence token-by-token like prior works (Kharitonov et al., 2023), the multi-scale transformer considers patches (i.e., every consecutive _nq_ token) as the global modeling units and then handles the tokens within each patch locally. Note that both the global and local Transformers are causal.
+
+For audio token sequences, each patch accounts for _nq_ consecutive audio tokens that exactly represent one audio frame. First, as suggested in Equation 2, regardless of the exact choices of each quantization vector **q** _∗[z] t[∗]_[, it is the summed quantization vector] **[ ˆh]** _t_[that is used to represent the audio frame.][Thus,] in the embedding stage, each patch (a.k.a., frame) is represented by the summed vector of the corresponding embeddings before entering the global Transformer. Second, the global Transformer is to predict audio frame-by-frame: to predict the frame **x** _t_ , it outputs the continuous representations
+
+4
+
+**==> picture [396 x 142] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Predicted Audio Sequence Local Local Local Multi-Scale Transformer Transformer Transformer Transformer Condition Sequences Target Audio Sequence Task Formulation for Multiple Tasks TTS VC SE TSE ... Global Transformer Tokenization for Multiple Modalities Semantic Phoneme MIDI Text Audio Token **----- End of picture text -----**
+
+Figure 1: Overview of UniAudio (left) and multi-scale Transformer architecture (right). represent the end of the sequence. _zt[k]_[denotes the k-th audio token at t-th frame.]
+
+that include frame **x** _t−_ 1 and all previous content. These continuous representations will be further processed by the local Transformer. Third, also as in Equation 2, given the hidden representation **h** _t_ , the acquisition of **z** _t_ is independent of any hidden output other than **h** _t_ . Inspired by this, it is reasonable to predict the discrete tokens for frame **x** _t_ , a.k.a., patch **z** _t_ , only with the hidden output of global Transformer corresponding to frame **x** _t−_ 1. To be more detailed, as the acquisition of each token _zt[k]_[is auto-regressively dependent on its prior tokens] _[ {][z] t[j][|][j][< k][}]_[, a local Transformer is adopted] to predict the patch sequence **z** _t_ in auto-regressive style. During this process, the corresponding vector output by the global transformer acts as a patch-level context, which is linearly transformed and then added to the embedded results of each token _zt[k]_[.]
+
+The proposed multi-scale Transformer architecture is also compatible with discrete and continuous sequences besides audio. For all discrete tokens except audio (phoneme, semantic, MIDI and special tokens), each token has independent semantics and thus should account for one patch. So these discrete tokens repeat for _nq_ times to fill each patch. The continuous text embeddings are also repeated for _nq_ times for the same purpose. Additionally, their embedding process is replaced by a linear transformation while their predicting targets for local Transformer are consecutive special tokens __ .
+
+The design of the proposed multi-scale Transformer can effectively reduce computational complexity. First, the equivalent sequence length for the global Transformer is reduced from _T × nq_ to _T_ , which makes the global modeling cost independent to _nq_ and thus the adoption of a larger _nq_ becomes feasible. Second, the intra-patch computation to generate the discrete tokens for each frame is offloaded to the local Transformer. The computation on the local transformer is comparatively light since it only processes the very short sequence (fixed to the length of _nq_ ) and empirically has fewer parameters than the global Transformer by design.
+
+## 3 EXPERIMENTS
+
+This section first introduces the experimental setup in Section 3.1. The results for the training stage and the fine-tuning stage are presented in Section 3.2 and 3.3 respectively. Ablation studies are presented in Section 3.4.
+
+## 3.1 EXPERIMENTAL SETUP
+
+**Data and Model:** UniAudio is built on labeled datasets. Specifically, 12 datasets are adopted in this work, all of which are publicly available. The overall audio volume is 165K hours. Detailed data statistics and their adoption for each task are in Appendix A.1. Discrete tokens from all modalities form a joint vocabulary of size 4212, including all special tokens. Vanilla Transformer decoder layers with causality are consistently adopted in global and local Transformer. The overall parameter budget is roughly 1B. Detailed model configuration is in Appendix A.2. Existing neural codec models are sub-optimal for universal audio generation, mainly due to data coverage. An improved neural codec model is then built with fewer quantization levels _nq_ , smaller frame-per-second rate, higher quality, and wider coverage (see Appendix E).
+
+**Training and Inference:** The training stage includes 7 tasks while 4 new tasks are added in the fine-tuning stage. Table 1 specifies the tasks for fine-tuning only. Both the training and fine-tuning
+
+5
+
+Table 2: Performance evaluation for UniAudio and selected prior works in the training stage
+
+|Task|Model|Objective Evaluation Metrics Results|Objective Evaluation Metrics Results|Subjective Evaluation Metrics Results|Subjective Evaluation Metrics Results|
+|---|---|---|---|---|---|
+|Text-to-Speech|Shen et al. (2023) UniAudio|SIM(_↑_)/ WER(_↓_)|0.62 / 2.3 **0.71 / 2.0**|MOS(_↑_) / SMOS(_↑_)|**3.83**_±_**0.10**/ 3.11_±_0.10 3.81_±_0.07 /**3.56**_±_**0.10**|
+|Voice Conversion|Wang et al. (2023e) UniAudio|SIM(_↑_)/ WER(_↓_)|0.82 / 4.9 **0.87 / 4.8**|MOS(_↑_) / SMOS(_↑_)|3.41_±_0.08 / 3.17_±_0.09 **3.54**_±_**0.07 / 3.56**_±_**0.07**|
+|Speech Enhancement|Richter et al. (2023) UniAudio|PESQ(_↑_)/ VISQOL(_↑_) / DNSMOS(_↑_)|**3.21 / 2.72**/ 3.29 2.63 / 2.44 /**3.66**|MOS(_↑_)|3.56_±_0.08 **3.68**_±_**0.07**|
+|Target Speaker Extraction|Wang et al. (2018) UniAudio|PESQ(_↑_)/ VISQOL(_↑_) / DNSMOS(_↑_)|**2.41 / 2.36**/ 3.35 1.88 / 1.68 /**3.96**|MOS(_↑_)|3.43_±_0.09 **3.72**_±_**0.06**|
+|Singing Voice|Liu et al. (2022)|||MOS(_↑_)|3.94_±_0.02 /**4.05**_±_**0.06**|
+|Synthesis|UniAudio|-|-|/ SMOS(_↑_)|4.08_±_0.04 / 4.04_±_0.05|
+|Text-to-Sound|Liu et al. (2023a) UniAudio|FAD(_↓_)/ KL(_↓_)|4.93 / 2.6 **3.12 / 2.6**|OVL(_↑_) / REL (_↑_)|61.0_±_1.9 / 65.7_±_1.8 **61.9**_±_**1.9 / 66.1**_±_**1.5**|
+|Text-to-Music|Copet et al. (2023) UniAudio|FAD(_↓_)/ KL(_↓_)|4.52 /**1.4** **3.65**/ 1.9|OVL(_↑_) / REL(_↑_)|**73.3**_±_**1.5 / 71.3**_±_**1.7** 67.9_±_1.7 / 70.0_±_1.5|
+
+are completed with 16 AMD MI200-64G GPUs. The detailed configuration of optimization is in Appendix A.3. To retain the performance of previous tasks during fine-tuning, following Conneau et al. (2020), the training data are re-sampled with respect to tasks with _α_ = 0 _._ 05. Top-k sampling is adopted consistently for inference, in which _k_ and the temperature are set to 30 and 0.8, respectively. As the global Transformer does not directly predict tokens, the sampling process only happens in the local Transformer inference.
+
+**Evaluation:** For evaluation, most tasks are evaluated using both objective and subjective metrics[5] . Generally, for objective evaluation, Word Error Rate (WER) is used to evaluate the intelligibility of generated speech; Similarity Score (SIM) is for similarity in terms of speaker identity[6] ; Perceptual Evaluation of Speech Quality (PESQ), VISQOL[7] , DNSMOS[8] and Mel Cepstral Distortion (MCD) are signal-level quality metrics derived from human auditory research; Following (Copet et al., 2023), Fréchet Audio Distance (FAD), Kullback-Leiber (KL) Divergence, and Fréchet Distance (FD) are for audio fidelity and audio similarity; For subjective evaluation, MOS and SMOS are adopted to provide human-centric judgment for speech and sing related tasks. For text-to-sound and text-to-music tasks, we use overall quality (OVL), and relevance to the text input (REL) (Copet et al., 2023). Note all subjective results are obtained from Amazon Mechanical Turk[9] for fair comparison. Appendix F shows details of the subjective evaluation process.
+
+## 3.2 THE RESULTS OF 7 GENERATIVE TASKS IN THE TRAINING STAGE
+
+This section presents the overall evaluation results of the proposed UniAudio model over all 7 audio generation tasks during the training stage. A comprehensive comparison is conducted between UniAuduio and multiple prior works on each task, including not only the LM-based methods but also the diffusion model-based methods as well as other conventional audio generation methods. The detailed comparison is presented in Appendix B. We selected one of the most advanced prior work in each task and present the results in Table 2.
+
+As suggested in Table 2, UniAudio is a versatile system that can handle all 7 audio generation tasks together and achieve competitive performance. Per subjective evaluation, UniAudio surpasses the baselines in 3 out of 6 tasks (TTS, VC, Sound); per objective evaluation, it achieves better results on 5 out of the 7 tasks except SVS and Music. We also find UniAudio under-perform on several metrics. UniAudio’s subjective performance for SE and TSE is less competitive compared with its competitors, which is also observed in previous literature (Erdogan et al., 2023) that the signal-level evaluation metrics may not be suitable for LM-based generative methods. UniAudio cannot surpass the selected competitor (Copet et al., 2023) in the Text-to-Music task. We note that (Copet et al., 2023) is built with more private labeled data than our UniAudio.
+
+> 5Following the setting of DiffSinger (Liu et al., 2022), SVS tasks don’t report the objective results
+
+> 6WER and SIM evaluation models follow Wang et al. (2023a)
+
+> 7[URL removed]
+
+> 8[URL removed]
+
+> 9[URL removed]
+
+6
+
+## 3.3 THE RESULTS OF 4 GENERATIVE TASKS IN THE FINE-TUNING STAGE
+
+Table 3: Performance evaluation for UniAudio and selected prior works in the fine-tuning stage
+
+|Task|Model|Evaluation Metrics Results|Evaluation Metrics Results|
+|---|---|---|---|
+|Audio Edit|AUDIT (Wang et al., 2023d) UniAudio|FD(_↓_)/ KL(_↓_)|20.78 / 0.86 **17.78 / 0.77**|
+|Speech Dereverb.|SGMSE+ Richter et al. (2023) UniAudio|PESQ(_↑_)/ DNSMOS(_↑_)|**2.87**/ 3.42 2.13 /**3.51**|
+|Instructed TTS|GroundTruth UniAudio|MOS(_↑_)/ SMOS(_↑_)|**3.77**_±_**0.07**/**3.85**_±_**0.08** 3.61_±_0.09 / 3.71_±_0.09|
+|Speech Edit|TTS system regeneration UniAudio|MCD(_↓_) / MOS(_↑_)|6.98 / 3.69_±_0.08 **5.12**/**3.82**_±_**0.06**|
+
+As UniAudio is designed to continuously support new audio generation tasks, this section reports UniAudio’s performance on unseen tasks. The model is obtained by fine-tuning over 4 new tasks jointly and the results are presented in Table 3. Similar to section 3.2, for each task, we compare UniAudio’s performance with one selected prior work and report the detailed results in Appendix B.
+
+As shown in Table 3, the fine-tuned UniAudio model surpasses its baselines in audio edit and speech dereverberation and is approaching the ground-truth quality in the Instructed TTS task. For speech editing, UniAudio shows considerable improvement compared to generating the whole sentence.
+
+## 3.4 ABLATION STUDY
+
+## 3.4.1 BENEFIT OF BUILDING UNIFIED AUDIO GENERATION MODEL
+
+To further validate our claim that building a unified model for all 11 audio generation tasks is promising and beneficial, more ablation studies are conducted. In Appendix C.1, we demonstrate that the joint-trained UniAudio model consistently outperforms the models that are trained for each specific task[10] , regardless they are included in the training stage or the fine-tuning stage. In Appendix C.2, we additionally validate that fine-tuning over the 4 new audio generation tasks does not affect UniAudio’s performance on the original 7 tasks. In Appendix C.3, we observe that UniAudio can consistently benefit from increased training data volume of each task, which provides another reason to build universal audio generation models: these models are easier to scale up as the data collection is more feasible. We provide more discussion in Appendix D about the effectiveness of building a universal audio generation model.
+
+## 3.4.2 THE EFFECTIVENESS OF MULTI-SCALE TRANSFORMER MODEL
+
+As in section 2.3, the adoption of neural codecs has become a popular choice of LLM-based audio generation but causes an overly long sequence issue that needs further consideration. This section compares the proposed multi-scale Transformer with four representative approaches in this field: Flattening Prediction ( _e.g._ SPEARTTS (Kharitonov et al., 2023)), Coarse first prediction ( _e.g._ VALL-E (Wang et al., 2023a)), Parallel prediction ( _e.g._ AudioGen (Kreuk et al., 2022)), and Delay prediction ( _e.g._ MusicGen (Copet et al., 2023)). Figure 2 illustrates the prediction order of these five architectures. Experiments are conducted on text-to-speech and text-to-music tasks and the results are reported in Table 4 and 5 respectively[11] .
+
+**Auto-Regression and Performance:** Among all 4 baselines aforementioned, Copet et al. (2023) claims that the flattening method provides the best audio generation quality. they further claim that the superior performance of flattening prediction is mainly attributed to the auto-regressive property; the other three methods do not reserve this property as the concurrent prediction is introduced (see Fig. 2). Under the scenario of codec adoption, we reinterpret the auto-regressive property as: current token prediction is based on all tokens of previous frames and the previous tokens within the current frame, or formally, the prediction of the current token _zt[k]_[is][based][on][tokens:] _{zt[k][′][′][ |][t][′][<][t][} ∪{][z] t[k][′][′][ |][t][′]_[=] _[t, k][′][<][k][}]_[.][With this definition, we claim that the proposed multi-scale] transformer is also auto-regressive.
+
+Aligned with Copet et al. (2023), our experiments also validate the importance of the auto-regressive property. As in Table 4 and 5, flattening prediction brings better generation quality than parallel,
+
+> 10Note the task-specific models are built with the corresponding subset of the training data.
+
+> 11Results are based on unofficial implementations.
+
+7
+
+**==> picture [308 x 207] intentionally omitted <==**
+
+**----- Start of picture text -----**
+0 0 D 0 1 1 Parallel Coarse first Delay C3 6 9 B2 E5 8 A1 D4 7 1 Flattening Multi-scale Transformer (Ours) **----- End of picture text -----**
+
+Figure 2: Order of token prediction for 4 representative methods in audio generation (Copet et al., 2023) and the proposed multi-scale Transformer. Assume _nq_ = 3 and _T_ = 3. Current token prediction (red) is conditioned on prior tokens (in green). Tokens in orange are concurrently predicted with the current token. 0 is a special token indicating empty positions in the delay prediction.
+
+Table 4: Model comparison among Coarse first, Flattening, Parallel, delay prediction, and multi-scale Transformer. Experiments were conducted on the LibriTTS. GPU memory and training time are obtained by a 20-second audio (average of 100 trials). All models have a similar parameter budget.
+
+|Structure|_nq_|MOS (_↑_)|MCD (_↓_)|GPU Mem. (GB)|Time (s) / Iter.|
+|---|---|---|---|---|---|
+|Coarse frst|8|3.48_±_0.05|7.37|18.7|0.58|
+|Parallel|3|3.14_±_0.07|7.89|13.56|0.53|
+|Delay|3|3.48_±_0.05|6.95|13.65|0.59|
+|Flattening|3|3.80_±_0.09|6.56|36.7|1.63|
+|Multi-Scale Transformer (ours)|3|3.77_±_0.05|6.52|19.4|0.73|
+|Multi-Scale Transformer (ours)|8|3.84_±_0.06|6.27|24.0|1.10|
+
+coarse first, and delay prediction. Additionally, with the same auto-regressive property, our proposed multi-scale transformer achieves a comparable performance with flattening prediction in terms of generation quality, which, again, validates the importance of auto-regression.
+
+**Efficiency:** Besides generation quality, efficiency is a major concern of audio generation. Although with the auto-regressive property, the flattening prediction is sub-optimal in terms of efficiency: the modeling is based on the _T × nq_ long sequence, which has a space complexity of _O_ (( _T ∗ nq_ )[2] ) in self-attention. As increasing _nq_ gives higher reconstruction quality at the cost of longer sequences and more computation, this issue becomes more severe when a larger _nq_ is adopted. Since the sequence length grows proportionally with _nq_ , we experimentally find it difficult to train with _nq ≥_ 4. By contrast, the proposed multi-scale Transformer distributes the inter- and intra-frame modeling to the global and local sub-modules respectively, which thus alleviates the space complexity to _O_ ( _T ∗_[2] ). Finally, without the requirement of auto-regression, methods like parallel, coarse first, and delay predictions achieve better efficiency due to the adoption of concurrent predictions. Since the space complexity is independent to _nq_ , training a larger _nq_ with the multi-scale transformer is then feasible.
+
+Experimentally, the proposed multi-scale transformer considerably reduces the time and memory cost compared with the flatting prediction. It still costs more time and memory compared with the other three baselines.
+
+Based on the observations above, we claim that the proposed multi-scale transformer is an autoregressive architecture that achieves a better trade-off between generation quality and efficiency.
+
+## 4 RELATED WORKS
+
+This work is an attempt to achieve universal audio generation through LLM-based techniques. There is a long research history for many audio generation tasks. Conventionally, the design of these tasks
+
+8
+
+Table 5: The ablation study to explore the effectiveness of our proposed multi-scale transformer. Experiments were conducted on text-to-music tasks with the Million Song dataset.
+
+|Structure|_nq_ FAD (_↓_) KL (_↓_)|OVL. (_↑_) REL. (_↑_)|
+|---|---|---|
+||||
+|Parallel Delay Flatten Multi-Scale Transformer (ours)|3 6.92 2.36 3 6.07 2.23 3 5.18 1.83 3 5.24 1.80|60.4_±_2.3 61.3_±_1.5 62.8_±_1.9 63.9_±_1.6 64.8_±_1.8 65.2_±_2.0 64.4_±_2.1 66.2_±_2.4|
+
+heavily leverages the domain knowledge of each specific task, and their workflows are distinctive from each other: For tasks like TTS, SE, TSE, TT-Music, VC, S-Edit, SD, SVS, (1) their neural network architectures are based on Transformer (Ren et al., 2020) or others (Oord et al., 2016; Luo & Mesgarani, 2019); (2) their training objectives can be either in time-domain (Luo & Mesgarani, 2019), frequency-domain (Yu et al., 2017) or others (Gu et al., 2021; Shen et al., 2023); (3) their designs are inspired by and derived from linguistics and phonetics (Zen et al., 2013), signal processing (Griffin & Lim, 1984), auditory perception (Shadle & Damper, 2001) and machine learning (Wang et al., 2016) research, etc; (4) they use different generative models, such as diffusion model (Shen et al., 2023; Wang et al., 2023b), flow (Le et al., 2023), Seq2Seq (Ren et al., 2020; Liu et al., 2021).
+
+The prosperity of LLM techniques (Radford et al., 2019; OpenAI, 2023) significantly promotes progress in audio generation research in several directions. First, the large language models, along with the prompt methods, inspired multiple emergent audio generation tasks that are based on textual instruction or descriptions from humans, such as Instruct-TTS (Yang et al., 2023a), Text-to-sound (Kreuk et al., 2022; Huang et al., 2023a) and text-to-music Copet et al. (2023); Agostinelli et al. (2023). Second, besides the text, audio can also be tokenized as discrete sequences (Zeghidour et al., 2021; Défossez et al., 2022; Kumar et al., 2023) that can be further processed by LMs. LM-based audio generative models then show superior capability in generalization towards unseen speakers (Wang et al., 2023a), low resources (Kharitonov et al., 2023) and multilingual (Zhang et al., 2023) scenarios. These methods also achieve state-of-the-art results in overall performance within their own scopes. Finally, the LM-like model can be further combined with existing generative models (e.g., diffusion models Rombach et al. (2022)) to obtain improved generation quality.
+
+It is laborious to handle each audio generation task case-by-case, especially when considering the data shortage as well as the emergent and varying needs in this area. Alternatively, building a universal audio generation model is a promising and practical paradigm. Given the rapid progress in audio generation research, recent designs of audio generation, including LM-based ones, tend to support multiple audio generation tasks simultaneously. Some pioneer works (Wang et al., 2023c; Le et al., 2023; Shen et al., 2023; Liu et al., 2023b; Jiang et al., 2023) clearly consider supporting multiple tasks as a key strength; the designs of other prior works (Borsos et al., 2023; Kharitonov et al., 2023; Shen et al., 2023) do show the potential to generate audio in a broader sense than what they originally claim. Following these pioneering research works, UniAudio supports an extended coverage of 11 audio generation tasks in a unified LM-based model.
+
+## 5 LIMITATION
+
+Not all known audio generation tasks are included in the proposed UniAudio, such as noise removal, noise speech edit (Wang et al., 2023c) and speech-to-speech translation (Rubenstein et al., 2023; Barrault et al., 2023). All new tasks added in fine-tuning are formulated with the known modalities in the training stage; Introducing new modalities during fine-tuning is unexplored in this work. Current UniAudio considers neither unlabeled data nor domain-specific foundation models, which can possibly further improve the overall performance. The samples generated by UniAudio are not guaranteed in quality and may contain errors.
+
+## 6 CONCLUSION
+
+To handle the emergent and varying needs in audio generation, this work is an attempt to achieve universal audio generation. UniAudio is proposed as a unified LM-based generative model that supports 11 different audio generation tasks. In experiments, the proposed UniAudio provides competitive performance on all 11 tasks. It also empirically demonstrates the capability of continuously integrating unseen audio generation tasks. Demo and code are released, in the hope that UniAudio can become a foundation model for universal audio generation in further research.
+
+9
+
+## 7 ETHICAL STATEMENT
+
+We are delving into the revolutionary field of generating diverse audio using large language model techniques. We find ourselves at the confluence of innovation and responsibility. It is imperative to acknowledge the ethical dimensions of our work and ensure that our contributions are employed for the betterment of society.
+
+**Being Open:** As we advance in this domain, it’s crucial to ensure that the benefits of this technology are widespread and not limited to a privileged few. Our code is released publicly along with this submission to ensure equal access for each person. All experiments are based on open-accessible datasets that allow research-oriented comparison and reproduction.
+
+**Avoid Misuse:** While our model can produce a myriad of audio content ranging from music to speech, there’s potential for misuse in the generation of misinformation, deepfake audio, or any harmful content. We advocate for adopting our code and model responsibly, with full respect to individual privacy and observance of regulations. Concerning the potential misuse of our model, checkpoints will not be released.
+
+## REFERENCES
+
+- Andrea Agostinelli, Timo I Denk, Zalán Borsos, Jesse Engel, Mauro Verzetti, Antoine Caillon, Qingqing Huang, Aren Jansen, Adam Roberts, Marco Tagliasacchi, et al. Musiclm: Generating music from text. _arXiv preprint arXiv:2301.11325_ , 2023.
+
+- Loïc Barrault, Yu-An Chung, Mariano Cora Meglioli, David Dale, Ning Dong, Paul-Ambroise Duquenne, Hady Elsahar, Hongyu Gong, Kevin Heffernan, John Hoffman, et al. Seamlessm4tmassively multilingual & multimodal machine translation. _arXiv preprint arXiv:2308.11596_ , 2023.
+
+- Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, Olivier Pietquin, Matt Sharifi, Dominik Roblek, Olivier Teboul, David Grangier, Marco Tagliasacchi, et al. Audiolm: a language modeling approach to audio generation. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 2023.
+
+Edresson Casanova, Julian Weber, Christopher D Shulby, Arnaldo Candido Junior, Eren Gölge, and Moacir A Ponti. Yourtts: Towards zero-shot multi-speaker tts and zero-shot voice conversion for everyone. In _International Conference on Machine Learning_ , pp. 2709–2720. PMLR, 2022.
+
+- Jun Chen, Zilin Wang, Deyi Tuo, Zhiyong Wu, Shiyin Kang, and Helen Meng. Fullsubnet+: Channel attention fullsubnet with complex spectrograms for speech enhancement. In _ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 7857– 7861. IEEE, 2022.
+
+- Yin-Ping Cho, Fu-Rong Yang, Yung-Chuan Chang, Ching-Ting Cheng, Xiao-Han Wang, and Yi-Wen Liu. A survey on recent deep learning-driven singing voice synthesis systems. In _2021 IEEE International Conference on Artificial Intelligence and Virtual Reality (AIVR)_ , pp. 319–323. IEEE, 2021.
+
+- Alexis Conneau, Alexei Baevski, Ronan Collobert, Abdelrahman Mohamed, and Michael Auli. Unsupervised cross-lingual representation learning for speech recognition. _arXiv preprint arXiv:2006.13979_ , 2020.
+
+- Jade Copet, Felix Kreuk, Itai Gat, Tal Remez, David Kant, Gabriel Synnaeve, Yossi Adi, and Alexandre Défossez. Simple and controllable music generation. _arXiv preprint arXiv:2306.05284_ , 2023.
+
+- Alexandre Défossez, Jade Copet, Gabriel Synnaeve, and Yossi Adi. High fidelity neural audio compression. _arXiv preprint arXiv:2210.13438_ , 2022.
+
+- Konstantinos Drossos, Samuel Lipping, and Tuomas Virtanen. Clotho: An audio captioning dataset. In _ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 736–740. IEEE, 2020.
+
+10
+
+Hakan Erdogan, Scott Wisdom, Xuankai Chang, Zalán Borsos, Marco Tagliasacchi, Neil Zeghidour, and John R Hershey. Tokensplit: Using discrete speech representations for direct, refined, and transcript-conditioned speech separation and recognition. _arXiv preprint arXiv:2308.10415_ , 2023.
+
+- Jort F Gemmeke, Daniel PW Ellis, Dylan Freedman, Aren Jansen, Wade Lawrence, R Channing Moore, Manoj Plakal, and Marvin Ritter. Audio set: An ontology and human-labeled dataset for audio events. In _2017 IEEE international conference on acoustics, speech and signal processing (ICASSP)_ , pp. 776–780. IEEE, 2017.
+
+- Daniel Griffin and Jae Lim. Signal estimation from modified short-time fourier transform. _IEEE Transactions on acoustics, speech, and signal processing_ , 32(2):236–243, 1984.
+
+- Rongzhi Gu, Shi-Xiong Zhang, Yuexian Zou, and Dong Yu. Complex neural spatial filter: Enhancing multi-channel target speech separation in complex domain. _IEEE Signal Processing Letters_ , 28: 1370–1374, 2021.
+
+- Zhifang Guo, Yichong Leng, Yihan Wu, Sheng Zhao, and Xu Tan. Prompttts: Controllable text-tospeech with text descriptions. In _ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 1–5. IEEE, 2023.
+
+- Xiang Hao, Xiangdong Su, Radu Horaud, and Xiaofei Li. Fullsubnet: A full-band and sub-band fusion model for real-time single-channel speech enhancement. In _ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 6633–6637. IEEE, 2021.
+
+- Geoffrey Hinton, Li Deng, Dong Yu, George E. Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N. Sainath, and Brian Kingsbury. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. _IEEE Signal Processing Magazine_ , 29(6):82–97, 2012. doi: 10.1109/MSP.2012.2205597.
+
+- Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 29:3451–3460, 2021.
+
+- Rongjie Huang, Feiyang Chen, Yi Ren, Jinglin Liu, Chenye Cui, and Zhou Zhao. Multi-singer: Fast multi-singer singing voice vocoder with a large-scale corpus. In _Proceedings of the 29th ACM International Conference on Multimedia_ , pp. 3945–3954, 2021a.
+
+- Rongjie Huang, Jiawei Huang, Dongchao Yang, Yi Ren, Luping Liu, Mingze Li, Zhenhui Ye, Jinglin Liu, Xiang Yin, and Zhou Zhao. Make-an-audio: Text-to-audio generation with prompt-enhanced diffusion models. _arXiv preprint arXiv:2301.12661_ , 2023a.
+
+- Rongjie Huang, Chunlei Zhang, Yongqi Wang, Dongchao Yang, Luping Liu, Zhenhui Ye, Ziyue Jiang, Chao Weng, Zhou Zhao, and Dong Yu. Make-a-voice: Unified voice synthesis with discrete representation. _arXiv preprint arXiv:2305.19269_ , 2023b.
+
+- Tzu-hsien Huang, Jheng-hao Lin, and Hung-yi Lee. How far are we from robust voice conversion: A survey. In _2021 IEEE Spoken Language Technology Workshop (SLT)_ , pp. 514–521. IEEE, 2021b.
+
+- Ziyue Jiang, Yi Ren, Zhenhui Ye, Jinglin Liu, Chen Zhang, Qian Yang, Shengpeng Ji, Rongjie Huang, Chunfeng Wang, Xiang Yin, et al. Mega-tts: Zero-shot text-to-speech at scale with intrinsic inductive bias. _arXiv preprint arXiv:2306.03509_ , 2023.
+
+- Jacob Kahn, Morgane Rivière, Weiyi Zheng, Evgeny Kharitonov, Qiantong Xu, Pierre-Emmanuel Mazaré, Julien Karadayi, Vitaliy Liptchinsky, Ronan Collobert, Christian Fuegen, et al. Libri-light: A benchmark for asr with limited or no supervision. In _ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 7669–7673. IEEE, 2020.
+
+- Eugene Kharitonov, Damien Vincent, Zalán Borsos, Raphaël Marinier, Sertan Girgin, Olivier Pietquin, Matt Sharifi, Marco Tagliasacchi, and Neil Zeghidour. Speak, read and prompt: High-fidelity text-to-speech with minimal supervision. _arXiv preprint arXiv:2302.03540_ , 2023.
+
+11
+
+- Chris Dongjoo Kim, Byeongchang Kim, Hyunmin Lee, and Gunhee Kim. Audiocaps: Generating captions for audios in the wild. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pp. 119–132, 2019.
+
+- Tom Ko, Vijayaditya Peddinti, Daniel Povey, Michael L Seltzer, and Sanjeev Khudanpur. A study on data augmentation of reverberant speech for robust speech recognition. In _2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 5220–5224. IEEE, 2017.
+
+- Felix Kreuk, Gabriel Synnaeve, Adam Polyak, Uriel Singer, Alexandre Défossez, Jade Copet, Devi Parikh, Yaniv Taigman, and Yossi Adi. Audiogen: Textually guided audio generation. _arXiv preprint arXiv:2209.15352_ , 2022.
+
+- Rithesh Kumar, Prem Seetharaman, Alejandro Luebs, Ishaan Kumar, and Kundan Kumar. Highfidelity audio compression with improved RVQGAN. In _Thirty-seventh Conference on Neural Information Processing Systems_ , 2023. URL [URL removed] qjnl1QUnFA.
+
+- Matthew Le, Apoorv Vyas, Bowen Shi, Brian Karrer, Leda Sari, Rashel Moritz, Mary Williamson, Vimal Manohar, Yossi Adi, Jay Mahadeokar, and Wei-Ning Hsu. Voicebox: Text-guided multilingual universal speech generation at scale. 2023. URL [URL removed] com/voicebox/paper.pdf.
+
+- Haohe Liu, Zehua Chen, Yi Yuan, Xinhao Mei, Xubo Liu, Danilo Mandic, Wenwu Wang, and Mark D Plumbley. Audioldm: Text-to-audio generation with latent diffusion models. _arXiv preprint arXiv:2301.12503_ , 2023a.
+
+- Haohe Liu, Qiao Tian, Yi Yuan, Xubo Liu, Xinhao Mei, Qiuqiang Kong, Yuping Wang, Wenwu Wang, Yuxuan Wang, and Mark D. Plumbley. AudioLDM 2: Learning holistic audio generation with self-supervised pretraining. _arXiv preprint arXiv:2308.05734_ , 2023b.
+
+- Jinglin Liu, Chengxi Li, Yi Ren, Feiyang Chen, and Zhou Zhao. Diffsinger: Singing voice synthesis via shallow diffusion mechanism. In _Proceedings of the AAAI conference on artificial intelligence_ , volume 36, pp. 11020–11028, 2022.
+
+- Songxiang Liu, Yuewen Cao, Disong Wang, Xixin Wu, Xunying Liu, and Helen Meng. Any-to-many voice conversion with location-relative sequence-to-sequence modeling. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 29:1717–1728, 2021.
+
+- Yen-Ju Lu, Zhong-Qiu Wang, Shinji Watanabe, Alexander Richard, Cheng Yu, and Yu Tsao. Conditional diffusion probabilistic model for speech enhancement. In _ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 7402–7406. IEEE, 2022.
+
+- Yi Luo and Nima Mesgarani. Conv-tasnet: Surpassing ideal time–frequency magnitude masking for speech separation. _IEEE/ACM transactions on audio, speech, and language processing_ , 27(8): 1256–1266, 2019.
+
+- Brian McFee, Thierry Bertin-Mahieux, Daniel PW Ellis, and Gert RG Lanckriet. The million song dataset challenge. In _Proceedings of the 21st International Conference on World Wide Web_ , pp. 909–916, 2012.
+
+- Xinhao Mei, Chutong Meng, Haohe Liu, Qiuqiang Kong, Tom Ko, Chengqi Zhao, Mark D Plumbley, Yuexian Zou, and Wenwu Wang. Wavcaps: A chatgpt-assisted weakly-labelled audio captioning dataset for audio-language multimodal research. _arXiv preprint arXiv:2303.17395_ , 2023.
+
+- Annamaria Mesaros, Toni Heittola, Aleksandr Diment, Benjamin Elizalde, Ankit Shah, Emmanuel Vincent, Bhiksha Raj, and Tuomas Virtanen. Dcase 2017 challenge setup: Tasks, datasets and baseline system. In _DCASE 2017-Workshop on Detection and Classification of Acoustic Scenes and Events_ , 2017.
+
+- Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. _arXiv preprint arXiv:1609.03499_ , 2016.
+
+12
+
+OpenAI. Gpt-4 technical report. _arXiv preprint arXiv:2204.06125_ , 2023.
+
+Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. Librispeech: an asr corpus based on public domain audio books. In _2015 IEEE international conference on acoustics, speech and signal processing (ICASSP)_ , pp. 5206–5210. IEEE, 2015.
+
+- Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. _arXiv preprint arXiv:1904.08779_ , 2019.
+
+- Vineel Pratap, Qiantong Xu, Anuroop Sriram, Gabriel Synnaeve, and Ronan Collobert. Mls: A large-scale multilingual dataset for speech research. _arXiv preprint arXiv:2012.03411_ , 2020.
+
+- Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever, et al. Improving language understanding by generative pre-training. 2018.
+
+- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. _OpenAI blog_ , 1(8):9, 2019.
+
+- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. _The Journal of Machine Learning Research_ , 21(1):5485–5551, 2020.
+
+- Yi Ren, Chenxu Hu, Xu Tan, Tao Qin, Sheng Zhao, Zhou Zhao, and Tie-Yan Liu. Fastspeech 2: Fast and high-quality end-to-end text to speech. _arXiv preprint arXiv:2006.04558_ , 2020.
+
+- Julius Richter, Simon Welker, Jean-Marie Lemercier, Bunlong Lay, and Timo Gerkmann. Speech enhancement and dereverberation with diffusion-based generative models. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 2023.
+
+- Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. Highresolution image synthesis with latent diffusion models. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 10684–10695, 2022.
+
+- Paul K Rubenstein, Chulayuth Asawaroengchai, Duc Dung Nguyen, Ankur Bapna, Zalán Borsos, Félix de Chaumont Quitry, Peter Chen, Dalia El Badawy, Wei Han, Eugene Kharitonov, et al. Audiopalm: A large language model that can speak and listen. _arXiv preprint arXiv:2306.12925_ , 2023.
+
+- Christine H Shadle and Robert I Damper. Prospects for articulatory synthesis: A position paper. In _4th ISCA tutorial and research workshop (ITRW) on speech synthesis_ , 2001.
+
+- Kai Shen, Zeqian Ju, Xu Tan, Yanqing Liu, Yichong Leng, Lei He, Tao Qin, Sheng Zhao, and Jiang Bian. Naturalspeech 2: Latent diffusion models are natural and zero-shot speech and singing synthesizers. _arXiv preprint arXiv:2304.09116_ , 2023.
+
+- Yao Shi, Hui Bu, Xin Xu, Shaoji Zhang, and Ming Li. Aishell-3: A multi-speaker mandarin tts corpus and the baselines. _arXiv preprint arXiv:2010.11567_ , 2020.
+
+- Jaesung Tae, Hyeongju Kim, and Taesu Kim. Editts: Score-based editing for controllable text-tospeech. _arXiv preprint arXiv:2110.02584_ , 2021.
+
+- Xu Tan, Tao Qin, Frank Soong, and Tie-Yan Liu. A survey on neural speech synthesis. _arXiv preprint arXiv:2106.15561_ , 2021.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Christophe Veaux, Junichi Yamagishi, Kirsten MacDonald, et al. Cstr vctk corpus: English multispeaker corpus for cstr voice cloning toolkit. _University of Edinburgh. The Centre for Speech Technology Research (CSTR)_ , 6:15, 2017.
+
+13
+
+- Chengyi Wang, Sanyuan Chen, Yu Wu, Ziqiang Zhang, Long Zhou, Shujie Liu, Zhuo Chen, Yanqing Liu, Huaming Wang, Jinyu Li, et al. Neural codec language models are zero-shot text to speech synthesizers. _arXiv preprint arXiv:2301.02111_ , 2023a.
+
+- Quan Wang, Hannah Muckenhirn, Kevin Wilson, Prashant Sridhar, Zelin Wu, John Hershey, Rif A Saurous, Ron J Weiss, Ye Jia, and Ignacio Lopez Moreno. Voicefilter: Targeted voice separation by speaker-conditioned spectrogram masking. _arXiv preprint arXiv:1810.04826_ , 2018.
+
+- Wen Wang, Dongchao Yang, Qichen Ye, Bowen Cao, and Yuexian Zou. Nadiffuse: Noise-aware diffusion-based model for speech enhancement. _arXiv preprint arXiv:2309.01212_ , 2023b.
+
+- Wenfu Wang, Shuang Xu, Bo Xu, et al. First step towards end-to-end parametric tts synthesis: Generating spectral parameters with neural attention. In _Interspeech_ , pp. 2243–2247, 2016.
+
+- Xiaofei Wang, Manthan Thakker, Zhuo Chen, Naoyuki Kanda, Sefik Emre Eskimez, Sanyuan Chen, Min Tang, Shujie Liu, Jinyu Li, and Takuya Yoshioka. Speechx: Neural codec language model as a versatile speech transformer. _arXiv preprint arXiv:2308.06873_ , 2023c.
+
+- Yu Wang, Xinsheng Wang, Pengcheng Zhu, Jie Wu, Hanzhao Li, Heyang Xue, Yongmao Zhang, Lei Xie, and Mengxiao Bi. Opencpop: A high-quality open source chinese popular song corpus for singing voice synthesis. _arXiv preprint arXiv:2201.07429_ , 2022.
+
+- Yuancheng Wang, Zeqian Ju, Xu Tan, Lei He, Zhizheng Wu, Jiang Bian, and Sheng Zhao. Audit: Audio editing by following instructions with latent diffusion models. _arXiv preprint arXiv:2304.00830_ , 2023d.
+
+- Zhichao Wang, Yuanzhe Chen, Lei Xie, Qiao Tian, and Yuping Wang. Lm-vc: Zero-shot voice conversion via speech generation based on language models. _arXiv preprint arXiv:2306.10521_ , 2023e.
+
+- Bo Wu, Kehuang Li, Minglei Yang, and Chin-Hui Lee. A reverberation-time-aware approach to speech dereverberation based on deep neural networks. _IEEE/ACM transactions on audio, speech, and language processing_ , 25(1):102–111, 2016.
+
+- Dongchao Yang, Songxiang Liu, Rongjie Huang, Guangzhi Lei, Chao Weng, Helen Meng, and Dong Yu. Instructtts: Modelling expressive tts in discrete latent space with natural language style prompt. _arXiv preprint arXiv:2301.13662_ , 2023a.
+
+- Dongchao Yang, Songxiang Liu, Rongjie Huang, Jinchuan Tian, Chao Weng, and Yuexian Zou. Hifi-codec: Group-residual vector quantization for high fidelity audio codec. _arXiv preprint arXiv:2305.02765_ , 2023b.
+
+- Dongchao Yang, Jianwei Yu, Helin Wang, Wen Wang, Chao Weng, Yuexian Zou, and Dong Yu. Diffsound: Discrete diffusion model for text-to-sound generation. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 2023c.
+
+- Dong Yu, Morten Kolbæk, Zheng-Hua Tan, and Jesper Jensen. Permutation invariant training of deep models for speaker-independent multi-talker speech separation. In _2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pp. 241–245. IEEE, 2017.
+
+- Lili Yu, Dániel Simig, Colin Flaherty, Armen Aghajanyan, Luke Zettlemoyer, and Mike Lewis. Megabyte: Predicting million-byte sequences with multiscale transformers. _arXiv preprint arXiv:2305.07185_ , 2023.
+
+- Neil Zeghidour, Alejandro Luebs, Ahmed Omran, Jan Skoglund, and Marco Tagliasacchi. Soundstream: An end-to-end neural audio codec. _IEEE/ACM Transactions on Audio, Speech, and Language Processing_ , 30:495–507, 2021.
+
+- Heiga Zen, Andrew Senior, and Mike Schuster. Statistical parametric speech synthesis using deep neural networks. In _2013 ieee international conference on acoustics, speech and signal processing_ , pp. 7962–7966. IEEE, 2013.
+
+14
+
+Heiga Zen, Viet Dang, Rob Clark, Yu Zhang, Ron J Weiss, Ye Jia, Zhifeng Chen, and Yonghui Wu. Libritts: A corpus derived from librispeech for text-to-speech. _arXiv preprint arXiv:1904.02882_ , 2019.
+
+- Lichao Zhang, Ruiqi Li, Shoutong Wang, Liqun Deng, Jinglin Liu, Yi Ren, Jinzheng He, Rongjie Huang, Jieming Zhu, Xiao Chen, et al. M4singer: A multi-style, multi-singer and musical score provided mandarin singing corpus. _Advances in Neural Information Processing Systems_ , 35: 6914–6926, 2022.
+
+- Ziqiang Zhang, Long Zhou, Chengyi Wang, Sanyuan Chen, Yu Wu, Shujie Liu, Zhuo Chen, Yanqing Liu, Huaming Wang, Jinyu Li, et al. Speak foreign languages with your own voice: Cross-lingual neural codec language modeling. _arXiv preprint arXiv:2303.03926_ , 2023.
+
+- Kateˇrina Žmolíková, Marc Delcroix, Keisuke Kinoshita, Tsubasa Ochiai, Tomohiro Nakatani, Lukáš Burget, and Jan Cernock[ˇ] y.` Speakerbeam: Speaker aware neural network for target speaker extraction in speech mixtures. _IEEE Journal of Selected Topics in Signal Processing_ , 13(4): 800–814, 2019.
+
+- Katerina Zmolikova, Marc Delcroix, Tsubasa Ochiai, Keisuke Kinoshita, Jan Cernock[ˇ] y, and Dong` Yu. Neural target speech extraction: An overview. _IEEE Signal Processing Magazine_ , 40(3):8–29, 2023.
+
+15
+
diff --git a/open_review/iclr2024_8600.json b/open_review/iclr2024_8600.json
new file mode 100644
index 0000000000000000000000000000000000000000..b7dfd214ffaefcdc78f1de0f7f1512a27415890d
--- /dev/null
+++ b/open_review/iclr2024_8600.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8600",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "AMAGO: Scalable In-Context Reinforcement Learning for Adaptive Agents",
+ "abstract": "We introduce AMAGO, an in-context Reinforcement Learning (RL) agent that uses sequence models to tackle the challenges of generalization, long-term memory, and meta-learning. Recent works have shown that off-policy learning can make in-context RL with recurrent policies viable. Nonetheless, these approaches require extensive tuning and limit scalability by creating key bottlenecks in agents' memory capacity, planning horizon, and model size. AMAGO revisits and redesigns the off-policy in-context approach to successfully train long-sequence Transformers over entire rollouts in parallel with end-to-end RL. Our agent is scalable and applicable to a wide range of problems, and we demonstrate its strong performance empirically in meta-RL and long-term memory domains. AMAGO's focus on sparse rewards and off-policy data also allows in-context learning to extend to goal-conditioned problems with challenging exploration. When combined with a multi-goal hindsight relabeling scheme, AMAGO can solve a previously difficult category of open-world domains, where agents complete many possible instructions in procedurally generated environments.",
+ "rebuttal": "### Changes to Appendix A.2\nWe have rewritten Appendix A.2 (the RL update section) to be significantly more detailed and the pdf has been updated. We hope that this version answers most of your questions about the learning update and related RL engineering details.\n\n### Reply to Reviewer KbVB\nThank you for your review! We address your questions and concerns below. Please let us know if more clarification is needed.\n\n> \"…the use of transformers, can be computationally intense. This may limit its efficiency in resource-limited situations…\"\n\nTransformers are more expensive than common RL architectures, but this approach to generalization does require some kind of memory, so “expensive” becomes a relative term. We show in Figure 6 (previously Fig. 4) that Transformers can be an efficient choice vs RNNs in the common RL setting of small model sizes and long s [...]\n\n### Reply to Reviewer LVWP\nThank you for your review! We address your questions and concerns below. \n\n> \"The high-level concept is not novel -- applying transformers to POMDPs or for in-context RL has been heavily studied\"\n\nYes, while this concept is not new, our work is much more about the details necessary to get it to work over long sequences with Transformers in an off-policy setting. \n\n> \"This method still requires server-grade GPUs to run, limiting this approach to well-off labs or industry\"\n\nAMAGO is more GPU-dependent than many single-task baselines (for example), but we will note that [...]\n\n### Reply to Reviewer WXv6 (Final Part)\n> \"What does \"relegate to an unstable baseline\" in the introduction mean?\"\n\nWe mean that the black-box/in-context approach was an early idea but that it became a weak baseline in many of the followup meta-RL papers in the years after RL^2. \n\n> \"What is the actor objective used by the method?\"\n\nIt is a mixture of the standard $-Q(s, \\pi(s))$ taking the min over 2 critics from an ensemble like TD3/REDQ and filtered behavior cloning. The behavior cloning term is motivated by the same idea as multi-gamma training, where we are trying to prevent learning from [...]\n\n### Reply to Reviewer WXv6 (Part 1)\nThanks for your review, especially of the Crafter appendix section. Many of your questions focus on technical details that require some explanation. We will try to keep this reply brief but it will need to be split into multiple parts.\n\n> \"goal-conditioned RL seems to be an important part of the contribution. However, this paper would be much easier to understand if it focused on the meta-RL part\"\n\nWith this suggestion in mind our revision has prioritized the first experiment section (meta-RL and long-term memory) when dealing with space constraints. We have [...]\n\n### Reply to Reviewer WXv6 (Part 2 - Crafter)\n> \"The paper explicitly claims state-of-the-art results on PoPGym but refrains from doing so for Crafter …. Why?\"\n\nThe difference is that we match the evaluation protocol of existing POPGym baselines as closely as possible but are not doing the same for Crafter. Instead, we are using the Crafter world generation and achievement system to create our own evaluation setting for goal-conditioned agents in an open-world domain. \n\n> \"Have I understood it correctly that the \"dense\" Crafter is the vanilla Crafter setting?\"\n\nYes you are right, and the term [...]\n\n### Reply to Reviewer t9aE\nThank you for your review! We address your questions and concerns below and would be happy to continue the discussion. \n\n> \"It is a bit hard to keep track of what exactly the different components of the proposed method are…. Generally, I think the main improvement the authors can make on this paper is clarity.\"\n\nWe have updated the Transformer architecture change and multi-gamma update sections of the Method section, which we hope will improve their clarity. \n\n> \"Similarly, an algorithm box for the relabeling scheme would be nice for clarity.\"\n\nWe have taken your sug [...]\n\n### Status on Revisions to Appendix A\nWe have decided it would be best to add more of the technical details discussed in your review and our reply to Appendix A, including a new figure demonstrating the varying scale of AMAGO's loss terms and how PopArt solves this problem. A few experiments are still wrapping up, but since we are nearing the end of the discussion period we would like to give advance notice that we will be updating the revision with these changes tomorrow (Monday 11/20).\n\n### Summary of Revisions\nWe would like to thank all of the reviewers for their detailed comments and questions. We will respond to each individually below, but here we provide a summary of the changes made to our work. Edits to the pdf have been highlighted in blue. \n\n### Writing\n\n- We have updated explanations of two of our method’s technical details in Section 4 (paragraphs “Stable Long-Context Transformers in Off-Policy RL” and “Long Horizons and Multi-Gamma Learning”) which we hope make the motivation behind these ideas more clear.\n\n- We have added an Algorithm box and expanded the discuss [...]",
+ "initial_scores": [
+ 6,
+ 8,
+ 8,
+ 8
+ ],
+ "score_mean": 7.5,
+ "score_variance": 1,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (spotlight)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper introduces AMAGO which addresses challenges associated with generalization, long-term memory, and meta-learning by employing sequence models. There are two main contributions. Firstly, it modifies the off-policy in-context approach by incorporating sequence models like Transformers instead of recurrent policies. This modification helps overcome constraints related to memory capacity, model size, and long horizon. Secondly, AMAGO extends in-context learning to goal-conditioned problems, enabling it to handle more complex exploration tasks. Empirical evaluations on several benchmarks show its superior performance over baselines.\n\nOverall, this is a solid paper and makes substantial contributions aforementioned to context-based meta-RL. All the questions and issues were resolved by the authors' responses. The reviewers reached a consensus for acceptance.",
+ "forum_id": "M6XWoEdmwf",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_KbVB",
+ "review_id": "FaTdPXAvV7",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2491,
+ "edit_detected": true,
+ "edit_delta_seconds": 953315,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_t9aE",
+ "review_id": "RPxOpZzMXb",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 4,
+ "confidence": 3
+ },
+ "review_text_chars": 1771,
+ "edit_detected": true,
+ "edit_delta_seconds": 2084993,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_LVWP",
+ "review_id": "2AJDsHCqH9",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1868,
+ "edit_detected": true,
+ "edit_delta_seconds": 1226265,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_WXv6",
+ "review_id": "CYrjn3vCMa",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 4,
+ "confidence": 4
+ },
+ "review_text_chars": 4576,
+ "edit_detected": true,
+ "edit_delta_seconds": 3292214,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8600.md b/open_review/iclr2024_8600.md
new file mode 100644
index 0000000000000000000000000000000000000000..b2ab1b11ffcfdb59c3f185c2b487f4608f24502b
--- /dev/null
+++ b/open_review/iclr2024_8600.md
@@ -0,0 +1,849 @@
+
+
+## AMAGO: SCALABLE IN-CONTEXT REINFORCEMENT LEARNING FOR ADAPTIVE AGENTS
+
+Authors withheld for review
+
+## ABSTRACT
+
+We introduce AMAGO, an in-context Reinforcement Learning (RL) agent that uses sequence models to tackle the challenges of generalization, long-term memory, and meta-learning. Recent works have shown that off-policy learning can make in-context RL with recurrent policies viable. Nonetheless, these approaches require extensive tuning and limit scalability by creating key bottlenecks in agents’ memory capacity, planning horizon, and model size. AMAGO revisits and redesigns the off-policy in-context approach to successfully train long-sequence Transformers over entire rollouts in parallel with end-to-end RL. Our agent is scalable and applicable to a wide range of problems, and we demonstrate its strong performance empirically in meta-RL and long-term memory domains. AMAGO’s focus on sparse rewards and off-policy data also allows in-context learning to extend to goal-conditioned problems with challenging exploration. When combined with a multi-goal hindsight relabeling scheme, AMAGO can solve a previously difficult category of open-world domains, where agents complete many possible instructions in procedurally generated environments.
+
+## 1 INTRODUCTION
+
+Reinforcement Learning (RL) research has created effective methods for training _specialist_ decisionmaking agents that maximize one objective in a single environment through trial-and-error [1, 2, 3, 4, 5]. New efforts are shifting towards developing _generalist_ agents that can adapt to a variety of environments that require long-term memory and reasoning under uncertainty [6, 7, 8, 9]. One of the most promising approaches to generalist RL is a family of techniques that leverage sequence models to actively adapt to new situations by learning from experience at test-time. These “in-context” agents use memory to recall information from previous timesteps and update their understanding of the current environment [10, 11]. In-context RL’s advantage is its simplicity: it reduces partial observability, generalization, and meta-learning to a single problem in which agents equipped with memory train in a collection of related environments [12, 13, 14]. The ability to explore, identify, and adapt to new environments arises implicitly as agents learn to maximize returns in deployments that may span multiple trials [13, 15, 16].
+
+Effective in-context agents need to be able to scale across two axes: 1) the length of their planning horizon, and 2) the length of their effective memory. The earliest versions of this framework [10, 11, 17] use recurrent networks and on-policy learning updates that do not scale well across either axis. Transformers [18] improve memory by removing the need to selectively write information many timesteps in advance and turning recall into a retrieval problem [19]. Efforts to replace recurrent policies with Transformers were successful [20, 21], but long-term adaptation remained challenging, and the in-context approach was relegated to an unstable baseline for other meta-RL methods [12]. However, it has been shown that pure in-context RL with recurrent networks can be a competitive baseline when the original on-policy gradient updates are replaced by techniques from a long line of work in stable off-policy RL [22, 23]. A clear next step is to reintroduce the memory benefits of Transformers. Unfortunately, training Transformers over long sequences with off-policy RL combines two of the most implementation-dependent areas in the field, and many of the established best practices do not scale (Section 3). The difficulty of this challenge is perhaps best highlighted by the fact that many popular applications of Transformers in off-policy (or offline) RL devise ways to avoid RL altogether and reformulate the problem as supervised learning [24, 25, 26, 27, 28, 29].
+
+1
+
+**==> picture [396 x 131] intentionally omitted <==**
+
+**----- Start of picture text -----**
+`Y Sample a new environment with Latent estimate of state, goal and environment horizons and every timestep in parallelOff-policy RL across multiple value unknown parameters e and an optional goal description g . . . Actor Critic . . . AMAGO Long-Sequence Transformers for Memory and In-Context RL Along Entire Rollouts pY new environment e Agent adapts to its representationtimestep . . . . . . over a horizon of up to H timesteps spanning one or Timestep Encoder Timestep Encoder Timestep Encoder more trials . . . . . . obs. action reward reset goal time **----- End of picture text -----**
+
+Figure 1: In-context RL techniques solve memory and meta-learning problems by using sequence models to infer the identity of unknown environments from test-time experience. AMAGO addresses core technical challenges to unify the performance of end-to-end off-policy RL with long-sequence Transformers in order to push memory and adaptation to new limits.
+
+Our work introduces AMAGO (Adaptive Memory Agent for achieving GOals) — a new learning algorithm that makes two important contributions to in-context RL. First, we redesign the off-policy actor-critic update from scratch to support long-sequence Transformers that learn from entire rollouts in parallel (Figure 1). AMAGO breaks off-policy in-context RL’s biggest bottlenecks by enabling memory lengths, model sizes, and planning horizons that were previously impractical or unstable. Our agent is open-source[1] and specifically designed to be efficient, stable, and applicable to new environments with little tuning. We empirically demonstrate its power and flexibility in existing meta-RL and memory benchmarks, including state-of-the-art results in the POPGym suite [30], where Transformers’ recall dramatically improves performance. Our second contribution takes in-context RL in a new direction with fresh benchmarks. AMAGO’s use of off-policy data — as well as its focus on long horizons and sparse rewards — makes it uniquely capable of extending the in-context RL framework to goal-conditioned problems [31, 32] with hard exploration. We add a new hindsight relabeling scheme for _multi-step_ goals that generates effective exploration plans in multi-task domains. AMAGO can then learn to complete many possible instructions while using its memory to adapt to unfamiliar environments. We first study AMAGO in two new benchmarks in this area before applying it to instruction-following tasks in the procedurally generated worlds of Crafter [33].
+
+## 2 RELATED WORK
+
+**RL Generalization and Meta-Learning.** General RL agents should be able to make decisions across similar environments with different layouts, physics, and visuals [34, 35, 36, 37]. Many techniques are based on learning invariant policies that behave similarly despite these changes [6]. Meta-RL takes a more active approach and studies methods for rapid adaptation to new RL problems [38]. Meta-RL is a crowded field with a complex taxonomy [12]; this paper uses the informal term “in-context RL” to refer to a specific subset of _implicit context-based_ methods that treat meta-learning, zero-shot generalization, and partial observability as a single problem. In practice, these methods are variants of RL[2] [11, 10], where we train a sequence model with standard RL and let memory and meta-reasoning arise implicitly as a byproduct of maximizing returns [16, 21, 17, 22, 15, 23, 8]. There are many other ways to use historical context to adapt to an environment. However, in-context RL makes so few assumptions that alternatives mainly serve as ways to take advantage of problems that do not need its flexibility. Examples include domains where each environment is fully observed, can be labeled with ground-truth parameters indicating its unique characteristics, or does not require meta-adaptation within trials [39, 40, 41, 42, 43, 44].
+
+The core AMAGO agent is conceptually similar to AdA [8] — a recent work on off-policy meta-RL with Transformers. AdA trains in-context RL agents in a closed-source domain that evaluates task diversity at scale, while our work is more focused on long-term recall and open-source RL engineering details.
+
+> 1Code is available here: [URL removed]
+
+2
+
+**Goal-Conditioned RL.** Goal-conditioned RL (GCRL) [31, 32] trains multi-task agents that generalize across tasks by making the current goal an input to the policy. GCRL often learns from sparse (binary) rewards based solely on task completion, reducing the need for reward engineering. GCRL methods commonly use hindsight experience replay (HER) [45, 46, 47, 48] to ease the challenges of sparse-reward exploration. HER randomly relabels low-quality data with alternative goals that lead to higher rewards, and this technique is mainly compatible with off-policy methods where the same trajectory can be recycled many times with different goals. Goal conditioned supervised learning (GCSL) [49, 50, 51, 52, 53, 54] uses HER to relabel every trajectory and directly imitates behavior conditioned on future outcomes. GCSL has proven to be an effective way to train Transformers for decision-making [26, 24, 27, 25, 55, 56] but has a growing number of theoretical and practical issues [57, 58, 59, 60]. AMAGO avoids these limitations by providing a stable and effective way to train long-sequence Transformers with pure RL.
+
+## 3 BACKGROUND AND PROBLEM FORMULATION
+
+**Solving Goal-Conditioned CMDPs with In-Context RL.** Partially observed Markov decision processes (POMDPs) create long-term memory problems where the true environment state _st_ may need to be inferred from a history of limited observations ( _o_ 0 _, . . . , ot_ ) [61]. Contextual MDPs (CMDPs) [62, 6, 63] extend POMDPs to create a distribution of related decision-making problems where everything that makes an environment unique can be identified by a _context parameter_ . More formally, an environment’s context parameter, _e_ , conditions its reward, transition, observation emission function, and initial state distribution. CMDPs create zero-shot generalization problems when _e_ is sampled at the end of every episode [6] and meta-RL problems when held constant for multiple trials [12]. We slightly adapt the usual CMDP definition by decoupling an optional _goal_ parameter _g_ from the environment parameter _e_ [41]. The goal _g_ only contributes to the reward function _Re,g_ ( _s, a_ ), and lets us provide a task description without assuming we know anything else about the environment.
+
+Knowledge of _e_ lets a policy adapt to any given CMDP, but its value is not observed as part of the state (and may be impossible to represent), creating an “implicit POMDP” [14, 39]. From this perspective, the only meaningful difference between POMDPs and CMDPs is the need to reason about transition dynamics ( _oi, ai, oi_ +1), rewards ( _r_ ), and resets ( _d_ ) based on full trajectories of environment interaction _τ_ 0: _t_ = ( _o_ 0 _, a_ 0 _, r_ 1 _, d_ 1 _, o_ 1 _, a_ 1 _, r_ 2 _, d_ 2 _, . . . , ot_ ). In-context RL agents embrace this similarity by treating CMDPs as POMDPs with additional inputs and using their memory to update state and environment estimates at every timestep. Memory-equipped policies _π_ take trajectory sequences as input and output actions that maximize returns over a finite horizon ( _H_ ) that may span multiple trials: _H π[∗]_ = argmax _π_ E _p_ ( _e,g_ ) _,at∼π_ ( _·|τ_ 0: _t,g_ ) �� _t_ =0 _[R][e,g]_[(] _[s][t][, a][t]_[)] �.
+
+**Challenges in Off-Policy Model-Free In-Context RL.** In-context RL is a simple and powerful idea but is often outperformed by more complex methods [64, 42, 12]. However, deep RL is a field where implementation details are critical [65], and recent work has highlighted how the right combination of off-policy techniques can close this performance gap [22]. Off-policy incontext agents collect training data in a replay buffer from which they sample trajectory sequences _τt−l_ : _t_ = ( _ot−l, at−l, rt−l_ +1 _, . . . , ot_ ) up to a fixed maximum _context length_ of _l_ . Training on shorter sequences than used at test-time is possible but creates out-of-distribution behavior [66, 67, 68]. Therefore, an agent’s context length is its most important bottleneck because it establishes an upper bound on memory and in-context adaptation. Model-free RL agents control their planning horizon with a value learning discount factor _γ ∈_ [0 _,_ 1). Despite context-based learning’s focus on long-term adaptation, learning instability restricts nearly all methods to _γ ≤ ._ 99 and effective planning horizons of around 100 timesteps. Trade-offs between context length, planning horizon, and stability create an unpredictable hyperparameter landscape [22] that requires extensive tuning.
+
+Agents that are compatible with both discrete and continuous actions use _τt−l_ : _t_ to update actor ( _π_ ) and critic ( _Q_ ) networks with two loss functions optimized in alternating steps [69, 70] that make it difficult to share sequence model parameters [22, 71, 72]. It is also standard to use multiple critic networks to reduce overestimation [73, 74] and maintain extra target networks to stabilize optimization [3]. The end result is several sequence model forward/backward passes per training step — limiting model size and context length [75, 22] (Figure 10). This problem is compounded by
+
+3
+
+the use of recurrent networks that process each timestep sequentially [76]. Transformers parallelize sequence computation and improve recall but can be unstable in general [77, 78], and the differences between supervised learning and RL create additional challenges. RL training objectives do not always follow clear scaling laws, and the correct network size can be unpredictable. Datasets also grow and shift over time as determined by update-to-data ratios that impact performance but are difficult to tune [79, 80]. Finally, the rate of policy improvement changes unpredictably and makes it difficult to prevent model collapse with learning rate cooldowns [18, 81]. Taken together, these challenges make us likely to optimize a large policy network for far longer than our small and shifting dataset can support [82, 83]. Addressing these problems requires careful architectural changes [20, 84] and Transformers are known to be an inconsistent baseline in our setting [21, 28, 8].
+
+## 4 METHOD
+
+We aim to extend the limits of off-policy in-context RL’s three main barriers: 1) the memory limit or context length _l_ , 2) the value discount factor _γ_ , and 3) the size and recall of our sequence model. Transformers are a strong solution to the last challenge and may be able to address all three barriers if we were able to learn from long context lengths _l ≈ H_ and select actions for _γ ≥ ._ 999 at test time. In principle, this would allow agents to remember and plan for long adaptation windows in order to scale to more challenging problems while removing the need to tune trade-offs between stability and context length. AMAGO overcomes several challenges to make this possible. This section summarizes the most important techniques that enable AMAGO’s performance and flexibility. More details can be found in Appendix A and in our open-source code release.
+
+A high-level overview of AMAGO is illustrated in Figure 1. The observations of every environment are augmented to a unified goal-conditioned CMDP format, even when some of the extra input information is unnecessary. This unified format allows AMAGO to be equally applicable to generalization, meta-RL, long-term memory, and multi-task problems without changes. AMAGO is an off-policy method that takes advantage of large and diverse datasets; trajectory data is loaded from disk and can be relabeled with alternative goals and rewards. The shape and format of trajectories vary across domains, but we use a timestep encoder network to map each timestep to a fixed-size representation. AMAGO allows the timestep encoder to be the only architecture change across experiments. A single Transformer trajectory encoder processes sequences of timestep representations. AMAGO uses these representations as the inputs to small feed-forward actor and critic networks, which are optimized simultaneously across every timestep of the causal sequence. Like all implicit context-based methods (Sec. 2), this architecture encourages the trajectory encoder outputs to be latent estimates of the current state and environment ( _si, e_ ) (Sec. 3). In short, AMAGO’s learning update looks more like supervised sequence modeling than an off-policy actor-critic, where each training step involves exactly one forward pass of one Transformer model with two output heads. This end result is simple and scalable but is only made possible by important technical details.
+
+**Sharing One Sequence Model.** The accepted best practice in off-policy RL is to optimize separate sequence models for the actor and critic(s) — using additional target models to compute the critic loss. Sharing actor and critic sequence models is possible but has repeatedly been shown to be unstable [22, 71, 72]. AMAGO addresses this instability and restructures the learning update to train its actor and critics on top of the same sequence representation; there are no target sequence models, and every parameter is updated simultaneously without alternating steps or conflicting learning rates. We combine the actor and critic objectives into a single loss trained by one optimizer. However, we must put each term on a predictable scale to prevent their weights from needing to be tuned across every experiment [85, 86]. The key detail enabling the simultaneous update to work in AMAGO — without separating the Transformer from the actor loss [72, 71] — is to carefully detach the critic from the actor loss (Appendix A.1). We compute loss terms with a custom variant of REDQ [74] for discrete and continuous actions that removes unintuitive hyperparameters wherever possible.
+
+**Stable Long-Context Transformers in Off-Policy RL.** Transformers bring additional optimization questions that can be more challenging in RL than supervised learning (Sec. 2). The shared off-policy update may amplify these issues, as we were unable to successfully apply existing architectural changes for Transformers in on-policy RL [84, 20] to our setting. We find that _attention entropy collapse_ [87] is an important problem in long-sequence RL. Language modeling and other successful applications of Transformers involve learning a variety of temporal patterns. In contrast, RL
+
+4
+
+**==> picture [270 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+A B = 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 A B C = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C AA B = 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0= 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 A B C = 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 E D E = 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 D E = 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 D = 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 **----- End of picture text -----**
+
+Figure 2: The agent (top left) navigates a maze to reach goal locations ( _g_[0] _, g_[1] _, g_[2] ). Yellow, red, and blue paths with locations (A, .. ., E) are examples of trajectories and achieved goals for relabeling. We show how instruction-relabeling creates a variety of alternative reward sequences.
+
+agents can converge on precise memory strategies that consistently recall specific timesteps of long sequences (Figure 15). Optimizing these policies encourages large dot products between a small set of queries and keys that can destabilize attention[2] . We modify the Transformer architecture based on Normformer [88] and _σ_ Reparam [87], and replace saturating activations with Leaky ReLUs to preserve plasticity [83, 89] as discussed in Appendix A.3. This architecture effectively stabilizes training and reduces tuning by letting us pick model sizes that are safely too large for the problem.
+
+**Long Horizons and Multi-Gamma Learning.** While long-sequence Transformers improve recall, adaptation over extended rollouts creates a challenging credit assignment and planning problem. An important barrier in increasing adaption horizons is finding stable ways to increase the discount factor _γ_ . Time information in the trajectory improves stability [90], but we also use a “multi-gamma” update that jointly optimizes many different values of _γ_ in parallel. Each _γ_ creates its own _Q_ -value surface, making the shared Transformer more likely to have a strong actor-critic learning signal for some _γ_ throughout training. The relative cost of the multi-gamma update becomes low as the size of the sequence model increases. AMAGO can select the action corresponding to any _γ_ during rollouts, and we use _γ ≥ ._ 999 unless otherwise noted. A discrete-action version of the multi-gamma update has previously been studied as a byproduct of hyperbolic discounting in (memory-free) MDPs with shared visual representations [91]. As a fail-safe, we include a filtered behavior cloning (BC) term [92, 93], which performs supervised learning when actions are estimated to have positive advantage ( _Q_ ( _s, a_ ) _− V_ ( _s_ ) _>_ 0) but does not directly depend on the scale of the _Q_ function.
+
+**Hindsight Instruction Relabeling.** AMAGO’s use of off-policy data and high discount factors allows us to relabel long trajectories in hindsight. This ability lets us expand the in-context RL framework to include goal-conditioned problems with sparse rewards that are too difficult for onpolicy agents with short planning horizons to explore. AMAGO introduces a variant of HER (Sec. 3) for _multi-step_ goals where _g_ = ( _g_[0] _, . . . , g[k]_ ). Besides adding the flexibility to create more complex multi-stage tasks, our experiments show that relabeling multi-step goals effectively creates automatic exploration plans in open-world domains like Crafter [33].
+
+Our relabeling scheme works in two steps. First, we do not restrict goals to represent target states and allow them to be an abstract set of tokens or strings from a closed vocabulary. During rollouts, we can evaluate the goal tokens we were instructed to achieve and record alternatives that can be used for relabeling. The second step extends the HER relabeling scheme to “instructions”, or sequences of up to _k_ subgoals. If an agent is tasked with _k_ goals but only completes the first _n ≤ k_ steps of the instruction, we sample _h ∈_ [0 _, k−n_ ] timesteps that provide alternative goals, and then sample from all the goals achieved at those timesteps. We merge the _h_ alternative goals into the original instruction in chronological order and replay the trajectory from the beginning, recomputing the reward for the new instruction, which leads to a return of _n_ + _h_ when rewards are binary. Figure 2 illustrates the technique with a maze-navigation example. Our implementation also considers importance-sampling variants that weight goal selection based on rarity and improve sample efficiency. Details are discussed in Appendix B.
+
+> 2Environments that require little memory create a similar problem to those that demand long-term memory of specific information. Long context sequences create narrow attention distributions in both cases.
+
+5
+
+## 5 EXPERIMENTS
+
+Our experiments are divided into two parts. First, we evaluate our agent in a variety of existing longterm memory, generalization, and meta-learning environments. We then explore the combination of AMAGO’s adaptive memory and hindsight instruction relabeling in multi-task domains with procedurally generated environments. Additional results, details, and discussion for each of our experiments can be found in Appendix C. Unless otherwise noted, AMAGO uses a context length _l_ equal to the entire rollout horizon _H_ . These memory lengths are not always necessary on current benchmarks, but we are interested in evaluating the performance of RL on long sequences so that AMAGO can serve as a strong baseline in developing new benchmarks that require more adaptation.
+
+## 5.1 LONG-TERM MEMORY, GENERALIZATION, AND META-LEARNING
+
+**==> picture [382 x 143] intentionally omitted <==**
+
+**----- Start of picture text -----**
+POPGym Suite (39 Environments) Unstandardized Mean Episodic Return ( [ 1, 1]) Standardized Mean Episodic Return ( [0, 1]) 1.0 1.0 0.8 0.8 0.6 0.4 0.6 0.2 0.4 0.0 Interquartile 0.2 Interquartile 0.2 Median Median Mean 0.4 Mean Outliers 0.0 AMAGO Naive Best On-Policy On-Policy Worst AMAGO Naive Best On-Policy On-Policy Off-Policy On-Policy GRU Linear On-Policy Off-Policy On-Policy GRU Linear Shared Baseline Transformer Baseline Shared Baseline Transformer Transformer Per Env. Per Env. Transformer Per Env. **----- End of picture text -----**
+
+Figure 3: **Summary of POPGym Suite Results. (Left)** Aggregate results based on raw returns. **(Right)** Relative performance standardized by the highest and lowest scores in each environment.
+
+POPGym [30] is a recent benchmark for evaluating long-term memory and generalization in a range of CMDPs. Performance in POPGym is far from saturated, and the challenges of sequence-based learning often prevent prior on-policy results from meaningfully outperforming memory-free policies. We tune AMAGO on one environment to meet the sample limit and architecture constraints of the original benchmark before copying these settings across 38 additional environments. Figure 3 summarizes results across the suite. We compare against the best existing baseline (a recurrent GRU-based agent [94]) and the most comparable architecture (an efficient Transformer variant [95]). We also report the aggregated results of the best baseline in each environment — equivalent to an exhaustive grid search over 13 alternative sequence models trained by on-policy RL. If we standardize the return in each environment to [0 _,_ 1] based on the highest and lowest baseline, as done in [30], AMAGO achieves an average score of _._ 95 across the suite, making it a remarkably strong default for sequence-based RL. We perform an ablation that naively applies the shared Transformer learning update without AMAGO’s other details — such as our Transformer architecture and multi-gamma update. The naive baseline performs significantly worse, and the metrics in Figure 3 mask its collapse in 9 _/_ 39 environments; AMAGO maintains stability in all of its 120+ trials despite using model sizes and update-to-data ratios that are not tuned. Learning curves and additional experiments are listed in Appendix C.1.
+
+**==> picture [390 x 75] intentionally omitted <==**
+
+**----- Start of picture text -----**
+AutoencodeEasy AutoencodeMedium AutoencodeHard CountRecallMedium RepeatPreviousHard 1.00 1.00 1.00 0.90 1.00 0.70 0.69 0.69 0.53 0.70 0.39 0.39 0.39 0.17 0.40 0.09 0.09 0.09 -0.20 0.10 -0.21 -0.21 -0.21 -0.56 -0.20 -0.51 -0.51 -0.52 -0.93 -0.50 0 3 6 9 12 15 0 3 6 9 12 15 0 3 6 9 12 15 0 3 6 9 12 15 0 3 6 9 12 15 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) GRU Baseline Best Baseline Naive Off-Policy Shared Transformer AMAGO AMAGO-GRU Avg. Return **----- End of picture text -----**
+
+Figure 4: **Memory-Intensive POPGym Environments.** AMAGO’s off-policy updates can improve performance in general, but its Transformer turns hard memory-intensive environments into a straightforward recall exercise. Appendix C.1 reports results on more than 30 additional environments.
+
+6
+
+Much of AMAGO’s performance gain in POPGym appears to be due to its ability to unlock Transformers’ memory capabilities in off-policy RL: there are 9 recall-intensive environments where the GRU baseline achieves a normalized score of _._ 19 compared to AMAGO’s _._ 999. Figure 4 ablates the impact of AMAGO’s trajectory encoder from the rest of its off-policy details by replacing its Transformer with a GRU-based RNN in a sample of these recall-intensive environments.
+
+We test the limits of AMAGO’s recall using a “Passive T-Maze” environment from concurrent work [96], which creates a way to isolate memory capabilities at any sequence length. Solving this task requires accurate recall of the first timestep at the last timestep _H_ . AMAGO trains a single RL Transformer to recover the optimal policy until we run out of GPU memory at context length _l_ = _H_ = 10 _,_ 000 (Figure 5 top right). One concern is that AMAGO’s maximum context lengths, large policies, and long horizons may hinder performance on easier problems where they are unnecessary, leading to the kind of hyperparameter tuning we would like to avoid. We demonstrate AMAGO on two continuous-action meta-RL problems from related work with dense (Fig. 5 left) and sparse (Fig. 5 bottom right) rewards where performance is already saturated, with strong and stable results.
+
+**==> picture [396 x 102] intentionally omitted <==**
+
+Figure 5: **Case Studies in In-Context Adaptation. (Left)** Adaptation over three episodes in HalfCheetah Velocity [97]. **(Center)** AMAGO vs. Algorithm Distillation over the first 500 timesteps of Dark Key-To-Door [28]. **(Bottom Right)** Adaptation to a sparse-reward environment with continuous actions [22]. **(Top Right)** AMAGO solves the Passive T-Maze memory experiment [96] up until the GPU memory limit of _l_ = _H_ = 10 _,_ 000 timesteps.
+
+Like several recent approaches that reformulate RL as supervised learning (Sec. 2), AMAGO scales with the size and sequence length of a single Transformer. However, it creates a stable way to optimize its Transformer on the true RL objective rather than a sequence modeling loss. This can be an important advantage when the supervised objective becomes misaligned with our true goal. For example, we replicate Algorithm Distillation (AD) [28] on a version of its Dark Key-To-Door meta-learning task. AMAGO’s ability to successfully optimize the return over any horizon _H_ lets us control sample efficiency at test-time (Fig. 5 center), while AD’s adaptation rate is limited by its dataset and converges several thousand timesteps later in this case.
+
+**==> picture [378 x 142] intentionally omitted <==**
+
+Figure 6: **(Left)** Meta-World [98] ML-1 success rate on held-out test tasks by context length. **(Right)** AMAGO enables larger models and longer context lengths than off-policy RNN variants. We compare training throughput in a common locomotion benchmark [97] with more details in Appendix D.
+
+Figure 6 (left) breaks from our default context length _l_ = _H_ and evaluates varying lengths on a sample of Meta-World ML-1 robotics environments [98]. Meta-World creates meta-RL tasks out of goal-conditioned environments by masking the goal information, which can be inferred from short
+
+7
+
+context lengths of dense reward signals. While the maximum meta-train performance of every context length is nearly identical, the meta-test success rates decrease slightly over long sequences. Extended contexts may encourage overfitting on these smaller environment distributions. Figure 6 (right) measures the scalability of AMAGO relative to off-policy agents with a separated RNN architecture as well as the more efficient (but previously unstable) shared model. AMAGO lets us train larger models faster than RNNs with equivalent memory capacity. More importantly, Transformers make optimizing these super-long sequences more realistic.
+
+## 5.2 GOAL-CONDITIONED ENVIRONMENT ADAPTATION
+
+We now turn our focus towards generalization over procedurally generated environments _e ∼ p_ ( _e_ ) and multi-step instructions ( _g_[0] _, . . . , g[k]_ ) _∼ p_ ( _g | e_ ) of up to _k_ goals (Sec. 3). A successful policy is able to adapt to a new environment in order to achieve sparse rewards of +1 for completing each step of its instruction, creating a general instruction-following agent. Learning to explore from sparse rewards is difficult, but AMAGO’s long-horizon off-policy learning update lets us relabel trajectories with alternative instructions (Figure 2). Before we scale up to a more complex domain, we introduce two easily-simulated benchmarks. “Package Delivery” is a toy problem where agents navigate a sequence of forks in a road to deliver items to a list of addresses. This task is both sparse and memory-intensive, as achieving any reward requires recall of previous attempts. Appendix C.3 provides a full environment description, and Figure 7 compares key ablations of AMAGO. Relabeling, memory, and multi-gamma learning are essential to performance and highlight the importance of AMAGO’s technical details.
+
+**==> picture [378 x 109] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Package Delivery without MultiGamma Package Delivery with MultiGamma 100 100 AMAGO 80 w/o Memory 80 w/o Relabeling 60 w/o Filtered BC 60 40 Relabel All 40 20 20 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Learning Updates (1e3) Learning Updates (1e3) Success Rate (%) **----- End of picture text -----**
+
+Figure 7: **Package Delivery Results.** Relabeling, long-term memory, and multi-gamma updates are essential to success in this sparse goal-conditioned adaptation problem ( _H_ = 180).
+
+**==> picture [378 x 110] intentionally omitted <==**
+
+Figure 8: **MazeRunner Results.** Memory improves navigation in a partially observed maze, but sparse rewards create the most significant barrier to learning (15 _×_ 15 _H_ = 400, 30 _×_ 30 _H_ = 1 _,_ 000).
+
+“MazeRunner” is a zero-shot maze navigation problem modeled after the example in Figure 2 and loosely based on Memory Maze [99]. The agent finds itself in a familiar spawn location in an otherwise unfamiliar maze and needs to navigate to a sequence of _k ∈_ [1 _,_ 3] locations. Although the underlying maze map is generated as an _N × N_ gridworld, the agent’s observations are continuous Lidar-like depth sensors. When _N_ = 15, the problem is sparse but solvable without relabeling thanks to our implementation’s low-level improvements (Figure 8 left). However, _N_ = 30 is impossibly sparse, and relabeling is crucial to success (Fig. 8 right). We run a similar experiment where action dynamics are randomly reset every episode in Appendix C.4. While this variant is more challenging,
+
+8
+
+our method outperforms other zero-shot meta-RL agents and nearly recovers the original performance while adapting to the new action space.
+
+Crafter [33] is a research-friendly simplification of Minecraft designed to evaluate multi-task capabilities in procedurally generated worlds. Agents explore their surroundings to gather food and resources while progressing through a tech tree of advanced tools and avoiding dangerous enemies. We create an _instruction-conditioned_ version where the agent is only successful if it completes the specified task. Our instructions are formed from the 22 original Crafter achievements with added goals for traveling to a grid of world coordinates and placing blocks in specific locations. Goals are represented as strings like “make stone pickaxe”, which are tokenized at the word level with the motivation of enabling knowledge transfer between similar goals. Any sequence of _k ≤_ 5 goal strings forms a valid instruction that we expect our agent to solve in any randomly generated Crafter environment.
+
+**==> picture [374 x 100] intentionally omitted <==**
+
+**----- Start of picture text -----**
+eat cow, All place defeat makewood collect stonemake place collect make stone pickaxe,make wood sword,collect coal, ProcedurallyGenerated table zombie sword stone pickaxe furnace coal defeat zombie Instructions 10090 100 99 94 100100 97 86 89 82 100 98 98 94 100 83 99 94 90 80 70 69 66 62 60 50 40 39 30 27 24 20 12 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 AMAGO w/o Memory w/o Relabeling w/o MultiGoal Instructions w/o Full Instruction Observable Success Rate (%) **----- End of picture text -----**
+
+Figure 9: **Crafter Instruction Success Rates.** Here we highlight specific instructions that reveal exploration capabilities. “All Procedurally Generated Instructions” indicates performance across the entire range of multi-step goals in randomly generated worlds.
+
+Figure 9 shows the success of AMAGO on the entire goal distribution along with several highlighted tasks. Resource-acquisition and tool-making tasks that require test-time exploration and adaptation to a new world benefit from Transformer policies and long-term memory. As the steps in an instruction become less likely to be achieved by random exploration, relabeling becomes essential to success. However, Crafter reveals a more interesting capability of our multi-step hindsight relabeling. If we ablate our relabeling scheme to single-goal HER and evaluate on instructions with length _k_ = 1 (Fig. 9 “w/o Multi-Goal...”), we find AMAGO loses the ability to complete advanced goals. Crafter’s achievement system locks skills behind a progression of prerequisite steps. For example, we can only make tools after we have collected the necessary materials. Relabeling with instructions lets us follow randomly generated sequences of goals we have mastered until we reach the “frontier” of skills we have discovered, where new goals have a realistic chance of occurring by random exploration. The agent eventually learns to complete new discoveries as part of other instructions, creating more opportunities for exploration. However, this effect only occurs when we provide the entire task in advance instead of revealing the instruction one step at a time (Fig. 9 “w/o Full Instruction...”). We continue this investigation in detail with additional Crafter experiments in Appendix C.5.
+
+## 6 CONCLUSION
+
+We have introduced AMAGO, an in-context RL agent for generalization, long-term memory, and meta-learning. Our work makes important technical contributions by finding a stable and highperformance way to train off-policy RL agents on top of one long-context Transformer. With AMAGO, we can train policies to adapt over more distant planning horizons with longer effective memories. We also show that the benefits of an off-policy in-context method can go beyond stability and sample efficiency, as AMAGO lets us relabel multi-step instructions to discover sparse rewards while adapting to unfamiliar environments. Our agent’s efficiency on long input sequences creates an exciting direction for future work, as very few academic-scale meta-RL or RL generalization benchmarks genuinely require adaptation over thousands of timesteps. AMAGO is open-source, and the combination of its performance and flexibility should let it serve as a strong baseline in the development of new benchmarks in this area. The core AMAGO framework is also compatible with sequence models besides Transformers and creates an extensible way to research more experimental long-term memory architectures that can push adaptation horizons even further.
+
+9
+
+## REFERENCES
+
+- [1] Adria Puigdom` enech Badia et al. “Agent57: Outperforming the atari human benchmark”. In:` _International Conference on Machine Learning_ . PMLR. 2020, pp. 507–517.
+
+- [2] Christopher Berner et al. “Dota 2 with large scale deep reinforcement learning”. In: _arXiv preprint arXiv:1912.06680_ (2019).
+
+- [3] Volodymyr Mnih et al. “Human-level control through deep reinforcement learning”. In: _nature_ 518.7540 (2015), pp. 529–533.
+
+- [4] David Silver et al. “A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play”. In: _Science_ 362.6419 (2018), pp. 1140–1144.
+
+- [5] Oriol Vinyals et al. “Grandmaster level in StarCraft II using multi-agent reinforcement learning”. In: _Nature_ 575.7782 (2019), pp. 350–354.
+
+- [6] Robert Kirk et al. _A Survey of Generalisation in Deep Reinforcement Learning_ . 2022. arXiv: 2111.09794 [cs.LG].
+
+- [7] Linxi Fan et al. “Minedojo: Building open-ended embodied agents with internet-scale knowledge”. In: _arXiv preprint arXiv:2206.08853_ (2022).
+
+- [8] Adaptive Agent Team et al. “Human-Timescale Adaptation in an Open-Ended Task Space”. In: _arXiv preprint arXiv:2301.07608_ (2023).
+
+- [9] Scott Reed et al. “A generalist agent”. In: _arXiv preprint arXiv:2205.06175_ (2022).
+
+- [10] Jane X Wang et al. “Learning to reinforcement learn”. In: _arXiv preprint arXiv:1611.05763_ (2016).
+
+- [11] Yan Duan et al. “RL[2] : Fast reinforcement learning via slow reinforcement learning”. In: _arXiv preprint arXiv:1611.02779_ (2016).
+
+- [12] Jacob Beck et al. “A Survey of Meta-Reinforcement Learning”. In: _arXiv preprint arXiv:2301.08028_ (2023).
+
+- [13] Luisa Zintgraf. “Fast adaptation via meta reinforcement learning”. PhD thesis. University of Oxford, 2022.
+
+- [14] Dibya Ghosh et al. _Why Generalization in RL is Difficult: Epistemic POMDPs and Implicit Partial Observability_ . 2021. arXiv: 2107.06277 [cs.LG].
+
+- [15] Pedro A Ortega et al. “Meta-learning of sequential strategies”. In: _arXiv preprint arXiv:1905.03030_ (2019).
+
+- [16] Matthew Botvinick et al. “Reinforcement learning, fast and slow”. In: _Trends in cognitive sciences_ 23.5 (2019), pp. 408–422.
+
+- [17] Bradly C Stadie et al. “Some considerations on learning to explore via meta-reinforcement learning”. In: _arXiv preprint arXiv:1803.01118_ (2018).
+
+- [18] Ashish Vaswani et al. “Attention is all you need”. In: _Advances in neural information processing systems_ 30 (2017).
+
+- [19] Jack W Rae and Ali Razavi. “Do transformers need deep long-range memory”. In: _arXiv preprint arXiv:2007.03356_ (2020).
+
+- [20] Luckeciano C Melo. “Transformers are meta-reinforcement learners”. In: _International Conference on Machine Learning_ . PMLR. 2022, pp. 15340–15359.
+
+- [21] Nikhil Mishra et al. “A simple neural attentive meta-learner”. In: _arXiv preprint arXiv:1707.03141_ (2017).
+
+- [22] Tianwei Ni, Benjamin Eysenbach, and Ruslan Salakhutdinov. _Recurrent Model-Free RL can be a Strong Baseline for Many POMDPs_ . 2022. arXiv: 2110.05038 [cs.LG].
+
+- [23] Rasool Fakoor et al. “Meta-q-learning”. In: _arXiv preprint arXiv:1910.00125_ (2019).
+
+- [24] Lili Chen et al. “Decision transformer: Reinforcement learning via sequence modeling”. In: _Advances in neural information processing systems_ 34 (2021), pp. 15084–15097.
+
+10
+
+- [25] Kuang-Huei Lee et al. “Multi-game decision transformers”. In: _Advances in Neural Information Processing Systems_ 35 (2022), pp. 27921–27936.
+
+- [26] Michael Janner, Qiyang Li, and Sergey Levine. “Reinforcement learning as one big sequence modeling problem”. In: _ICML 2021 Workshop on Unsupervised Reinforcement Learning_ . 2021.
+
+- [27] Qinqing Zheng, Amy Zhang, and Aditya Grover. “Online decision transformer”. In: _arXiv preprint arXiv:2202.05607_ (2022).
+
+- [28] Michael Laskin et al. “In-context Reinforcement Learning with Algorithm Distillation”. In: _arXiv preprint arXiv:2210.14215_ (2022).
+
+- [29] Lucy Xiaoyang Shi et al. “Cross-Episodic Curriculum for Transformer Agents”. In: _arXiv preprint arXiv:2310.08549_ (2023).
+
+- [30] Steven Morad et al. “POPGym: Benchmarking Partially Observable Reinforcement Learning”. In: _The Eleventh International Conference on Learning Representations_ . 2023. URL: https: //openreview.net/forum?id=chDrutUTs0K.
+
+- [31] Leslie Pack Kaelbling. “Learning to achieve goals”. In: _IJCAI_ . Vol. 2. Citeseer. 1993, pp. 1094–8.
+
+- [32] Vitchyr Pong. “Goal-Directed Exploration and Skill Reuse”. PhD thesis. University of California, Berkeley, 2021.
+
+- [33] Danijar Hafner. “Benchmarking the spectrum of agent capabilities”. In: _arXiv preprint arXiv:2109.06780_ (2021).
+
+- [34] Karl Cobbe et al. “Leveraging procedural generation to benchmark reinforcement learning”. In: _International conference on machine learning_ . PMLR. 2020, pp. 2048–2056.
+
+- [35] Xingyou Song et al. “Observational overfitting in reinforcement learning”. In: _arXiv preprint arXiv:1912.02975_ (2019).
+
+- [36] Charles Packer et al. “Assessing generalization in deep reinforcement learning”. In: _arXiv preprint arXiv:1810.12282_ (2018).
+
+- [37] Amy Zhang, Nicolas Ballas, and Joelle Pineau. “A dissection of overfitting and generalization in continuous reinforcement learning”. In: _arXiv preprint arXiv:1806.07937_ (2018).
+
+- [38] Jurgen Schmidhuber. “Evolutionary principles in self-referential learning, or on learning how¨ to learn: the meta-meta-... hook”. PhD thesis. Technische Universit¨at M¨unchen, 1987.
+
+- [39] Jan Humplik et al. “Meta reinforcement learning as task inference”. In: _arXiv preprint arXiv:1905.06424_ (2019).
+
+- [40] Pierre-Alexandre Kamienny et al. “Learning adaptive exploration strategies in dynamic environments through informed policy regularization”. In: _arXiv preprint arXiv:2005.02934_ (2020).
+
+- [41] Evan Z Liu et al. “Decoupling exploration and exploitation for meta-reinforcement learning without sacrifices”. In: _International conference on machine learning_ . PMLR. 2021, pp. 6925– 6935.
+
+- [42] Kate Rakelly et al. “Efficient off-policy meta-reinforcement learning via probabilistic context variables”. In: _International conference on machine learning_ . PMLR. 2019, pp. 5331–5340.
+
+- [43] Hongyu Ren et al. “OCEAN: Online Task Inference for Compositional Tasks with Context Adaptation”. In: _Conference on Uncertainty in Artificial Intelligence_ . PMLR. 2020, pp. 1378– 1387.
+
+- [44] Bernie Wang et al. “Improving context-based meta-reinforcement learning with selfsupervised trajectory contrastive learning”. In: _arXiv preprint arXiv:2103.06386_ (2021).
+
+- [45] Marcin Andrychowicz et al. “Hindsight experience replay”. In: _Advances in neural information processing systems_ 30 (2017).
+
+- [46] Ashvin V Nair et al. “Visual reinforcement learning with imagined goals”. In: _Advances in neural information processing systems_ 31 (2018).
+
+- [47] Soroush Nasiriany et al. “Disco rl: Distribution-conditioned reinforcement learning for general-purpose policies”. In: _2021 IEEE International Conference on Robotics and Automation (ICRA)_ . IEEE. 2021, pp. 6635–6641.
+
+- [48] Ben Eysenbach et al. “Rewriting history with inverse rl: Hindsight inference for policy improvement”. In: _Advances in neural information processing systems_ 33 (2020), pp. 14783– 14795.
+
+11
+
+- [49] Dibya Ghosh et al. “Learning to reach goals via iterated supervised learning”. In: _arXiv preprint arXiv:1912.06088_ (2019).
+
+- [50] Ajay Mandlekar et al. “Iris: Implicit reinforcement without interaction at scale for learning control from offline robot manipulation data”. In: _2020 IEEE International Conference on Robotics and Automation (ICRA)_ . IEEE. 2020, pp. 4414–4420.
+
+- [51] Corey Lynch et al. “Learning latent plans from play”. In: _Conference on robot learning_ . PMLR. 2020, pp. 1113–1132.
+
+- [52] Aviral Kumar, Xue Bin Peng, and Sergey Levine. “Reward-conditioned policies”. In: _arXiv preprint arXiv:1912.13465_ (2019).
+
+- [53] Juergen Schmidhuber. “Reinforcement Learning Upside Down: Don’t Predict Rewards–Just Map Them to Actions”. In: _arXiv preprint arXiv:1912.02875_ (2019).
+
+- [54] Rupesh Kumar Srivastava et al. “Training agents using upside-down reinforcement learning”. In: _arXiv preprint arXiv:1912.02877_ (2019).
+
+- [55] Zichen Jeff Cui et al. “From play to policy: Conditional behavior generation from uncurated robot data”. In: _arXiv preprint arXiv:2210.10047_ (2022).
+
+- [56] Mengdi Xu et al. “Prompting decision transformer for few-shot policy generalization”. In: _International Conference on Machine Learning_ . PMLR. 2022, pp. 24631–24645.
+
+- [57] Benjamin Eysenbach et al. “Imitating Past Successes can be Very Suboptimal”. In: _arXiv preprint arXiv:2206.03378_ (2022).
+
+- [58] Keiran Paster, Sheila McIlraith, and Jimmy Ba. “You Can’t Count on Luck: Why Decision Transformers Fail in Stochastic Environments”. In: _arXiv preprint arXiv:2205.15967_ (2022).
+
+- [59] David Brandfonbrener et al. “When does return-conditioned supervised learning work for offline reinforcement learning?” In: _arXiv preprint arXiv:2206.01079_ (2022).
+
+- [60] Rui Yang et al. “Rethinking goal-conditioned supervised learning and its connection to offline rl”. In: _arXiv preprint arXiv:2202.04478_ (2022).
+
+- [61] Anthony R Cassandra, Leslie Pack Kaelbling, and Michael L Littman. “Acting optimally in partially observable stochastic domains”. In: _Aaai_ . Vol. 94. 1994, pp. 1023–1028.
+
+- [62] Assaf Hallak, Dotan Di Castro, and Shie Mannor. “Contextual markov decision processes”. In: _arXiv preprint arXiv:1502.02259_ (2015).
+
+- [63] Christian Perez, Felipe Petroski Such, and Theofanis Karaletsos. “Generalized hidden parameter mdps: Transferable model-based rl in a handful of trials”. In: _Proceedings of the AAAI Conference on Artificial Intelligence_ . Vol. 34. 04. 2020, pp. 5403–5411.
+
+- [64] Luisa Zintgraf et al. “VariBAD: Variational Bayes-Adaptive Deep RL via Meta-Learning”. In: _Journal of Machine Learning Research_ 22.289 (2021), pp. 1–39.
+
+- [65] Peter Henderson et al. “Deep reinforcement learning that matters”. In: _Proceedings of the AAAI conference on artificial intelligence_ . Vol. 32. 1. 2018.
+
+- [66] Steven Kapturowski et al. “Recurrent experience replay in distributed reinforcement learning”. In: _International conference on learning representations_ . 2018.
+
+- [67] Matthew Hausknecht and Peter Stone. “Deep recurrent q-learning for partially observable mdps”. In: _2015 aaai fall symposium series_ . 2015.
+
+- [68] Nicolas Heess et al. “Memory-based control with recurrent neural networks”. In: _arXiv preprint arXiv:1512.04455_ (2015).
+
+- [69] Timothy P Lillicrap et al. “Continuous control with deep reinforcement learning”. In: _arXiv preprint arXiv:1509.02971_ (2015).
+
+- [70] Petros Christodoulou. “Soft actor-critic for discrete action settings”. In: _arXiv preprint arXiv:1910.07207_ (2019).
+
+- [71] Zhihan Yang and Hai Nguyen. “Recurrent off-policy baselines for memory-based continuous control”. In: _arXiv preprint arXiv:2110.12628_ (2021).
+
+- [72] Denis Yarats et al. “Improving sample efficiency in model-free reinforcement learning from images”. In: _Proceedings of the AAAI Conference on Artificial Intelligence_ . Vol. 35. 12. 2021, pp. 10674–10681.
+
+- [73] Scott Fujimoto, Herke Hoof, and David Meger. “Addressing function approximation error in actor-critic methods”. In: _International conference on machine learning_ . PMLR. 2018, pp. 1587–1596.
+
+12
+
+- [74] Xinyue Chen et al. “Randomized ensembled double q-learning: Learning fast without a model”. In: _arXiv preprint arXiv:2101.05982_ (2021).
+
+- [75] Marco Pleines et al. “Generalization, Mayhems and Limits in Recurrent Proximal Policy Optimization”. In: _arXiv preprint arXiv:2205.11104_ (2022).
+
+- [76] Chris Lu et al. “Structured state space models for in-context reinforcement learning”. In: _arXiv preprint arXiv:2303.03982_ (2023).
+
+- [77] Ruibin Xiong et al. “On layer normalization in the transformer architecture”. In: _International Conference on Machine Learning_ . PMLR. 2020, pp. 10524–10533.
+
+- [78] Toan Q Nguyen and Julian Salazar. “Transformers without tears: Improving the normalization of self-attention”. In: _arXiv preprint arXiv:1910.05895_ (2019).
+
+- [79] William Fedus et al. “Revisiting fundamentals of experience replay”. In: _International Conference on Machine Learning_ . PMLR. 2020, pp. 3061–3071.
+
+- [80] Pierluca D’Oro et al. “Sample-efficient reinforcement learning by breaking the replay ratio barrier”. In: _Deep Reinforcement Learning Workshop NeurIPS 2022_ . 2022.
+
+- [81] Hugo Touvron et al. “Llama 2: Open foundation and fine-tuned chat models”. In: _arXiv preprint arXiv:2307.09288_ (2023).
+
+- [82] Evgenii Nikishin et al. “The primacy bias in deep reinforcement learning”. In: _International conference on machine learning_ . PMLR. 2022, pp. 16828–16847.
+
+- [83] Zaheer Abbas et al. “Loss of plasticity in continual deep reinforcement learning”. In: _arXiv preprint arXiv:2303.07507_ (2023).
+
+- [84] Emilio Parisotto et al. “Stabilizing transformers for reinforcement learning”. In: _International conference on machine learning_ . PMLR. 2020, pp. 7487–7498.
+
+- [85] Hado P van Hasselt et al. “Learning values across many orders of magnitude”. In: _Advances in neural information processing systems_ 29 (2016).
+
+- [86] Danijar Hafner et al. “Mastering atari with discrete world models”. In: _arXiv preprint arXiv:2010.02193_ (2020).
+
+- [87] Shuangfei Zhai et al. “Stabilizing Transformer Training by Preventing Attention Entropy Collapse”. In: _International Conference on Machine Learning_ . PMLR. 2023, pp. 40770– 40803.
+
+- [88] Sam Shleifer, Jason Weston, and Myle Ott. “Normformer: Improved transformer pretraining with extra normalization”. In: _arXiv preprint arXiv:2110.09456_ (2021).
+
+- [89] Qiyang Li et al. “Efficient Deep Reinforcement Learning Requires Regulating Overfitting”. In: _arXiv preprint arXiv:2304.10466_ (2023).
+
+- [90] Fabio Pardo et al. “Time limits in reinforcement learning”. In: _International Conference on Machine Learning_ . PMLR. 2018, pp. 4045–4054.
+
+- [91] William Fedus et al. “Hyperbolic discounting and learning over multiple horizons”. In: _arXiv preprint arXiv:1902.06865_ (2019).
+
+- [92] Ziyu Wang et al. “Critic regularized regression”. In: _Advances in Neural Information Processing Systems_ 33 (2020), pp. 7768–7778.
+
+- [93] Ashvin Nair et al. “Overcoming exploration in reinforcement learning with demonstrations”. In: _2018 IEEE international conference on robotics and automation (ICRA)_ . IEEE. 2018, pp. 6292–6299.
+
+- [94] Kyunghyun Cho et al. “Learning phrase representations using RNN encoder-decoder for statistical machine translation”. In: _arXiv preprint arXiv:1406.1078_ (2014).
+
+- [95] Angelos Katharopoulos et al. “Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention”. In: _Proceedings of the 37th International Conference on Machine Learning_ . ISSN: 2640-3498. PMLR, 2020, pp. 5156–5165.
+
+- [96] Tianwei Ni et al. “When Do Transformers Shine in RL? Decoupling Memory from Credit Assignment”. In: _arXiv preprint arXiv:2307.03864_ (2023).
+
+- [97] Chelsea Finn, Pieter Abbeel, and Sergey Levine. “Model-agnostic meta-learning for fast adaptation of deep networks”. In: _International conference on machine learning_ . PMLR. 2017, pp. 1126–1135.
+
+- [98] Tianhe Yu et al. “Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning”. In: _Conference on robot learning_ . PMLR. 2020, pp. 1094–1100.
+
+13
+
+- [99] Jurgis Pasukonis, Timothy Lillicrap, and Danijar Hafner. “Evaluating Long-Term Memory in 3D Mazes”. In: _arXiv preprint arXiv:2210.13383_ (2022).
+
+- [100] Greg Brockman et al. “Openai gym”. In: _arXiv preprint arXiv:1606.01540_ (2016).
+
+- [101] Sergey Levine et al. “Offline reinforcement learning: Tutorial, review, and perspectives on open problems”. In: _arXiv preprint arXiv:2005.01643_ (2020).
+
+- [102] Ashvin Nair et al. “Awac: Accelerating online reinforcement learning with offline datasets”. In: _arXiv preprint arXiv:2006.09359_ (2020).
+
+- [103] Jake Grigsby and Yanjun Qi. “A Closer Look at Advantage-Filtered Behavioral Cloning in High-Noise Datasets”. In: _arXiv preprint arXiv:2110.04698_ (2021).
+
+- [104] Matteo Hessel et al. “Rainbow: Combining improvements in deep reinforcement learning”. In: _Proceedings of the AAAI conference on artificial intelligence_ . Vol. 32. 1. 2018.
+
+- [105] Raja Farrukh Ali et al. “Efficient Multi-Horizon Learning for Off-Policy Reinforcement Learning”. In: _Deep Reinforcement Learning Workshop NeurIPS 2022_ . 2022. URL: https: //openreview.net/forum?id=7Se_75p9dVA.
+
+- [106] Tuomas Haarnoja et al. “Soft actor-critic algorithms and applications”. In: _arXiv preprint arXiv:1812.05905_ (2018).
+
+- [107] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. “Layer normalization”. In: _arXiv preprint arXiv:1607.06450_ (2016).
+
+- [108] Tri Dao et al. “FlashAttention: Fast and Memory-Efficient Exact Attention with IOAwareness”. In: _arXiv preprint arXiv:2205.14135_ (2022).
+
+- [109] Ron Dorfman, Idan Shenfeld, and Aviv Tamar. “Offline meta learning of exploration”. In: _arXiv preprint arXiv:2008.02598_ (2020).
+
+- [110] Vitaly Kurin et al. “In defense of the unitary scalarization for deep multi-task learning”. In: _Advances in Neural Information Processing Systems_ 35 (2022), pp. 12169–12183.
+
+- [111] Luisa M Zintgraf et al. “Exploration in approximate hyper-state space for meta reinforcement learning”. In: _International Conference on Machine Learning_ . PMLR. 2021, pp. 12991– 13001.
+
+- [112] Heinrich Kuttler et al. “The nethack learning environment”. In:¨ _Advances in Neural Information Processing Systems_ 33 (2020), pp. 7671–7684.
+
+- [113] Max Schwarzer et al. “Bigger, Better, Faster: Human-level Atari with human-level efficiency”. In: _International Conference on Machine Learning_ . PMLR. 2023, pp. 30365–30380.
+
+14
+
+## A AMAGO DETAILS
+
+## A.1 SHARING A SINGLE SEQUENCE MODEL IN OFF-POLICY RL
+
+Off-policy actor-critic methods compute loss terms with an ensemble of actor and critic networks along with a moving-average copy of their parameters used to generate temporal difference targets. Extending the feed-forward (fully observed) setup to sequence-based learning results in an excessive number of sequence model forward/backward passes per training step (Figure 10 top left) [69]. This has created several ways to share parameters and improve efficiency. Ni et al. [22] share a sequence model between the ensemble of critic networks, which becomes more important when using REDQ [74] (Fig. 10 top right). Parameters can be shared across the actor and critics, but this has been shown to be unstable. SAC+AE [72] confronts a similar problem in pixel-based learning and popularized the solution of detaching the larger base model (the Transformer in our case) from the actor’s gradients (Fig. 10 bottom left). This approach has also been demonstrated in sequence-learning [71]. AMAGO removes the target sequence model as well — sharing one Transformer across every actor, critic, and target network while preserving the actor’s gradients and training with one optimizer (Fig. 10 bottom right). Ni et al. [22] evaluate a fully shared architecture but find it to be unstable and do not consistently apply it across every domain. We find that instability is caused by the critic receiving gradients from the actor’s loss and remove these terms during the backward pass of the joint actor-critic objective (Appendix A.2 Equation 3). Concurrent to our work, [96] addressed the same problem by using a frozen copy of the critics to compute the actor loss.
+
+**==> picture [358 x 230] intentionally omitted <==**
+
+Figure 10: **Evolution of Off-Policy Actor-Critic Agent Architectures.** Black arrows give a highlevel overview of how the actor, critic(s), and target networks combine to compute the training objective(s). Network borders are color-coded according to the loss function they optimize. Sequence models (green) are more expensive than feed-forward actors (blue) and critics (gray), which has motivated several ways to simplify the training process while maintaining stability.
+
+## A.2 BASE ACTOR-CRITIC UPDATE
+
+AMAGO’s shared sequence model reduces the RL training process to the standard feed-forward case where the output of the trajectory encoder becomes the state array ( _s_ ), and the batch size is effectively larger by a factor of the context length _l_ . At a high level, we are training a stochastic policy _π_ with a custom variant of the off-policy actor-critic update derived from DDPG [69]. In continuous control, the critic _Q_ takes actions as a network input and outputs a scalar value. In discrete environments, the critic outputs an array corresponding to the value for each of the _|A|_ actions [70]. The actor is trained
+
+15
+
+to maximize the output of the critic ( _L_ PG) while the critic is trained to minimize the classic one-step temporal difference error ( _L_ TD):
+
+**==> picture [359 x 31] intentionally omitted <==**
+
+Where **�** _∇_ is a stop-gradient, and _Q_[¯] and _π_ ¯ denote target critic and actor networks, respectively. AMAGO then combines these two terms into a single shared loss:
+
+**==> picture [323 x 30] intentionally omitted <==**
+
+As mentioned in Appendix A.1, we zero gradients to prevent our critic from directly minimizing the actor’s objective _L_ PG. The weights of each term ( _λ_ 0 _, λ_ 1) can be important but unintuitive hyperparameters. _L_ PG and _L_ TD do not scale equally with _Q_ , and the scale of _Q_ values depends on the environment’s reward function and changes over time at a rate determined by learning progress. This means that the relative importance of our loss terms to their shared trajectory encoder’s gradient update is shifting unpredictably, making ( _λ_ 0 _, λ_ 1) difficult to set in a new environment.
+
+**==> picture [358 x 229] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Actor Loss Term Critic Loss Term 50 10 r × 1 25 8 r × 1, PopArt r × 10 0 6 25 r × 10, PopArt 4 r × 800 50 2 r × 800, PopArt 75 0 100 0 1 2 3 0 1 2 3 Timesteps 1e6 Timesteps 1e6 Actor / Critic (Relative Scale) Transformer Grad. Norm Average Return 2000 300 200 15 1500 100 10 1000 0 5 500 100 0 200 0 0 1 2 3 0 1 2 3 0 1 2 3 Timesteps 1e6 Timesteps 1e6 Timesteps 1e6 **----- End of picture text -----**
+
+Figure 11: **Scaling AMAGO’s Learning Update with PopArt.** PopArt automatically places the relative importance of the actor and critic loss terms in AMAGO’s shared learning update on a reasonably predictable scale, and enables stable training without extreme gradient clipping.
+
+PopArt [85] is typically used to normalize the scale of value-based loss functions when training one policy across multiple domains. However, we use it to reduce hyperparameter tuning by putting _Q_ (and therefore _L_ PG and _L_ TD) on a predictable scale so that ( _λ_ 0 _, λ_ 1) can have meaningful default values. Figure 11 demonstrates the problem and PopArt’s solution. In this example, we train context length _l_ = 128 AMAGO agents on LunarLander-v2 [100]. We use our default values ( _λ_ 0 _, λ_ 1) = (10 _,_ 1) (Table 4). The gray curves track the actor and critic objectives on the environment’s default reward scale without using PopArt. Performance happens to be quite strong (Fig. 11 lower right), but the actor and critic loss scales make gradient norms (lower center) destructively large without clipping. When we scale rewards by a constant ( _r ×_ 10, _r ×_ 800), the optimization metrics often cannot be shown on a readable y-axis and the relative importance of the actor term is now nearly zero (lower left). PopArt automatically puts the relative importance of the actor loss on a predictable order of magnitude (blue, green, orange), and we are no longer relying on alarming levels of gradient clipping.
+
+16
+
+**Critic Ensembling.** In practice, the actor’s goal of maximizing the critic’s output leads to value overestimation that is handled by using the minimum prediction of two critics trained in parallel [73]. Overestimation is especially concerning in our case, because AMAGO’s use of long sequences means that its effective replay ratio [79] can be unusually high; it is not uncommon for our agents to train on their entire replay buffer several times between rollouts. We enable the use of REDQ ensembles [74] with more than two critics as a precaution.
+
+**Filtered Behavioral Cloning.** One difference between training policies with a supervised objective (where Transformers are common and relatively stable) and RL is that our actor’s update depends on the scale and stability of the _Q_ -value surface (Eq. 1). We can improve learning with a “filtered” behavior cloning (BC) actor objective that is independent of the scale of the critics’ output space, which is added to Eq. 3 with a third weight _λ_ 2:
+
+**==> picture [385 x 49] intentionally omitted <==**
+
+The actor’s standard _L_ PG term has a strong learning signal when the value surface is steep, but _L_ FBC only depends on the sign of the advantage and behaves more like supervised learning. AMAGO is now always optimizing a stable sequence modeling objective where we learn to predict replay buffer actions with positive advantage. Variants of the filtered BC update appear in online RL but have become more common in offline settings [101, 102]. AMAGO’s gradient flow causes _λ_ 2 _L_ FBC to impact the objective of the trajectory encoder and actor network but not the critic. We use the binary filter from CRR [92] because it does not add hyperparameters, and training on batches of long sequences helps mask its tendency to increase variance by filtering too many actions [103].
+
+**Multi-Gamma Learning.** Long horizons and sparse rewards can lead to flat _Q_ -value surfaces and slow the convergence of TD learning. AMAGO computes _L_ PG, _L_ TD, and _L_ FBC in parallel across _γN_ values of the discount factor _γ_ . Each _γ_ creates its own value surface — informally making it less likely that all of our loss terms have converged and improving representation learning of shared parameters. Discrete actor and critics’ output layers become _γN_ times larger. Actions for each _γ_ need to be an input to continuous critics (along with _γ_ values themselves), so the effective batch size of continuous-action critic networks is multiplied by _γN_ . In either case, however, the relative cost of this technique becomes low as the size of the shared Transformer increases. An example of the _Q_ scales learned by different values of _γ_ is plotted in Figure 12. During rollouts, we can select the index of the actor’s outputs corresponding to any of the _γN_ horizons used during training. This selection could potentially be randomized to generate more diverse behavior, but we select a fixed _γ_ = _._ 999 in our experiments.
+
+**==> picture [238 x 137] intentionally omitted <==**
+
+**----- Start of picture text -----**
+= . 7 = . 95 = . 999 1.25 = . 9 = . 99 1.00 0.75 0.50 0.25 0.00 0 500 1000 1500 2000 2500 3000 3500 Learning Updates (1e3) ) a, ( Q **----- End of picture text -----**
+
+Figure 12: **Multi-Gamma Actor-Critic Training.** AMAGO optimizes one Transformer on actorcritic loss terms corresponding to many values of the discount factor _γ_ , and can use the actions that maximize any horizon at test-time. We show the average Q-value across trajectory sequences throughout training at different discounts.
+
+17
+
+Our multi-gamma update is motivated by a need to improve learning signal for unstable sequence models in long-horizon actor-critic updates with discrete and continuous actions. This approach was developed as a natural extension of a training objective that is already parallelized across timesteps and an ensemble of critics. After the initial release of our work, we learned that a discrete value-based [3, 104] version of the multi-gamma update has previously been studied as a byproduct of hyperbolic discounting in pixel-based MDP environments [91, 105]. The hyperbolic discounting perspective actually motivates a more diverse range of _γ_ values than used in our results (Table 4), and may greatly improve AMAGO’s sample efficiency (Appendix C.1 Figure 18).
+
+**Stochastic Policies and Exploration.** AMAGO samples from a stochastic policy during both data collection and evaluation. Because we do not use entropy constraints [106], we add exploration noise during data collection. In discrete domains, noise is added as in classic epsilon-greedy, while continuous domains randomly perturb the action vector as in TD3 [73]. The level of action randomness is determined by a hyperparameter _ϵ_ that is typically annealed over a fixed number of environment steps. AMAGO adapts this schedule to more closely align with the exploration/exploitation trade-off that occurs within the adaption horizon of any given CMDP [64]. _ϵ_ is annealed over the _H_ timesteps of a rollout, and the intensity of this schedule decreases over training. This process is visualized in Figure 13. Because the parameters of this schedule are difficult to tune, we heavily randomize them across AMAGO’s parallel actors — meaning we are always collecting data at varying levels of action noise. Due to this randomization there are no main experiments where we found tuning the exploration schedule to be critical to achieving strong results[3] . In fact, randomizing over _ϵ_ is probably the more important implementation detail, but we describe the rest of the approach for completeness. The slope of the episode-level schedule can be set to zero to recover the standard approach.
+
+**==> picture [198 x 131] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Epoch-Level Noise Schedule Episode-Level Noise Schedule **----- End of picture text -----**
+
+Figure 13: **Exploration Noise in Implicit POMDPs.** AMAGO adapts the standard random exploration schedule to more closely align with the exploration/exploitation trade-off that occurs when acting in an implicit POMDP.
+
+## A.3 AMAGO ARCHITECTURE
+
+**Transformer.** We observe performance collapse when using a standard Pre-LayerNorm [77] Transformer in long training runs. In rare cases, we find that this is caused by gradient collapse due to saturating ReLU activations. For this reason we replace every ReLU/GeLU (including those in the actor/critic MLPs) with a Leaky ReLU that will allow learning to continue. This idea is also motivated by work in network plasticity and long training runs in continual RL, where activations other than ReLU can be a simple baseline [83]. We find that this change fixes gradient instability, but does not prevent performance collapse. Instead, collapse is now caused by saturating activations in the residual block of AMAGO’s Transformer. We apply two existing methods that effectively solve this problem. Normformer’s [88] additional LayerNorms [107] isolate the optimization problem to the query/key/value activations whose saturation directly causes attention entropy collapse. _σ_ Reparam [87] stabilizes attention by limiting the magnitude of queries, keys, and values. Figure 14 demonstrates this pattern of activations on a sample POPGym environment where the optimal policy requires recall of a specific timestep and encourages low-entropy attention matrices. However, we observe
+
+> 3The toy T-Maze memory result (Figure 5) uses a unique schedule discussed in Appendix C.2, but this adjustment is motivated by the environment setup and is not based on tuning.
+
+18
+
+**==> picture [218 x 212] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Query/Key/Value Max Output 40 30 20 10 0 0 2 4 6 8 1e6 Layer Max Output 300 200 100 0 0 2 4 6 8 Gradient Updates 1e6 Normformer Pre-LN Reparam AMAGO **----- End of picture text -----**
+
+Figure 14: **Transformer Residual Block Activations in a Low-Entropy Attention Environment.** We record the maximum output of a Transformer layer and its query/key/value vectors in our default POPGym architecture while training in a recall-intensive environment where the optimal policy encourages a low-entropy attention matrix (Figure 15).
+
+**==> picture [298 x 150] intentionally omitted <==**
+
+**----- Start of picture text -----**
+RepeatPreviousEasy RepeatPreviousMedium 0 0 10 10 20 20 30 30 40 40 0 10 20 30 40 0 10 20 30 40 Key Timestep Key Timestep Query Timestep Query Timestep **----- End of picture text -----**
+
+Figure 15: **Examples of Low-Entropy Attention Matrices.** We visualize representative examples of AMAGO attention heads in two recall-intensive POPGym environments on the 45th timestep of a rollout (for readability). Darker blue entries indicate high attention weights. Both policies are nearly optimal with average returns _> ._ 99.
+
+collapse due to saturating activations in many environments in our experiments if training continues for long enough — even when performance has not yet converged. Our architectural changes let us stably train sparse attention patterns like those visualized in Figure 15. AMAGO uses Flash Attention [108] to enable long context lengths on a single GPU (Figure 29). Figure 16 summarizes our default architectural changes.
+
+**Instruction-Conditioning.** AMAGO uses a small RNN or MLP to process the instruction sequence of goal tokens, and the resulting representation is concatenated to the CMDP information that forms Transformer input tokens. It would be simpler to add the instruction to the beginning of the context sequence. The only reason for the extra complexity of the goal embedding is to allow for fair baselines that do not use context sequences (“w/o Memory”).
+
+19
+
+**==> picture [258 x 230] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Residual Connection 𝜎 Reparam Linear Residual Connection LayerNorm Linear Leaky ReLU ReLU/GeLU 𝜎 Reparam Linear Linear LayerNorm LayerNorm Residual Connection Residual Connection LayerNorm Causal Multi-Head Attention Causal HeadScale Flash Attention Q/K/V Linear Q/K/V 𝜎 Reparam Linear LayerNorm LayerNorm Input Input Standard Pre-LN AMAGO Transformer Block Transformer Block **----- End of picture text -----**
+
+Figure 16: **AMAGO Transformer Block. (Left)** A standard Pre-LayerNorm (Pre-LN) Transformer layer [77]. **(Right)** AMAGO replaces all saturating activations with Leaky ReLUs and uses additional LayerNorms [107] (as in NormFormer [88]) and a modified linear layer ( _σ_ Reparam [87]). These strategies limit the magnitude of activations along the residual block and effectively prevent attention entropy collapse.
+
+## B RELABELING WITH GOAL IMPORTANCE SAMPLING
+
+AMAGO generates training data in multi-goal domains by relabeling trajectories with alternative instructions based on hindsight outcomes. Relabeling improves reward sparsity for actor-critic training, and greatly amplifies the learning signal of existing data by recycling the same experience with many different instructions. This technique works by saving the rewards for the entire goal space during rollouts, rather than just the rewards for the goals in the intended instruction (Figure 17 Step 1). While evaluating many different dense reward terms would be unrealistic, it is more practical in sparse goal-conditioned domains where success can be evaluated with simple rules. Algorithm 1 provides a high-level overview of multi-step relabeling. This technique reduces to HER [45] when: 1) the goal space is a subset of the state space, 2) goal sequence lengths _k_ = 1, and 3) alternative goals are primarily sampled from the end of the trajectory (Alg. 1 line 4).
+
+**Algorithm 1** Simplified Hindsight Instruction Relabeling
+
+**Require:** Trajectory _τ_ with goal sequence _g_ = ( _g_[0] _, . . . , g[k]_ ) of length _k_
+
+- 1: _n ←_ number of steps in _g_ successfully completed by _τ_
+
+- 2: ( _tg_ 0 _, . . . , tgn_ ) _←_ timesteps where each sub-goal of _g_ was achieved
+
+- 3: _h ←_ relabel ~~c~~ ount(0 _, k − n_ ) _∈_ [0 _, k − n_ ] _▷_ Choose a number of hindsight goals to insert. Defaults to uniform sampling.
+
+- 4: ( _a_[0] _, . . . , a[h]_ ) _,_ ( _ta_ 0 _, . . . , tah_ ) _←_ sample ~~a~~ lternative ~~g~~ oals( _τ_ ) _▷_ Sample a goal from _h_ timesteps in _τ_ that completed alternative objectives. Defualts to uniform sampling.
+
+- 5: _r ←_ sort�( _a_[0] _, . . . , a[h] , g_[0] _, . . . , g[n]_ ), by=( _ta_ 0 _, . . . , tah, tg_ 0 _, . . . , tgn_ )� _▷_ Insert new goals in chronological order.
+
+- 6: _τ[′] ←_ replay( _τ, r_ ) _▷_ Recompute rewards and terminals based on goal sequence _r_ (Fig. 2).
+
+Generating a diverse training dataset with relabeled sequences of goals allows our agents to carry out multi-stage tasks and has important exploration advantages (Appendix C.5), but creates a practical
+
+20
+
+issue where we have too many alternative instructions to choose from. Domains like Crafter and MazeRunner create rollouts with dozens or hundreds of candidate goals over the full length of the trajectory. There are also goal types that can occur simultaneously and for many consecutive timesteps. AMAGO relabels by sampling one instruction from the many sub-sequences of these goals (Alg. 1 line 4). With so many combinations of goal instructions available to us, we need a way to focus our learning updates on useful information.
+
+**==> picture [378 x 101] intentionally omitted <==**
+
+**----- Start of picture text -----**
+��Rollout and Log Alternative Goals ��Prioritize %�Sample %�Relabel original instruction (return = 1) relabeled instruction (return = 3) ... **----- End of picture text -----**
+
+Figure 17: **Relabeling With Prioritized Goal Sampling.** Long rollouts in multi-goal domains lead to an unmanageable number of candidate instructions for relabeling. AMAGO improves sample efficiency without domain knowledge by prioritizing rare goals.
+
+Our solution is a weighted relabeling scheme that helps sort through the noise of common outcomes by prioritizing interesting goals. While there could be opportunities to add domain knowledge in this process, we prefer to avoid this and sample goals according to their rarity. AMAGO tracks both the frequency that a particular goal occurs at any given timestep, and the frequency that it occurs at all in a given episode. We assign a priority score to goals based on their rarity, which then lets us modify the relabeling scheme to sample based on these scores (Figure 17). AMAGO’s technical details are designed to reduce hyperparameter sensitivity and prevent individual tricks like this from becoming unintuitive points of failure that require manual tuning. Therefore we automatically randomize over several reasonable approaches. Examples include sampling from the top- _k_ most rare goals according to either frequency statistic, or those above either the median or minimum rarity in a trajectory to filter trivial goals. AMAGO still relabels uniformly with some frequency, which keeps the full diversity of our dataset available and prevents information from being lost. Randomization over these implementation details occurs on a per-trajectory level, meaning every batch has sequences that were generated with a wide range of strategies. We defer the precise details to our open-source code release. Appendix C.5 provides a quantitative demonstration of our method.
+
+## C EXPERIMENTAL DETAILS AND FURTHER ANALYSIS
+
+This section provides a detailed analysis of AMAGO’s main results. Each subsection will give a description of our custom learning domains, followed by a more complete discussion of the results in the main text with additional experiments. Hyperparameter and compute information is listed in Appendix D.
+
+## C.1 POPGYM
+
+We evaluate on 39 environments from the POPGym suite [30] and follow the original benchmark in using policy architectures with a memory hidden state of 256. Learning curves for each environment are shown on a full page below. Figure 3 reports results at the benchmark standard of 15M timesteps, though the learning curves extend slightly further when data is available. We plot the maximum and minimum value achieved by any seed to highlight the stability of AMAGO relative to the “naive” off-policy Transformer baseline. Each environment defaults to 3 random seeds, as in [30]. The variance of AMAGO at convergence is extremely low. However, there can be significant variance in the timestep where rapid increases in performance begin. There are two environments where this variance impacts results because it occurs near the 15M sample limit (AutoencodeHard and CountRecallHard), which we address by running 9 random seeds.
+
+The “naive” agent maintains AMAGO’s shared actor-critic update but disables many of our other technical details. These include the modified Transformer architecture (Appendix A.3) and multi-
+
+21
+
+gamma update. The naive agent also reduces the REDQ ensemble from AMAGO’s default of 4 parallel critics to the standard 2, and uses a lower discount factor of _γ_ = _._ 99. This causes learning to collapse in many seeds. However, collapse generally does not impact the final scores reported in Figure 3 which indicate the _maximum mean episodic return_ (MMER) achieved during training. The effects of policy collapse can be much more damaging in longer goal-conditioned experiments where it occurs before convergence, but is too expensive to demonstrate at this scale.
+
+AMAGO was briefly tuned on one environment (ConcentrationEasy) to meet the benchmark’s sample limit. However, our results suggest that we likely did not push sample efficiency settings high enough, as AMAGO is still improving well after 15M timesteps in some difficult environments. The multi-gamma update (Appendix A.2) provides a useful starting point for increased sample efficiency. The combination of this techniques’ compute efficiency and our focus on long-horizon learning motivated a large number of _γ > ._ 99 (Table 4) throughout our work. However, another motivation for a similar update inspires a broader range including low _γ_ values [91, 105]. We experiment with a wider range of settings in two POPGym environments where our main results are limited by sample efficiency in Figure 18.
+
+**==> picture [358 x 348] intentionally omitted <==**
+
+**----- Start of picture text -----**
+BattleshipEasy 0.400 Paper Default (Table 4) 0.175 "Duplicate" (.999, .999) (.1, .9, .95, .97, .995, .997, .999) 0.050 (.1, .9, .95, .97, .99, .999) 0.275 (.1, .9, .95, .999) (.05, .999) 0.500 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1e7 BattleshipEasy Paper Default (Table 4) 0.400 None (.999) 0.175 (.7, .999) (.7, .9, .95, .999) 0.050 (.7, .9, .95, .97, .99, .993, .995, .997, .999) 0.275 (.7, .9, .95, .97, .99, .993, .995, .997, .998, 0.500 .999, .9993, .9995, .9997) 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1e7 AutoencodeHard 1.0 Paper Default (Table 4) 0.5 (.9, .95, .97, .99, .995, .999) (.1, .9, .95, .97, .99, .995, .999) 0.0 (.1, .999) 0.5 0.00 0.25 0.50 0.75 1.00 1.25 1.50 Timesteps 1e7 **----- End of picture text -----**
+
+Figure 18: **Alternative Multi-Gamma Settings in POPGym.** We evaluate a range of settings for the discount factor ensemble used in AMAGO’s learning update, and find that the defaults used in our main experiments may be underestimating the importance of short-horizon _γ_ values.
+
+22
+
+**==> picture [390 x 673] intentionally omitted <==**
+
+**----- Start of picture text -----**
+GRU (MMER) Best Baseline (MMER) Naive Off-Policy Shared Transformer AMAGO AutoencodeEasy AutoencodeMedium AutoencodeHard BattleshipEasy 1.00 1.00 1.00 0.39 0.74 0.74 0.74 0.16 0.49 0.49 0.49 -0.07 0.24 0.24 0.24 -0.31 -0.01 -0.01 -0.01 -0.54 -0.26 -0.26 -0.26 -0.77 -0.52 -0.51 -0.52 -1.01 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) BattleshipMedium BattleshipHard ConcentrationEasy ConcentrationMedium -0.21 -0.37 0.34 -0.09 -0.34 -0.46 0.15 -0.23 -0.46 -0.54 -0.03 -0.37 -0.58 -0.63 -0.22 -0.52 -0.70 -0.72 -0.40 -0.66 -0.83 -0.81 -0.58 -0.80 -0.95 -0.90 -0.77 -0.94 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) ConcentrationHard CountRecallEasy CountRecallMedium CountRecallHard -0.83 0.92 0.90 0.87 -0.83 0.61 0.60 0.58 -0.83 0.30 0.29 0.28 -0.84 -0.00 -0.01 -0.01 -0.84 -0.31 -0.32 -0.30 -0.85 -0.62 -0.62 -0.59 -0.85 -0.93 -0.93 -0.88 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) HigherLowerEasy HigherLowerMedium HigherLowerHard MineSweeperEasy 0.53 0.52 0.51 0.86 0.44 0.43 0.43 0.67 0.35 0.34 0.34 0.49 0.26 0.26 0.25 0.31 0.17 0.17 0.17 0.12 0.09 0.08 0.08 -0.06 -0.00 -0.00 -0.01 -0.25 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) MineSweeperMedium MineSweeperHard MultiarmedBanditEasy MultiarmedBanditMedium 0.06 -0.19 0.71 0.77 -0.02 -0.25 0.59 0.64 -0.10 -0.30 0.47 0.51 -0.18 -0.36 0.35 0.38 -0.26 -0.42 0.23 0.25 -0.34 -0.47 0.11 0.12 -0.41 -0.53 -0.01 -0.01 0 3 6 9 12 15 18 0 3 6 9 12 15 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) MultiarmedBanditHard NoisyStatelessCartPoleEasy NoisyStatelessCartPoleMedium NoisyStatelessCartPoleHard 0.780.65 0.990.85 0.660.57 0.400.36 0.51 0.70 0.48 0.31 0.38 0.55 0.38 0.26 0.24 0.41 0.29 0.21 0.11 0.26 0.20 0.16 -0.03 0.11 0.11 0.11 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) NoisyStatelessPendulumEasy NoisyStatelessPendulumMedium NoisyStatelessPendulumHard RepeatFirstEasy 0.91 0.91 0.91 1.00 0.79 0.80 0.78 0.73 0.67 0.68 0.66 0.47 0.56 0.57 0.54 0.20 0.44 0.45 0.41 -0.07 0.32 0.34 0.29 -0.33 0.20 0.22 0.17 -0.60 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) RepeatFirstMedium RepeatFirstHard RepeatPreviousEasy RepeatPreviousMedium 1.00 1.00 1.00 1.00 0.67 0.68 0.75 0.74 0.33 0.36 0.50 0.49 0.00 0.05 0.25 0.24 -0.33 -0.27 -0.01 -0.01 -0.66 -0.59 -0.26 -0.26 -1.00 -0.90 -0.51 -0.51 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 0 3 6 9 12 15 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) RepeatPreviousHard StatelessCartPoleEasy StatelessCartPoleMedium StatelessCartPoleHard 1.00 1.00 1.00 1.00 0.74 0.85 0.84 0.84 0.49 0.70 0.68 0.68 0.24 0.55 0.53 0.52 -0.01 0.40 0.37 0.36 -0.26 0.25 0.21 0.20 -0.51 0.11 0.05 0.04 0 3 6 9 12 15 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) Timesteps (Million) Timesteps (Million) StatelessPendulumEasy StatelessPendulumMedium StatelessPendulumHard 0.92 0.89 0.83 0.80 0.77 0.73 0.68 0.65 0.63 0.57 0.53 0.53 0.45 0.41 0.43 0.33 0.30 0.33 0.21 0.18 0.23 0 3 6 9 12 15 18 0 3 6 9 12 15 18 0 3 6 9 12 15 18 Timesteps (Million) Timesteps (Million) 23 Timesteps (Million) **----- End of picture text -----**
+
+## C.2 ADDITIONAL MEMORY AND MULTI-EPISODIC META-RL RESULTS
+
+**Half-Cheetah Velocity.** In Figure 5 (left) we use a classic meta-RL benchmark from [97] as an example of a case where AMAGO’s long sequences and high discount factors are clearly unnecessary but do not need tuning. This task is solvable with short context lengths of just a few timesteps. We evaluate adaptation over the first 3 episodes ( _H_ = 600) and report baselines from variBAD [64], BOReL [109], RL[2] [11], and the recurrent off-policy implementation in [22].
+
+**Dark-Key-To-Door.** Dark-Key-To-Door is a sparse-reward multi-episodic meta-RL problem [28]. Figure 19 compares a version of AMAGO with a Transformer and RNN trajectory encoder on a 9 _×_ 9 version of the environment with a max episode length of 50. An agent that always fails to solve the task will encounter 10 episodes of a new environment during a meta-testing horizon of _H_ = 500 timesteps. The maximum return per episode is 2. An adaptive agent learns to solve the task quickly once it has identified the key and door location by meta-exploration, and tries to complete as many episodes as possible in the _H_ = 500 timestep limit. The Transformer and RNN model architectures have equal memory hidden state size and layer count, and all other training details are held fixed.
+
+**==> picture [173 x 124] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Dark Key-To-Door Avg. Total Return Over H = 500 ( 10 Episodes) AMAGO 40 Completes the Min. 10 Episodes AMAGO-GRU 30 20 10 0 3 6 9 12 15 18 21 Timesteps (Millions) **----- End of picture text -----**
+
+Figure 19: **Dark Key-To-Door Trajectory Encoder Comparison.** On-Policy RNNs have previously been successful in this environment but fail to make progress at _l_ = _H_ = 500 when directly substituted into the AMAGO agent.
+
+We replicate Algorithm Distillation [28] (AD) on an 8 _×_ 8 version of the task by collecting training histories from 700 source RL agents. Each history is generated by a memory-free actor-critic as it improves for 50 _,_ 000 timesteps in a fixed environment _e_ . We then train a standard Transformer architecture on the supervised task of predicting the next action in sequences sampled from these learning histories. While AD converges to high performance, it does so on roughly the same timescale as the single-task agents in its training data (Figure 20 right). AMAGO can directly optimize for fast adaptation over the given horizon _H_ , and learns a much more efficient strategy over the first few episodes in a new environment (Fig. 20 left).
+
+**==> picture [318 x 112] intentionally omitted <==**
+
+Figure 20: **Fast-Adaptation with Long-Context Transformers.** AMAGO uses a long-context Transformer to directly optimize for fast adaptation to new environments **(Left)** , while AD [28] converges at approximately the speed of the single-task agents that generated its training data **(Right)** .
+
+24
+
+**Passive T-Maze.** Ni et al. [96] is a concurrent work that includes a T-maze experiment to effectively unit-test the recall ability of in-context agents; any policy that achieves the maximum return must be able to recall information from the first timestep at the final timestep _H_ . Their results show that recurrent approaches fail around context lengths of 100, but that Transformers can stretch as high as _H_ = 1 _,_ 500. The T-Maze task is intended to isolate memory from the effects of credit assignment and exploration. However, at extreme sequence lengths the reward begins to test the sample efficiency of epsilon-greedy exploration because reaching the memory challenge requires following the optimal policy for at least the first _H −_ 1 timesteps. The exploration noise schedule (Appendix A) is modified to have standard noise near the beginning and end of an episode (when there are interesting actions to learn) but low noise in-between when it would waste a rollout to deviate from the learned policy. We avoid sampling from our stochastic policy because numerical stability protections prevent it from becoming fully deterministic, and this error accumulates over long rollouts. The reward penalty is also adapted to remain informative after the first timestep the policy disagrees with the optimal policy. These changes are not important to the main question of long-term recall but allow this environment to evaluate long sequence lengths in practice. With these adjustments, AMAGO can stably learn the optimal policy all the way out to the GPU memory barrier with context lengths _l_ = _H_ = 10 _,_ 000 (Figure 5 top right). However, as noted in [96] our choice of sequence model has no effect on the credit assignment problem of RL backups and AMAGO’s Transformer does not lead to a significant improvement in the “Active T-Maze” variant of this problem.
+
+**Wind Environment.** Figure 5 (bottom right) reports scores of a sparse-reward meta-RL task from [22]. This task has continuous actions and is noted to be sensitive to hyperparameters. We evaluate AMAGO with a Transformer and RNN trajectory encoder — keeping all other details the same as in the Dark-Key-To-Door experiment. The RNN encoder is much more effective at the shorter sequence lengths in this environment ( _H_ = 75) than the Dark-Key-To-Door environment. It appears that the RNN is slightly more sample efficient than the Transformer when using the same update-to-data ratio.
+
+**Meta-World ML-1.** We train AMAGO for up to 10M timesteps with various context lengths (Figure 6 left). The checkpoint that reached the highest average return on the training tasks is evaluated on held-out test tasks. Each episode lasts for 500 timesteps and we evaluate for less than the 10 trials used in the original results [98] because we notice the success rates saturate within the first attempt. We have also experimented with the ML-10 and ML-45 multi-task variants of Meta-World. Preliminary results suggest that short context lengths are still surprisingly capable of identifying the task. However, we find that success in these benchmarks is very dependent on the agent’s ability to independently normalize the scale of rewards in each of the 10 or 45 domains. This issue is not specific to meta-RL and is common in multi-task RL generally [85, 110]. AMAGO assumes we do not know how many tasks make up _p_ ( _e_ ) (because in most of our other experiments this number is very large), so we leave this to future work.
+
+## C.3 PACKAGE DELIVERY
+
+Package Delivery is a toy problem designed to test our central focus of learning goal-conditioned policies that need to adapt to a distribution of different environments. The agent travels along a road and is rewarded for making deliveries at provided locations along the way. However, there are “forks” in the road where it needs to decide whether to turn left or right. If the agent picks the wrong direction at any fork, or reaches the end of the road, it is sent back to the starting position. The correct approach is to advance to a fork in the road, pick a direction, note whether it was the correct choice, and then recall that outcome the next time we reach the same decision. For an added factor of variation, the action that needs to be taken to be rewarded for dropping off a package is randomized in each environment, and needs to discovered by trial-and-error and then remembered so we do not run out of packages.
+
+## C.3.1 ENVIRONMENT AND TASK DETAILS
+
+**Environment Distribution** _p_ ( _e_ ): we randomly choose _f ∼ U_ (2 _,_ 6) locations for forks on a road with length _L_ = 30. Each fork is uniformly assigned a correct direction of left or right. These hyperparmeters could be tuned to create more difficult versions of this problem. We also uniformly sample a correct action for package delivery from 4 possibilities.
+
+25
+
+**Goal Space** _G_ : all of the locations (0 _, . . . , L_ = 30) where packages could be delivered.
+
+**Observation Space** : current position, remaining packages, and a binary indicator of arriving at a fork in the road.
+
+**Action Space** : 8 discrete actions corresponding to moving forwards along the road, left/right at a fork, standing still (no-op), and the 4 actions that could correspond to successfully dropping off a package (depending on the environment _e_ ).
+
+**Instruction Distribution** _p_ ( _g | e_ ): we randomly choose _k ∼ U_ (2 _,_ 4) locations (without replacement) that are not road forks for package delivery.
+
+**Task Horizon** _H_ : This is the shortest problem in our goal-conditioned experiments with a maximum horizon (and therefore a maximum sequence length) of _H_ = 180.
+
+## C.3.2 ADDITIONAL RESULTS AND ANALYSIS
+
+**==> picture [397 x 114] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Package Delivery without MultiGamma Package Delivery with MultiGamma 100 100 AMAGO 80 w/o Memory 80 w/o Relabeling 60 w/o Filtered BC 60 40 Relabel All 40 20 20 0 0 0 100 200 300 400 500 600 700 0 100 200 300 400 500 600 700 Learning Updates (1e3) Learning Updates (1e3) Success Rate (%) **----- End of picture text -----**
+
+**Figure 7: Delivery Results** (reproduced here for convenience).
+
+Figure 7 compares ablations of AMAGO on the Package Delivery domain. The main result is that AMAGO can successfully learn the memory-based strategy necessary to adapt to new roads. As expected, removing its context-based meta-learning capabilities (“w/o Memory”) greatly reduces performance. The memory challenge of generalizing to new environments makes rewards difficult to find and relabeling is essential to learning any non-random behavior (“w/o Relabeling”). This gap between relabeling and not relabeling is a common theme across all our goal-conditioned experiments, and causes most external baselines to fail in an uninformative way. Figure 7 directly compares ablations with and without multi-gamma learning. Multi-gamma is one of several implementation details in AMAGO meant to enable stable learning from sparse rewards with Transformers. Filtered behavior cloning (“w/o Filtered BC”) [92] is also meant to address sparsity, but we can see that its impact goes from quite positive (Fig. 7 left) to slightly negative (Fig. 7 right) when combined with multi-gamma. Filtered BC and multi-gamma are addressing a similar problem, but multi-gamma does so more effectively and exposes some of the drawbacks of filtered BC once the sparsity issue is resolved. For example, filtered BC can lead to a higher-entropy policy by cloning sub-optimal actions that leak through a noisy filter.
+
+AMAGO randomly relabels trajectories to a mixture of returns between the true outcome and a complete success. The “Relabel All” curves follow the goal-conditioned supervised learning (GCSL) (Sec. 2) approach of relabeling every trajectory with a successful instruction. While this may improve data quality, it turns the value learning problem from predicting _if_ a goal will be achieved to _when_ it will happen, because from the agent’s perspective every goal always does [60]. AMAGO’s high discount factors cause this to have low learning signal, making actor optimization difficult. Multigamma improves performance (Fig. 7 right), because many of the _γ_ values used during training have a short enough horizon to mask the problem. Relabeling all trajectories to be a success while turning off the BC filter and policy gradient actor loss would create a GCSL method, which have shown promise with large Transformer architectures (Sec. 2). However we were unable to achieve competitive performance with this setup and prefer a more traditional RL learning update.
+
+26
+
+## C.4 MAZERUNNER
+
+MazeRunner is a difficult but easily simulated problem that combines sparse goal-conditioning with long-term exploration. The agent needs to learn to navigate a randomly generated maze in order to reach a sequence of goal coordinates.
+
+## C.4.1 ENVIRONMENT AND TASK DETAILS
+
+**Environment Distribution** _p_ ( _e_ ): we randomly generate an _N × N_ maze, and then manually adjust the bottom three rows to have a familiar layout where the agent starts in a small tunnel with open space on either side. An example 30 _×_ 30 environment is rendered in Figure 21. We can optionally generate a random permutation of the action space, which adjusts the actions that corresponds to each direction of movement.
+
+**Goal Space** _G_ : all of the locations ((0 _,_ 0) _, . . . ,_ ( _N, N_ )) in the maze.
+
+**Observation Space** : 4 depth sensors from the agent’s location to the nearest wall in each direction. By default we include the ( _x, y_ ) coordinates of the agent’s position, which can be removed for an extra challenge that forces the agent to self-localize.
+
+**Action Space** : Either 4 discrete actions or a 2-dimensional continuous space that is mapped to the 4 cardinal directions. The action directions can be randomized based on the environment _e_ .
+
+**Instruction Distribution** _p_ ( _g | e_ ): we choose _k ∼ U_ (1 _,_ 3) locations (without replacement) that are not covered by a wall of the maze.
+
+**Task Horizon** _H_ : The task horizon creates a difficult trade-off between exploration and exploitation. There can also be worst-case scenarios where the layout of the random maze and position of the goals make completing the task impossible in a fixed time limit. We compute difficulty statistics with an oracle tree-search agent and use the results to pick safe values where the 15 _×_ 15 version sets _H_ = 400 while 30 _×_ 30 sets _H_ = 1 _,_ 000.
+
+**==> picture [119 x 120] intentionally omitted <==**
+
+Figure 21: **30** _×_ **30 MazeRunner.** The agent begins in the bottom center with goal locations shown as colored trophies.
+
+## C.4.2 ADDITIONAL RESULTS AND ANALYSIS
+
+**==> picture [396 x 110] intentionally omitted <==**
+
+**Figure 8: MazeRunner Results** (reproduced here for convenience).
+
+**15** _×_ **15 MazeRunner.** Figure 8 (left) evaluates the default version of MazeRunner with _N_ = 15. Without random actions dynamics and with the current status of the task as an input to each timestep, a standard Recurrent PPO baseline could learn the same kind of adaptive generalization as AMAGO. The lowest-feature ablation of AMAGO’s core agent (“w/o Relabeling, w/o Multi-Gamma”) uses a Transformer to match the performance of Recurrent PPO on the 15 _×_ 15 domain. However, our other technical improvements can almost double that performance, albeit with high variance (“w/o Relabeling, w/ Multi-Gamma”). Adding relabeling to create the full AMAGO method leads to a nearly perfect success rate in 15 _×_ 15 with low variance (“AMAGO”). Position information ( _x, y_ ) was included to help baseline performance, but we find that AMAGO can achieve a 91% success rate without it.
+
+27
+
+**30** _×_ **30 MazeRunner.** The larger maze size creates an extremely challenging sparse exploration problem, and all ablations of the relabeling scheme fail along with the Recurrent PPO baseline. AMAGO performs well and uses its memory to efficiently explore its surroundings (“w/o Memory” has about half its final success rate). We believe there is room to continue to use the MazeRunner environment at larger maze sizes and task horizons to evaluate long-term-memory architectures at low simulation cost. We experiment with adding a dynamics modeling term to AMAGO’s training objective (“w/ World Model”). World modeling is a natural fit for AMAGO’s long-context Transformer backbone but does not appear to have an impact on this low-dimensional domain. The “w/o Planning” baseline hides future goal locations from the task-conditioned input. In theory, this effects AMAGO’s ability to make exploration/exploitation trade-offs and take routes that maximize the chance of finding all _k_ locations, and does make a noticeable but small difference as the agent’s strategy improves. However, 1 _,_ 000 timesteps may be too generous to highlight this trade-off.
+
+**“Rewired” Action Space Adaptation.** Figure 22 shows MazeRunner MetaLearned Actions the final performance of several methods with the ran1.6 VariBAD (15x15) ~~VariBAD (30x30)~~ domly permuted action space feature enabled.ing to new action dynamics requires a level of adaptationabove standard Recurrent PPO, so our baselines shift toGeneraliz1.41.21.0 HyperX (15x15)RL ~~[2]~~ (15x15)58.0% HRL ~~w/o Memory (30x30)AMAGO (30x30)~~ yp[2] (30x30)erX (30x30) 68.0% full meta-RL methods. While some multi-episodic meth0.8 ods can be modified to work in a zero-shot setting [111], 0.6 we focus on three techniques that are more natural fits for 0.4 this problem: variBAD [64], HyperX [111], and RL[2] [11, 0.2 0.1% 0.1% 0.0% 0.1% 0.1% ~~6.0%~~ 10]. In an effort to use validated external implementations 0.0 of these algorithms, we switch to the continuous action Figure 22: **MazeRunner with Random** space version of MazeRunner. We choose the hyperpa- **Dynamics.** The agent’s action space is rameters from the largest-scale experiment in the original randomized in every environment. codebase, with some tuning performed by solving easier versions of the problem. However, only RL[2] shows signs of life on 15 _×_ 15 permuted actions (Fig. 22). 30 _×_ 30 is too sparse for RL[2] , but AMAGO’s relabeling and long-sequence improvements allow us to nearly recover the metrics in Figure 8 while adapting to the randomized action space.
+
+## C.5 CRAFTER
+
+**==> picture [396 x 100] intentionally omitted <==**
+
+Figure 23: **Examples of Crafter Terrain Generation (Left).** Crafter generates new landscapes and locations of rare resources every episode (reproduced from [33]). **Crafter Observation (Right).** An example of the agent-centric view that forms observations.
+
+Crafter [33] is a simplification of Minecraft with 2D graphics and a high framerate that facilitates research on building agents with the variety of skills necessary to survive and develop more advanced technology in a procedurally generated environment. The standard evaluation setting provides a lightly shaped dense reward that encourages survival and avoiding danger, while giving a sparse reward the first time the agent completes each of the 22 “achievements” in a new episode. This represents an _undirected_ kind of multi-task learning, where the agent receives equal credit for completing any of its skills whenever the opportunity arises, and cannot be prompted with a specific objective. We create a _directed_ version where the agent is only rewarded for completing the next step of an instruction we provide.
+
+28
+
+## C.5.1 ENVIRONMENT AND TASK DETAILS
+
+**Environment Distribution** _p_ ( _e_ ) **:** Crafter generates a new world map that randomizes the locations of caves, lakes, and rare resources upon every reset. Three examples are shown in Figure 23.
+
+**Goal Space** _G_ **:** We create goals from Crafter’s 22 achievements, which include those listed in Table 1 as well as “collect sapling” (where all agents have a near 100% success rate) and more difficult goals like “make iron sword” and “collect diamond” (where all agents have a near 0% success rate). We add more complexity by creating goals for traveling to every ( _x, y_ ) location spaced 5 units apart, such as “travel to (5, 5)” and “travel to (60, 15)”. An “Expanded” version of Crafter adds goals for placing blocks at every ( _x, y_ ) location. All goal strings are represented as three tokens – e.g., “ _<_ make _> <_ stone _> <_ sword _>_ ”, “ _<_ travel _> <_ 50 _> <_ 5 _>_ ”, “ _<_ collect _> <_ coal _> <_ PAD _>_ ” — which is meant to improve generalization across goals relative to one-hot identifiers.
+
+**Observation Space:** Crafter observations are egocentric views of the agent and its surrounding area (Figure 23 right) along with health and inventory data. AMAGO supports pixel observations, but our experiments default to a version that maps the image (Figure 23 right) to texture IDs, which can be processed with an embedding rather than a CNN. This simplification shortens training times and lets us run many ablations, and is inspired by the NetHack Learning Environment [112] — another high-throughput generalization benchmark. However, we do evaluate the full AMAGO method on pixel observations with a CNN (Table 2), and the results are similar to the simplified version.
+
+**Action Space:** Crafter has 17 discrete actions corresponding to player movement, tool making, and item placement.
+
+**Instruction Distribution** _p_ ( _g | e_ ) **:** By default, our instructions are generated by randomly choosing an instruction length _k ∼ U_ (1 _,_ 5) and then filling that length by weighted sampling (with replacement) from the goal space. We pick sample weights that ensured non-relabeling baselines could make some progress by down-weighting the hardest goals (like diamond collection). We defer the exact weights to our open-source code release. We also experiment with using the ground-truth Crafter achievement progression (see Crafter Figure 4 [33]) to generate instructions.
+
+**Task Horizon** _H_ **:** We enforce a maximum episode length of _H_ = 2 _,_ 000 timesteps. However, a typical episode is less than 500 timesteps, because the agents either succeed quickly or are defeated by an enemy.
+
+## C.5.2 ADDITIONAL RESULTS AND ANALYSIS
+
+Table 1 evaluates agents on single-goal instructions and lets us measure AMAGO’s knowledge of the 22 main skills similar to existing Crafter results (Table 1 top section). We add a baseline version of our core agent trained with Crafter’s default reward function to control for changes in state representation, sample limit, memory, and maximum episode length. Moving from the undirected reward function to sparse instruction-conditioning leads to a dramatic decline in performance without relabeling or long-term memory (Table 1 middle section). The lower section of Table 1 compares versions of our method with different instruction-generation and relabeling schemes, which will be explained below. AMAGO has learned to complete Crafter’s achievement progression up to collecting iron despite the added difficulty that comes with being task-conditioned.
+
+**Exploring with Instructions.** The instruction format lets us discover new behavior by following sequences of steps from our own goal space, and turns exploration into a multi-task generalization problem. The process works in three steps. First, relabeling lets AMAGO master sequences of goals that are frequently achieved early in training. Second, we follow randomly generated instructions that happen to be made up of those easier goals, eventually reaching the frontier of what we have already discovered. Random exploration then has a realistic chance of finding new outcomes. We can verify the first two steps by ablating AMAGO’s ability to follow multi-goal instructions during training (Table 1 “w/o Multi-Goal”), and observing a steep decline in performance on hard-exploration goals like tool making. In the third and final step, AMAGO learns to internalize the new discovery so that it can be achieved without the help of the instruction curriculum. We suspect this is closely tied with AMAGO’s ability to observe the full instruction that led to the discovery, and test this by hiding the full task (Table 1 “w/o Planning”), which fails to discover hard goals despite following multi-goal instructions. The goal discovery process is supported by Figure 24, which measures the progress
+
+29
+
+||Collect|Collect|Place|Wake|Place|Wood|Eat|Defeat|Wood|Collect|Place|Stone|Stone|Collect|Defeat|Collect|
+|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+||Wood|Drink|Plant|Up|Table|Sword|Cow|Zombie|Pickaxe|Stone|Furnace|Pickaxe|Sword|Coal|Skeleton|Iron|
+|Rainbow (Undirected) [104]|74.9|24.0|94.2|93.3|52.3|9.8|26.1|39.6|4.8|0.2|0.0|0.0|0.0|0.0|0.7|0.0|
+|DreamerV2 (Undirected)[86]|92.7|80.0|84.4|92.8|85.7|40.2|17.1|53.1|59.6|42.7|1.8|0.2|0.3|14.7|2.6|0.0|
+|AMAGO (Undirected)|99.9|93.3|99.9|95.8|99.8|99.1|81.1|91.3|99.4|97.5|93.6|86.3|92.3|69.5|53.5|0.0|
+|w/o Relabeling|97.3|79.2|**99.9**|4.5|94.4|0.0|15.2|68.9|0.0|0.0|0.0|0.0|0.0|0.0|0.0|0.0|
+|w/o Memory|99.8|91.3|**99.9**|91.5|98.9|98.4|62.2|85.7|99.2|39.3|0.0|0.0|0.0|0.0|0.0|0.0|
+|w/o Multi-Goal|99.8|93.1|**99.9**|97.8|99.4|97.8|93.9|88.9|99.5|83.1|0.0|0.0|0.0|0.0|10.4|0.0|
+|w/o Planning|**99.9**|98.1|98.7|93.6|95.7|93.9|36.0|82.0|98.6|0.0|0.0|0.0|0.0|0.0|0.0|0.0|
+|w/o Importance Sampling|**99.9**|98.4|99.8|93.3|99.8|**99.9**|**98.9**|95.1|**99.9**|96.1|92.1|98.6|97.5|81.5|57.5|0.0|
+|AMAGO|**99.9**|**99.9**|99.3|**99.9**|96.7|99.8|96.6|97.2|99.8|**99.5**|94.2|97.8|98.3|**90.1**|**76.5**|0.0|
+|AMAGO (w/ Tech Tree)|**99.9**|98.3|99.8|96.1|**99.9**|99.8|98.5|**97.3**|99.8|97.8|97.0|**99.0**|**99.5**|84.0|58.4|0.0|
+|AMAGO (Expanded)|**99.9**|97.4|**99.9**|94.3|**99.9**|99.8|97.9|96.7|**99.9**|98.6|**97.7**|**99.0**|99.0|84.8|40.4|0.0|
+
+Table 1: **Crafter Achievement Success Rates (%).** We compare _undirected_ shaped reward agents (top section) with _directed_ ablations of our agent (middle). AMAGO (bottom) recovers all the skills of the undirected reward function while being steerable/instruction-conditioned. The Rainbow/DreamerV2 vs. Undirected AMAGO comparison measures how skill coverage changes when using an increased sample limit, long-term memory, and simplified default observations.
+
+of a single difficult goal relative to an easier multi-step instruction in which it is the final step. We note that Crafter’s default reward function of giving +1 the first time each achievement occurs in an episode leads to this same exploration behavior. The best way for an agent to maximize the Crafter reward is to quickly enumerate every skill it has already mastered, and then start exploring for new rare possibilities. AMAGO’s instruction format and relabeling scheme create a way to bring this behavior to a goal-conditioned setting.
+
+**==> picture [354 x 97] intentionally omitted <==**
+
+Figure 24: **Multi-Goal Learning and Exploration.** We compare AMAGO’s performance on difficult single-goal instructions with another task that forms a useful exploration plan. We measure the average task progress, which is equivalent to return normalized by instruction length.
+
+**==> picture [396 x 100] intentionally omitted <==**
+
+**----- Start of picture text -----**
+"collect drink "eat cow "collect sapling "travel to (10,10) eat cow make stone pickaxe place plant All place stone "make wood pickaxe wake up collect coal "make wood sword place plant Random travel to (50,50) collect stone "make stone pickaxe make stone sword make wood sword defeat zombie place plant 1009080 Instructions w/o Memoryw/o Relabeling place stone" w/o PlanningAMAGO build at (30 30)" AMAGO (Expanded) collect iron" defeat zombie"4.4 4.4 defeat zombie"4.4 defeat zombie" 3.0 2.9 eat cow"4.9 4.9 7060 1.8 1.7 3.9 2.3 2.4 5040 1.4 4.4 3020 0.4 0.9 0.8 1.8 1.4 2.2 3.9 100 0.0 0.0 0.1 0.0 0.0 0.0 0.0 0.0 1.0 1.6 0.9 1.1 0.1 0.7 3.5 0.0 3.8 Success Rate (%) **----- End of picture text -----**
+
+Figure 25: **Crafter Instruction Success Rates.** Bar labels are average returns. AMAGO generalizes well to user-prompted instructions in new Crafter environments.
+
+Figure 25 expands on the results in Figure 9 to show more examples of user-selected multi-goal instructions in addition to “All Random Instructions”, which corresponds to an expectation over the procedurally generated _p_ ( _g | e_ ). Qualitatively, the agents show a clear understanding of instructions and typically fail by rushing to complete tasks during nighttime when they become surrounded by enemies.
+
+**Impact of Goal Importance Sampling.** Learning curves in Crafter can have a sigmoid pattern where our agent plateaus for long periods of time before suddenly discovering a new skill that unlocks success in a higher percentage of tasks. Goal importance sampling shortens these plateaus by
+
+30
+
+prioritizing new skills during relabeling, and this leads to a significant increase in sample efficiency (Figure 26). Figure 27 demonstrates this goal prioritization on the kind of low-performance data AMAGO sees early in training. Unfortunately, all agents eventually reach the exploration barrier of consistently finding the iron and cannot complete Crafter’s tech-tree. Below we discuss several preliminary attempts to address this problem.
+
+**==> picture [258 x 130] intentionally omitted <==**
+
+**----- Start of picture text -----**
+50 w/o Goal Importance Sampling w/o Relabeling 40 w/o Memory AMAGO 30 20 10 0 100 300 500 700 900 1100 1300 1500 Epoch Exploration Rollout Success Rate (%) **----- End of picture text -----**
+
+Figure 26: **Learning Curves in Crafter.** Goal importance sampling improves sample efficiency by shortening the “plateaus” between discoveries. However, both agents converge to the same exploration barrier (Table 1). “w/o Goal Importance Sampling” final performance is indicated by a dashed yellow line. This plot records _train-time_ success rates and shows one random seed to highlight the sudden spikes in performance of individual runs.
+
+**==> picture [390 x 117] intentionally omitted <==**
+
+**----- Start of picture text -----**
+1.0 Uniform Relabeling 0.8 Goal Importance Relabeling 0.6 0.4 0.2 0.0 collect saplingcollect woodmake wood pickaxeplace plantplace table wake updefeat zombiecollect drinkmake wood sword eat cowcollect stonecollect coaldefeat skeletonplace stonemake stone swordtravel (30m, 30m) Relabel Frequency **----- End of picture text -----**
+
+Figure 27: **Importance Sampling Alternative Goal Selection.** We use replay buffer data from a low-performance ablation (“w/o Planning”) to demonstrate how our rarity-based relabeling scheme improves sample efficiency by prioritizing challenging goals. This plot is interpreted: “given that a particular goal is achieved in a trajectory that needs to be relabeled, what is the probability that it will be chosen to create an alternative instruction?” The rarity-based scheme exaggerates the frequency of challenging goals like “collect coal” and “make stone sword”, and diminishes trivial goals like “travel (30m, 30m).” As the agent improves, goals that were once rare become more common and this effect is less extreme.
+
+**Following “Tech-Tree” Instructions and “Expanded” Crafter.** While AMAGO learns many of Crafter’s core skills, it still converges without mastering all of the goal space. Our results lead us to believe there are two main components driving AMAGO’s exploration, and it is not clear which is the main bottleneck. First is the instruction distribution _p_ ( _g | e_ ) that forms exploration plans for new goals. The exploration effect relies on generating useful instructions that can lead to new discoveries, and could be improved if the instructions we provide are more likely to be helpful. We can use ground-truth knowledge of Crafter’s skill progression to bias _p_ ( _g | e_ ) towards instructions that form useful exploration plans. In this “Tech-Tree” version, half of the instructions are generated by sampling sub-sequences of Crafter’s progression up until the most advanced goal we have previously achieved. Unfortunately, this does not lead to the discovery of new skills (Table 1 “w/ Tech-Tree”). The second opportunity is to expand the goal space that forms exploration curricula. “Expanded” Crafter experiments with this idea and creates tech-tree instructions with added goals for being nearby
+
+31
+
+rare resources like iron and diamond. This does not fully solve the problem, but shows some signs of improvement, as multi-goal prompts like “make stone pickaxe, collect iron” now find iron nearly 40% of the time (Figure 25). Finding better ways to improve instruction generation (preferably without the domain knowledge used here) and extend the goal space by learning in more complex multi-task domains are exciting directions for future work.
+
+**Planning and Long-Horizon Tasks.** AMAGO’s ability to see all _k_ steps of its instruction is meant to allow value learning to form long-term plans. If we only provide the current step, our instruction is effectively handling all the agent’s planning. However, if we provide the full instruction, AMAGO is free to explore its environment with the future in mind and take actions that are not directly related to completing the task but will better prepare it for later events. Figure 28 measures the success rate at increasing instruction lengths. We can use the fact that our default instruction distribution samples each step independently to get a rough upper bound on performance. This is not a fair expectation because each additional goal extends the length of the episode and leaves more time for starvation or dangerous enemies to cause failure. However, AMAGO holds to this line quite well despite solving complex goals that take hundreds of timesteps to complete. We would ideally see the “w/o Planning” ablation fall well below its
+
+**==> picture [159 x 159] intentionally omitted <==**
+
+**----- Start of picture text -----**
+AMAGO AMAGO Approx. Upper Bound w/o Planning 80 w/o Planning Approx. Upper Bound 70 60 50 40 30 20 10 1 2 3 4 5 Instruction Length Success Rate (%) **----- End of picture text -----**
+
+Figure 28: **Impact of AMAGO’s (Implicit) Planning on Crafter Instructions.**
+
+upper bound because it would be less careful about resource management. However, it learns to solve so many fewer complex goals to begin with that looking at long instructions that succeed reduces us to a sample of mostly trivial tasks that would not require much planning at all.
+
+**Instruction-Specific Behavior.** One concern is that because Crafter only has 22 different core skills, our agents could learn an uninteresting strategy of ignoring their instruction and cycling through every behavior they have learned to accomplish. This is one of the reasons we add travel goals, which brings the total goal count high enough where this strategy would be very difficult to learn and execute. “Expanded” Crafter also includes goals for placing stone blocks at each ( _x, y_ ) location. Some of the manually-generated instructions in Figure 25 were specifically chosen to be unrelated to the natural progression of Crafter’s achievement system. For example, “travel to (10, 10), place stone, travel to (50, 50), place stone” requires the agent to traverse nearly the full length of its world and would not involve advanced resource-gathering. This task is difficult because long-distance travel attracts dangerous enemies, but even when AMAGO fails it does so with a clear understanding of what was being asked and does not waste time on unrelated objectives.
+
+**Relabeling Corrects for Missing Instructions.** An advantage of hindsight instruction relabeling is that the train-time _p_ ( _g | e_ ) it generates includes every goal that is accomplished, rather than just those we assign during rollouts. This lets us learn about instructions that could not be generated by the domain’s natural instruction distribution. We create a simple demonstration of this by removing the “wake up” goal from our instruction generation. Because this goal will occur unintentionally, AMAGO learns to complete it when requested 99 _._ 9% of the time (Table 1). However, the “w/o Relabeling” ablation has never seen these goal tokens and its 4 _._ 5% success rate represents the episodes where it is achieved by chance due to a stochastic policy.
+
+||Collect Sapling|Collect Wood|Collect Drink|Place Plant|Wake Up|Place Table|Place Furnace|Eat Cow|Defeat Zombie|Wood Pickaxe|Wood Sword|Collect Stone|Stone Pickaxe|Stone Sword|Collect Coal|Defeat Skeleton|Collect Iron|All Random Instructions|
+|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+|Textures|99.9|99.9|99.9|99.3|99.9|99.9|94.5|96.2|96.6|99.9|99.9|99.5|97.8|98.3|90.1|76.5|0.0|62.1|
+|Pixels|99.9|99.9|99.4|99.9|93.7|99.5|94.0|99.3|96.7|99.9|99.9|98.3|98.8|97.7|89.8|80.0|0.0|53.9|
+
+Table 2: **AMAGO Crafter Success Rates (%) from Pixels.**
+
+**Learning from Pixels.** Our main experiments map Crafter image observations to discrete block textures. This is primarily a compute-saving measure that lets us study more ablations. However, we do evaluate the full AMAGO method on pixel observations, with a summary of key results in Table
+
+32
+
+2. Learning from pixels performs similarly to texture observations on all single-goal instructions. However, there is a roughly 9% drop in performance on the full range of instructions _p_ ( _g | e_ ).
+
+## D POLICY ARCHITECTURE AND TRAINING DETAILS
+
+**AMAGO Hyperparameter Information.** Network architecture details for our main experimental domains are provided in Table 3. Table 4 lists the hyperparameters for our RL training process. Many of AMAGO’s details are designed to reduce hyperparameter sensitivity, and this allows us to use a consistent configuration across most experiments.
+
+||**POPGym**|**Dark** **Key-To-Door**|**Wind**|**Passive** **T-Maze**|**Meta-World**|**Package** **Delivery**|**MazeRunner**|**Crafter**|
+|---|---|---|---|---|---|---|---|---|
+|Transformer|||||||||
+|Model Dim.|256|256|128|128|256|128|128|384|
+|FF Dim.|1024|1024|512|512|1024|512|512|1536|
+|Heads|8|8|8|8|8|8|8|12|
+|Layers|3|3|2|2|3|3|3|6|
+|Other Networks|||||||||
+|Actor MLP|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(400, 400)|
+|Critic MLP|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(256, 256)|(400, 400)|
+|Goal Emb.|N/A|N/A|N/A|N/A|N/A|FF (64, 32)|FF (64, 32)|RNN (Hid. Dim 96) _→_64|
+|Timestep Encoder|(512, 512, 200)|(128, 128, 64)|(128, 128, 64)|(128, 128, 128)|(256, 256, 200)|(128, 128, 128)|(128, 128, 128)|Embedding _→_MLP (384, 384)|
+
+Table 3: **AMAGO Network Architecture Details.**
+
+||**Package Delivery**|**MazeRunner**|**Crafter**|**Other Domains (POPGym)**|
+|---|---|---|---|---|
+|Critics|||4||
+|Critics in Clipped TD Target|||2||
+|Context Length_l_|||_H_||
+|Actor Loss Weight|||1||
+|Filtered BC Loss Weight|||.1||
+|Value Loss Weight|||10||
+|Multi-Gamma_γ_ Values (Discrete)|_._7_, ._9_, ._93_, ._95_, ._98_,_|_._99_, ._992_, ._994_, ._995_, ._997_, ._998_, ._999_, ._9991_, ._9992_, . . . , ._9995|||
+|Multi-Gamma_γ_ Values (Continuous)||_._9_, ._95_, ._99_, ._993_, ._996_, ._999|||
+|Target Update_τ_|||.003||
+|Gradient Clip (Norm)|||1||
+|Learning Rate|3e-4|3e-4|1e-4|1e-4|
+|L2 Penalty|1e-4|1e-4|1e-4|1e-3|
+|Batch Size (in Full Trajectories)|24|24|18|24|
+|Max Buffer Size (in Full Trajectories)|15,000|20,000|20,000|20,000 (80,000)|
+|Gradient Updates Per Epoch|1500|1000|1500|1000|
+|Parallel Actors|24|24|8|12 (24)|
+|Timesteps Per Actor Per Epoch|_H_|_H_|_H_|_H_ (1000)|
+|Epochs|600|600|2000|(625)|
+|Exploration Max_ϵ_at Ep. Start|||1. _→_.05||
+|Exploration Max_ϵ_at Ep. End|||.8_→_.01||
+|Exploration Annealed (Timesteps - Per Actor)||1_,_000_,_000|||
+
+Table 4: **AMAGO Training Hyperparameters.**
+
+**Compute Requirements.** Each AMAGO agent is trained on one A5000 GPU. Results are reported as the average of at least three random seeds unless otherwise noted. Learning curves default to displaying the mean and standard deviation of trials. The POPGym (Appendix C.1) and Wind (Figure 5) learning curves show the maximum and minimum values achieved by any seed. Wall-clock training times vary significantly across experiments and were improved over the course of this work. For reference, POPGym training runs take approximately 8 hours to complete. AMAGO alternates between data collection and learning updates for consistent comparisons across baselines. However, these steps could be done in parallel or asynchronously if wall-clock speed was critical.
+
+**Sample Efficiency.** The AMAGO training loop alternates between collecting trajectory rollouts from parallel actors and performing learning updates. Sample efficiency in off-policy RL is primarily determined by the update-to-data ratio between these two stages [79, 74]. It has been shown that common defaults are often too conservative and that sample efficiency can be greatly improved by
+
+33
+
+increasing the update-to-data ratio [113, 80]. AMAGO’s use of Transformers resets this hyperparameter landscape. Due to compute constraints and the large number of technical details we are already evaluating, our experiments make little effort to optimize sample efficiency. It would be surprising if the current results represent the best trade-off between sample efficiency and performance.
+
+**==> picture [318 x 318] intentionally omitted <==**
+
+**----- Start of picture text -----**
+40 Model (Memory Dim. × Layers) Separated RNN 700k (128d ×1) 30 Shared RNN 600k (128d ×1) AMAGO 1.2M (128d ×1) 20 AMAGO 1.2M (128d ×1, No Flash) 10 0 32 64 128 256 512 768 1024 2048 3000 4096 5000 6000 7000 8000 Context Length 35 Model (Memory Dim. × Layers) 30 Separated RNN 2.7M (256d ×3) 25 Shared RNN 1.6M (256d ×3) 20 AMAGO 3.6M (256d ×3) AMAGO 3.6M (256d ×3, No Flash) 15 10 5 0 32 64 128 256 512 768 1024 2048 3000 4096 5000 6000 7000 8000 Context Length 30 Model (Memory Dim. × Layers) 25 Separated RNN 15.2M (512d ×5) Shared RNN 8M (512d ×5) 20 AMAGO 17.5M (512d ×5) 15 10 5 0 32 64 128 256 512 768 1024 2048 3000 4096 5000 6000 7000 8000 Context Length Gradient Steps / Sec. Gradient Steps / Sec. Gradient Steps / Sec. **----- End of picture text -----**
+
+Figure 29: **Training Throughput: AMAGO vs. Off-Policy RNNs.** We compare training speed in terms of gradient updates per second at various context lengths with a batch size of 24 sequences on a single NVIDIA A5000 GPU. These experiments use a HalfCheetah locomotion environment [97] and the codebase from [22] to benchmark the RNN agents. We modify AMAGO’s hyperparameters to create a fair comparison, though AMAGO is loading data from disk while the RNNs are loading from RAM. “No Flash” baselines remove Flash Attention [108].
+
+34
+
diff --git a/open_review/iclr2024_8604.json b/open_review/iclr2024_8604.json
new file mode 100644
index 0000000000000000000000000000000000000000..a0d49bed7e8c525db8b7891ba1030769bc85924c
--- /dev/null
+++ b/open_review/iclr2024_8604.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8604",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "From Molecules to Materials: Pre-training Large Generalizable Models for Atomic Property Prediction",
+ "abstract": "Foundation models have been transformational in machine learning fields such as natural language processing and computer vision. Similar success in atomic property prediction has been limited due to the challenges of training effective models across multiple chemical domains. To address this, we introduce Joint Multi-domain Pre-training (JMP), a supervised pre-training strategy that simultaneously trains on multiple datasets from different chemical domains, treating each dataset as a unique pre-training task within a multi-task framework. Our combined training dataset consists of $\\sim$120M systems from OC20, OC22, ANI-1x, and Transition-1x. We evaluate performance and generalization by fine-tuning over a diverse set of downstream tasks and datasets including: QM9, rMD17, MatBench, QMOF, SPICE, and MD22. JMP demonstrates an average improvement of 59% over training from scratch and matches or sets state-of-the-art on 34 out of 40 tasks. Our work highlights the potential of pre-training strategies that utilize diverse data to advance property prediction across chemical domains, especially for low-data tasks.",
+ "rebuttal": "We appreciate reviewer `avot` revising their score and recognizing the practical contribution of our work. We believe our approach does contribute technical innovations beyond “engineering tricks”, as it offers a viable blueprint for developing foundation models pre-trained across chemical domains — something that did not previously exist — and opens up a new area of research. Additionally, we provide excellent empirical results and thorough benchmarking to gain a better understanding of generalization.\n\nWhile novelty can be subjective, we believe our work clearly crosses the threshold. There are numerous examples from top venues like ICLR where ideas were taken from one field and applied to another e.g. NLP to CV [[Dosovitskiy et al., ICLR 2021](https://openreview.net/forum?id=YicbFdNTTy), [Bao et al, ICLR 2022](https://openreview.net/forum?id=p-BhZSz59o4)]. In these instances, the technical contributions may be conceptually straightforward, but they offer significant benefits in practice and open up new research directions. One additional point of reference within the area of pre-training for atomic systems is the work by [Zaidi et al., 2023](https://openreview.net/forum?id=tYIMtogyee) --- accepted at ICLR 2023 with very positive reviews (notable-top-25%) --- that builds on prior work and uses the same (or very similar) underlying architecture, denoising technique, and loss function [[Godwin et al., 2022](https://arxiv.org/abs/2106.07971)]. Despite the straightforward nature of these approaches, they have turned out to be very influential in their respective communities. We envision our work as having the potential to be similarly impactful and making a valuable contribution to the machine learning for chemistry community.\n\n### General Response\nWe would like to thank all the reviewers for the time and effort they put into giving us feedback! We were glad that all of the reviewers had positive things to say about our work, e.g. “innovative approach” from reviewer `R7em` and “exhaustive and meticulous” from reviewer `avot`, and that they found the paper well written and easy to follow. Moreover, we are happy that all reviewers seemed to be in agreement that the direction of the paper --- pre-training a large model on diverse chemical domains --- is a fruitful and impactful one.\n\nA major critique of our work was abo [...]\n\n### Response to Reviewer KadD: 1/1\nWe thank the reviewer for their positive comments, and we are glad of the recognition of our model's \"exceptional performance\" and that they found our work to be \"comprehensive and thorough\". We address each of the reviewer's comments below.\n\n> The disscussion of the correlation between pre-training tasks and downstream tasks is missing.\n\nIn Section 3 (Datasets), we discuss the differences between the pre-training and fine-tuning datasets in two different aspects:\n1. We identify the underlying chemical domain of the pre-training and fine-tuning datasets and s [...]\n\n### Response to Reviewer R7em: 1/1\nWe thank the reviewer for their time and effort in reviewing our paper. Specifically, we are glad that the reviewer found our work to be innovative, creative, and broadly applicable.\n\n> Need for Broader Ablation Studies: Issue: While the paper includes ablation studies to analyze the impact of different JMP components, these studies could be broadened to provide a more comprehensive understanding of the model’s behavior and the contributions of individual components.\n\nIn our current manuscript (see section 5.1), we have conducted the necessary ablations to an [...]\n\n### Response to Reviewer XFKt: 1/5\nWe thank the reviewer for their thoughtful feedback and highlighting our comprehensive benchmarks with state-of-the-art results, our choice of large and diverse pre-training dataset, and our experiments with model sizes. We also appreciate the questions and concerns raised which we address below.\n\n> The paper claims that the proposed pre-training method is model-agnostic. However, the only evaluated architecture backbone is GemNet-OC. It would be better to have a variant pre-trained using other types of model backbones to conduct further comparison and analys [...]\n\n### Response to Reviewer XFKt: 2/5\n> This paper claims that many previous efforts on pretraining molecules focus on a specific domain which ignores the information provided by other domains and generalizability. It would be better to provide more empirical evidence that compares the proposed model with other pre-training methods\n\nWe agree that making comparisons with other pre-training methods is important. We have tried to do that wherever results were reported. In the main paper, we compare with two other pre-training methods in both the QM9 and the QMOF tables. Additionally, Figure 3 compar [...]\n\n### Response to Reviewer XFKt: 3/5\n> This paper claims that they can deal with OOD challenge and cross-domain adaption better and they can benefit drug discovery, etc. So I would like to see more results on how this method perform on other therapeutics data [4], e.g., the molecule property predictions (toxicity, solubility, lipophilicity, etc.) on MoleculeNet [5]\n\nOur current results demonstrate that our model can generalize across multiple domains: We pre-train on the catalysis and small molecule domains and fine-tune on small molecules (ID), large molecules (OOD), and materials (OOD).\n\nRega [...]\n\n### Response to Reviewer XFKt: 4/5\n> More supervised SOTA should be compared. E.g., for the materials domain, there are two more recent papers [2, 3] that can be reported against the proposed method.\n\nFor MatBench, we compare our results to all recent competitive benchmarks on MatBench leaderboard (see https://matbench.materialsproject.org/Leaderboards%20Per-Task/matbench_v0.1_matbench_dielectric/). The papers referenced appear to be trained on MP 2018.6.1 (69,239 materials), which is different from the dataset MP Energy of Formation (132,752 materials) and MP Band Gap (106,113 materials).\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 5,
+ 8,
+ 5
+ ],
+ "score_mean": 5.75,
+ "score_variance": 2.25,
+ "score_spread": 3,
+ "score_min": 5,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper introduces an approach for pretraining across multiple datasets for materials property prediction. The authors show that the resulting foundation model outperforms SoTA on a wide variety of tested downstream tasks. While several of the reviewers are concerned that the \"novelty\" of the ML methods is limited, the ICLR reviewing guidelines state that \"Submissions bring value to the ICLR community when they convincingly demonstrate new, relevant, impactful knowledge (incl., empirical, theoretical, for practitioners, etc).\" Given that this paper introduces a foundation model for materials property prediction and shows SoTA results across a wide range of datasets widely used within the ICLR community, I believe that this contribution is eminently worth of inclusion at ICLR.",
+ "forum_id": "PfPnugdxup",
+ "primary_area": "applications to physical sciences (physics, chemistry, biology, etc.)",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_XFKt",
+ "review_id": "zjfh4fFCFL",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4624,
+ "edit_detected": true,
+ "edit_delta_seconds": 509480,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_KadD",
+ "review_id": "87ZnUEQ6eL",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1064,
+ "edit_detected": true,
+ "edit_delta_seconds": 726989,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_R7em",
+ "review_id": "cRynoQ0OEe",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 2529,
+ "edit_detected": true,
+ "edit_delta_seconds": 853847,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_avot",
+ "review_id": "IQbAyXa8J1",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 4202,
+ "edit_detected": true,
+ "edit_delta_seconds": 2323955,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8604.md b/open_review/iclr2024_8604.md
new file mode 100644
index 0000000000000000000000000000000000000000..480e364d8dacd62b669267a9b5a72f59775fc468
--- /dev/null
+++ b/open_review/iclr2024_8604.md
@@ -0,0 +1,867 @@
+
+
+## - FROM MOLECULES TO MATERIALS: PRE TRAINING - LARGE GENERALIZABLE MODELS FOR ATOMIC PROP ERTY PREDICTION
+
+Authors withheld for review
+
+## ABSTRACT
+
+Foundation models have been transformational in machine learning fields such as natural language processing and computer vision. Similar success in atomic property prediction has been limited due to the challenges of training effective models across multiple chemical domains. To address this, we introduce Joint Multi-domain Pre-training (JMP), a supervised pre-training strategy that simultaneously trains on multiple datasets from different chemical domains, treating each dataset as a unique pre-training task within a multi-task framework. Our combined training dataset consists of _∼_ 120M systems from OC20, OC22, ANI-1x, and Transition-1x. We evaluate performance and generalization by fine-tuning over a diverse set of downstream tasks and datasets including: QM9, rMD17, MatBench, QMOF, SPICE, and MD22. JMP demonstrates an average improvement of 59% over training from scratch and matches or sets state-of-the-art on 34 out of 40 tasks. Our work highlights the potential of pre-training strategies that utilize diverse data to advance property prediction across chemical domains, especially for low-data tasks.
+
+## 1 INTRODUCTION
+
+Computing atomic properties accurately and efficiently for a vast array of molecules and materials is crucial for a range of applications, from drug discovery (Chan et al., 2019; Deng et al., 2022) to catalyst design (Zitnick et al., 2020). Currently, the quantum chemistry method Density Functional Theory (DFT) is commonly employed for atomic property calculations. Unfortunately, DFT’s use is limited by its significant computational expense, which can range from hours to days for certain calculations. Machine learning (ML) potentials, which approximate or augment DFT, are capable of reducing the computational cost by orders of magnitude (Behler, 2016). In recent years, much progress has been made towards this goal (Kolluru et al., 2022b), fueled in part by the release of large and diverse DFT-generated datasets for training ML models. While these datasets are incredibly useful, they are also extremely expensive to generate, e.g., _∼_ 400 million CPU hours for the Open Catalyst 2020 dataset (OC20) (Chanussot et al., 2021). As a consequence, it is impractical to create a large dataset for every specific chemistry problem of interest. Similarly, it is non-ideal to train a model from scratch for all use cases, which is common practice currently.
+
+Foundation models (FMs) — large pre-trained models that can be fine-tuned for various tasks — have achieved remarkable success in domains such as natural language processing (NLP) and computer vision (CV), especially when fine-tuned on low-resource downstream tasks. Several key factors have enabled this effectiveness: (1) the availability of massive datasets, (2) the development of widely adopted pre-training strategies, and (3) the establishment of diverse benchmarks to rigorously assess the performance of these fine-tuned models. Despite the availability of large DFT-labeled datasets (e.g., OC20) and the existence of a wide and diverse range of downstream tasks (e.g., QM9 (Ruddigkeit et al., 2012b), MatBench (Dunn et al., 2020)), the adoption of pre-training in ML
+
+1
+
+**==> picture [404 x 248] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Catalysis MoleculesSmall MoleculesSmall MoleculesLarge Materials OC20 OC22 ANI1x Trans1x QM9 SPICE Matbench Learned Representations MD17 MD22 QMOF Data Normalization & Fine-tune Temperature Sampling Backbone Pre-train Model Knowledge Backbone Transfer Model Multi-Task Cv E F Eform Learning QM9 SPICE Matbench E F E F E F E F E F E F EG OC20 OC22 ANI1x Trans1x MD17 MD22 QMOF **----- End of picture text -----**
+
+Figure 1: An overview of the Joint Multi-domain Pre-training (JMP) method. **Left** : JMP’s pretraining setup, where a single model is simultaneously trained on set of diverse pre-training datasets using multi-task learning. **Center** : JMP’s fine-tuning process, where the pre-trained JMP backbone is equipped with new prediction heads and trained on downstream tasks. **Right** : t-SNE visualizations of JMP’s node-level ( _h_[˜] ) embeddings for randomly selected structures from all datasets.
+
+for atomic property prediction has been noticeably less prevalent. This under-utilization becomes evident when noting that most of the state-of-the-art (SOTA) results on downstream tasks come from models trained from scratch. More specifically, prior to our work, all previous SOTA results on the rMD17, MD22, SPICE, and MatBench datasets come from models trained form scratch. For QM9, models trained from scratch hold SOTA status for 7 of the 12 targets. In total, out of the 40 total tasks explored in this work’s evaluation benchmark, models trained from scratch hold the previous SOTA on 34 tasks.
+
+At its core, the challenge of pre-training for atomic property prediction lies in the complexity and diversity of the underlying chemical space. Target applications vary from drug design to catalysis, the data ranges from small molecules with only 4 atoms to periodic crystals with hundreds, and even the properties of interest for each application vary from various energies to forces to phonon peaks. Furthermore, the nature of atomic properties imposes a unique set of challenges. Unlike in NLP or CV, where the data is often discrete and finite, atomic properties are continuous and can span several orders of magnitude. This requires models to be robust to outliers and capable of predicting highly variable outputs. Further, existing pre-training strategies (e.g., Zaidi et al. (2022); Zhou et al. (2023b)) are designed with equilibrium systems in mind and are not directly applicable to non-equilibrium systems, which are common in DFT datasets (e.g., over 99.7% of OC20’s training data comprises of non-equilibrium structures). These challenges motivate the need for a flexible and generalizable pre-training strategy that can be adapted to different applications and datasets.
+
+In this work, we introduce Joint Multi-domain Pre-training (JMP), a supervised pre-training strategy tailored to the challenges and opportunities of machine learning for atomic modeling. JMP concurrently trains over 120 million diverse equilibrium and non-equilibrium atomic structures by framing each chemical domain as a separate pre-training task in a multi-task framework. This large-scale pre-training enables learning generalizable representations of atomic interactions. The contributions of our work are summarized as follows: **First** , we introduce the JMP method, shown in Figure 1, and demonstrate its powerful generalization ability by evaluating its fine-tuning performance across a diverse benchmark suite spanning small molecules, large molecules, and materials. Our results show that JMP consistently outperforms training from scratch and sets or matches the **state-of-the-art on 34 out of the 40 fine-tuning benchmarks** . **Second** , we show that JMP enables efficient scaling to larger models that would normally overfit if trained from scratch on small datasets. Pre-training acts as a strong regularizer, allowing us to train a 235M parameter model that sets new state-of-the-art performance on multiple low-data benchmarks. **Finally** , we conduct a detailed analysis of JMP’s
+
+2
+
+computational requirements. While expensive upfront, we show JMP’s pre-training cost is recovered by enabling over 12x faster fine-tuning compared to training from scratch. By pre-training large models on diverse chemical data, we believe JMP represents an important step towards the goal of a universal ML potential, and that the continued growth of available data and compute power will only improve JMP’s ability to learn transferable atomic representations.
+
+## 2 RELATED WORK
+
+**Machine learning potentials:** There has been significant progress in developing ML models for atomic property prediction. Initial approaches focused on descriptor-based methods, where these descriptors were hand-fitted physically meaningful analytical functions (González, 2011; Sundius, 2002; Dinur and Hagler, 1991). These functions were incorporated into gaussian process models (Chmiela et al., 2017) or neural networks (Behler and Parrinello, 2007). Recent advances in graph neural networks (GNNs) have shown to be a promising approach for these tasks, surpassing descriptorbased methods (Gasteiger et al., 2020; Schütt et al., 2017; Batzner et al., 2021; Batatia et al., 2022) on multiple benchmarks across the atomic domains of small molecules, catalysts, and bulk materials. While much progress has been made, it remains difficult for a single model to perform well across all chemical domains.
+
+**Pretraining and transfer learning on 3D atomic systems:** The concept of transfer learning, where representations are learned on one dataset and transferred to another, has been successfully applied to a number of atomic modeling tasks (Kolluru et al., 2022a; Cai et al., 2020; Tsubaki and Mizoguchi, 2021; Smith et al., 2018). However, most of the focus in this area has been on transferring representations within the same chemical domain with a limited amount of pre-training data (Smith et al., 2019; Yamada et al., 2019; Pesciullesi et al., 2020). There are beginning to be more dedicated works on pre-training (Zhu et al., 2022; Liu et al., 2021; Jiao et al., 2022; Zhou et al., 2023b), but most do not explore generalization across multiple chemical domains. Many of these works focus on self-supervised pre-training on molecular graphs and/or 3D atomic structures. Recent self-supervised methods have focused on denoising methods (Song et al., 2020) applied to equilibrium structures — i.e. the per atom forces are close to zero (Zaidi et al., 2022; Feng et al., 2023b; Liu et al., 2022). The original formulation of denoising equilibrium structures is applicable to less than 1% of our training data because most of the atomic properties data is non-equilibrium. This is an active area of research and since the beginning of our present work, alternative formulations that could apply to non-equilibrium data have started to emerge (Feng et al., 2023a; Zheng et al., 2023).
+
+## 3 DATASETS
+
+We separate the atomic space into four domains for the purposes of this manuscript including, small molecules (1-20 atoms), large molecules (more than 20 atoms), materials, and catalysis (contains material surfaces with molecules). Each dataset sample contains a 3D atomic structure (positions and atomic numbers) and a set of atomic properties. The atomic properties can be either node-level (e.g., forces) or graph-level (e.g., energy). The datasets are summarized in Table 1, with additional information, including details on train, validation, and test splits, in Appendix H.
+
+To study the ability of pre-trained models to generalize across domains and tasks, we only pre-train on small molecule and catalysis datasets, and fine-tune on small molecule, large molecule, and materials datasets. Our pre-training datasets include the ANI-1x (Smith et al., 2020) and Transition1x (Schreiner et al., 2022) small molecule datasets and the OC20 (Chanussot et al., 2021) and OC22 (Tran et al., 2022) catalysis datasets. These datasets were chosen due to their diversity and large size.
+
+The combined pre-training dataset contains over 120M training examples with energy and force labels, with the majority of the data ( _>_ 99%) coming from non-equilibrium structures. Due to the difference in underlying DFT theory and software used across the datasets, we utilize different prediction heads for each dataset. We also use a per-dataset linear referencing scheme for the energies. For fine-tuning, we use smaller datasets from three domains to evaluate how pre-trained models perform in similar (small molecule) and unseen domains (large molecule and materials). These datasets may contain in-distribution (ID) (i.e., energies and forces) or out-of-distribution (OOD) labels (e.g., QM9’s ∆ _ϵ_ ).
+
+3
+
+|**Dataset**|**Domain**|**Labels**|**Elements**|**Avg size**|**Train Set**|**Description**|
+|---|---|---|---|---|---|---|
+|**Pretraining Datasets**|||||||
+|OC20|Catalyst|E, F|55|_∼_73(7-225)|100M|Catalyst relaxations|
+|OC22|Catalyst|E, F|51|_∼_80(17-228)|8M|Oxide catalyst relaxations|
+|ANI-1x|Small Molecule|E, F|H, C, N, O|_∼_15(4-63)|2M|MD simulations|
+|Transition-1x|Small Molecule|E, F|H, C, N, O|_∼_14(4-23)|10M|Reactions database|
+|**Finetuning Datasets**|||||||
+|Matbench|Materials (OOD)|ID / OOD|84|_∼_30 (4-444)|_∼_600–130k|Material properties|
+|QMOF|Materials (OOD)|OOD|77|_∼_109 (17, 500)|10k|MOF properties|
+|MD17|Small Mols. (ID)|ID|H, C, N, O|_∼_13 (9-21)|1k|MD simulation|
+|QM9|Small Mols. (ID)|ID / OOD|H, C, N, O|_∼_18 (3-29)|_∼_130k|QM properties|
+|SPICE|Large Mols. (OOD)|ID|H, C, N, O, S|_∼_46(26-96)|1300,_∼_34k|MD simulations|
+|MD22|Large Mols. (OOD)|ID|H, C, N, O|_∼_67 (42-370)|_∼_600–8k|MD simulations|
+
+Table 1: Summary of datasets and their properties, including the domain, target labels, atomic elements present, their sizes and a brief description.
+
+## 4 JOINT MULTI-DOMAIN PRE-TRAINING
+
+Joint Multi-domain Pre-training (JMP), shown in Figure 1, is based on the intuition that pre-training on a diverse set of chemical domains should lead to better representation learning and thus better generalization through fine-tuning. The pre-training task is framed as a multi-task supervised learning problem, where each label of each pre-training dataset is treated as a separate task. This allows us to pre-train a single backbone model on multiple chemical domains and labels simultaneously.
+
+**Notation:** We use the following notation throughout this section. Let _D_ = _{D_ 1 _, . . . , DM }_ be the set of _M_ datasets that we pre-train on. Each dataset, _Di_ , is a set systems (e.g., molecules or crystals), where each system is a tuple of atomic numbers ( _Z_ ), atomic positions ( _R_ ), and target (i.e., ground-truth) energy ( _E_[ˆ] ) and forces ( _F_[ˆ] ). For a given mini-batch of _B_ systems, _Wb_ is the index of the dataset that system _b ∈ B_ belongs to, and _Nb_ is the number of atoms in system _b_ .
+
+**Model Architecture:** Our goal in this work is to design model-agnostic strategies for supervised pre-training. For our backbone model architecture, we chose GemNet-OC (Gasteiger et al., 2022) for its effectiveness across a wide spectrum of chemical domains as well as at large scales (Sriram et al., 2022). GemNet-OC is a message-passing neural network that computes a node representation **h** _i_ for each atom _i_ and an edge representation **m** _ij_ for pairs of nearby atoms, _i_ and _j_ . Using these representations, prediction heads compute desired target properties. System-level scalar predictions, such as energy, are computed by summing the node representations, _E_ =[�] _[N] i_ =1 **[MLP]**[(] _[h][i]_[)][.][Node-] level vector predictions, such as forces, are computed by summing the edge direction unit vectors, weighted by the edge representations, _Fi_ =[�] _[N] j_ =1[(] **[MLP]**[(] _[m][ij]_[)] _[ ·]_ **[ ˆr]** _[ij]_[)][.][During][pre-training,][we] compute forces using a direct equivariant block, similar to Klicpera et al. (2021)’s model setup for the OC20 dataset. This is for two reasons: (1) direct force prediction is much more computationally efficient than gradient-based force prediction, as the latter needs to perform a secondary backward pass to compute the gradient of the energy with respect to the atomic positions and (2) previous works (Gasteiger et al., 2022) have shown that for larger datasets, direct force prediction shows much faster convergence while producing similar converged accuracies to gradient-based force prediction.
+
+## 4.1 MULTI-TASK PRE-TRAINING
+
+In the multi-task setting, each dataset has its own energy and force prediction heads, as shown in Figure 1 (left). This allows us to train a single model on multiple datasets simultaneously. In the following sections, we describe each of these imbalances and our proposed solutions in detail.
+
+**Data Normalization:** When pre-training on multiple datasets, we first need to normalize the targets to make sure they are on a common scale across datasets. Since our pre-training task is energy and force prediction, for each dataset we first linearly reference the total energies and then normalize them to unit Gaussian distributions. We normalize the forces by dividing them by component-wise RMS force. This puts the energy and forces for each dataset on a common scale.
+
+**Dataset Size Imbalance:** Our pre-training datasets vary greatly in size, from 2 million to 100 million training samples, for a total of 120M samples. To maintain a proper balance between the total contribution of large, high-resource and small, low-resource pre-training datasets and to prevent overfitting to high-resource datasets and underfitting on low-resource datasets, we use temperature
+
+4
+
+sampling (Devlin et al., 2018) during batch construction. Specifically, we sample each dataset _i |Di|_ with probability _pi ∝_ ( � _j[|][D][j][|]_[)][1] _[/T]_[ , where] _[ |][D][i][|]_[ is the number of samples in dataset] _[ i]_[ and] _[ T]_[is the] temperature hyperparameter. Inspired by Shaham et al. (2023), which shows that _T_ = 2 optimizes model performance on high and low-resource languages for large models, we use _T_ = 2.
+
+**System Size Imbalance:** The number of atoms per system varies greatly across our pre-training datasets. For example, Transition-1x has 14 atoms per system on average, while OC22 has 80 atoms per system on average. The naive loss reduction method shown in the non-teal terms of Equation (1), which is the default behavior of most machine learning libraries, computes an atom-level force loss and then averages the force loss across all atoms in the batch. This leads to datasets with more atoms per system dominating the force loss. To address this issue, we propose a structure-wise loss reduction strategy which first computes the average force loss for each system and then computes the average force loss across all systems. This ensures that the relative importance of the force loss is roughly equal across datasets, regardless of the number of nodes per system. In Equation (1), the updates to the naive formulation of the loss function are shown in teal and removed terms are red. This simple change leads to a significant improvement in model performance, as shown in Section 5.1.
+
+**==> picture [359 x 46] intentionally omitted <==**
+
+**Loss Imbalance Within a Single Dataset:** In the single-dataset setting, _λE_ and _λF_ are typically tuned by grid search, but this approach is not feasible in the multi-dataset setting, as there 2 _· M_ hyperparameters to tune, and changing one hyperparameter affects the optimal values of the others. Therefore, we need a simple heuristic to determine the loss coefficients for each dataset that provides a reasonable balance between the energy and force losses. Inspired by Tran et al. (2022)’s size invariant force loss, which computes a dynamic _λF_ based on the number of atoms in each system of the input batch, we fix _λ_[(] _E[i]_[)][=][1][ and] _[ λ]_[(] _F[i]_[)][=] _[⟨][N][⟩][D] i_[, where] _[ ⟨][N][⟩][D] i_[is the average number of atoms] per system in the _i_ th dataset, _Di_ . This provides a reasonable balance between energy and force loss within each dataset.
+
+**Fine-Tuning:** Once we have a fully pre-trained model, we can fine-tune it on downstream tasks. Our fine-tuning procedure is very similar to other fine-tuning procedures in the machine learning literature (Devlin et al., 2018; Zaidi et al., 2022): We discard the pre-training prediction heads, add new randomly initialized prediction heads for the downstream task, and fine-tune the entire model on the downstream task. This procedure is illustrated in Figure 1 (middle). For fine-tuning tasks with force labels, we have the option of using the directly computed forces (i.e., using the direct equivariant block) or computing the forces by taking the gradient of the energy with respect to the atomic positions. Our initial experiments showed that JMP works well with both methods. In our evaluations, however, we chose to compute forces conservatively by taking the gradient of the energy with respect to the atomic positions, as this is the standard approach in the literature.
+
+## 5 EXPERIMENTS
+
+We benchmark our pre-trained models on a diverse set of atomic ML tasks. In previous related works, evaluations are commonly restricted to downstream datasets that align closely with the pre-training dataset’s domain (Zaidi et al., 2022; Zhou et al., 2023a). We posit that true success in pre-training models for atomic machine learning tasks requires adeptness at out-of-domain extrapolation. To test this hypothesis, our benchmark uniquely spans across diverse domains including small molecules (QM9 and rMD17), large molecules (MD22 and SPICE), and materials (MatBench and QMOF).
+
+We compare our fine-tuned models (JMP) to randomly initialized models trained from scratch (GNOC) to demonstrate the effectiveness of JMP. We also compare to previous state-of-the-art models where available. For each task, we present results for both a small ( _∼_ 30M parameters, labeled with the **-S** suffix) and large ( _∼_ 230M parameters, labeled with the **-L** suffix) pre-trained model to probe the impact of the model size. These two variants utilize the GN-OC Base and Large backbone architectures from Gasteiger et al. (2022), respectively. Finally, we conduct ablation studies to understand the impact of various components of JMP. More information on the datasets used for
+
+5
+
+**==> picture [397 x 142] intentionally omitted <==**
+
+**----- Start of picture text -----**
+QM9 MD17 MD22 SPICE Matbench QMOF (a) Scrach Large vs Scratch Small (b) Fine-tuned Large vs Fine-tuned Small (c) Fine-tuned Large vs Scratch Large 75 50 25 0 25 50 75 Fine-tuning Tasks Relative Improvement (%) **----- End of picture text -----**
+
+Figure 2: Relative performance improvement across all tasks of all fine-tuning datasets, in percentages, of (a) Scratch Large ( **GN-OC-L** ) over Scratch Small ( **GN-OC-S** ), (b) Fine-tuned Large ( **JMP-L** ) over Fine-tuned Small ( **JMP-S** ), and (c) Fine-tuned Large ( **JMP-L** ) over Scratch Large ( **GN-OC-L** ). GN-OC shows poor scaling to large models, a clear sign of overfitting, whereasJMP reverses this, exhibiting much improved scaling dynamics. JMP also consistently outperforms GN-OC across all domains, datasets, and targets. The shaded rectangles indicate the average relative performance across all tasks for each dataset. The exact percentages can be found in Appendix C.1
+
+pre-training and fine-tuning can be found in Section 3. Details on the pre-training and fine-tuning setup, such as the optimizers, learning rate schedules, and early stopping information, can be found in Appendix F. Exact hyperparameters can be found in Appendix J.
+
+**Common Observations:** We begin by highlighting some common observations across all experiments. First, when training from scratch, GN-OC-L performs 8% worse on average than GN-OC-S, as shown in Figure 2 (a). This is a clear indication of overfitting and has been consistently observed in low-data regimes (Gasteiger et al., 2022). Second, this problem of overfitting is nearly eliminated by JMP, illustrated in Figure 2 (b). On average, JMP-L exhibits an impressive 21% relative performance gain over JMP-S. This indicates that the JMP training procedure is able to effectively leverage the additional capacity of the large model, even in low-data regimes. Third, we observe that pre-training with JMP elevates performance across all domains, datasets, and tasks (Figure 2 (c)), with an average relative improvement of 59% for JMP-L over GN-OC-L.
+
+**Results on Small Molecules - QM9 and rMD17:** For each target of QM9 (Wu et al., 2018), we fine-tune a dedicated model using a simple prediction head with sum pooling for all targets. For _R_[2] , we use the same prediction head formulation as Thölke and De Fabritiis (2022). Our results can be found in Table 2 compared against previous state-of-the-art works (Liao and Smidt, 2022; Batatia et al., 2022; Musaelian et al., 2023; Feng et al., 2023a;
+
+**==> picture [132 x 172] intentionally omitted <==**
+
+**----- Start of picture text -----**
+GNS-TAT-NN JMP-S ET-NN JMP-L ET-OREO LUMO HOMO 0 20 40 60 Relative Improvement (%) **----- End of picture text -----**
+
+Figure 3: Relative improvement, over training from scratch, of different pre-training methods on QM9’s _ϵ_ LUMO and _ϵ_ HOMO.
+
+Zaidi et al., 2022). With the sole exception of _R_[2] , our JMP-L model achieves state-of-the-art results on all QM9 targets. For the _R_[2] target, a similar phenomenon has been observed in previous pre-training works (Zaidi et al., 2022) where the benefits of using pre-trained models are not as pronounced.
+
+In addition to their impressive performance, our JMP-S and JMP-L models demonstrate a large improvement relative to their scratch-trained counterparts. Figure 3 compares this relative improvement — measured on the _ϵ_ LUMO and _ϵ_ HOMO targets — to other state-of-the-art pre-training and transfer learning methods for QM9. As shown, JMP outperforms all previous methods by a significant margin. This is a strong signal that our pre-training approach is effective at learning generalizable representations for small molecules. We also report additional pretraining comparisons on all our finetuning benchmarks with a pre-trained model from (Zaidi et al., 2022) and demonstrate significant improvements on all tasks in Appendix A.
+
+**Data overlap:** Due to the limited complexity of small molecules, there is some data overlap between our pre-training datasets (ANI-1x and Transition-1x) and QM9. To check the impact of this overlap
+
+6
+
+on our results, we evaluate the fine-tuning performance of our JMP-L on a QM9 dataset that excludes the overlapping molecules. Using molecular compositions to identify overlaps, we observe that the exclusion of overlapping molecules has a negligible impact on our results (see Appendix I).
+
+|**Target (Units)** **TorchMD-** **Equi-** **MACE** **Allegro** **Pretrained** **Pretrained** **Net** **former** **ET-OREO** **GNS+TAT+NN**|**GN-OC-** **GN-OC-** **JMP-** **JMP-** **S** **L** **S** **L**|
+|---|---|
+|_µ_(_D_) 0.011 0.011 0.015 - - 0.016 _α_(_a_3 0) 0.059 0.046 0.038 - - 0.040 _ε_HOMO (_meV_) 20.3 15.0 22.0 - 16.8 14.9 _ε_LUMO (_meV_) 18.6 14.0 19.0 - 14.5 14.7 ∆_ε_(_meV_) 36.1 30.0 42.0 - 26.4 22.0 _R_2 (_a_2 0) **0.033** 0.251 0.210 - - 0.440 ZPVE (_meV_) 1.8 1.3 1.2 - - 1.0 _U_0 (_meV_) 6.2 6.6 4.1 4.7 - 5.8 _U_ (_meV_) 6.4 6.7 4.1 4.4 - 5.8 _H_ (_meV_) 6.2 6.6 4.7 4.4 - 5.8 _G_(_meV_) 8.3 7.6 5.5 5.7 - 6.9 _Cν_ (Cal/MolK) 0.026 0.023 0.021 - - 0.020|0.020 0.023 0.010 **0.008** 0.052 0.056 0.037 **0.032** 21.8 22.7 11.1 **8.8** 17.3 18.6 10.8 **8.6** 38.5 40.6 23.1 **19.1** 0.210 0.171 0.200 0.163 1.2 1.2 1.0 **0.9** 7.2 9.4 3.3 **2.9** 6.9 9.7 3.3 **2.8** 7.3 8.7 3.3 **2.8** 8.1 9.2 4.5 **4.3** 0.024 0.024 0.018 **0.017**|
+
+Table 2: MAE test split results on all targets of the QM9 dataset. SOTA results are bolded. For rMD17, we compute forces by taking the negative gradient of the energy with respect to the atomic positions. Table 3 shows our force prediction results on the rMD17 dataset. Similarly to QM9, we observe that JMP consistently outperforms GN-OC across all rMD17 targets. Our JMP-L model achieves state of the art performance in 5 molecules and is very competitive on the rest. Appendix B.1 also shows that JMP achieves SOTA on 6/10 targets on the few-shot 50-sample subset of rMD17.
+
+|**Molecules** **MACE** **Allegro**|**GN-OC-S** **GN-OC-L** **JMP-S** **JMP-L**|
+|---|---|
+|Aspirin 6.6 7.3 Benzene 0.3 **0.2** Ethanol 2.1 2.1 Malonaldehyde 4.1 4.1 Naphthalene 1.6 **0.9** Salicylic acid **3.1** 2.9 Toluene **1.5** 1.8 Uracil 2.1 **1.8** Paracetamol 4.8 4.9 Azobenzene 3.0 **2.6**|24.3 24.7 6.7 **5.1** 1.0 1.0 0.7 0.3 13.0 13.3 2.8 **2.0** 21.1 25.7 5.3 **4.0** 5.6 5.7 2.2 1.4 14.7 15.1 4.6 3.4 6.8 7.2 2.3 **1.5** 12.0 12.9 4.0 2.5 17.3 18.4 5.3 **4.0** 11.1 11.4 4.5 3.3|
+
+Table 3: Force MAE results in meV/Å on the test split of the rMD17 dataset. SOTA is bolded. **Results on Materials - MatBench and QMOF:** In the materials domain, we fine-tune on the MatBench (Dunn et al., 2020) and QMOF datasets (Rosen et al., 2021). For MatBench, we evaluated all regression tasks that utilize a 3D structure as an input and compared them with competitive models on the leaderboard (De Breuck et al., 2021; Ruff et al., 2023). For QMOF, we predict the band gap target on a 10k split, similarly to Kang et al. (2022); Cao et al. (2023). We use mean pooling for all experiments, except MatBench’s phonons, which is the measure of frequency of the highest frequency optical phonon mode peak and thus uses max pooling. Our results can be found in Table 4. We observe that JMP-L achieves SOTA performance across QMOF and on all MatBench tasks. These two datasets contain diverse out-of-domain chemical structures (materials) and out-of-domain target labels (i.e., not energies and forces), relative to the pre-training datasets. JMP’s impressive performance is yet another positive signal indicating that JMP is learning generalizable representations.
+
+|**Materials (Units)** **MODNet** **coGN** **(fold0 / mean)** **(fold0 / mean)**|**GN-OC-S** **GN-OC-L** **JMP-S** **JMP-L** **(fold0)** **(fold0)** **(fold0 / mean)** **(fold0 / mean)**|
+|---|---|
+|JDFT2D (_meV/atom_) 25.55 / 33.20 22.25 / 37.17 Phonons (_cm−_1) 34.77 / 34.28 32.12 / 29.71 Dielectric (_unitless_) 0.169 / 0.271 0.178 / 0.309 Log GVRH (_log_10(_GP A_)) 0.073 / 0.073 0.068 / 0.069 Log KVRH (_log_10(_GP A_)) 0.054 / 0.055 0.052 / 0.054 Perovskites (_eV/unitcell_) 0.093 / 0.091 0.027 / 0.027 MP Gap (_eV_) 0.215 / 0.220 0.153 / 0.156 MP E Form (_meV/atom_) 40.2 / 44.8 17.4 / 17|26.19 25.34 20.72 / 30.16 23.12 /**29.94** 93.45 88.74 26.6 / 22.77 21.28 /**20.57** 0.225 0.211 0.133 / 0.252 0.119 /**0.249** 0.082 0.082 0.06 / 0.062 0.057 /**0.059** 0.061 0.063 0.044 / 0.046 0.045 /**0.045** 0.045 0.045 0.029 / 0.028 0.026 /**0.026** 0.228 0.235 0.119 / 0.121 0.089 /**0.091** 31.4 33.1 13.6 / 13.3 10.3 /**10.1**|
+|**PT CGCNN** **PT MOFTransformer**||
+|QMOF 0.28 0.27|0.25 0.24 0.18 **0.16**|
+
+Table 4: MAE test split results on different targets in the materials domain. SOTA is bolded.
+
+**Results on Large Molecules - MD22 and SPICE:** To further investigate the impact of pre-training on unseen domains, we evaluate two large molecule datasets, MD22 (Chmiela et al., 2023) and SPICE (Eastman et al., 2023) and compare our results to the previous state-of-the-art (Kovacs et al., 2023).
+
+7
+
+|**Molecule** **sGDML** **MACE** **Allegro**|**GN-OC-S** **GN-OC-L** **JMP-S** **JMP-L**|
+|---|---|
+|||
+|Ac-Ala3-NHMe 34.55 3.80 4.63 5.07 6.27 2.64 **1.92** DHA 32.41 2.80 3.17 2.87 3.95 2.01 **1.37** Stachyose 29.24 3.80 4.21 2.22 3.85 2.69 **1.73** AT-AT 29.97 4.30 4.13 5.38 5.96 3.02 **1.98** AT-AT-CG-CG 30.48 5.00 5.55 5.80 5.62 3.28 **2.11** Buckyball Catcher 29.57 3.70 - 10.35 8.20 3.08 **2.26** Double Walled Nanotubes 22.68 12.00 - 11.20 9.61 8.36 **6.17**||
+|||
+|Solvated Amino Acids Dipeptides|6.20 8.02 1.60 **1.33** 2.46 2.99 1.32 **1.02**|
+
+Table 5: Force MAE results in meV/Å on test splits of large molecule datasets. SOTA is bolded.
+
+For SPICE, we only use the large molecule sub-tasks: solvated amino acids and dipeptides. Similar to rMD17, we compute forces by taking the negative gradient of the energy with respect to the atomic positions. However, for MD22’s Buckyball Catcher and Double-Walled Nanotubes, we were unable to fit these large structures in memory with using gradient-based force predictions; therefore, we used direct force prediction heads instead. Our results can be found in Table 5. Once again, our model demonstrates state-of-the-art results across all molecules of MD22 and all tasks of SPICE.
+
+## 5.1 ABLATION STUDIES
+
+Our ablations demonstrate the impact of various changes to JMP on the downstream fine-tuning performance. We performed pre-training experiments including dataset sampling strategies, loss formulation, and regularization strategies, and observed their impact on fine-tuning. Given the computational cost of training models on the full pre-training dataset, ablation experiments were conducted on a scaled-down version of the full pre-training dataset containing a randomly selected _∼_ 2.5M examples. All pre-training models are trained for 10 epochs. Similarly, fine-tuning for these experiments was run on only one task from each of the fine-tuning datasets (MD17: Aspirin, MD22: Stachyose, QM9: ∆ _ϵ_ , MatBench: MP E Form, QMOF: Band Gap, and SPICE: Solvated Amino Acids). Additional ablations, including using fully balanced ( _T_ = _∞_ ) sampling, threshold regression loss for energies and forces, and automatic task weighting strategies such as PCGrad (Yu et al., 2020) are explored in Appendix B. Table 6 shows the mean improvement, relative to the base, across all the fine-tuning tasks described above. A summarized insight of each ablation study follows:
+
+**Base (B):** Base refers to the naive implementation of a multi-task pre-training model without temperature sampling, structure-wise loss reduction, or additional regularization. This model serves as the baseline for comparison. **Temperature Sampling:** Temperature-based sampling with _T_ = 2 provides a moderate improvement, while higher values (e.g., _T_ = _∞_ ) show diminishing returns. This is consistent with Shaham et al. (2023), which shows that for large-enough models, _T_ = 2 provides ideal performance across both low and high resource datasets. **Structure-Wise Loss Reduction (SWL):** The application of the structure-wise loss reduction strategy proved to be a substantial improvement on the model’s performance, with **T2** + **SWL** offering a 7.7% improvement over **B** . **Weight Decay (WD):** Elevating the weight decay regularization parameter to 0.1 (from the default 0 _._ 01) brings the collective improvement to 11.4% over **B** .
+
+||**Ablations**|E[**RI**]**(%)**|
+|---|---|---|
+||Base (Temperature 1.0) [**B**]|0%|
+||B + Temperature 2.0 [**T2**] B + Temperature_∞_[**T**_∞_]|2.2% 2.6%|
+||T2 + SW Loss Averaging [**SWL**]|7.7%|
+||SWL + Weight Decay [**WD**] SWL + Dropout [**DO**]|11.4% 11.4%|
+||WD + Edge Dropout [**ED**]|13.2%|
+||WD + ED + EMA Weights [**EMA**]|12.4%|
+||EMA + OC20 Only [**OC20**]|-9.9%|
+
+Table 6: Ablation results demonstrating the mean relative improvements of each method relative to the base method ( **B** ), averaged over ablation subsplits.
+
+**Dropout (DO):** Using dropout with _p_ = 0 _._ 1 on atom update layers yielded similar uplift to **WD** . **Edge Dropout (ED):** For this ablation, we drop _p_ = 0 _._ 1 of the edges at every step. We then scale the embeddings of remaining edges by a factor of 1 _−_ 1 _p_[.][This yielded a small improvement over] **[ WD]**[,] increasing the collective improvement to 13.2% over **B** .
+
+**Exponential Moving Average (EMA):** Fine-tuning on EMA weights did not improve performance. **OC20 Only (OC20):** To understand the impact of multi-task pre-training, we trained a model on the OC20 dataset only. We selected a 120M subset of OC20 to match the number of examples in the full JMP pre-training dataset. Note that this means that the dataset used in the **OC20** ablation contains 48 _×_ more data points than the rest of our ablations. Despite this, **OC20** performed substantially worse than **B** , indicating that diverse multi-task pre-training is important for generalization.
+
+8
+
+Based on our ablation results the two most important changes from **B** were **SWL** and regularization methods like **WD** , **DO** , and **ED** . These results are consistent with Kurin et al. (2022), which demonstrates the effectiveness of regularization in multi-task learning. Our final model integrates temperature-based sampling ( **T2** ), structure-wise loss reduction strategy ( **SWL** ), an amplified weight decay regularization parameter of 0.1 ( **WD** ), edge dropout with _p_ = 0 _._ 1 ( **ED** ), and **EMA** despite not showing a performance boost as it has been standard for training GemNet (Gasteiger et al., 2022).
+
+## 5.2 COMPUTATIONAL COST ANALYSIS
+
+Pre-training JMP-L required significant computational resources, which is typical for foundation model approaches. We pre-trained JMP-L on 128x V100 32GB GPUs for 2 epochs, which took around 34,400 GPU hours in total (see Appendix G for exact training times and CO2 impact). While this is a substantial upfront investment, it enables efficient fine-tuning across a diverse set of downstream tasks.
+
+We evaluated JMP-L fine-tuning performance versus training models from scratch (i.e., GN-OC-L). Training GN-OC-L on the downstream tasks until convergence based on our stopping criteria took around 3,300 GPU hours in total across all tasks. In contrast, fine-tuning JMP-L on the same tasks took only around 275 GPU hours total to match the performance of the models trained from scratch. This 12x
+
+**==> picture [166 x 126] intentionally omitted <==**
+
+**----- Start of picture text -----**
+150 JMP GN-OC 100 50 0 QM9 MD17MD22SPICEMatbenchQMOF (GPU Hours) Time to Milestone **----- End of picture text -----**
+
+Figure 4: The number of GPU hours, averaged for each dataset, required to train GNOC-L to convergence and to fine-tune JMP-L to match GN-OC-L’s performance. Overall, fine-tuning JMP-L was able to match GN-OCL’s performance in 121[the time.]
+
+reduction in compute demonstrates the significant benefits of pre-training. Figure 4 shows this difference in compute requirements, averaged for each fine-tuning dataset.
+
+## 6 CONCLUSION
+
+Our findings demonstrate the promise of pre-training strategies that leverage diverse data to improve atomic property prediction. Our source code and pre-trained models are publicly available on GitHub[1] . We hope this will spark further research and innovation in this area to accelerate progress towards a foundation model for chemistry. It is essential to acknowledge the potential for bias in our models and datasets, which can impact their prediction capability and quality. Additionally, given the potential for misuse of atomic machine learning models, we emphasize that these models must be used responsibly.
+
+There are several limitations of this study that provide fertile ground for future research. Due to the large computation expense of pre-training new models, our study only experimented with the GemNet-OC backbone model. Further exploration of different backbone models is warranted. Additionally, the current methodology of discarding pre-training prediction heads before fine-tuning may not be optimal, particularly for datasets with similar labels to the pre-training sets. Lastly, the model size used in this study, though substantial, is dwarfed by the largest models in NLP and CV. We anticipate that employing larger models, trained with the help of recent data and model parallelism techniques (Sriram et al., 2022), could enhance performance.
+
+In summary, this work presents Joint Multi-domain Pre-training (JMP), a novel atomic pre-training strategy that leverages diverse atomic datasets to learn rich representations through multi-task regression. By effectively formulating and regularizing the multi-task learning problem, we achieve remarkable performance on various in-domain and out-of-domain fine-tuning tasks. Scaling up to a large model with over 235 million parameters leads to improved performance on all downstream tasks, even low-resource ones like rMD17. This suggests that pre-training not only enhances accuracy but also facilitates effective scaling, allowing models to benefit from increased capacity without overfitting. Additionally, we establish a comprehensive set of fine-tuning benchmarks across various chemical domains and tasks. Building off the results present here to create larger, more general, and more accurate ML potentials will remain significant challenge for the field moving forward.
+
+> 1[URL removed]
+
+9
+## REFERENCES
+
+- Ilyes Batatia, Dávid Péter Kovács, Gregor NC Simm, Christoph Ortner, and Gábor Csányi. Mace: Higher order equivariant message passing neural networks for fast and accurate force fields. _arXiv preprint arXiv:2206.07697_ , 2022.
+
+- Simon Batzner, Albert Musaelian, Lixin Sun, Mario Geiger, Jonathan P Mailoa, Mordechai Kornbluth, Nicola Molinari, Tess E Smidt, and Boris Kozinsky. Se (3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. _arXiv preprint arXiv:2101.03164_ , 2021.
+
+- Jörg Behler. Perspective: Machine learning potentials for atomistic simulations. _The Journal of chemical physics_ , 145(17):170901, 2016.
+
+- Jörg Behler and Michele Parrinello. Generalized neural-network representation of high-dimensional potential-energy surfaces. _Physical review letters_ , 98(14):146401, 2007.
+
+- Chenjing Cai, Shiwei Wang, Youjun Xu, Weilin Zhang, Ke Tang, Qi Ouyang, Luhua Lai, and Jianfeng Pei. Transfer learning for drug discovery. _Journal of Medicinal Chemistry_ , 63(16):8683–8694, 2020.
+
+- Zhonglin Cao, Rishikesh Magar, Yuyang Wang, and Amir Barati Farimani. Moformer: self-supervised transformer model for metal–organic framework property prediction. _Journal of the American Chemical Society_ , 145(5):2958–2967, 2023.
+
+- HC Stephen Chan, Hanbin Shan, Thamani Dahoun, Horst Vogel, and Shuguang Yuan. Advancing drug discovery via artificial intelligence. _Trends in pharmacological sciences_ , 40(8):592–604, 2019.
+
+- Lowik Chanussot, Abhishek Das, Siddharth Goyal, Thibaut Lavril, Muhammed Shuaibi, Morgane Riviere, Kevin Tran, Javier Heras-Domingo, Caleb Ho, Weihua Hu, et al. Open catalyst 2020 (oc20) dataset and community challenges. _ACS Catalysis_ , 11(10):6059–6072, 2021.
+
+- Stefan Chmiela, Alexandre Tkatchenko, Huziel E Sauceda, Igor Poltavsky, Kristof T Schütt, and Klaus-Robert Müller. Machine learning of accurate energy-conserving molecular force fields. _Science advances_ , 3(5):e1603015, 2017.
+
+- Stefan Chmiela, Valentin Vassilev-Galindo, Oliver T Unke, Adil Kabylda, Huziel E Sauceda, Alexandre Tkatchenko, and Klaus-Robert Müller. Accurate global machine learning force fields for molecules with hundreds of atoms. _Science Advances_ , 9(2):eadf0873, 2023.
+
+- Pierre-Paul De Breuck, Geoffroy Hautier, and Gian-Marco Rignanese. Materials property prediction for limited datasets enabled by feature selection and joint learning with modnet. _npj Computational Materials_ , 7(1):83, 2021.
+
+- Jianyuan Deng, Zhibo Yang, Iwao Ojima, Dimitris Samaras, and Fusheng Wang. Artificial intelligence in drug discovery: applications and techniques. _Briefings in Bioinformatics_ , 23(1), 2022.
+
+- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. _arXiv preprint arXiv:1810.04805_ , 2018.
+
+- Uri Dinur and Arnold T Hagler. New approaches to empirical force fields. _Reviews in computational chemistry_ , 2:99–164, 1991.
+
+- Alexander Dunn, Qi Wang, Alex Ganose, Daniel Dopp, and Anubhav Jain. Benchmarking materials property prediction methods: the matbench test set and automatminer reference algorithm. _npj Computational Materials_ , 6(1):138, 2020.
+
+- Peter Eastman, Pavan Kumar Behara, David L Dotson, Raimondas Galvelis, John E Herr, Josh T Horton, Yuezhi Mao, John D Chodera, Benjamin P Pritchard, Yuanqing Wang, et al. Spice, a dataset of drug-like molecules and peptides for training machine learning potentials. _Scientific Data_ , 10(1):11, 2023.
+
+Rui Feng, Qi Zhu, Huan Tran, Binghong Chen, Aubrey Toland, Rampi Ramprasad, and Chao Zhang. May the force be with you: Unified force-centric pre-training for 3d molecular conformations. _arXiv preprint arXiv:2308.14759_ , 2023a.
+
+11
+
+- Shikun Feng, Yuyan Ni, Yanyan Lan, Zhi-Ming Ma, and Wei-Ying Ma. Fractional denoising for 3d molecular pre-training. In _International Conference on Machine Learning_ , pages 9938–9961. PMLR, 2023b.
+
+- Johannes Gasteiger, Janek Groß, and Stephan Günnemann. Directional message passing for molecular graphs. In _International Conference on Learning Representations_ , 2020. URL [URL removed]
+
+- Johannes Gasteiger, Muhammed Shuaibi, Anuroop Sriram, Stephan Günnemann, Zachary Ward Ulissi, C Lawrence Zitnick, and Abhishek Das. Gemnet-oc: developing graph neural networks for large and diverse molecular simulation datasets. _Transactions on Machine Learning Research_ , 2022.
+
+- MA González. Force fields and molecular dynamics simulations. _École thématique de la Société Française de la Neutronique_ , 12:169–200, 2011.
+
+- Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. _arXiv preprint arXiv:1801.06146_ , 2018.
+
+Weihua Hu, Matthias Fey, Hongyu Ren, Maho Nakata, Yuxiao Dong, and Jure Leskovec. Ogb-lsc: A large-scale challenge for machine learning on graphs. _arXiv preprint arXiv:2103.09430_ , 2021.
+
+- Rui Jiao, Jiaqi Han, Wenbing Huang, Yu Rong, and Yang Liu. 3d equivariant molecular graph pretraining. _arXiv preprint arXiv:2207.08824_ , 2022.
+
+- Yeonghun Kang, Hyunsoo Park, Berend Smit, and Jihan Kim. Moftransformer: A multi-modal pre-training transformer for universal transfer learning in metal-organic frameworks. 2022.
+
+- Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pages 7482–7491, 2018.
+
+- Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _arXiv preprint arXiv:1412.6980_ , 2014.
+
+- Johannes Klicpera, Florian Becker, and Stephan Günnemann. Gemnet: Universal directional graph neural networks for molecules. _arXiv preprint arXiv:2106.08903_ , 2021.
+
+- Adeesh Kolluru, Nima Shoghi, Muhammed Shuaibi, Siddharth Goyal, Abhishek Das, C Lawrence Zitnick, and Zachary Ulissi. Transfer learning using attentions across atomic systems with graph neural networks (taag). _The Journal of Chemical Physics_ , 156(18):184702, 2022a.
+
+- Adeesh Kolluru, Muhammed Shuaibi, Aini Palizhati, Nima Shoghi, Abhishek Das, Brandon Wood, C Lawrence Zitnick, John R Kitchin, and Zachary W Ulissi. Open challenges in developing generalizable large scale machine learning models for catalyst discovery. _arXiv preprint arXiv:2206.02005_ , 2022b.
+
+- David Peter Kovacs, Ilyes Batatia, Eszter Sara Arany, and Gabor Csanyi. Evaluation of the mace force field architecture: from medicinal chemistry to materials science. _arXiv preprint arXiv:2305.14247_ , 2023.
+
+- Vitaly Kurin, Alessandro De Palma, Ilya Kostrikov, Shimon Whiteson, and Pawan K Mudigonda. In defense of the unitary scalarization for deep multi-task learning. _Advances in Neural Information Processing Systems_ , 35:12169–12183, 2022.
+
+- Alexandre Lacoste, Alexandra Luccioni, Victor Schmidt, and Thomas Dandres. Quantifying the carbon emissions of machine learning. _arXiv preprint arXiv:1910.09700_ , 2019.
+
+- Yi-Lun Liao and Tess Smidt. Equiformer: Equivariant graph attention transformer for 3d atomistic graphs. _arXiv preprint arXiv:2206.11990_ , 2022.
+
+- Shengchao Liu, Hanchen Wang, Weiyang Liu, Joan Lasenby, Hongyu Guo, and Jian Tang. Pretraining molecular graph representation with 3d geometry. _arXiv preprint arXiv:2110.07728_ , 2021.
+
+12
+
+Shengchao Liu, Hongyu Guo, and Jian Tang. Molecular geometry pretraining with se (3)-invariant denoising distance matching. _arXiv preprint arXiv:2206.13602_ , 2022.
+
+Zhihai Liu, Yan Li, Li Han, Jie Li, Jie Liu, Zhixiong Zhao, Wei Nie, Yuchen Liu, and Renxiao Wang. Pdb-wide collection of binding data: current status of the pdbbind database. _Bioinformatics_ , 31(3): 405–412, 2015.
+
+- Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. _arXiv preprint arXiv:1608.03983_ , 2016.
+
+- Albert Musaelian, Simon Batzner, Anders Johansson, Lixin Sun, Cameron J Owen, Mordechai Kornbluth, and Boris Kozinsky. Learning local equivariant representations for large-scale atomistic dynamics. _Nature Communications_ , 14(1):579, 2023.
+
+- Giorgio Pesciullesi, Philippe Schwaller, Teodoro Laino, and Jean-Louis Reymond. Transfer learning enables the molecular transformer to predict regio-and stereoselective reactions on carbohydrates. _Nature communications_ , 11(1):4874, 2020.
+
+- Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole Von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. _Scientific data_ , 1(1):1–7, 2014.
+
+- Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. _arXiv preprint arXiv:1907.10903_ , 2019.
+
+- Andrew S Rosen, Shaelyn M Iyer, Debmalya Ray, Zhenpeng Yao, Alan Aspuru-Guzik, Laura Gagliardi, Justin M Notestein, and Randall Q Snurr. Machine learning the quantum-chemical properties of metal–organic frameworks for accelerated materials discovery. _Matter_ , 4(5):1578– 1597, 2021.
+
+- Lars Ruddigkeit, Ruud van Deursen, Lorenz C. Blum, and Jean-Louis Reymond. Enumeration of 166 billion organic small molecules in the chemical universe database gdb-17. _Journal of Chemical Information and Modeling_ , 52(11):2864–2875, 2012a. doi: 10.1021/ci300415d. URL [URL removed] PMID: 23088335.
+
+- Lars Ruddigkeit, Ruud Van Deursen, Lorenz C Blum, and Jean-Louis Reymond. Enumeration of 166 billion organic small molecules in the chemical universe database gdb-17. _Journal of chemical information and modeling_ , 52(11):2864–2875, 2012b.
+
+Robin Ruff, Patrick Reiser, Jan Stühmer, and Pascal Friederich. Connectivity optimized nested graph networks for crystal structures. _arXiv preprint arXiv:2302.14102_ , 2023.
+
+- Mathias Schreiner, Arghya Bhowmik, Tejs Vegge, Jonas Busk, and Ole Winther. Transition1x-a dataset for building generalizable reactive machine learning potentials. _Scientific Data_ , 9(1):779, 2022.
+
+- Kristof Schütt, Pieter-Jan Kindermans, Huziel Enoc Sauceda Felix, Stefan Chmiela, Alexandre Tkatchenko, and Klaus-Robert Müller. Schnet: A continuous-filter convolutional neural network for modeling quantum interactions. In _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017. URL [URL removed] files/paper/2017/file/303ed4c69846ab36c2904d3ba8573050-Paper.pdf.
+
+- Uri Shaham, Maha Elbayad, Vedanuj Goswami, Omer Levy, and Shruti Bhosale. Causes and cures for interference in multilingual translation. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 15849–15863, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long. 883. URL [URL removed]
+
+Justin S Smith, Benjamin T Nebgen, Roman Zubatyuk, Nicholas Lubbers, Christian Devereux, Kipton Barros, Sergei Tretiak, Olexandr Isayev, and Adrian Roitberg. Outsmarting quantum chemistry through transfer learning. 2018.
+
+13
+
+- Justin S Smith, Benjamin T Nebgen, Roman Zubatyuk, Nicholas Lubbers, Christian Devereux, Kipton Barros, Sergei Tretiak, Olexandr Isayev, and Adrian E Roitberg. Approaching coupled cluster accuracy with a general-purpose neural network potential through transfer learning. _Nature communications_ , 10(1):1–8, 2019.
+
+- Justin S Smith, Roman Zubatyuk, Benjamin Nebgen, Nicholas Lubbers, Kipton Barros, Adrian E Roitberg, Olexandr Isayev, and Sergei Tretiak. The ani-1ccx and ani-1x data sets, coupled-cluster and density functional theory properties for molecules. _Scientific data_ , 7(1):1–10, 2020.
+
+- Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. _arXiv preprint arXiv:2010.02502_ , 2020.
+
+- Anuroop Sriram, Abhishek Das, Brandon M Wood, and C. Lawrence Zitnick. Towards training billion parameter graph neural networks for atomic simulations. In _International Conference on Learning Representations_ , 2022. URL [URL removed]
+
+- a T Sundius. Scaling of ab initio force fields by molvib. _Vibrational Spectroscopy_ , 29(1-2):89–95, 2002.
+
+- Philipp Thölke and Gianni De Fabritiis. Torchmd-net: equivariant transformers for neural network based molecular potentials. _arXiv preprint arXiv:2202.02541_ , 2022.
+
+- Richard Tran, Janice Lan, Muhammed Shuaibi, Siddharth Goyal, Brandon M Wood, Abhishek Das, Javier Heras-Domingo, Adeesh Kolluru, Ammar Rizvi, Nima Shoghi, et al. The open catalyst 2022 (oc22) dataset and challenges for oxide electrocatalysis. _arXiv preprint arXiv:2206.08917_ , 2022.
+
+- Masashi Tsubaki and Teruyasu Mizoguchi. Quantum deep descriptor: Physically informed transfer learning from small molecules to polymers. _Journal of Chemical Theory and Computation_ , 17(12): 7814–7821, 2021.
+
+- Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. _Chemical science_ , 9(2):513–530, 2018.
+
+- Hironao Yamada, Chang Liu, Stephen Wu, Yukinori Koyama, Shenghong Ju, Junichiro Shiomi, Junko Morikawa, and Ryo Yoshida. Predicting materials properties with little data using shotgun transfer learning. _ACS central science_ , 5(10):1717–1730, 2019.
+
+- Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsea Finn. Gradient surgery for multi-task learning. _Advances in Neural Information Processing Systems_ , 33: 5824–5836, 2020.
+
+- Sheheryar Zaidi, Michael Schaarschmidt, James Martens, Hyunjik Kim, Yee Whye Teh, Alvaro Sanchez-Gonzalez, Peter Battaglia, Razvan Pascanu, and Jonathan Godwin. Pre-training via denoising for molecular property prediction. _arXiv preprint arXiv:2206.00133_ , 2022.
+
+- Shuxin Zheng, Jiyan He, Chang Liu, Yu Shi, Ziheng Lu, Weitao Feng, Fusong Ju, Jiaxi Wang, Jianwei Zhu, Yaosen Min, et al. Towards predicting equilibrium distributions for molecular systems with deep learning. _arXiv preprint arXiv:2306.05445_ , 2023.
+
+- Gengmo Zhou, Zhifeng Gao, Qiankun Ding, Hang Zheng, Hongteng Xu, Zhewei Wei, Linfeng Zhang, and Guolin Ke. Uni-mol: A universal 3d molecular representation learning framework. In _The Eleventh International Conference on Learning Representations_ , 2023a. URL https: //openreview.net/forum?id=6K2RM6wVqKu.
+
+- Gengmo Zhou, Zhifeng Gao, Qiankun Ding, Hang Zheng, Hongteng Xu, Zhewei Wei, Linfeng Zhang, and Guolin Ke. Uni-mol: A universal 3d molecular representation learning framework. 2023b.
+
+- Jinhua Zhu, Yingce Xia, Lijun Wu, Shufang Xie, Tao Qin, Wengang Zhou, Houqiang Li, and Tie-Yan Liu. Unified 2d and 3d pre-training of molecular representations. In _Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining_ , pages 2626–2636, 2022.
+
+- C Lawrence Zitnick, Lowik Chanussot, Abhishek Das, Siddharth Goyal, Javier Heras-Domingo, Caleb Ho, Weihua Hu, Thibaut Lavril, Aini Palizhati, Morgane Riviere, et al. An introduction to electrocatalyst design using machine learning for renewable energy storage. _arXiv preprint arXiv:2010.09435_ , 2020.
+
+14
+
+## APPENDIX
+
+## **Table of Contents:**
+
+- A Additional Pretraining Comparisons
+
+- B Additional Results and Experiments
+
+- C Embedding and Activation Visualizations
+
+- D Additional Method Information
+
+- E Structure-Wise Loss Reduction Code
+
+- F Training Setup
+
+- G Model Training Times and CO2 Impact
+
+- H Additional Dataset Details
+
+- I Dataset Overlap
+
+- J Model and Optimization Hyperparameters
+
+## A ADDITIONAL PRETRAINING COMPARISONS
+
+We compare our finetuning results on all benchmarks with the publicly available checkpoint from Zaidi et al. (2022) that performs pretraining via denoising. The only checkpoint available is with TorchMDNet backbone and not their best-performing model, therefore we just add results for pretraining ET+NN where NN stands for noisy nodes as described in the original work. In this method, they pretrain on the PCQM4Mv2 (Hu et al., 2021) dataset which is a 3D small molecule dataset. We perform significantly better on all datasets (including in the small molecule domain) showing the impact of our supervised joint pretraining approach. A model trained on just a small molecule dataset in a denoising setup focused on equilibrium systems performs worse than the model trained on a supervised setup on non-equilibrium combining datasets from multiple chemical domains. Our Figure 3 in the main paper also demonstrated the relative improvement coming from pretraining relative to models performed from scratch.
+
+|**Molecules**|**Pretrained**|**JMP-S**|**JMP-L**|
+|---|---|---|---|
+||**ET+NN**|||
+|Aspirin|15.1|6.7|**5.1**|
+|Benzene|1.0|0.7|**0.3**|
+|Ethanol|8.9|2.8|**2.0**|
+|Malonaldehyde|13.0|5.3|**4.0**|
+|Naphthalene|4.5|2.2|**1.4**|
+|Salicylic acid|9.8|4.6|**3.4**|
+|Toluene|4.8|2.3|**1.5**|
+|Uracil|6.4|4.0|**2.5**|
+|Paracetamol|12.6|5.3|**4.0**|
+|Azobenzene|7.6|4.5|**3.3**|
+
+Table 7: Force MAE errors in meV/Å on the test split of the rMD17 dataset.
+
+## B ADDITIONAL RESULTS AND EXPERIMENTS
+
+## B.1 EXPANDED RMD17 RESULTS: TRAINING ON 50 EXAMPLES
+
+Following the idea presented by Batatia et al. (2022) we reduced the rMD17 per molecule training set size from 1000 _→_ 50 examples and evaluated the performance of the JMP-L model. The test set remained unchanged. Table 10 shows these results. The large pre-trained model provided state-of-theart performance on 6 out of 10 molecules and gives competitive results on the rest. Most notably, we
+
+15
+
+|**Target (Units)**|**Pretrained**|**JMP-S**|**JMP-L**|
+|---|---|---|---|
+||**ET+NN**|||
+|_µ_(_D_)|0.015|0.010|**0.008**|
+|_α_(_a_3 0)|0.069|0.037|**0.032**|
+|_ε_HOMO (_meV_)|23.1|11.1|**8.8**|
+|_ε_LUMO (_meV_)|19.1|10.8|**8.6**|
+|∆_ε_(_meV_)|39.8|23.1|**19.1**|
+|_R_2 (_a_2 0)|0.556|0.200|**0.163**|
+|ZPVE (_meV_)|1.1|1.0|**0.9**|
+|_U_0 (_meV_)|6.0|3.3|**2.9**|
+|_U_ (_meV_)|6.0|3.3|**2.8**|
+|_H_ (_meV_)|6.1|3.3|**2.8**|
+|_G_(_meV_)|6.9|4.5|**4.3**|
+|_Cν_ (cal/mol K)|0.021|0.018|**0.017**|
+
+Table 8: Average absolute error results on all targets of the QM9 dataset.
+
+|**Molecule**|**Pretrained**|**JMP-S**|**JMP-L**|
+|---|---|---|---|
+||**ET+NN**|||
+|Ac-Ala3-NHMe|8.53|2.64|**1.92**|
+|DHA|7.23|2.01|**1.37**|
+|Stachyose|10.12|2.69|**1.73**|
+|AT-AT|10.35|3.02|**1.98**|
+|AT-AT-CG-CG|8.81|3.28|**2.11**|
+|Buckyball Catcher|-|3.08|**2.26**|
+|Double Walled Nanotubes|-|8.36|**6.17**|
+|||||
+|Solvated Amino Acids|7.11|1.60|**1.33**|
+|Dipeptides|6.56|1.32|**1.02**|
+
+Table 9: Force MAE results in meV/Å on the test splits for large molecule datasets (MD22 and SPICE). Missing numbers are due to runs failing or hitting NaNs.
+
+16
+
+see that the fine-tuned model performs significantly better than the GN-OC-L model. These results offer preliminary evidence that reasonable few-shot performance may be achievable with a large pre-trained atomic model.
+
+|**Molecules** **NequIP** **MACE**|**GN-OC-L** **JMP-L**|
+|---|---|
+|||
+|Aspirin 52.0 43.9 Benzene 2.9 **2.7** Ethanol 40.2 32.6 Malonaldehyde 52.5 43.3 Naphthalene 10.0 **9.2** Salicylic acid 35.0 28.4 Toluene 15.1 **12.1** Uracil 40.1 25.9 Paracetamol 39.7 31.5 Azobenzene 20.0 **17.7**|119.7 **36.8** 8.8 2.8 95.3 **22.2** 159.2 **42.9** 39.5 9.6 108.5 **26.4** 53.3 12.4 135.5 **25.8** 66.4 **27.3** 139.0 17.8|
+
+Table 10: Average absolute force prediction errors in meV/Å on the test split of the revised MD17 dataset comparing the performance of fine-tuning our pre-trained model with GN-OC trained from scratch, as well as other state-of-the-art results. For all runs, the train set was limited to only 50 examples.
+
+## B.2 PDBBIND V2013 BINDING AFFINITY RESULTS
+
+We also evaluate the performance of our pre-trained model on the core set of the PDBBind v2013 dataset (Liu et al., 2015), provided in the MoleculeNet benchmark (Wu et al., 2018), which contains 154 protein-ligand complexes. The dataset contains 3D structures of protein-ligand complexes, as well as the binding affinity of the ligand to the protein. Following MoleculeNet, we use a random 80%/10%/10% train/validation/test split, and we report the RMSE metric. Table 11 shows the results of our pre-trained model compared to the state-of-the-art results. We see that our pre-trained model achieves state-of-the-art performance on this dataset, further demonstrating that our pre-trained model can be used for a wide range of molecular tasks, including those that involve protein-ligand complexes.
+
+|**Method**|_−log Kd_ _Ki_|**RMSE**|
+|---|---|---|
+|**JMP-L**||**1.36**|
+|**DeepBindGCN_RG_x**||1.49|
+|**SE-OnionNet**||1.69|
+|**DeepBindRG**||1.81|
+|**GraphBAR (dataset 4, best)**||1.63|
+|**BAPA**||1.45|
+
+Table 11: Binding affinity RMSE results on the PDBBind v2013 dataset.
+
+## B.3 ADDITIONAL ABLATION STUDIES
+
+**Fully balanced datasets:** Finding the optimal dataset scaling is important for pre-training with datasets of variable size. While we investigated dataset scaling with a temperature of 2.0 in the main ablation results, we additionally tested the impact of fully balancing the datasets (high temperature). The results for this ablation can be found in Table 13, labeled as B + **Fully balanced** . Compared to the base pre-trained model where there was no dataset scaling, the fully balanced run provided a mean relative improvement (RI) of 2.61% on the ablation fine-tuning tasks. This is very similar to the improvement we see with temperature 2.0 (mean RI over base of 2.29%), but it requires more training steps to reach an epoch of the largest dataset. As a result, we used temperature 2.0 dataset scaling for all our models trained on the full pre-training dataset.
+
+17
+
+**Threshold loss:** DFT is an approximate method and as a result the labels (e.g. energy and forces) in DFT datasets have some error associated with them. In our multi-dataset case, many datasets are computed using different DFT engines and levels of theory, leading to distinct noise distributions for each dataset. To address this, we experiment with a threshold loss which measures the distance between the model’s prediction and the ground-truth (i.e., DFT-computed) label, but only penalizes predictions that are outside of a given threshold. To implement this threshold loss, we modify the loss original functions, _Li_ , by incorporating the predefined physically motivated margins for each dataset as shown in Table 12. The equation for the threshold loss is shown in Equation (2).
+
+**==> picture [292 x 25] intentionally omitted <==**
+
+where _L_[0] _i_[is the original loss function for dataset] _[ i]_[, and] _[ M][i]_[is the metric used to compute the margin] for dataset _i_ . For all our datasets, we use the mean absolute error (MAE) as the metric for computing the margin. Table 13 shows ablation studies for a model which used this threshold loss mechanism, labeled as B + T2 + SWL + **Threshold Loss** . While our initial experiments indicated that the threshold loss was a promising modification, our final ablation results show that the threshold loss hurts performance.
+
+|Dataset|Energy (eV)|Forces (eV/Å)|
+|---|---|---|
+|ANI-1x|0.043|0.01|
+|Transition-1x|0.043|0.01|
+|OC20|0.1|0.03|
+|OC22|0.1|0.03|
+
+Table 12: Summary of energy and force threshold values for different datasets.
+
+**Automatic Task Weighting with PCGrad:** PCGrad (Yu et al., 2020) is a “gradient surgery” method that attempts to address the optimization challenges in multi-task learning by projecting each task’s gradient onto the normal plane of the gradient of any other task that has a conflicting gradient. We evaluate the usage of PCGrad alongside our structure-wise loss reduction strategy. Our experiments showed that PCGrad ( **PCG** ) does not offer performance improvements over **SWL** . These results are consistent with Kurin et al. (2022), which shows that adequate regularization can mitigate the need for complex multi-task optimization methods.
+
+|**Ablations**|**Mean RI (%)**|
+|---|---|
+|Base (**B**)|0%|
+|B +**Fully balanced**|**2.61%**|
+|B + Temperature 2.0 (**T2**)|2.29%|
+|T2 + SW Loss Averaging (**SWL**)|7.68%|
+|SWL +**Threshold Loss**|**5.38%**|
+|SWL + PCGrad (**PCG**)|6.48%|
+|SWL + Weight Decay (**WD**)|11.37%|
+|SWL + Dropout (**DO**)|11.41%|
+|SWL + Edge Dropout (**ED**)|13.18%|
+|SWL + WD + EMA Weights (**EMA**)|12.38%|
+|EMA + OC20 Only (**OC20**)|**-9.88 %**|
+
+Table 13: Additional experiments with all ablation results
+
+## B.4 FINE-TUNING LR SCHEDULING
+
+Learning rate scheduling has a large impact on the downstream fine-tuning performance. We utilize with a robust learning rate scheduling strategy that we employ in all our fine-tuning experiments. Namely, we combine the ideas behind **linear warmup** , **cosine decay** (Loshchilov and Hutter, 2016),
+
+18
+
+**Layerwise Learning Rate Decay (LLRD)** (Howard and Ruder, 2018), and **ReduceLROnPlateau** . Let _α_ be our learning rate, _Nw_ be the number of warmup epochs, _fw_ be the warmup initial learning rate coefficient, _Nc_ be the number of cosine decay epochs, _fc_ be the cosine decay final learning rate coefficient, _Np_ be the number of patience epochs for ReduceLROnPlateau, _fp_ be the patience learning rate coefficient, and _Di_ be the LLRD decay coefficient for layer _i_ . Then, our learning rate scheduling strategy for layer _i_ is described below:
+
+1. **Linear Warmup** : During the initial phase of training, the learning rate _α_ begins at _fw · α · Di_ and gradually escalates to reach _α · Di_ over _Nw_ warmup epochs. This strategy aids in preventing substantial gradients at the beginning of training, thereby ensuring a stable optimization process.
+
+2. **Cosine Decay** : After the warmup phase, we transition to a cosine decay strategy. The learning rate starts from _α · Di_ and decays to _fc · α_ over _Nc_ epochs. This phase facilitates the gradual reduction of the learning rate, enabling efficient model convergence. The final learning rate after the cosine decay phase is the same for all layers, meaning LLRD only influences the warmup and cosine decay phases.
+
+3. **ReduceLROnPlateau** : The final phase is governed by the ReduceLROnPlateau strategy. It commences with the learning rate set at _fc · α_ , and if the validation loss does not decrease for _Np_ epochs, the learning rate is decreased by multiplying it with _fp_ . This dynamic adjustment of the learning rate based on validation loss performance assists in fine-tuning the model parameters towards the end of the training process.
+
+This scheduling strategy provides a robust method to adjust the learning rate across different phases of the model training, thereby balancing the need for both rapid learning and careful optimization as the model converges to the best solution. Table 14 shows the fine-tuning performance of the **JMP-L** model when fine-tuned on the Aspirin molecule of the rMD17 dataset using different components of our LR scheduling strategy. We observe that the performance of the model improves as we add each component of the LR scheduling strategy. We can see that all components of our scheduling strategy contribute to the performance of the model. Overall, we see a massive improvement of 31% in the force MAE when we use our full LR scheduling strategy when compared to simply using a cosine decay strategy. This demonstrates the importance of a robust learning rate scheduling strategy for fine-tuning the model on downstream tasks. For our final runs, the specific values of the LR scheduling hyperparameters can be found in Appendix J.
+
+|**LR Schedule**|**Forces MAE**|
+|---|---|
+|Warmup + Cos|7.8|
+|Warmup + Cos + LLRD|6.4|
+|Warmup + Cos + LLRD + RLP|5.1|
+
+Table 14: Impact of learning rate schedules on Aspirin Force MAE (meV/Å) when evaluated on the validation set. Cos: Cosine Decay, LLRD: Layerwise Learning Rate Decay, RLP: ReduceLROnPlateau
+
+## C EMBEDDING AND ACTIVATION VISUALIZATIONS
+
+In this section, we illustrate the potency of our pre-trained model’s embeddings through visualizations. The t-SNE plot in Figure 5 represents the node-level ( _h_ ) and edge-level ( _m_ ) GN-OC embeddings of the JMP-L model, computed, averaged across the entire system as shown in Equation (3), where _N_ is the number of nodes in the system, _E_ is the number of edges in the system, _h ∈_ ( _N, Dh_ ) is the GNOC node embedding tensor for the system, and _m ∈_ ( _E, Dm_ ) is the GN-OC edge embedding tensor for the system. We randomly select structures across all pre-training and fine-tuning development datasets (as described in Appendix H.3) and compute these aggregated system-level embeddings. Each data point corresponds to a unique structure, and its color indicates the dataset from which the structure originated.
+
+**==> picture [277 x 30] intentionally omitted <==**
+
+19
+
+**==> picture [354 x 215] intentionally omitted <==**
+
+**----- Start of picture text -----**
+OC20 Trans1x QM9 Matbench MD17 OC22 ANI1x SPICE QMOF MD22 (a) Node Embeddings (b) Edge Embeddings **----- End of picture text -----**
+
+Figure 5: t-SNE visualizations of the node-level ( _h_[˜] ) and edge-level ( _m_ ˜ ) JMP-L embeddings for randomly selected structures from all pre-training and fine-tuning development datasets. Each point represents a structure, and the color indicates the dataset from which the structure was sampled.
+
+**==> picture [378 x 153] intentionally omitted <==**
+
+Figure 6: Visualization of the cosine similarity between the learned atom embeddings for H, C, N, O, Co, and Cu with all other elements in the dataset. Note that nearby atoms in the periodic table have more similar embeddings, which is consistent with known element properties.
+
+20
+
+Furthermore, Figure 6 provides an intriguing visualization of the cosine similarities between the learned atom embeddings for a selection of elements (H, C, N, O, Co, and Cu) with all other elements in the dataset. The plot reveals that atoms located adjacently on the periodic table exhibit more similar embeddings, a result that aligns well with their known elemental properties. This underlines the model’s ability to accurately capture and encode fundamental chemical properties within its learned embeddings.
+
+## C.1 EXACT PERCENTAGES FOR FIGURE 2
+
+The per-dataset averages values (with translucent shading) for Figure 2 are: (a) QM9 -10.7%, MD17 -5.4%, MD22 -15.4%, SPICE -25.6%, Matbench 0.4%, QMOF 2.2%; (b) QM9 14.3%, MD17 31.6%, MD22 31.1%, SPICE 19.5%, Matbench 9.4%, QMOF 9.5%; and (c) QM9 49.5%; MD17 77.9%; MD22 61.0%; SPICE 74.6%; Matbench 45.0%; QMOF 32.0%.
+
+## D ADDITIONAL METHOD INFORMATION
+
+## D.1 OPTIMAL TASK WEIGHTING AND REGULARIZATION
+
+The problem of optimal task weighting is an active area of research in multi-task learning. Existing works range from dynamically weighting tasks based on uncertainty estimates computed from their loss (Kendall et al., 2018) to performing “gradient surgery” on per-task gradients to alleviate conflicting gradients. However, recent work by Kurin et al. (2022) has shown that _unitary scalarization_ , or simply summing the losses across all tasks, matches or outperforms most existing methods, provided that adequate regularization is used. Inspired by these findings, we use unitary scalarization for pre-training, and we use the following regularization techniques: We use a weight decay of 0 _._ 1, edge dropout (Rong et al., 2019) with _p_ = 0 _._ 1, and exponential moving average with a decay of 0 _._ 99 on the model weights.
+
+## D.2 FINE-TUNING FORCE COMPUTATION
+
+For fine-tuning tasks with force labels, we have the option of using the directly computed forces (i.e., using the direct equivariant block) or computing the forces by taking the gradient of the energy with respect to the atomic positions. Our initial experiments showed that JMP works well with both methods. In our evaluations, however, we chose to compute forces conservatively by taking the gradient of the energy with respect to the atomic positions, as this is the standard approach in the literature.
+
+## E STRUCTURE-WISE LOSS REDUCTION CODE
+
+In this section, we provide the code for the structure-wise loss reduction (SWL) loss function, as well as the original GemNet-OC loss function for comparison. The code is written in PyTorch, and is shown in Listings 1 and 2. Table 15 below maps the notation used in the sample code to the notation used in Equation (1) in the main text.
+
+1 def gemnet_oc_loss( 2 E: Tensor, # (batch_size,) 3 F: Tensor, # ((batch_size*num_atoms), 3) 4 E_target: Tensor, # (batch_size,) 5 F_target: Tensor, # ((batch_size*num_atoms), 3) 6 batch_idx: Tensor, # ((batch_size*num_atoms),) 7 lambda_E: Tensor, # scalar 8 lambda_F: Tensor, # scalar
+
+2The batch_idx tensor is a product of PyTorch Geometric’s sparse graph batching, which constructs a batched graph as one large graph with disconnected components. The batch_idx tensor maps each node in the batched graph to its corresponding component in the original batch. In the notation of the paper, we do not use this explicitly to simplify the notation. Instead, we use subscripts on node-level quantities to denote the component that the node belongs to. For example, _Fb,i_ denotes the force vector of the _i_ -th atom in the _b_ -th component of the batched graph, or _Nb_ denotes the number of atoms in the _b_ -th component of the batched graph.
+
+21
+
+|**Sample Code Notation**|**Paper Notation**|
+|---|---|
+|E|_E_|
+|F|_F_|
+|E_target|ˆ_E_|
+|F_target|ˆ_F_|
+|lambda_E|_λE_|
+|lambda_F|_λF_|
+|batch_idx|Not present2|
+|dataset_idx|_W_|
+
+Table 15: Mapping of notation used in the sample code to the notation used in Equation (1) in the main text.
+
+9 ): 10 # Energy loss computation 11 systemwise_energy_loss = (E - E_target) ** 2 # (batch_size,) 12 energy_loss = lambda_E * torch.mean( 13 systemwise_energy_loss 14 ) # scalar 15 16 # Force loss computation 17 atomwise_F_loss = torch.norm( 18 F - F_target, 19 p=2, 20 dim=-1 21 ) # (batch_size*num_atoms,) 22 force_loss = lambda_F * torch.mean(atomwise_F_loss) # scalar 23 24 return energy_loss + force_loss
+
+Listing 1: Original GemNet-OC loss function
+
+1 def jmp_loss( 2 E: Tensor, # (batch_size,) 3 F: Tensor, # ((batch_size*num_atoms), 3) 4 E_target: Tensor, # (batch_size,) 5 F_target: Tensor, # ((batch_size*num_atoms), 3) 6 batch_idx: Tensor, # ((batch_size*num_atoms),) 7 dataset_idx: Tensor, # (batch_size,) 8 lambda_E: Tensor, # (num_datasets,) 9 lambda_F: Tensor, # (num_datasets,) 10 ): 11 # Energy loss computation 12 # Energy computation is the same as the 13 # original GemNet-OC loss function, 14 # with the only difference being that 15 # we have task-specific energy loss coefficients. 16 systemwise_energy_loss = (E - E_target) ** 2 # (batch_size,) 17 energy_loss = torch.mean( 18 systemwise_energy_loss 19 *[lambda_E[dataset_idx]] 20 ) # scalar 21 22 # Force loss computation 23 atomwise_F_loss = torch.norm( 24 F - F_target, 25 p=2, 26 dim=-1 27 ) # (batch_size*num_atoms,) 28 # The only difference is that we now 29 # perform a structure-level averaging,
+
+22
+
+30 # instead of an atom-level averaging. 31 structurewise_force_loss = scatter_mean( 32 atomwise_F_loss, 33 batch_idx 34 ) # (batch_size,) 35 # Similarly to the energy loss, we now have 36 # task-specific force loss coefficients. 37 force_loss = torch.mean( 38 structurewise_force_loss 39 *[lambda_F[dataset_idx]] 40 ) # scalar 41 42 return energy_loss + force_loss Listing 2: Our proposed loss function
+
+## F TRAINING SETUP
+
+## F.1 PRE-TRAINING
+
+**Optimizer** We use the AdamW (Kingma and Ba, 2014) optimizer with a learning rate of 0 _._ 0003, _β_ 1 = 0 _._ 9, _β_ 2 = 0 _._ 95, and a weight decay value of 0 _._ 1.
+
+**Learning Rate Scheduling** . During pre-training, we use a linear-warmup with cosine decay learning rate schedule. The linear warmup starts with 0 _._ 2 _·_ LR and warms up to LR over 2000 steps. The cosine decay reduces the learning rate to 0 _._ 1 _·_ LR over 2 epochs.
+
+## F.2 FINE-TUNING
+
+**Optimizer** We use the AdamW (Kingma and Ba, 2014) optimizer with a learning rate of 0 _._ 00008, _β_ 1 = 0 _._ 9, _β_ 2 = 0 _._ 95, and a weight decay value of 0 _._ 1.
+
+**Loss Function** . We use the MAE loss function for scalar targets (e.g., energy, band-gap) and the L2 distance loss function vector targets (e.g., forces).
+
+**Learning Rate Scheduling** . Across all fine-tuning tasks, we utilize the following learning rate schedule: (1) Warmup over 5 epochs, (2) cosine decay over 32 epochs, and (3) reduce on plateau for the remainder of training. We also utilize Layer-wise Learning Rate Decay (LLRD) (Howard and Ruder, 2018) during phases (1) and (2). LLRD employs higher initial learning rates for final, more task-specific layers. The final learning rate after phase (2), however, is the same for all layers. See Appendix B.4 for more information on the fine-tuning LR scheduling.
+
+**Early Stopping** . All our fine-tuning runs use the following stopping criteria: (1) Early stopping with a patience of 50 epochs, (2) maximum of 500 epochs or 7 days of training, or (3) the learning rate dropping below 10 _[−]_[8] . For the rMD17 dataset, due to the small size of the train set, we use a patience of 1000 and a maximum of 100,000 epochs, similar to Musaelian et al. (2023).
+
+## G MODEL TRAINING TIMES AND CO2 IMPACT
+
+Table 16 shows the total training time (in GPU-hours) of pre-training our model on the pre-training datasets, fine-tuning the model on all fine-tuning datasets, and training baseline scratch models for each fine-tuning dataset. The substantial computational resources required for pre-training the models cannot be understated. These numbers, however, are significantly offset when considering the subsequent fine-tuning phase. Remarkably, the fine-tuned models, starting from the pre-trained checkpoints, demonstrated superior performance while utilizing approximately half of the computational resources required by the models trained from scratch. This efficacious use of resources when applying our technique substantiates its viability. Moreover, the initial investment of resources in pre-training the models is well compensated as these models, once trained, can be reused across multiple applications, thereby amplifying their utility and cost-effectiveness.
+
+All experiments were conducted using private infrastructure, which has a carbon efficiency of 0.432 kgCO2eq/kWh. A cumulative of 46400 hours of computation was performed on hardware of type Tesla V100-SXM2-32GB (TDP of 300W). Total emissions are estimated to be 6013.44 kgCO2eq of
+
+23
+
+which 100 percents were directly offset. Estimations were conducted using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
+
+|**Model**|**Time (GPU-hours)**|_CO_2**Emissions**|
+|---|---|---|
+|JMP-L Pre-Training|34400|4458.24|
+|JMP-S Pre-Training|5700|738.72|
+|JMP-L Fine-Tuning|3000|388.8|
+|Scratch GN-OC-L Training|3300|427.68|
+
+Table 16: Training times of different models in this work and their corresponding _CO_ 2 emission estimates
+
+## H ADDITIONAL DATASET DETAILS
+
+## H.1 PRE-TRAINING DATASETS
+
+For the purpose of pre-training, we selected two datasets from the catalysis domain, namely OC20 and OC22, as well as two small molecules datasets, ANI-1x and Transion-1x. These datasets were chosen due to their substantial training sizes and the diversity of structures they offer. Note that all of the pre-training datasets we used contain energy and forces labels.
+
+**Linear Referencing and Normalization:** The underlying DFT functional and DFT engine (e.g. VASP vs. Orca) used differs between our pre-training datasets, resulting in variations in energy magnitudes across them. To address these differences and establish a consistent energy reference, we first compute an element specific energy reference for each of these datasets independently. This is achieved by calculating a linear reference across the training split of each dataset to find the per-element contribution (Musaelian et al., 2023). Subsequently, we normalize the energy and force labels dataset-wise. Specifically, we divide the energy labels by their respective standard deviations, ensuring a standardized scale for comparison. The force labels are normalized by dividing them by the root-mean-square of the force components in the corresponding training set.
+
+**Open Catalyst 2020:** The Open Catalyst 2020 (OC20) dataset (Chanussot et al., 2021) is a large and diverse catalyst dataset comprising a training set of 130 million examples, including 55 elements, 82 adsorbates, and catalysts consisting of unaries, binaries, and ternaries. The OC20 dataset consists of DFT relaxation trajectories, where the atom positions are iteratively updated based on the forces to minimize the energy. There are a total of 640k relaxations with an average trajectory length of 200, which makes the total training data _∼_ 130M examples. In order to get better sampling across the potential energy surface, the dataset also contains ab initio molecular dynamics (AIMD) data and rattled data where atom positions are randomly perturbed. The cumulative size of all these data amounts to 189 million entries. All the density functional theory (DFT) calculations conducted in this study utilized VASP with _RPBE_ functional. Due to the considerable size of the pre-training dataset, we needed to establish practical training parameters. Consequently, we designated a training size of 100 million entries for our large training set, along with 2 million entries for our development set. These sizes were chosen to strike a balance between computational feasibility and the inclusion of a substantial amount of data for training purposes.
+
+**Open Catalyst 2022:** The Open Catalyst 2022 (OC22) dataset, as presented in the work by Tran et al. (Tran et al., 2022), shares similarities with OC20 in terms of optimization trajectories involving adsorbates and catalyst surfaces. However, OC22 is more specialized and specifically focuses on oxide materials. While it may not possess the same level of diversity as OC20, it still provides valuable information within this specific context. The dataset comprises a total of 8M training data, which we employ in its entirety for our large run. Furthermore, we utilize 200k data from this dataset for our development run, ensuring a similar ratio of dataset sizes as our large run. It is important to note that for this study, a different DFT functional was employed compared to OC20. Specifically, the _PBE_ + _U_ functional was utilized in this work. The decision to use this functional was made to account for the specific characteristics and properties of oxide catalysts, providing a more accurate representation of their behavior.
+
+24
+
+**ANI-1x:** The ANI-1x dataset (Smith et al., 2020) is a small molecule conformation dataset containing C, H, N, and O atoms, created using the Gaussian software with the _wb_ 97 _x/_ 6 _−_ 31 _G_ ( _d_ ) electronic structure method. This is a diverse organic dataset generated through active learning through a pre-training ML potential. This dataset has a total of 5M DFT calculations. We screened out organic molecules that have less than 4 atoms from the training data as our backbone GemNet model can’t calculate quadruplets for these. We split the entire data into train, val, and test such that val and test have molecules that are not present in the train. We subsample 80k split for our development set out of the _∼_ 4M training data.
+
+**Transition-1x:** The Transition 1x dataset (Schreiner et al., 2022) contains close to 10M DFT calculations of forces and energies of molecular configurations at the _wB_ 97 _x/_ 6 _−_ 31 _G_ ( _d_ ) level of theory (similar to ANI-1x). The configurations in this dataset are on and around reaction pathways generated by running Nudged Elastic Band (NEB) on 10k organic reactions. Therefore, this dataset contains a more dense sampling of PES for every system as compared to the ANI-1x dataset. The train, val, and test splits for this dataset are pre-defined and we use the same splits. For our development set, we subsample 200k split out of the total 9M train data.
+
+## H.2 FINETUNING DATASETS
+
+To demonstrate the ability of our pre-trained models to generalize over a diverse set of fine-tuning tasks, we selected two datasets from three different atomic domains. We include QMOF and Matbench from the materials domain, MD17 and QM9 from the small molecules domain, and SPICE (dipeptides and solvated amino acids subsets) and MD22 from the large molecules domain.
+
+**QMOF:** The QMOF dataset (Rosen et al., 2021) is a database of approximately 15,000 experimentally synthesized metal organic frameworks (MOFs). We use a training dataset of 10,000 systems and split the remaining into validation and test sets. The band gap, which determines the electrical conductivity of a material, is an important property for identifying materials for electrocatalysis and energy applications, so we use it as the label for our models. It is worth noting that the non-referenced energy predictions for the other datasets (OC20, OC22, and ANI-1x) are extensive properties (i.e., the energy values depend on the size of the system), while the band gap is an intensive property (it does not depend on the size of the system). Therefore, we take a mean pooling of embeddings across nodes to calculate this scalar property.
+
+**MatBench:** Matbench (Dunn et al., 2020) is a benchmark for predicting the properties of inorganic bulk materials. There are a total of 13 tasks in this benchmark that have samples that range in size from 312-132k samples. Tasks include predicting optical, thermal, electronic, thermodynamic, tensile and elastic properties given a material’s composition and/or crystal structure. For our work, since we give structure as input to our model and demonstrate finetuning on regression tasks, we restrict to 8 tasks in Matbench. Each task has 5 folds and predefined test splits. We report an average across 5 folds for our JMP-L and JMP-S models but due to the compute cost, we stick to only reporting on fold 0 for all other comparisons. For prediction of all material properties across these tasks, we use mean pooling except for phonons. We observe max pooling to work better for phonons as the vibrational frequencies aren’t intensive or extensive properties.
+
+**MD17:** The MD17 (Chmiela et al., 2017) dataset, is a collection of eight small organic molecules for which energies and forces are computed using ab-initio Molecular Dynamics (MD) simulations with Density Functional Theory (DFT). The revised MD17 data is a recomputed version of the original MD17 with improved numerical accuracy. For this dataset, we use 950 samples for train, 50 samples for validation, and the remainder of the data as test set. This is the same number used by other models benchmarked on this dataset. All of our force predictions are modeled as the gradient of energies to achieve improved performances. Additionally, we also demonstrate results on a training split of 50 to demonstrate the few-shot learning capabilities of our pre-trained model (shown in Appendix B).
+
+**QM9:** The QM9 dataset (Ramakrishnan et al., 2014) is a widely used benchmark dataset in the field of quantum chemistry and machine learning. It comprises a collection of quantum mechanical calculations for organic molecules containing up to nine heavy atoms from the GDB-17 database (Ruddigkeit et al., 2012b). The dataset provides essential molecular properties, including atomization energy, HOMO-LUMO gap, dipole moment, polarizability, and more. All molecules are modeled using the _B_ 3 _LY P/_ 6 _−_ 31 _G_ (2 _df, p_ ) DFT functional. We take an atomwise reference for all properties
+
+25
+
+and then normalize those to a standard Gaussian for predictions. We empirically find sum pooling to work better for all the property predictions.
+
+**SPICE:** SPICE (Eastman et al., 2023) is a large and diverse dataset with the goal of training potentials relevant to simulating drug-like small molecules with proteins. It contains over a million conformers. We were interested in finetuning on the domain of larger molecules, we restricted our finetuning results to dipeptides and solvated amino acids subset. The dipeptides subset covers a full range of covalent interactions found in naturally occurring proteins and the solvated amino acids subset includes critical non-covalent interaction of protein-water and water-water.
+
+**MD22:** MD22 (Chmiela et al., 2023) is a benchmark dataset for large molecules and includes molecules with sizes from 42 to 370 atoms. This dataset includes MD simulations of 8 molecules which include proteins, lipids, carbohydrates, nucleic acids, and supramolecules. All of these domains are not seen during pre-training. The trajectories for all the systems were sampled at temperatures between 400 and 500 K at a resolution of 1 fs, with corresponding potential energy and forces calculated at _PBE_ + _MBD_ (61 _,_ 62) level of theory.
+
+## H.3 DEVELOPMENT SPLITS FOR ABLATION STUDIES
+
+Due to the high computational cost of training on our full pre-training and fine-tuning sets we made scaled-down development versions for our ablation studies. The pre-training subset includes a 2M split of OC20 as Gasteriger et al. (Gasteiger et al., 2022) demonstrate that results on this split correlate with the larger training split. Further, we chose splits of the other pre-training datasets that keep roughly the same ratio as present in the full pre-training set to enable the study of dataset imbalances. Additionally, for finetuning datasets, we pick a single target or molecule from each dataset. The development datasets are summarized in Table 17.
+
+|**Datasets**|**Task**|**Dev. train split**|
+|---|---|---|
+|Pre-training datasets|||
+|OC20|E, F|2M|
+|OC22|E, F|200k|
+|ANI-1x|E, F|80k|
+|Transition-1x|E, F|200k|
+|Fine-tuning datasets|||
+|Matbench|MP E Form|10k|
+|QMOF|Band gap|10k|
+|MD17|Aspirin Forces|1k|
+|QM9|∆_ϵ_|110k|
+|SPICE|Solvated Amino Acids|1k|
+|MD22|Stachyose|8k|
+
+Table 17: Scaled down development sets for ablation studies.
+
+26
+
+## I DATASET OVERLAP
+
+|**Target (Units)**|**JMP-L**|**JMP-L**|**JMP-L**|
+|---|---|---|---|
+||**Overlapping**|**Non-overlapping**|**Combined**|
+|_µ_(_D_)|0.008|0.006|0.008|
+|_α_(_a_3 0)|0.032|0.030|0.032|
+|_ε_HOMO (_meV_)|9.1|7.7|8.8|
+|_ε_LUMO (_meV_)|8.5|8.9|8.6|
+|∆_ε_(_meV_)|19.4|18.1|19.1|
+|_R_2 (_a_2 0)|0.162|0.164|0.163|
+|ZPVE (_meV_)|0.901|1.043|0.9|
+|_U_0 (_meV_)|3.0|2.6|2.9|
+|_U_ (_meV_)|2.9|2.5|2.8|
+|_H_ (_meV_)|2.9|2.5|2.8|
+|_G_(_meV_)|4.4|4.2|4.3|
+|_Cν_ (cal/mol K)|0.017|0.018|0.017|
+
+Table 18: QM9 results where the test set is partitioned into overlapping and non-overlapping fractions based on composition.
+
+As mentioned in the main text there is some overlap between the pre-training and fine-tuning small molecule datasets. This will likely always be the case for small molecules because under a certain number of heavy atoms nearly all possible molecules can be enumerated (Ruddigkeit et al., 2012a) and many datasets draw from this distribution. In particular, there is overlap between the molecules in ANI-1x and QM9. While there are some of the same or very similar molecules present, the level of DFT used to generate the data is different ( _ω_ b97x vs B3LYP), the labels are not identical (although the thermodynamic properties are closely related to the total electronic energy), and the 3D structures may not be identical, given these differences it is unclear how the overlap will impact fine-tuning performance. To examine this further, we evaluated a pre-trained model that has been fine-tuned on QM9 (JMP-L) with multiple versions of test set, one with only the overlapping systems, one with all overlapping systems removed, and finally the combined or full test set. We consider the strictest case, where overlap is determined by composition i.e. if the same atoms are present. The results are hard to differentiate across all test splits, as shown in Table 18, indicating that model is learning not simply memorizing similar examples in pre-training.
+
+## J MODEL AND OPTIMIZATION HYPERPARAMETERS
+
+Table 19 shows the model hyperparmeters for the small and large variants of the GemNet-OC backbone. Table 20 shows the training and optimization hyperparameters for the pre-training, finetuning, and scratch baseline training runs. Comma-separated hyperparameter values indicate that multiple values were evaluated in our experiments. In this case, an exhaustive grid search is conducted across all possible hyperparameters, and the hyperparameters that produce the best results (i.e., the lowest validation MAE scores) are selected. Notably, we use ReduceLROnPlateau with a patience of 3 and factor of 0.8 for all Scratch GN-OC runs and all GN-OC Small fine-tuning runs. For the FT GN-OC Large runs, we use the learning rate scheduling strategy as described in Appendix B.4. For rMD17 fine-tuning runs, we found that using a longer cosine decay duration of 128 epochs, with a lower cosine final LR factor of 1e-2, produces better results.
+
+27
+
+|GemNet-OC Hyperparameters|Small|Large|
+|---|---|---|
+|No. spherical basis|7|7|
+|No. radial basis|128|128|
+|No. blocks|4|6|
+|Atom embedding size|256|256|
+|Edge embedding size|512|1024|
+|Triplet edge embedding input size|64|64|
+|Triplet edge embedding output size|64|128|
+|Quadruplet edge embedding input size|32|64|
+|Quadruplet edge embedding output size|32|32|
+|Atom interaction embedding input size|64|64|
+|Atom interaction embedding output size|64|64|
+|Radial basis embedding size|16|32|
+|Circular basis embedding size|16|16|
+|Spherical basis embedding size|32|64|
+|No. residual blocks before skip connection|2|2|
+|No. residual blocks after skip connection|2|2|
+|No. residual blocks after concatenation|1|4|
+|No. residual blocks in atom embedding blocks|3|3|
+|No. atom embedding output layers|3|3|
+|Cutoff|12.0|12.0|
+|Quadruplet cutoff|12.0|12.0|
+|Atom edge interaction cutoff|12.0|12.0|
+|Atom interaction cutoff|12.0|12.0|
+|Max interaction neighbors|30|30|
+|Max quadruplet interaction neighbors|8|8|
+|Max atom edge interaction neighbors|20|20|
+|Max atom interaction neighbors|1000|1000|
+|Radial basis function|Gaussian|Gaussian|
+|Circular basis function|Spherical harmonics|Spherical harmonics|
+|Spherical basis function|Legendre Outer|Legendre Outer|
+|Quadruplet interaction|True|True|
+|Atom edge interaction|True|True|
+|Edge atom interaction|True|True|
+|Atom interaction|True|True|
+
+Table 19: Model hyperparameters for the small and large variants the GemNet-OC backbone model
+
+Table 20: Optimization hyperparameters across different training runs.
+
+|**Pre-Training JMP Small/Large**||
+|---|---|
+|Batch Size|1024/768|
+|Optimizer|AdamW|
+|Weight Decay|0.1|
+|EMA|0.99|
+|Initial LR|2.00e-4|
+|LR Scheduler|Warmup + Cos|
+|Warmup Duration|2000 steps|
+|Warmup Starting Factor|0.2|
+|Cos Duration|2 epochs|
+|Con Final LR Factor|1.0e-1|
+|Max TrainingEpochs|2|
+
+28
+
+|**Fine-Tuning JMP Small**||
+|---|---|
+|Optimizer|AdamW|
+|Weight Decay|0.1|
+|EMA|0.99|
+|Initial LR|8.00e-5|
+|LR Scheduler|Warmup + Cos + LLRD + RLP|
+|Warmup Duration|5 epochs|
+|Warmup Starting Factor|1.00e-1|
+|Cos Duration|32 epochs|
+|Cos Annealing|false|
+|Con Final LR Factor|1.0e-1|
+|LLRD Embedding Block Initial LR Factor|0.30|
+|LLRD Block 1 Initial LR Factor|0.35|
+|LLRD Block 2 Initial LR Factor|0.40|
+|LLRD Block 3 Initial LR Factor|0.55|
+|LLRD Block 4 Initial LR Factor|0.625|
+|RLP Patience|5|
+|RLP Factor|0.1|
+|**Fine-Tuning JMP Large**||
+|Optimizer|AdamW|
+|Weight Decay|0.1|
+|EMA|0.99|
+|Initial LR|8.00e-5|
+|LR Scheduler|Warmup + Cos + LLRD + RLP|
+|Warmup Duration|5 epochs|
+|Warmup Starting Factor|1.00e-1|
+|Cos Duration|32 epochs|
+|Cos Annealing|false|
+|Con Final LR Factor|1.0e-1|
+|LLRD Embedding Block Initial LR Factor|0.30|
+|LLRD Block 1 Initial LR Factor|0.55|
+|LLRD Block 2 Initial LR Factor|0.40|
+|LLRD Block 3 Initial LR Factor|0.30|
+|LLRD Block 4 Initial LR Factor|0.40|
+|LLRD Block 5 Initial LR Factor|0.55|
+|LLRD Block 6 Initial LR Factor|0.625|
+|RLP Patience|5|
+|RLP Factor|0.1|
+|**Fine-Tuning JMP Large - MD17**||
+|Optimizer|AdamW|
+|Weight Decay|0.1|
+|EMA|0.99|
+|Initial LR|8.00e-5|
+|LR Scheduler|Warmup + Cos + LLRD + RLP|
+|Warmup Duration|5 epochs|
+|Warmup Starting Factor|1.00e-1|
+|Cos Duration|32 epochs|
+|Cos Annealing|false|
+|Con Final LR Factor|1.0e-2|
+|LLRD Embedding Block Initial LR Factor|0.30|
+|LLRD Block 1 Initial LR Factor|0.55|
+|LLRD Block 2 Initial LR Factor|0.40|
+|LLRD Block 3 Initial LR Factor|0.30|
+|LLRD Block 4 Initial LR Factor|0.40|
+|LLRD Block 5 Initial LR Factor|0.55|
+|LLRD Block 6 Initial LR Factor|0.625|
+|RLP Patience|5|
+
+29
+
+|RLP Factor|0.1|
+|---|---|
+|**Scratch GN-OC Small and Large**||
+|Optimizer|AdamW|
+|Weight Decay|0.01|
+|EMA|0.99|
+|Initial LR|1e-4, 2e-4, 5e-5|
+|LR Scheduler|RLP|
+|Patience|3|
+|Factor|0.8|
+
+30
+
diff --git a/open_review/iclr2024_8605.json b/open_review/iclr2024_8605.json
new file mode 100644
index 0000000000000000000000000000000000000000..5222878e9bf5275fa95e6dea5e0bdb2c780dae47
--- /dev/null
+++ b/open_review/iclr2024_8605.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8605",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "PlaSma: Procedural Knowledge Models for Language-based Planning and Re-Planning",
+ "abstract": "Procedural planning, which entails decomposing a high-level goal into a sequence of temporally ordered steps, is an important yet intricate task for machines. It involves integrating common-sense knowledge to reason about complex and often contextualized situations, e.g. ``scheduling a doctor's appointment without a phone''. While current approaches show encouraging results using large language models (LLMs), they are hindered by drawbacks such as costly API calls and reproducibility issues. In this paper, we advocate planning using smaller language models. We present PlaSma, a novel two-pronged approach to endow small language models with procedural knowledge and (constrained) language-based planning capabilities. More concretely, we develop *symbolic procedural knowledge distillation* to enhance the commonsense knowledge in small language models and an *inference-time algorithm* to facilitate more structured and accurate reasoning. In addition, we introduce a new related task, *Replanning*, that requires a revision of a plan to cope with a constrained situation. In both the planning and replanning settings, we show that orders-of-magnitude smaller models (770M-11B parameters) can compete and often surpass their larger teacher models' capabilities. Finally, we showcase successful application of PlaSma in an embodied environment, VirtualHome.",
+ "rebuttal": "Thank you so much for your positive comments and detailed reviews. We were waiting for some (human) experiment results. We just submitted our responses.\n\nPlease let us know if you have any further questions/concerns and we are more than happy to continue the discussion.\n\nThanks, authors\n\n### (continued) Response to Reviewer EJrs' comment\n### Re Can a classifier solve the problem? \n- The original proScript paper proposed a **prediction task** to be: given a goal and an unordered list of steps, predict a set of ordered steps. (Note that in this setting the model has access to the ground-truth list of steps which is NOT the case with the end-to-end plan **generation task**.)\n- They implemented a two-step approach baseline where they trained a **binary classifier** (RoBERTa-large) to predict the precedence between pairs of steps, followed by building an ordered list of steps (plan [...]\n\n### Awaiting additional feedback (if any)\nAs the discussion period is nearing its conclusion, we would appreciate knowing if there are outstanding matters subsequent to our discussion. \n\nWe hope our response sufficiently addresses your concern. Your feedback is invaluable, and we are committed to enhancing the quality of our work. We have updated our document accordingly and summarized the changes in the general response. \n\nOnce again, we appreciate your time and consideration.\nBest, Authors\n\n### General response highlighting our contributions\nWe value all the helpful comments/suggestions by the reviewers. We ensure their incorporation in our updated pdf.\n\nAs the discussion period ends soon (in 2 days), we'd like to summarize and highlight the contribution of our work as follows:\n\nOur novelty lies in **(1)** the design of a unified and generalizable framework for data collection, distillation, and inference-time algorithm, **(2)** proposed novel counterfactual setting in the context of language-based agents, and **(3)** the application of PlaSma as a small foundation model in embod [...]\n\n### Response to Reviewer drVQ (Continue)\n### Q4.1 Are human evaluation dimensions enough?\nGiven the open-ended nature of CoPlan goals having varying levels of actionability (not all of them are grounded), we follow the common practice of Likert human evaluation across multiple dimensions [1-3]. Notably, we make sure we evaluate plans on dimensions that are related to actual plan ability in an embodied domain. For example, temporal ordering is related to executability (e.g., grasping should be done before picking up), and coverage/completeness is related to success/correctness. Nonetheless, we [...]\n\n### Response to Reviewer EJrs\nWe thank the reviewer for their detailed review and positive endorsement of our interesting research problem, our proposed methodology, the comprehensiveness of the task under study, and compelling results on VirtualHome. Please find our response below:\n\n\n### Re ProScript details:\nProscript is a manually-curated dataset of ~6k scripts at varying levels of granularity, for a wide range of everyday activities (e.g., `bake a cake`, `audition for a musical`, `go sailing`, etc.). Given the diversity and granularity of goals in ProScript, we believe it provides a good v [...]\n\n### Response to Reviewer EJrs' comment\nWe thank the reviewer for taking the time to read and engage with us in our response. Below we seek to address the reviewer’s concern with regards to the complexity of the dataset. We analyze the complexity from several dimensions:\n\n1. **Lexical diversity**: We use generally accepted measures [1] to analyze the diversity of datasets. We compute 1/2/3-gram entropy and the mean segmented token type ratio (MSTTR). To establish a comparison, we compute these values for three other datasets: XSUM (extreme summarization of news articles), DialogSum (real-life s [...]\n\n### Response to Reviewer bpqq\nWe thank the reviewer for taking the time to read our responses. We're glad that most of your questions are addressed.\n\nWe'd like to summarize and highlight the contribution of our work as follows:\n\nOur novelty lies in **(1)** the design of a unified and generalizable framework for data collection, distillation, and inference-time algorithm, **(2)** proposed novel counterfactual setting in the context of language-based agents, and **(3)** the application of PlaSma as a small foundation model in embodied environments. More specifically:\n\n- We propose a unified fram [...]\n\n### Response to Reviewer bpqq\nWe thank the reviewer for their detailed review and positive comments on our novel data collection, interesting results, and well-written paper. We are in the process of updating our pdf, meanwhile please find our response below:\n\n### W1. Novelty and Comparison with Orca:\n\nThanks for pointing out Orca that we overlooked. Indeed there is a recent line of work on building general-purpose small models which warrant a discussion and reference. While our work shares similar spirit with Orca, we find the key distinction in (1) our goal is to develop a specialized small [...]\n\n### Response to Reviewer drVQ\nWe thank the reviewer for taking the time to read and engage with us in our response.\n\nConcerning the rigidity of the evaluation, we took substantial steps to address this issue. Firstly, we conducted an **extensive human evaluatio**n, scrutinizing various facets of a plan within a sizable subset of the test set (300 examples). Additionally, we undertook an **extrinsic evaluation on VirtualHome**, a platform characterized by **hard executability conditions**, to delve deeper into PlaSma's effectiveness within an embodied environment. We achieved **94.18% executabi [...]\n\n### Response to Reviewer drVQ\nThank you for the detailed review and positive comments on our cost-efficient distillation paradigm and our verifier-guided decoding algorithm. We are working on improving the writing of the paper to better showcase the ideas/contributions as suggested by the reviewer. Meanwhile, please find our responses below:\n\n### \n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 8,
+ 6
+ ],
+ "score_mean": 6.5,
+ "score_variance": 1,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "### Summary\nThis paper proposed a distillation procedure and an inference-time decoding algorithm to enable relative small language models for planning and replanning with performance close or surpassing its larger language teacher models.\nThe model leverages symbolic procedural knowledge distillation and an inference-time algorithm, to enable smaller models with enhanced procedural knowledge and planning capabilities. \n\n### Strengths \n+ Equipping small language models to come up with procedural knowledge at the same level as large language models\n+ Reduces the scale and cost of potent models through teacher-distillation\n+ Proposed a guided decoding procedure with a LLM-based step verifier\n\n### Weaknesses: \n- Lack of clarity and self-containments in writing, \n- Limited evaluation in terms of domains for procedural knowledge.",
+ "forum_id": "dFcXJgnrGB",
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_drVQ",
+ "review_id": "oVMAwaIfbS",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3529,
+ "edit_detected": true,
+ "edit_delta_seconds": 297628,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_h13v",
+ "review_id": "RZI9Gwzklz",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1989,
+ "edit_detected": true,
+ "edit_delta_seconds": 1812794,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_EJrs",
+ "review_id": "GDfmZLE9Y2",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 4184,
+ "edit_detected": true,
+ "edit_delta_seconds": 759757,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_bpqq",
+ "review_id": "XOoiXMT8gR",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3065,
+ "edit_detected": true,
+ "edit_delta_seconds": 1684516,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8605.md b/open_review/iclr2024_8605.md
new file mode 100644
index 0000000000000000000000000000000000000000..14f3340b2ba4265129ad7688a5efa59c28be2b18
--- /dev/null
+++ b/open_review/iclr2024_8605.md
@@ -0,0 +1,794 @@
+
+
+## : PROCEDURAL KNOWLEDGE MODELS FOR - LANGUAGE BASED PLANNING AND RE-PLANNING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Procedural planning, which entails decomposing a high-level goal into a sequence of temporally ordered steps, is an important yet intricate task for machines. It involves integrating common-sense knowledge to reason about complex and often contextualized situations, e.g. “scheduling a doctor’s appointment without a phone”. While current approaches show encouraging results using large language models (LLMs), they are hindered by drawbacks such as costly API calls and reproducibility issues. In this paper, we advocate planning using smaller language models. We present PLASMA, a novel two-pronged approach to endow small language models with procedural knowledge and (constrained) language planning capabilities. More concretely, we develop _symbolic procedural knowledge distillation_ to enhance the commonsense knowledge in small language models and an _inference-time algorithm_ to facilitate more structured and accurate reasoning. In addition, we introduce a new related task, _Replanning_ , that requires a revision of a plan to cope with a constrained situation. In both the planning and replanning settings, we show that orders-of-magnitude smaller models (770M-11B parameters) can compete and often surpass their larger teacher models’ capabilities. Finally, we showcase successful application of PLASMA in an embodied environment, VirtualHome.[1]
+
+## 1 INTRODUCTION
+
+Powered by massive scale, large language models (LLMs) excel on many downstream tasks that require commonsense. One such task is _procedural planning_ (Schank & Abelson, 1975b; Pearson & Laird, 2005), a task that involves decomposing a high-level **goal** into a sequence of coherent, logical, and goal-oriented steps ( **plan** ) (e.g. “see a movie" _→_ “Look up movie showings", “Choose a movie" _. . ._ ). Recent approaches model this task as a conditional language generation problem using LLMs (Madaan et al., 2022; Huang et al., 2022; Ahn et al., 2022; Zhao et al., 2023). Despite their reasonable performance on the task, their steep computational cost and inaccessibility to models’ parameters hinder the wider adoption of LLMs (OpenAI, 2023) for procedural planning.
+
+We present PLASMA (PLAn with SMAll models), a novel framework and model to impart procedural knowledge and language-based planning abilities in small LMs.[2] In the _first phase_ of the framework, we enhance the implicit commonsense knowledge in small LMs through **symbolic** _**procedural**_ **knowledge distillation** (West et al., 2022; Bhagavatula et al., 2023) as illustrated in Figure 1. We formulate it in two stages: (i) _Knowledge verbalization_ to generate procedural knowledge from an LLM, and (ii) _Knowledge distillation_ to transfer LLM-generated knowledge to a smaller LM.
+
+For the knowledge distillation stage, we introduce two constrained settings: _Constrained planning_ and _Counterfactual replanning_ in addition to the standard language planning task. These tasks enable
+
+> 1Our data and code is publicly available at: [URL removed]
+
+> 2Hereafter, we will use **‘planning’** to refer to **‘language-based planning’** for brevity.
+
+1
+
+**==> picture [397 x 143] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Procedural Knowledge Verbalization Procedural Knowledge Distillation Planning (P) N/A Provide steps: PLAN: goal [goal] see a movie 1.Look up movie showings and times Templates:Prompt goal + plan Constrained Planning (CP) 2.Choose a movie to see 3.Drive to the movie theater goal + plan + condition Provide steps conditionally: 4.Get items from the concession stand [goal] see a movie [condition] see the movie at home 5.Walk together towards the theater 6.Sit down in the assigned seats Counterfactual Re-planning (CR) 7.See a movie. Rewrite steps: [goal] see a movie COUNTERFACTUAL PLAN: [plan] 1. Look up movie showings and 1.Choose a streaming service times; 2. Choose a movie to see; 2.Choose the movie and start streaming it … 7. See a movie 3.Get snacks or drinks from the kitchen [condition] see the movie at home 4.Set up the viewing device in a comfortable and safe place Goals Plans Conditions Counterfactual Multitasking 5.Sit and enjoy the movie. Plans P CP CR **----- End of picture text -----**
+
+Figure 1: Symbolic Procedural Knowledge Distillation.
+
+a more realistic setting by requiring models to reason about contextually constrained situations in real-world applications. Specifically, the model generates or revises a plan based on a given goal (e.g., "see a movie") while adhering to an additional **condition** (e.g., "at home"). Our knowledge verbalization process results in a large dataset for (i) language-based planning, (ii) language-based planning under constraints, and (iii) language-based re-planning of existing plans under constraints. Our dataset, COPLAN, is then used to train smaller models, PLASMA, using both task-specific and multi-task distillation.
+
+For the _second phase_ of PLASMA, we enable structured, tree-based reasoning via a novel **inferencetime decoding algorithm** (Figure 2). We observe that the standard next-token prediction objective in auto-regressive LMs (applied during distillation) does not equip them with sufficient causal and temporal reasoning abilities to generate high-quality plans, or a mechanism to rectify their mistakes in earlier steps. To address this challenge, we develop a _verifier-guided step-wise beam search_ to better leverage the multi-step structure of plans (resulting in PLASMA+). Concretely, we incorporate a step-wise verifier in a tree-based decoding algorithm to guide PLASMA+ to generate more semantically coherent and temporally accurate plans.
+
+Experimental results show that our approach is effective at endowing smaller LMs with planning abilities. For the standard planning task, smaller student models (of varying sizes) achieve 17.57% relative improvements, on average, over their teacher. The best student model is comparable even to GPT-3, a model 16 times the student’s size. For the first time, we distill constrained and counterfactual planning abilities in small-size models, achieving 93% and 86% validity rates according to human evaluation. Interestingly, in the VirtualHome environment (Puig et al., 2018), our model significantly outperforms previous work based on GPT-3 (Huang et al., 2022) on executability (absolute 17%) and correctness (absolute 25%). Our framework including symbolic procedural distillation, decoding-time algorithm, and the proposed tasks and the accompanying COPLAN dataset provide valuable resource and direction for advancing research in the field of procedural language-based planning.
+
+## 2 SMALL LANGUAGE MODELS AS PROCEDURAL KNOWLEDGE MODELS
+
+In this section, we discuss how to endow small student models with procedural knowledge for (constrained and counterfactual) planning capabilities. We first describe our knowledge verbalization and distillation framework which we collectively refer to as Symbolic Procedural Knowledge Distillation (§2.1, §2.2). We then propose a strategy to enhance the reasoning capabilities of small students via a novel verifier-guided step-wise decoding algorithm (§2.3).
+
+## 2.1 COPLAN: PROCEDURAL KNOWLEDGE VERBALIZATION FROM LARGE TEACHERS
+
+Large language model can perform new tasks by adapting to a few in-context examples (Brown et al., 2020). We thus leverage this emergent reasoning capabilities of LLM to circumvent the challenge of crowdsourcing supervised datasets at scale. We collect data targeting the following three tasks:
+
+2
+
+1. **Goal-based Planning (pl.)** , decomposing a high-level goal _g_ into a sequence of temporally extended steps _y_ = _{st}[T] t_ =1[.]
+
+2. **Constrained Planning (cp.)** , decomposing a high-level goal _g_ into a sequence of temporally extended steps _y_ = _{st}[T] t_ =1[while satisfying a given condition] _[ c]_[.]
+
+3. **Counterfactual Replanning (cr.)** , rewriting an initial plan _y_ to a given goal _g_ into a new plan _y[′]_ in order to satisfy a given condition _c_ .
+
+Our knowledge verbalization pipeline shown in the left side of Figure 1 is a two-stage process: 1) instance generation through few-shot prompting, and 2) automatic data curation using a critic to filter out the low quality data. The process results in COPLAN, a quality dataset containing goals, plans, conditions, and counterfactual plans.
+
+**Step 1. Data Generation** We start by generating a large pool of goals _G_ with a diverse range of topics in a bootstrapping fashion. Concretely, we start with 5 manually written goals and expand them through prompting GPT-3. We then manually filter out low-quality (in terms of acceptability/achievability) ones and repeat this expansion/filtering for several iterations until we obtain a seed goal pool with 100 goals. We subsequently use this goal pool for randomly selecting few-shot examples for prompting and generating a large number of goals in our final dataset.
+
+For each generated goal _g ∈G_ , we few-shot prompt a teacher model _M_ to generate a set of ordered steps, as a plan _y_ to achieve the goal. The input to _M_ , including instruction and few-shot examples, takes the format shown in Appendix Figure 7. Since LLMs can be sensitive to instruction, and/or few-shot examples (Perez et al., 2021; Lu et al., 2022b), we randomize the prompt by (i) manually creating a set of semantically similar instructions and each time randomly sample from the instruction set, and (ii) using different set of in-context examples for each input. We use a subset of the existing ProScript (Sakaguchi et al., 2021) and DeScript (Wanzare et al., 2016) datasets as our seed source to form in-context examples, _P_ = _{_ ( _gj_ , _yj_ ) _}[M] j_ =1[:]
+
+**==> picture [74 x 11] intentionally omitted <==**
+
+The result is a pool of 140k pairs of goal and plans, ( _g_ , _y_ ), generated from the teacher model.
+
+For the constrained and counterfactual (re)planning tasks, we also obtain conditions _c_ , and modified plans _y[′]_ from a teacher model _M_ through few-shot prompting. We manually design our prompts _P_ to collect natural language conditions concerning the environment the task is performed in such as Location (“the store is closed”), Equipment (“you don’t have a sharp tool”), Safety (“the car breaks down”) or user’s specifications such as Physical Condition and Preference (“you have an injury“). For a given goal _gi_ and plan _yi_ , we sample conditions:
+
+**==> picture [84 x 11] intentionally omitted <==**
+
+Next, we few-shot prompt _M_ to rewrite an initial plan _y_ for a given goal _g_ such that it satisfies the requirement of a condition _c_ :
+
+**==> picture [98 x 11] intentionally omitted <==**
+
+The prompting templates and examples of conditions are shown in Appendix Figure 8 and Table 6.
+
+**Step 2. Automatic Data Curation** To retain high-quality data for (re)planning under the original and constrained settings, we filter out generated samples from Step 1, i.e. generated plans, conditions and counterfactuals, that are invalid or of low quality. A plan _y_ is considered invalid if it contains an _illogical order_ of steps, is _off-topic_ (w.r.t the goal) or _incomplete_ . Whereas a modified plan _y[′]_ should not only satisfies these general criteria but should also adhere to the condition.
+
+To this end, we train separate supervised critic models to judge the quality of generated samples of different types. We collect 13K human annotations of _valid vs. invalid_ samples on Amazon Mechanical Turk to train a RoBERTa-Large (Liu et al., 2019a) as our critic models (see Appendix B.1 and B.2 for more details on annotation instruction and hyper-parameter tuning). All critics are binary classifiers which identify whether a tuple of either (goal, plan), (goal, plan, condition) or (goal, plan, condition, modified plan) is valid.
+
+Naturally, there is a trade-off between dataset size and precision. Following West et al. (West et al., 2022), we test several confidence thresholds at which the critic rejects a pair and choose the best values (0.65, 0.76, 0.82)[3] according to precision-recall curves. After filtering out low quality
+
+> 3These values are for plan, condition and counterfactual plans, respectively.
+
+3
+
+**==> picture [358 x 129] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Buy a new car Does [next step] logically follows the [plan-so-far] to help achieve the goal? Plan-so-far: Based on: Temporality, Completeness, 1. Research vehicle and features Logicality, Achievability 2. [next step] Test drive a car .72 .91 Contact seller .54 .48 Fill out registration .41 .18 Research vehicle .68 .19 Go to dealership .84 .76 … … … Make the purchase .35 .24 Write a check .70 .52 Check sales price .69 .73 Negotiate a best price .81 .76 … … … Get the keys .56 .11 … … … **----- End of picture text -----**
+
+Figure 2: Verifier-guided Step-wise Beam Search. For brevity, we only showcase with _N_ = 5 and _K_ = 2 for the first step and _N_ = 4 and _K_ = 2 for the second step. The scores are for illustration.
+
+data, our final COPLAN dataset consists of 2 main subsets including 57,794 (goal, plan) for the original **goal-based planning** task ( _D[pl]_[.] ), and 43,690 (goal, plan, condition, modified plan) for the **constrained and counterfactual** settings, ( _D[cp]_[.] and _D[cr]_[.] ). On the original planning task, COPLAN is _×_ 11 larger in scale than existing datasets (Sakaguchi et al., 2021; Wanzare et al., 2016) while keeping the precision at 74%. On the proposed constrained and counterfactual settings, our dataset is to the best of our knowledge the first large-scale constrained procedural (re)planning dataset with free-form (open vocabulary) conditions. Analyses show that the COPLAN includes a diverse array of topics covered by goals (§A.1) and conditions (§A.2).
+
+## 2.2 PLASMA: PROCEDURAL KNOWLEDGE DISTILLATION INTO SMALL STUDENTS
+
+After obtaining our procedural planning data COPLAN, we use it to fine-tune student models on the three different task settings described in §2.1. We consider both task-specific and multi-task distillation objectives to transfer generated procedural knowledge into the student models:
+
+**Task-specific Distillation.** Following the common practice, we use the standard autoregressive language modeling objective (Radford et al., 2018) to fine-tune separate student models for each task: _L_ ( _θ_ ) = E( _x_ , _y_ ) _∼Dtask_ � _−_ log _pθ_ ( _y|T_ ( _x_ ))�, for task _∈{pl_ ., _cp_ ., _cr_ . _}_ (1) where _T_ ( _x_ ) is a task-specific template for each task-specific input _x_ (see right side of Figure 1).
+
+**Multi-task Distillation.** We aim to improve the generalization of the student by exploiting the knowledge found in the three related tasks as an inductive bias (Raffel et al., 2020; Wei et al., 2022). We thus minimize the joint loss including all three task settings. We name this student PLASMA-Mul.
+
+## 2.3 PLASMA+: ADVANCING STUDENT WITH VERIFIER-GUIDED DECODING
+
+During inference, the student may generate logically and/or temporally ill-formed sequence of steps **y** = _{st}[T] t_ =1[as it is only trained to maximize the next-token probability.][For example, in Figure][ 2][, it] may generate “write a check” at step 3 with relatively high confidence due to a spurious correlation between “sales price” and “check”. We mitigate this issue via step-wise guided decoding. Rather than generating plans greedily, we instead generate step-by-step by sampling several candidate next steps and searching for those with a high log-probability under both the distilled student and a verifier. The verifier is tasked to check for sequential ordering and semantic completeness. In an embodied setting, the verifier could be taken over by any affordance or safety module (Ahn et al., 2022) that determines the executability of an action in a given environment. **Step Verifier.** We introduce a verifier, which is trained to check the validity of plan steps and encourage PLASMA to produce more temporally and causally valid plans. The verifier takes as input a goal, the plan-so-far and a candidate next step and outputs a continuous validity score _p_ verifier( _st|g_ , _s picture [306 x 13] intentionally omitted <==**
+
+where _||_ is concatenation, _x_ is a task-specific input, and _q_ is a decoding algorithm. We encourage exploration at each step, by generating candidates using multiple decoding methods such as beam search, and nucleus sampling with temperature 1.0.
+
+To select the top-K scoring next-step candidates _St[∗]_[, we use a value function] _[ v]_[(] _[s][≤][t]_[)] _[−→]_[R][ which] returns the weighted sum of normalized sequence log-likelihood from the student model and the verifier validity score,
+
+**==> picture [311 x 28] intentionally omitted <==**
+
+with _α_ controlling the impact of the distilled student and the verifier. The search ends when the beam contains _K_ completed plans. We return the highest-scored plan as the final output. Our step-wise beam search strategy maintains a diverse set of candidate plans during the decoding process, allowing the model to explore multiple plausible paths before converging on a most promising one.
+
+## 3 EXPERIMENTS
+
+**Implementation Details.** While any model with few-shot capabilities could be used, we choose our teacher model _M_ to be GPT-3 text-curie-001 (Brown et al., 2020) for collecting the goals and initial plans, and GPT-3 text-davinci-003 for collecting conditions and counterfactual plans.[5] We sample data points from GPT-3 using nucleus sampling ( _p_ = 0.98) and temperature of _T_ = 0.9. For our student models, we try a range of model sizes in T5 family (Raffel et al., 2020), such as T5-large, T5-3B, and T5-11B. Student models are trained using Huggingface Transformers (Wolf et al., 2020). Main experiments can be done on 2 GPUs with 48GB of memory.
+
+During inference, we use a beam _K_ = 5 for regular beam search, and _N_ = 10 (next-step candidates), beam _K_ = 5, _p_ = 0.9, and _α_ = 0.5 for our verifier-guided step-wise decoding (see §2.3).
+
+**Baselines.** For each task, we compare our distilled students with their corresponding teacher, zero-shot and few-shot variants of GPT-3 (Brown et al., 2020), COCOGEN (Madaan et al., 2022) and human performance (when available). COCOGEN frames the planning task as a code generation task and use a pre-trained code LM (code-davinci-002) in a few-shot setting.
+
+Next, we present the experimental setup for each task, along with their results.
+
+## 3.1 GOAL-BASED PLANNING
+
+In this section, we aim to study two key research questions through our experiments. Firstly, we seek to investigate the extent to which scale impacts the distillation of procedural knowledge. Secondly, we aim to examine whether the scale gap can be bridged through the use of multitasking and/or a novel decoding algorithm. In essence, we seek to determine whether small language models can perform procedural planning tasks with the same level of proficiency as large language models.
+
+**Evaluation Set.** For the original planning task, we use human-written plans from the test set of ProScript (Sakaguchi et al., 2021) dataset as our evaluation data.
+
+> 4In total, we automatically create 47K +/- pairs of (plan-so-far, next-step) using 3K human-written plans.
+
+> 5In our preliminary experiment, we found text-davinci-003 (the strongest GPT-3 version at the time) to be helpful for the more challenging counterfactual data collection.
+
+5
+
+**Setup.** We compare several student models of varying scales (770M-11B) with the teacher model, text-curie-001, and extremely large scale models (175B). For all student models, we decode using both regular beam search (PLASMA) and our verifier-guided step-wise beam search (PLASMA+).
+
+**Metrics.** Since there may exist many equally valid plans to a goal, we conduct human evaluations for the main results and report automatic metrics such as BLEU (Papineni et al., 2002), ROUGE (Lin, 2004) and BERTScore (Zhang et al., 2020) in Appendix Table 7. We ask human annotators on the Amazon Mechanical Turk (AMT) platform to rate the generated plans for 250 randomly sampled goals on three aspects: 1) Order: how well-ordered the plan is (captures sequential correctness), 2) Coverage: how well the plan covers the necessary steps to accomplish the goal (captures semantic completeness), and 3) Overall quality: overall quality and correctness of the plan. Details of the human evaluation can be found in Appendix D.3 Figure 10.
+
+Table 1 and Figure 3 summarize the human evaluation for the original planning task.
+
+**Does scale matter?** Larger models perform relatively better across all aspects.
+
+## **Does multi-task distillation help bridge the**
+
+**scale gap?** As we observe, multi-task distillation almost always wins over its task-specific counterpart with the exception of the smallest student, PLASMA (770M). We posit that very small student models might not have enough capacity to leverage the related tasks efficiently during multitasking.
+
+**Does verifier-guided decoding help bridge the scale gap?** Pairing models with our verifier-guided step-wise decoding substantially improves performance across students of varying sizes over all aspects. Specifically, compared with regular beam search, our proposed decoding results in 7%48% relative improvements in overall quality across different student sizes. The improvements achieved by the proposed decoding is larger for smaller students. We showcase the comparisons with qualitative examples in Table 8.
+
+The best distilled students with 770M, 3B, and 11B parameters achieved respectively 14.13%, 16%, and 22.59% relative improve-
+
+Table 1: Averaged 5-point Likert scale human evaluation for the goal-based planning. Small students paired with our decoding algorithm consistently outperform their teacher (text-curie-001) and are competitive with order of magnitude larger models in zero/few-shot settings. *CoCoGen (Madaan et al., 2022) is a 16-shot baseline using code LLM.
+
+||Model_size_||**Coverage **|**Order **|**Overall** **Quality**|
+|---|---|---|---|---|---|
+|||PLASMA|3.18|3.64|3.17|
+||**Distilled 770M**|PLASMA+|4.25|4.55|4.28|
+|||PLASMA-Mul|2.84|3.36|2.85|
+|||PLASMA-Mul+|4.16|4.48|4.23|
+|||PLASMA|3.78|4.07|3.83|
+|||PLASMA+|4.38|4.60|4.35|
+||**Distilled 3B**|PLASMA-Mul|3.96|4.35|4.03|
+|||PLASMA-Mul+|4.29|4.62|4.33|
+|||PLASMA|4.01|4.33|4.03|
+||**Distilled 11B**|PLASMA+ PLASMA-Mul|4.33 4.24|4.60 4.59|4.39 4.28|
+|||PLASMA-Mul+|**4.53**|**4.77**|**4.58**|
+||**Curie (Teacher)**|few-shot (5)|3.75|4.27|3.75|
+||**Davinci (175B)**|zero-shot|4.83|4.87|4.84|
+|||few-shot (5)|**4.88**|**4.90**|**4.90**|
+||**COCOGEN (175B)**|few-shot (16)|4.48|4.70|4.55|
+||**Human**||4.56|4.61|4.57|
+
+ments over their teacher model (text-curie-001). Finally, our best distilled model (11B PLASMAMul+) performs equally well as human and is competitive with orders-of-magnitude larger models (175B).[6] These results support our claim that a smaller model can, in fact, be as powerful as larger models when augmented with smarter decoding-time techniques. Figure 3 visualizes how we bridge the scale gap using our multi-task distillation and verifier-guided decoding. Since the initial submission, we conduct an additional comparison with GPT-4 (see Table 14), indicating similar trends.
+
+**Effect of symbolic distillation.** In this experiment, we investigate the utility of CoPlan that is obtained through symbolic distillation in the presence of manually curated ProScript dataset (Sakaguchi et al., 2021). We thus compare a T5-11B distilled model trained on CoPlan with a T5-11B model trained only on ProScript, and the mix of both. Due to potential distribution shifts, we evaluated them on both their in- and out-of-domain test sets. We generate plans using our proposed verifier-guided decoding for randomly sampled 150 goals from ProScript and COPLAN. We use the same human evaluation setup as before. Table 2 shows that training on our LLM-generated
+
+> 6Pairwise annotator agreements (i.e., how often do two annotators agree on the answer) are 0.78, 0.84, and 0.80 for coverage, order and overall quality, respectively.
+
+6
+
+|770M 3B 11B 175B|Table 2: Effect of symbolic knowledge distilla- tion. The model trained on our COPLANdataset transfers better to other dataset,ProScript.|Table 2: Effect of symbolic knowledge distilla- tion. The model trained on our COPLANdataset transfers better to other dataset,ProScript.|
+|---|---|---|
+||Test on_→_ **ProScript** **COPLAN** Train on_↓_**Coverage Order** **Overall** **Quality** **Coverage Order** **Overall** **Quality** **ProScript** 4.47 4.68 4.51 4.51 4.81 4.58 **COPLAN** 4.58 4.78 4.73 4.72 4.86 4.73 **Mix** **4.82** **4.83** **4.83** **4.77** **4.88** **4.78**| **ProScript** **COPLAN**|
+|||4.47 4.68 4.51 4.51 4.81 4.58 4.58 4.78 4.73 4.72 4.86 4.73 **4.82** **4.83** **4.83** **4.77** **4.88** **4.78**|
+||||
+
+Table 2: Effect of symbolic knowledge distillation. The model trained on our COPLAN dataset transfers better to other dataset, ProScript.
+
+Figure 3: Bridging the scale gap in goal-based planning. Smaller models are able to achieve comparable performance and sometimes surpass larger models via multi-tasking and guided decoding.
+
+COPLAN dataset, consistently transfers better to human-written dataset, ProScript across all dimensions. Training on the mix of both datasets, however, achieves the best performance.
+
+## 3.2 CONSTRAINED AND COUNTERFACTUAL (RE)PLANNING
+
+Here, we seek to benchmark language models’ planning abilities under constrained (contextually grounded) situations. This task goes beyond the original planning task, requiring models to produce novel linguistic alternatives to unseen situations.
+
+**Evaluation Set.** We created the test set of COPLAN by generating conditions and counterfactual plans for the human-written (goal, plan) in the ProScript. Additionally, instead of using trained critic to filter out low-quality samples, we used human annotators to verify them. We only used human-verified tuples of (goal, plan, condition, cf. plan) as the test set of COPLAN.
+
+**Setup.** We compare 3B and 11B student models with GPT-3 Curie and text-davinci-003, the 175B teacher, in zero/few-shot settings. During inference, we use our verifier-guided step-wise decoding with _α_ = 0.75 to outweigh student model’s probability over the verifier validity score.[7]
+
+**Metric.** We conduct human evaluation on the AMT. We generate (counterfactual) plans for 300 randomly sampled examples using each model. We ask 3 workers to rate if each generated plan contains the necessary steps to make the goal achievable _while satisfying the condition_ . We provide 3 answer options: **A** : The plan contains all the necessary steps to meet the requirements of the condition on the goal, **B** : The plan addresses the condition, but it is trivial and lacks thoughtfulness[8] , and **C** : The plan does NOT address the condition or does so very poorly. We take the majority vote for the final results. Details on crowd-sourcing human evaluation can be found in Appendix Figure 12.
+
+**Results.** Figure 4 depicts the results. Large students perform better on both tasks. In constrained planning, our 11B PLASMA-Mul+ demonstrates a 93.33% success rate in producing high-quality plans while adhering to the given condition, which is comparable to the performance of the 175B parameter Davinci model in a zero-shot setting. Furthermore, our model generates slightly fewer low-quality plans, only 7 as opposed to 12 by Davinci. While multi-tasking seems to be somewhat helpful in constrained planning, this is not always the case for replanning. We hypothesize that the reason for this could be that the original and constrained planning tasks, which do not involve modifying an existing plan, may negatively impact the replanning task. The best performance for the counterfactual replanning is achieved by Davinci (90%) followed by PLASMA+ (86.33%).[9] Nonetheless, statistical _T_ -test of our best models for constrained and counterfactual (re)planning tasks indicate that they are statistically on par with the much larger Davinci GPT-3.5 (175B). Human-annotated error types are reported in Appendix Table 11, showing “missing necessary steps” is the most prevalent mistake.[10]
+
+> 7 We performed a hyperparameter search over _α_ = _{_ 0.5, 0.75, 0.8 _}_ .
+
+> 8Example: addressing the condition “you have no money” with adding a step “find money” in the plan.
+
+> 9Pairwise annotator agreements are 0.96 and 0.94 for constrained and counterfactual (re)planning.
+
+> 10 Results with 95% confidence intervals are reported in the Appendix Table 13 and Figure 9.
+
+7
+
+**==> picture [358 x 164] intentionally omitted <==**
+
+**----- Start of picture text -----**
+20 12 7 7 12 9 17 19 11 40 36 29 67 58 141 122 264 264 274 280 204 208 280 287 220 234 259 251 133 127 270 266 **----- End of picture text -----**
+
+Figure 4: Human evaluation of 300 generations. PLASMA+ models (in left and right plots) are trained on the constrained and counterfactual (re)planning subsets of COPLAN. Statistical _T_ -test indicates that our best models for constrained and counterfactual (re)planning are statistically on par with the much larger Davinci (175B) and are able to generate good plans 93.33% and 86.33% of the times.
+
+We provide qualitative examples of model generations across all three tasks in Table 4. More examples of (good and bad) generations according to human annotators are provided in Appendix Tables 9, 10.
+
+## 3.3 APPLICATION TO EMBODIED AGENTS
+
+As an extrinsic evaluation, we investigate the application of PLASMA in a domain with hard executability conditions. We evaluate PLASMA on the task of planning in the VirtualHome (Puig et al., 2018) environment. In this environment, agents can perform household activities, e.g. “paint ceiling", through programs, in the form of supported actions (42 in total) and arguments. For evaluation, we use their test set consisting of 88 goals (and corresponding gold programs). We compare our best student PLASMA-Mul (11B) with the best-performing model on VirtualHome environment according to Huang et al. (2022). Specifically, we compare with Planner, a 1-shot GPT-3 (175B)
+
+Table 3: Human-evaluated correctness along with (automatic) executability and Longest-common subsequence (LCS) scores on VirtualHome (Puig et al., 2018). Steps generated by our model are more executable and correct for accomplishing the task.
+
+||**model**|**Executability**|**LCS**|**Correctness**|
+|---|---|---|---|---|
+|||**(%)**|**(%)**|**(%)**|
+||Planner (175B) (Huang et al.,2022)|77.17|19.10|18.33|
+||PLASMA-Mul_F T_ (11B)|76.38|28.36|41.38|
+||PLASMA-Mul+_F T_ (11B)|**94.18**|**31.93**|**43.68**|
+||Human|100|N/A|66.66|
+
+model with several inference-time strategies designed to ensure executability in embodied environments. Following their setup, we translate generated steps from natural language to steps executable in the environment. To apply our model to VirtualHome, we finetune PLASMA-Mul on _∼_ 4K human labeled examples and also finetune the verifier on the same data using the method described in Section 2.3. This human-labeled data, obtained from previous work (Huang et al., 2022), consists of pairs of _⟨_ task, natural language plan _⟩_ . The same data was used to finetune supervised models including GPT-3 13B, resulting in performance inferior to that of Planner (Huang et al., 2022).
+
+We evaluate models on: (i) **Executability** : measures whether a generated action is executable within the environment, (ii) **Correctness** : measures whether the generated actions accomplish the task, and (iii) Longest common subsequence ( **LCS** ): measures the action-level similarity between a generated program and a human-annotated one. We show, in Table 3, that PLASMA generates steps that are significantly more executable (according to automatic metric) and also more correct/complete (according to human judges). This suggests successful application of PLASMA in embodied setting. More experimental details can be found in Appendix E.
+
+8
+
+Table 4: PLASMA generations for _Constrained planning_ and _Counterfactual replanning_ tasks. More examples are provided in Appendix Table 15.
+
+|**Goal** **Condition**|**Goal** **Condition**|**Initial Plan** **Generated (Counterfactual) Plan**|
+|---|---|---|
+|Empty lint flter If the lint trap i too hot to touch||Find lint flter > Remove lint flter > Clean lint flter > Replace lint flter|
+||If the lint trap i too hot to touch|s
Unplug dryer > Open dryer > Locate lint trap > Use heat- resistant glove or mitt to pick up lint trap > Pull lint trap out of dryer > Empty lint trap|
+|||Load clothes into dryer > Locate lint trap > Move hand towards lint trap > Grip lint trap with fin- gers > Pull lint trap out of dryer > Use other hand to lift lint from lint trap > Empty lint filter Load clothes into dryer > Locate lint trap > Use gloved hand to move hand to ward lint trap > Grip lint trap with fngers > Use other hand to lift lint from lint trap > Re move lint trap from dryer|
+
+## 4 RELATED WORKS
+
+**Procedural Planning** The problem of planning to accomplish a goal via sub-steps is widely studied in two contexts. One is script knowledge generation, which is a long-standing NLP problem (Schank & Abelson, 1975a). Collecting script knowledge requires either human annotation (Wanzare et al., 2016), unsupervised feature-based extraction (Chambers & Jurafsky, 2008), or, more recently, methods that utilize task-specific fine-tuned LLMs (Sakaguchi et al., 2021) and pipeline-based approaches (Sancheti & Rudinger, 2022). In addition, there is a line of procedural planning that involves planning with executable actions that can be executed by robots in real-life environments (Huang et al., 2022; Ahn et al., 2022; Wu et al., 2022; Jansen, 2020; Guan et al., 2023). Recent approaches view planning as a conditional text generation problem using LLMs (Madaan et al., 2022; Huang et al., 2022; Ahn et al., 2022; Lu et al., 2023). Despite showing strong performance, their success heavily relies on scale.
+
+**Symbolic Knowledge Distillation** Crowd-sourcing human-written datasets at scale is both challenging and costly, leading to a growing interest in using LLM-generated data to train smaller models which falls under the conceptual framework of symbolic knowledge distillation (West et al., 2022). In a concurrent work, Yuan et al. (Yuan et al., 2023) proposed a similar approach to distill script knowledge from LLMs for constrained planning task. However unlike our conditions which allows nuanced and free-form format, their constraints are limited to specific types by extending an original goal with a modifier. Relatedly, Collins et al. (2022) benchmarked LLMs’ planning abilities (Valmeekam et al., 2023) under 28 manually constructed constrained goals. We instead investigate a broader range of constraints in a larger-scale COPLAN and distill this knowledge into smaller models.
+
+**Decoding-time Algorithm** Decoding-time algorithm is an emerging approach for adapting language models’ output for task-specific characteristics. Works in this line often focus on incorporating explicit lexical constraints (Lu et al., 2021; 2022a; Hokamp & Liu, 2017; Pascual et al., 2020). Besides discrete lexical constraints, applying continuous optimization functions, e.g. KL loss, has been found to be effective (Qin et al., 2020; 2022; Kumar et al., 2021; Hoang et al., 2017). Perhaps our approach is most similar to function-guided decoding methods. Krause et al. (Krause et al., 2021) and Yang et al. (Yang & Klein, 2021) fuse next-token probability with desired attributes’ probabilities at inference using a discriminator model. These and related token-level beam search variants assume access to per-token logits and gradient updates. Our decoding method however only relies on model log-probabilities and a verifier to facilitate semantic and temporal constraints at a step level.
+
+## 5 CONCLUSIONS AND FUTURE WORK
+
+In this paper, we focus on procedural planning, a challenging task that involves decomposing highlevel goals into ordered steps. We introduce PLASMA as an effective approach that uses smaller and more accessible models. By leveraging symbolic procedural knowledge distillation and an inference-time algorithm, we have endowed smaller models with enhanced procedural knowledge and planning capabilities. Furthermore, we introduced the task of Counterfactual Planning, which involves generating/revising plans to accommodate realistic counterfactual scenarios. Our results demonstrate that significantly smaller models can effectively compete with and often outperform their larger teacher models in both original and counterfactual settings. We hope our work sheds light on new directions towards developing smaller yet powerful multi-modal models for (counterfactual) procedural planning and reasoning.
+
+9
+
+## ETHICS STATEMENT
+
+## IRB AND ANNOTATION ETHICS
+
+We obtained IRB exemption for our data collection and evaluation from our institution’s internal review board. In full compliance to the exemption clauses as published in the code of federal regulations (45 CFR 46.104(d)(2,3)), we did not collect any deanomyzing information, and we do not publish our dataset with worker specific information such as the MTurk’s worker id. Based on our exempted status, according to our internal regulations, does not require for us to use consent forms with our crowdsourcing.
+
+Additionally, our data collection and evaluation efforts only involve human judgments about world knowledge relating to general real-world goals and plans. We have no reason to believe that our crowdsourcing posed harm or discomfort beyond the minimal risk as defined by 45 CFR 46.102(i).
+
+## LIMITATIONS
+
+One potential limitation of our work is that the verbalization component of our framework involves open text generation from large-scale language models (GPTs). Works such as Bender et al. (Bender et al., 2021) have argued that generations from LLMs can be prone to harmful biases stemming from the massive language data they are trained on. In the process of constructing the dataset, we have not directly observed levels of biases to cause us alarm. We believe harmful and discriminatory generations are largely mitigated by the very nature of the goals and scripts we obtain: our data is primarily composed of low-level everyday situations such as education, self-care, and mundane chores like vacuuming the floor or cooking a meal (see §A.1, A.2). This said, we acknowledge that prejudices like gender roles, for example, do also surface in the most mundane scenarios.
+
+A related limitation is that LLMs have been trained on primarily English pretraining data, likely sourced from texts that reflect North American or European culture or norms. Consequently, we note that the goals in COPLAN may reflect the goals that are most culturally expected or appropriate to the cultures of English-speaking countries. This is also expected of the plans that may include culturally limited processes and procedures. This should be a consideration that any follow-up studies using our data and model should attend to. Extending our study to include more socio-culturally inclusive goals and plans is a compelling direction for our future research.
+
+## BROADER IMPACTS
+
+Related to the concerns discussed in the Limitations section above, it is important for any downstream application to be aware that our data may have a limited representation of the goals and procedures of dominant cultures of English-speaking countries.
+
+## REPRODUCIBILITY STATEMENT
+
+We include all experimental details for reproducing the distillation and decoding algorithm in the beginning of §3, Appendix B, and E. Additionally, instruction for collecting COPLAN and human evaluations are provided in §2.1 and Appendix D.3.
+
+10
+
+## REFERENCES
+
+- Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea Finn, Chuyuan Fu, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, Daniel Ho, Jasmine Hsu, Julian Ibarz, Brian Ichter, Alex Irpan, Eric Jang, Rosario Jauregui Ruano, Kyle Jeffrey, Sally Jesmonth, Nikhil Joshi, Ryan Julian, Dmitry Kalashnikov, Yuheng Kuang, Kuang-Huei Lee, Sergey Levine, Yao Lu, Linda Luu, Carolina Parada, Peter Pastor, Jornell Quiambao, Kanishka Rao, Jarek Rettinghouse, Diego Reyes, Pierre Sermanet, Nicolas Sievers, Clayton Tan, Alexander Toshev, Vincent Vanhoucke, Fei Xia, Ted Xiao, Peng Xu, Sichun Xu, Mengyuan Yan, and Andy Zeng. Do as i can and not as i say: Grounding language in robotic affordances. In _arXiv preprint arXiv:2204.01691_ , 2022.
+
+- Emily M. Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big? In _Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency_ , FAccT ’21, pp. 610–623, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383097. doi: 10.1145/3442188.3445922. URL [URL removed]
+
+- Chandra Bhagavatula, Jena D. Hwang, Doug Downey, Ronan Le Bras, Ximing Lu, Lianhui Qin, Keisuke Sakaguchi, Swabha Swayamdipta, Peter West, and Yejin Choi. I2d2: Inductive knowledge distillation with neurologic and self-imitation, 2023.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 1877–1901. Curran Associates, Inc., 2020. URL [URL removed] cc/paper/2020/file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf.
+
+- Nathanael Chambers and Dan Jurafsky. Unsupervised learning of narrative event chains. In _Proceedings of ACL-08: HLT_ , pp. 789–797, Columbus, Ohio, June 2008. Association for Computational Linguistics. URL [URL removed]
+
+- Katherine M Collins, Catherine Wong, Jiahai Feng, Megan Wei, and Josh Tenenbaum. Structured, flexible, and robust: benchmarking and improving large language models towards more human-like behavior in out-of-distribution reasoning tasks. In _Proceedings of the Annual Meeting of the Cognitive Science Society_ , volume 44, 2022.
+
+- Sebastian Gehrmann, Tosin Adewumi, Karmanya Aggarwal, Pawan Sasanka Ammanamanchi, Anuoluwapo Aremu, Antoine Bosselut, Khyathi Raghavi Chandu, Miruna-Adriana Clinciu, Dipanjan Das, Kaustubh Dhole, Wanyu Du, Esin Durmus, Ondˇrej Dušek, Chris Chinenye Emezue, Varun Gangal, Cristina Garbacea, Tatsunori Hashimoto, Yufang Hou, Yacine Jernite, Harsh Jhamtani, Yangfeng Ji, Shailza Jolly, Mihir Kale, Dhruv Kumar, Faisal Ladhak, Aman Madaan, Mounica Maddela, Khyati Mahajan, Saad Mahamood, Bodhisattwa Prasad Majumder, Pedro Henrique Martins, Angelina McMillan-Major, Simon Mille, Emiel van Miltenburg, Moin Nadeem, Shashi Narayan, Vitaly Nikolaev, Andre Niyongabo Rubungo, Salomey Osei, Ankur Parikh, Laura Perez-Beltrachini, Niranjan Ramesh Rao, Vikas Raunak, Juan Diego Rodriguez, Sashank Santhanam, João Sedoc, Thibault Sellam, Samira Shaikh, Anastasia Shimorina, Marco Antonio Sobrevilla Cabezudo, Hendrik Strobelt, Nishant Subramani, Wei Xu, Diyi Yang, Akhila Yerukola, and Jiawei Zhou. The GEM benchmark: Natural language generation, its evaluation and metrics. In Antoine Bosselut, Esin Durmus, Varun Prashant Gangal, Sebastian Gehrmann, Yacine Jernite, Laura Perez-Beltrachini, Samira Shaikh, and Wei Xu (eds.), _Proceedings of the 1st Workshop on Natural Language Generation, Evaluation, and Metrics (GEM 2021)_ , pp. 96–120, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.gem-1.10. URL [URL removed]
+
+- Lin Guan, Karthik Valmeekam, Sarath Sreedharan, and Subbarao Kambhampati. Leveraging pretrained large language models to construct and utilize world models for model-based task planning, 2023.
+
+11
+
+Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. _ArXiv_ , abs/1503.02531, 2015.
+
+- Cong Duy Vu Hoang, Gholamreza Haffari, and Trevor Cohn. Towards decoding as continuous optimisation in neural machine translation. In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pp. 146–156, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1014. URL https: //aclanthology.org/D17-1014.
+
+- Chris Hokamp and Qun Liu. Lexically constrained decoding for sequence generation using grid beam search. In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 1535–1546, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1141. URL [URL removed] org/P17-1141.
+
+- Wenlong Huang, Pieter Abbeel, Deepak Pathak, and Igor Mordatch. Language models as zeroshot planners: Extracting actionable knowledge for embodied agents. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato (eds.), _International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA_ , volume 162 of _Proceedings of Machine Learning Research_ , pp. 9118–9147. PMLR, 2022. URL [URL removed]
+
+- Peter Jansen. Visually-grounded planning without vision: Language models infer detailed plans from high-level instructions. In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pp. 4412–4417, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.findings-emnlp.395. URL [URL removed] 2020.findings-emnlp.395.
+
+- Subbarao Kambhampati, Sarath Sreedharan, Mudit Verma, Yantian Zha, and Lin Guan. Symbols as a lingua franca for bridging human-ai chasm for explainable and advisable ai systems, 2021.
+
+- Ben Krause, Akhilesh Deepak Gotmare, Bryan McCann, Nitish Shirish Keskar, Shafiq Joty, Richard Socher, and Nazneen Fatema Rajani. GeDi: Generative discriminator guided sequence generation. In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , pp. 4929–4952, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.findings-emnlp.424. URL [URL removed] findings-emnlp.424.
+
+- Sachin Kumar, Eric Malmi, Aliaksei Severyn, and Yulia Tsvetkov. Controlled text generation as continuous optimization with multiple constraints. In _Neural Information Processing Systems_ , 2021.
+
+- Chin-Yew Lin. ROUGE: A package for automatic evaluation of summaries. In _Text Summarization Branches Out_ , pp. 74–81, Barcelona, Spain, July 2004. Association for Computational Linguistics. URL [URL removed]
+
+- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. _ArXiv_ , abs/1907.11692, 2019a.
+
+- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. _arXiv preprint arXiv:1907.11692_ , 2019b.
+
+- Ximing Lu, Peter West, Rowan Zellers, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. NeuroLogic decoding: (un)supervised neural text generation with predicate logic constraints. In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 4288–4299, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.339. URL https: //aclanthology.org/2021.naacl-main.339.
+
+12
+
+- Ximing Lu, Sean Welleck, Peter West, Liwei Jiang, Jungo Kasai, Daniel Khashabi, Ronan Le Bras, Lianhui Qin, Youngjae Yu, Rowan Zellers, Noah A. Smith, and Yejin Choi. NeuroLogic a*esque decoding: Constrained text generation with lookahead heuristics. In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , Seattle, United States, July 2022a. Association for Computational Linguistics. doi: 10.18653/v1/2022.naacl-main.57. URL [URL removed] 2022.naacl-main.57.
+
+- Yao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel, and Pontus Stenetorp. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 8086–8098, Dublin, Ireland, May 2022b. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.556. URL [URL removed] 556.
+
+- Yujie Lu, Weixi Feng, Wanrong Zhu, Wenda Xu, Xin Eric Wang, Miguel Eckstein, and William Yang Wang. Neuro-symbolic procedural planning with commonsense prompting. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed] net/forum?id=iOc57X9KM54.
+
+- Aman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang, and Graham Neubig. Language models of code are few-shot commonsense learners. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , pp. 1384–1403, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. URL [URL removed] org/2022.emnlp-main.90.
+
+- Subhabrata Mukherjee, Arindam Mitra, Ganesh Jawahar, Sahaj Agarwal, Hamid Palangi, and Ahmed Awadallah. Orca: Progressive learning from complex explanation traces of gpt-4, 2023.
+
+OpenAI. Openai api pricing. [URL removed] 2023. Accessed: 2023-05-15.
+
+- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In _Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics_ , pp. 311–318, Philadelphia, Pennsylvania, USA, July 2002. Association for Computational Linguistics. doi: 10.3115/1073083.1073135. URL [URL removed]
+
+- Damian Pascual, Béni Egressy, Florian Bolli, and Roger Wattenhofer. Directed beam search: Plugand-play lexically constrained language generation. _ArXiv_ , abs/2012.15416, 2020.
+
+- Douglas Pearson and John Laird. Incremental learning of procedural planning knowledge in challenging environments. _Computational Intelligence_ , 21:414–439, 11 2005. doi: 10.1111/j.1467-8640. 2005.00280.x.
+
+- Ethan Perez, Douwe Kiela, and Kyunghyun Cho. True few-shot learning with language models. _NeurIPS_ , 2021. URL [URL removed]
+
+- Xavier Puig, Kevin Ra, Marko Boben, Jiaman Li, Tingwu Wang, Sanja Fidler, and Antonio Torralba. Virtualhome: Simulating household activities via programs. In _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , pp. 8494–8502, 2018.
+
+- Lianhui Qin, Vered Shwartz, Peter West, Chandra Bhagavatula, Jena D. Hwang, Ronan Le Bras, Antoine Bosselut, and Yejin Choi. Back to the future: Unsupervised backprop-based decoding for counterfactual and abductive commonsense reasoning. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 794–805, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.58. URL [URL removed]
+
+- Lianhui Qin, Sean Welleck, Daniel Khashabi, and Yejin Choi. Cold decoding: Energy-based constrained text generation with langevin dynamics. _Advances in Neural Information Processing Systems_ , 2022.
+
+13
+
+- Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. 2018.
+
+- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. _Journal of Machine Learning Research_ , 21(140):1–67, 2020. URL [URL removed]
+
+- Keisuke Sakaguchi, Chandra Bhagavatula, Ronan Le Bras, Niket Tandon, Peter Clark, and Yejin Choi. proScript: Partially ordered scripts generation. In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , pp. 2138–2149, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.findings-emnlp.184. URL [URL removed]
+
+- Abhilasha Sancheti and Rachel Rudinger. What do large language models learn about scripts? In _Proceedings of the 11th Joint Conference on Lexical and Computational Semantics_ , pp. 1–11, Seattle, Washington, July 2022. Association for Computational Linguistics. doi: 10.18653/v1/ 2022.starsem-1.1. URL [URL removed]
+
+- Roger C. Schank and Robert P. Abelson. Scripts, plans and knowledge. In _International Joint Conference on Artificial Intelligence_ , 1975a.
+
+- Roger C. Schank and Robert P. Abelson. Scripts, plans and knowledge. In PN Johnson-Laird and PC Wason (eds.), _Thinking: Readings in Cognitive Science, Proceedings of the Fourth International Joint Conference on Artificial Intelligence_ , pp. 151–157. Tbilisi, USSR, 1975b.
+
+- Karthik Valmeekam, Alberto Olmo, Sarath Sreedharan, and Subbarao Kambhampati. Large language models still can’t plan (a benchmark for llms on planning and reasoning about change), 2023.
+
+- Lilian D. A. Wanzare, Alessandra Zarcone, Stefan Thater, and Manfred Pinkal. A crowdsourced database of event sequence descriptions for the acquisition of high-quality script knowledge. In _Proceedings of the Tenth International Conference on Language Resources and Evaluation (LREC’16)_ , pp. 3494–3501, Portorož, Slovenia, May 2016. European Language Resources Association (ELRA). URL [URL removed]
+
+- Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In _International Conference on Learning Representations_ , 2022. URL [URL removed] id=gEZrGCozdqR.
+
+- Peter West, Chandra Bhagavatula, Jack Hessel, Jena Hwang, Liwei Jiang, Ronan Le Bras, Ximing Lu, Sean Welleck, and Yejin Choi. Symbolic knowledge distillation: from general language models to commonsense models. In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 4602–4625, Seattle, United States, July 2022. Association for Computational Linguistics. doi: 10.18653/v1/ 2022.naacl-main.341. URL [URL removed]
+
+- Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. Transformers: State-of-the-art natural language processing. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pp. 38–45, Online, October 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-demos.6. URL [URL removed]
+
+- Te-Lin Wu, Alex Spangher, Pegah Alipoormolabashi, Marjorie Freedman, Ralph Weischedel, and Nanyun Peng. Understanding multimodal procedural knowledge by sequencing multimodal instructional manuals. In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 4525–4542, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.310. URL [URL removed]
+
+14
+
+- Kevin Yang and Dan Klein. FUDGE: Controlled text generation with future discriminators. In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ . Association for Computational Linguistics, 2021. doi: 10.18653/v1/2021.naacl-main.276. URL [URL removed]
+
+- Siyu Yuan, Jiangjie Chen, Ziquan Fu, Xuyang Ge, Soham Shah, Charles Jankowski, Yanghua Xiao, and Deqing Yang. Distilling script knowledge from large language models for constrained language planning. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 4303–4325, Toronto, Canada, July 2023. Association for Computational Linguistics. URL [URL removed]
+
+- Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with BERT. In _8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020_ . OpenReview.net, 2020. URL [URL removed]
+
+Zirui Zhao, Wee Sun Lee, and David Hsu. Large language models as commonsense knowledge for large-scale task planning, 2023.
+
+15
+
+## SUPPLEMENTARY MATERIAL
+
+A COPLAN ANALYSIS DETAILS
+
+## A.1 GOAL DIVERSITY
+
+**==> picture [191 x 191] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Fitness 3% Social 5% Education Financial 21% 8% Career 9% Other Service 20% 14% Self-Improvement 20% **----- End of picture text -----**
+
+Figure 5: Goal diversity in COPLAN
+
+**==> picture [191 x 192] intentionally omitted <==**
+
+Figure 6: Condition diversity in COPLAN
+
+In this section, we demonstrate that the goals in our COPLAN dataset broadly cover a diverse set of everyday, real-world human activities.
+
+For this analysis, we first define seven goal-relevant categories based on categories defined by the US Bureau of Labor Statistics[11] : (1) **career** and work related activities; (2) **education** and professional growth; (3) **financial** and commercial activities; (4) **fitness** and health; (5) **service** and civic activities; (6) **social** activities and relationships; and (7) **self-improvement** and leisure.
+
+Next, using the seven categories, we manually annotate 200 most frequent verb unigrams, 300 most frequent noun unigrams, and 300 most frequent nominal (nouns + adjectives) bigrams extracted from the goals statement. Only when the unigram (e.g. “make”) or the bigram (e.g. “new word”) indicates one of the seven categories (e.g., “close friend” for relationship or “college university” for education) the instance is annotated with the category. Otherwise, it is annotated with an eight category, **other** . For each goal in COPLAN, each (verb, noun) unigram or (nominal) bigram casts a category as a vote if found in the annotated data. If not found, then it casts other as vote. Majority vote is taken as the category of the larger goal statement.
+
+Figure 5 shows the distribution of the activity types in COPLAN. Education is the largest category (“join an online course to learn a new language”) followed by self-improvement (“develop my creative writing skills”). Service (“cooking meals for a homeless shelter”), career (“get interview for a new job”), and financial (“upgrade to a new car”) are the next largest categories. The other category includes miscellaneous activies like chores and events like “vaccuum the livingroom floor”.
+
+## A.2 CONDITION DIVERSITY
+
+We assess the diversity of the conditions in COPLAN by analyzing the verbal use and nominal trigrams employed in the statements.
+
+We manually analyze 20 most frequent verbs and phrasal verbs (e.g., “have access”) appearing in the condition statements. The verbs are grouped into 5 semantic categories: (1) **want** (to want, to desire, etc); (2) **possess** (to have, to possess, etc); (3) **access** (to obtain, to get, to procure etc); (4)
+
+> 11[URL removed] defines 11 categories to cover common everyday civilian activities. We cluster these categories into five.
+
+16
+
+**able** (to be able to, be capable of, etc); and (5) **trust** (to be safe, to rely, etc). Note that each of these categories include conditions of both polarity; for example, for **possess** , it includes both the condition imposed by having (“have enough money”) and by lacking (“not have enough money”). A sixth category, **other** , was included for the verbs not included in the above categories. For each condition in COPLAN, the first trigram made up of verbs, adjectives, and nouns appearing after the main verb (e.g., “If you _want_ to [apply to an online program]” –> main verb: _want_ , trigram: _apply online program_ ) were extracted. Trigrams were then associated with each of the 5 semantic categories based on the main verb.
+
+Figure 6 shows the most frequent unique trigrams in each category. The graph includes the 20 most frequent trigrams for each category. The displayed trigrams were manually clustered when appropriate for readability purposes (e.g., “take course online” clustered with “take online course”).
+
+We find a wide variety of real-world constraints that pose varying levels of restriction such as preference and desire (“want to take an online course”) and hindrances posed by the state of having or not having something (“not having enough money” or “having a disability”).
+
+## B ADDITIONAL EXPERIMENTAL DETAILS
+
+## B.1 CRITIC MODELS: COLLECTING HUMAN ANNOTATIONS
+
+We gather human annotations of _valid vs. invalid_ teacher generations. Annotations are crowdsourced through the Amazon Mechanical Turk (AMT) platform. We qualify 263 best performing workers through a paid qualification round. Additionally, we chose annotators among those who were located in US, GB and CA, and had 98% approval rate for at least 10,000 previous annotations. Crowdworker compensation for qualification and annotation HITs is maintained at an average of $15 per hour.
+
+**Plans.** For plans, the crowdworkers were presented with randomly-sampled 13K generated (goal, plan) pairs, and were asked to evaluate the plans along three dimensions: _topicality_ —the topic of the plan is relevant and appropriate for the goal, _ordering_ —the steps in the plan are appropriately ordered, and _completeness_ —the plan provides complete and informative steps to achieve the goal. We asked the workers to evaluate the goal’s _achievability_ as a separate (fourth) dimension. Each dimension was rated on a 5-point likert scale with three _valid_ labels (Definitely, Mostly, and Somewhat; numeric value 1) and two _invalid_ labels (Hardly, Not at all; numeric value 0). Each (goal, plan) pairs were annotated by three crowdworkers. The template used is shown in Figure 10.
+
+We determine the validity of a (goal, plan) pair in the following manner. We then calculate the mean score (over the three annotator responses) for each of the dimensions. A (goal, plan) pair is considered _valid_ only if: (1) it receives a score greater than 0.25 for each of the _achievablility_ , _topicality_ , or _ordering_ dimensions, and (2) receives a scores greater or equal to 0.65 on the _completeness_ dimension. Failing that, a pair is considered _invalid_ .
+
+**Conditions.** For conditions, we collect human judgements on whether the condition makes the goal more specific or harder to achieve (but not impossible) on a randomly-sampled set of 6100 generated tuples of (goal, plan, condition). We include screenshot of our annotation template in Figure 11.
+
+**Counterfactual Plans.** And finally, for counterfactual plans, we collect 10.5K human judgements on whether the modified plan contain all the necessary steps to make the goal achievable while adhering to the condition. We include screenshot of our annotation template in Figure 12.
+
+B.2 CRITIC MODELS: TRAINING DETAILS
+
+||**Plan Critic** **Condition Critic** **Counterfactual Critic**|**batch size learning rate** 16 1e-6 32 1e-5 32 1e-6|
+|---|---|---|
+
+Table 5: Hyper-parameter values for training different critic models.
+
+We train 3 binary classifiers (critics) for filtering out low quality teacher generations in §2.1 using pre-trained RoBERTa-Large Liu et al. (2019a). We conduct a small grid search on validation loss for batch size _bs_ = _{_ 16, 32, 64 _}_ and learning rate _lr_ = _{_ 1 _e −_ 4, 1 _e −_ 5, 1 _e −_ 6, 5 _e −_ 6 _}_ . We report the effective hyper-parameters for each critic in Table 5. We use early stopping on validation loss.
+
+17
+
+## B.3 TRAINING THE VERIFIER
+
+**Constructing Pseudo-negative Examples.** For training the step verifier, we use the human-written plans Sakaguchi et al. (2021) to construct positive examples of (plan-so-far, next-step) pairs and devise three main perturbation strategies to automatically construct negative examples as explained below:
+
+- **Reordered Steps** : Conflicting logical order results from inaccurate causal or temporal dependencies in a plan. Thus, we apply both _near_ and _distant_ reordering by randomly reordering two consecutive and two distant steps.
+
+- **Repetitive Steps** : Degeneration i.e., generating repetitive text is commonly observed in language models. Similarly, we include both _near_ and _distant_ repetition by repeating the immediate previous step and distant previous step as a pseudo-negative next-step.
+
+- **Missing Steps** : Another common mistake made by language models is missing necessary steps, leading to incoherent plans. To simulate this behaviour, we randomly select a non-immediate step as a pseudo-negative next-step.
+
+We collect a training set of 47k positive and negative pairs of (plan-so-far, next-step) using only 3k human-written plans.
+
+**Training Details.** We fine-tune RoBERTa Large Liu et al. (2019a) as a binary classifier identifying the validity of a candidate next-step. We train for 10 epochs with early stopping on validation accuracy using batch size of 32 and learning rate of 1 _e −_ 5.
+
+|**Category**|**Goal**|**Condition**|
+|---|---|---|
+|**Location**|Purchase gardening supplies|there are no local gardening stores nearby|
+||Singthe lyrics|you want to singthe lyrics in a recordingstudio|
+|**Equipment**|Studying for the exam Practicepotterytechniques|you want to use a laptop or computer you don’t have the right tools or clay|
+|**Safety**|Take out several plates Transport materials home|the plates are too heavy or fragile the car breaks down or runs out ofgas|
+|**User’s condition/**|Practice playing the instrument|you are unable to read sheet music|
+|**specifcation**|Rent rock climbingequipment|you need size specifc equipment|
+
+Table 6: Examples for different categories of conditions in COPLAN dataset.
+
+## C OUT-OF-DOMAIN EVALUATION
+
+Collins et al. (2022) proposed two out-of-distribution reasoning tasks to evaluate LLMs, one of which involved constrained planning. For a given goal and one or more conditions, the task is to gener- **Model** ate a plan. We evaluate PLASMA on the 28 constrained PLASMA **71** goals provided by the paper. We compare our generations GPT-3 (from (Collins et al., 2022)) 36 to the GPT-generated plans provided by the paper and GPT-3 zero shot 64 text-davinci-002 prompted in a zero shot manner. To evaluate the generations we perform a human evaluation, as described in §D.3. Table 12: Percent of generated counter-
+
+|**Model**|**% good**|
+|---|---|
+|PLASMA|**71**|
+|GPT-3 (from (Collins et al.,2022)) GPT-3 zero shot|36 64|
+
+Table 12: Percent of generated counterfactual plans which have been rated as _good_ by annotators.
+
+The human evaluation results in Table 12 show that PLASMA outperforms the other baselines in this out-ofdomain subset of counterfactual planning task.
+
+## D EVALUATION DETAILS
+
+## D.1 AUTOMATIC EVALUATION
+
+We report automatic evaluation of models for the original planning task in Table 7. Note that humanwritten plans are not the only possible plans, hence these automatic metrics may not provide an
+
+18
+
+|model_size_||**BLEU **|**ROUGE-2 **|**ROUGE-L **|**BERT-f1**|
+|---|---|---|---|---|---|
+||PLASMA|12.97|14.02|28.23|84.31|
+||PLASMA+|14.26|16.31|31.02|85.30|
+|**Distilled 770M**||||||
+||PLASMA-Mul|14.47|14.43|27.99|84.02|
+||PLASMA-Mul+|14.49|16.70|31.49|85.35|
+||PLASMA|12.89|14.39|28.57|84.70|
+|**Distilled 3B**|PLASMA+|13.92|15.56|30.83|85.19|
+||PLASMA-Mul|13.62|15.42|29.31|84.80|
+||PLASMA-Mul+|14.96|16.80|31.97|85.28|
+||PLASMA|12.64|13.93|28.14|84.56|
+||PLASMA+|14.65|15.84|31.04|85.33|
+|**Distilled 11B**||||||
+||PLASMA-Mul|13.61|15.67|29.99|85.10|
+||PLASMA-Mul+|15.54|16.76|31.98|85.37|
+|**Curie (Teacher)**|few-shot (3-5)|7.13|9.24|22.78|83.08|
+|**Davinci (175B)**|zero-shot|4.98|7.81|21.38|81.20|
+||few-shot (3-5)|10.27|10.27|24.57|83.48|
+|**CoCoGen (175B)**|few-shot (16)|18.07|21.01|33.99|86.41|
+
+Table 7: Automatic Evaluation Results for the Planning task. Note that the human-written plans are not the only possible plans, hence these automatic metrics may not provide an informative measure of performance.
+
+informative measure of performance. To further verify this, we computed the correlation between the most commonly used BLEU score and human scores. We find that BLEU has very weak correlations to human scores of coverage, ordering an overall quality, with a Pearson correlation of 7.7%, 5.9%, and 5.6%.
+
+## D.2 CONFIDENCE INTERVALS
+
+We provide the 95% confidence intervals for our main results on goal-based (Table 13) and constrained and counterfactual (re)planning (Figure 9).
+
+## D.3 HUMAN EVALUATION ON AMT
+
+All human evaluations were conducted on the Amazon Mechanical Turk (AMT). We sourced our annotators from the same pool of qualified workers (see B.1). Throughout the entirety project, we maintained an average of $15/hour pay rate based on our estimation of time needed to complete the task. Each examples were annotated by 3 workers and majority vote was taken for the reported results. The layout templates for evaluating plans and counterfactual plans are shown in Figures 10 and 12, respectively.
+
+## E EXPERIMENTAL DETAILS OF VIRTUALHOME EVALUATION
+
+We follow the same experimental setup and metrics for evaluation as Planner Huang et al. (2022). The test set consists of 88 high-level goals. To translate a generated natural language step into an executable step, we follow Huang et al. (2022) and find an executable action closest in embedding space to the generated step. To compute these embeddings, we use the stsb-roberta-large model. Executability and LCS are computed identical to Huang et al. (2022). Due to challenges with reproducibility of GPT-3 outputs, evaluation results of GPT-3 do not exactly match between our works.
+
+Note that the previous method (Huang et al., 2022) involves extracting the most relevant (in-domain) - human-annotated examples by matching goals (Make breakfast _⟨ ⟩_ Make toast) as well as sampling LLMs several times for each step and ranking them.
+
+19
+
+|**Model**|**Plan**|
+|---|---|
+||**Goal: put coffee in coffee machine**|
+|Curie (Teacher)|Step 1: fnd coffee machine Step 2: unlock coffee machine Step 3: put coffee in coffee|
+||machine Step 4: close coffee machine Step 5: wait a few minutes Step 6: coffee should|
+||be ready|
+|PLASMA-Mul (11B)|Step 1: get coffee Step 2: put coffee in coffee machine Step 3: turn on coffee machine|
+||Step 4: wait for coffee to brew Step 5: drink coffee|
+|PLASMA-Mul+ (11B)|Step 1: buy coffee beans Step 2: grind the coffee beans Step 3: put the ground coffee|
+||into the coffee flter Step 4: put the flter into the machine Step 5: turn the machine on|
+||Step 6: wait for the coffee to brew Step 7: enjoy your coffee|
+||**Goal: put on baseball jersey**|
+|Curie (Teacher)|Step 1: get baseball jersey Step 2: put baseball jersey on Step 3: take baseball jersey off|
+|PLASMA(11B)|Step 1: fnd a baseball jersey Step 2: put on baseball jersey Step 3: take off baseball|
+||jersey Step 4: put on another baseball jersey Step 5: take off second baseball jersey Step|
+||6: put on third baseball jersey Step 7: put on fourth baseball jersey|
+|PLASMA+ (11B)|Step 1: walk to closet Step 2: open closet Step 3: look for baseball jersey Step 4: fnd|
+||baseball jersey Step 5: take baseball jersey out of closet Step 6: put on baseball jersey|
+||**Goal: sit at the table with dinner date**|
+|Curie (Teacher)|Step 1: text or call the person to let them know that you will be late Step 2: arrive at the|
+||restaurant on time Step 3: take a seat at the table Step 4: wait for the other person to|
+||arrive Step 5: eat dinner Step 6: say goodbye and thank you|
+|PLASMA(3B)|Step 1: fnd dinner date Step 2: go to dinner date’s house Step 3: sit at the table Step 4:|
+||talk to dinner date Step 5: eat dinner Step 6: leave dinner date’s house|
+|PLASMA+ (3B)|Step 1: choose a restaurant Step 2: make a reservation Step 3: drive to the restaurant|
+||Step 4: park the car Step 5: enter the restaurant Step 6: fnd a seat Step 7: sit at the table|
+||with dinner date|
+||**Goal: brush all teeth**|
+|Curie (Teacher)|Step 1: get in the car Step 2: drive to the dental offce Step 3: park the car Step 4: go|
+||inside the offce Step 5: pay the bill Step 6: get a receipt Step 7: brush all teeth Step 8:|
+||leave offce|
+|PLASMA(770M)|Step 1: Get toothbrush Step 2: Get toothpaste Step 3: Get toothbrush Step 4: Get|
+||toothbrush Step 5: Get toothbrush Step 6: Get toothbrush Step 7: Brush all teeth|
+|PLASMA+ (770M)|Step 1: Get toothbrush Step 2: Get toothpaste Step 3: Put toothpaste on toothbrush Step|
+||4: Grab toothbrush Step 5: Hold toothbrush up to mouth Step 6: Brush all teeth|
+
+Table 8: Qualitative examples generated by different models for the goal-based planning task.
+
+## F COMPARISON WITH GPT-4
+
+It is noteworthy to mention that the planning subset of COPLAN is collected from the smaller GPT model (as teacher), i.e., text-curie-001 which is significantly less powerful that the most recent GPT-4 model. Nonetheless, we conduct a comparison of our best goal-based PLASMA model (11B PLASMA-Mul+) with its teacher, GPT-3[12] and GPT-4 in few-shot setting on 50 instances (total of 200). Results are shown in Table 14. As we observe, the trend remains the same as in Table 1, with GPT-4 slightly surpassing its predecessor (text-davinci-003) only in the ordering dimension.
+
+12text-davinci-003
+
+20
+
+**==> picture [301 x 461] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Type Conditional Plan Goal : eat ice cream if you have an ice cream maker Step 1: Decide to eat ice cream Step 2: Locate the ice cream maker good Step 3: Turn on the ice cream maker Step 4: Add ingredients to the ice cream maker Step 5: Follow the instructions to churn the ice cream Step 6: Remove the ice cream from the ice cream maker Step 7: Put the ice cream in a bowl Step 8: Eat ice cream Goal : brush all teeth if you are out of toothpaste Step 1: Decided to brush all teeth Step 2: Locate a store that sells toothpaste Step 3: Purchase toothpaste good Step 4: Drive to the store Step 5: Purchase toothpaste Step 6: Drive back home Step 7: Unpack the toothpaste Step 8: Open the toothpaste Step 9: Brush all teeth Goal : write names on the cards if you have a shaky hand Step 1: find a pen or pencil with a large tip Step 2: hold the pen or pencil in one hand bad Step 3: hold the pen or pencil in the other hand Step 4: use a pen or pencil to write the names on the cards Step 5: once the names are on the cards, place them in a drawer or file Step 6: close the drawer or file Step 7: write names on the cards Goal : walk into town if you have a disability that limits your mobility Step 1: Decide to walk into town Step 2: Put on shoes Step 3: Get a cane or other mobility aid if necessary bad Step 4: Put the cane or other mobility aid in a backpack Step 5: Put the backpack on Step 6: Leave the house Step 7: Walk to the bus stop Step 8: Take the bus into town Step 9: Walk into town **----- End of picture text -----**
+
+Table 9: Qualitative examples of the _constrained planning_ task.
+
+21
+
+|Type|Original Plan|Counterfactual Plan|
+|---|---|---|
+|good|**Goal**: empty lint flter Step 1: load clothes into dryer Step 2: locate lint trap Step 3: move hand towards lint trap Step 4: grip lint trap with fngers Step 5: pull lint trap out of dryer Step 6: use other hand to lift lint from lint trap Step 7: empty lint flter|**Goal**: empty lint flter_if the lint trap_ _is too hot to touch_ Step 1: Load clothes into dryer Step 2: Locate lint trap Step 3: Move hand towards lint trap Step 4: Use a heat-resistant glove to grip lint trap with fngers Step 5: Pull lint trap out of dryer Step 6: Use other hand to lift lint from lint trap Step7: Emptylint flter|
+|good|**Goal**: take a shower after work Step 1: decided to take a shower after work Step 2: drive home from work Step 3: go to bath room Step 4: take off clothes Step 5: start water to get heat Step 6: take hot shower Step 7: take a shower after work|**Goal**: take a shower after work_if you want to_ _take a shower at the gym_ Step 1: Decide to take a shower after work Step 2: Drive to gym Step 3: Go to locker room Step 4: Remove clothes Step 5: Enter shower room Step 6: Start water to get heat Step 7: Take hot shower Step8: Take a shower after work|
+|bad|**Goal**: empty old left overs from the fridge Step 1: go through the house Step 2: walk into the kitchen Step 3: locate the refridgerator Step 4: walk to the refridgerator Step 5: grab the door handle Step 6: open the refrigerator door Step 7: empty old left overs from the fridge|**Goal**: empty old left overs from the fridge _if you have diffculty bending down_ Step 1: go through the house Step 2: walk into the kitchen Step 3: locate the refridgerator Step 4: walk to the refridgerator Step 5: grab a chair or stool Step 6: place the chair or stool in front of the refrigerator Step 7: use the chair or stool to open the refrigerator door Step8: emptyold left overs from the fridge|
+|bad|**Goal**: buy a new watch Step 1: decided to buy a new watch Step 2: search the internet for watch retailers Step 3: pick a reliable retailer Step 4: search the retailer site for watches Step 5: add watch to cart Step 6: click check out Step 7: add payment information Step 8: add address information Step 9: buy a new watch|**Goal**: buy a new watch_if your_ _payment information is compromised_ Step 1: decide to buy a new watch Step 2: search the internet for watch retailers Step 3: pick a reliable retailer Step 4: search the retailer site for watches Step 5: add watch to cart Step 6: click check out Step 7: add payment information Step 8: verify payment information Step 9: buy a new watch|
+
+Table 10: Qualitative examples of the _counterfactual re-planning_ task.
+
+22
+
+|**Error Type**|**Constrained Planning**|**Counterfactual Replanning**|
+|---|---|---|
+||Edits Required Missing steps Unnecessary steps|Edits Required Missing steps Unnecessary steps|
+|Plasma+ (3B) Plasma-Mul+ (3B) Plasma+ (11B) Plasma-Mul+ (11B)|4.66 8.33 3.66 4.33 7.66 3.66 3.66 5.00 3.33 3.00 3.33 3.66|13.33 19.33 6.00 10.66 14.66 4.33 4.66 10.00 3.33 6.00 11.66 4.66|
+|curie-001zero-shot curie-001few-shot davinci-003zero-shot davinci-003few-shot|7.00 27.00 6.66 6.00 25.33 5.00 1.33 6.33 0.66 1.33 3.00 0.66|26.00 49.33 13.66 30.00 48.00 13.33 5.33 7.33 2.66 4.33 8.66 2.66|
+
+Table 11: Percent of generated (counterfactual) plans with each error type. “Missing Steps” is the most common error types across all models.
+
+|Model_size_||**Overall Quality**|**95% CI**|
+|---|---|---|---|
+||PLASMA|3.17|[2.94; 3.41]|
+|**Distilled 770M**|PLASMA+|4.28|[4.12; 4.44]|
+||PLASMA-Mul|2.85|[2.60; 3.09]|
+||PLASMA-Mul+|4.23|[4.05; 4.42]|
+||PLASMA|3.83|[3.69; 3.97]|
+|**Distilled 3B**|PLASMA+|4.35|[4.20; 4.50]|
+||PLASMA-Mul|4.03|[3.85; 4.20]|
+||PLASMA-Mul+|4.33|[4.17; 4.48]|
+||PLASMA|4.03|[3.85; 4.20]|
+|**Distilled 11B**|PLASMA+|4.39|[4.23; 4.54]|
+||PLASMA-Mul|4.28|[4.12; 4.42]|
+||PLASMA-Mul+|**4.58**|[4.46; 4.71]|
+|**Curie (Teacher)**|few-shot (5)|3.75|[3.54; 3.95]|
+|**Davinci (175B)**|zero-shot|4.84|[4.77; 4.92]|
+||few-shot (5)|**4.90**|[4.85; 4.95]|
+|**COCOGEN (175B)**|few-shot (16)|4.55|[4.43; 4.68]|
+|**Human**||4.57|[4.46; 4.69]|
+
+Table 13: Averaged 5-point human ‘quality ratings’ for original planning along with 95% Confidence Intervals.
+
+## G COMPLEXITY AND DIVERSITY ANALYSIS OF STUDIED DATASETS
+
+We analyze the complexity of proScript and CoPlan from several dimensions:
+
+- **Lexical diversity** : We use generally accepted measures (Gehrmann et al., 2021) to analyze the diversity of datasets. We compute 1/2/3-gram entropy and the mean segmented token type ratio (MSTTR). To establish a comparison, we compute these values for three other datasets: XSUM (extreme summarization of news articles), DialogSum (real-life scenario dialogue summarization), and TinyStories. These have been specifically picked as they are stylistically different from our goal and script setup, and they often contain longer more natural sentences. In Table 16, we observe that even though the goals and steps in our dataset are shorter, the overall lexical diversity of proScript and Coplan are comparable with other datasets. XSUM displays a higher MSTTR score, but this is likely attributed to
+
+23
+
+||**Coverage **|**Order **|**Overall**|
+|---|---|---|---|
+||||**Quality**|
+|PLASMA-Mul+ (11B)|4.31|4.68|4.23|
+|Curie (teacher)|3.53|4.37|3.58|
+|GPT-3.5 (Davinci-003)|4.78|4.84|4.81|
+|GPT-4|4.78|5.00|4.81|
+
+Table 14: Comparison of our best goal-based PLASMA model with its teacher, GPT-3.5 and GPT-4 in fewshot setting.
+
+the characteristics of news and more formal text. We also note that the machine-generated CoPlan exhibits slightly higher lexical diversity than the human-written proScript.
+
+- **Perplexity of an LM** : We also report the perplexity of an off-the-shelf language model which measures the degree of uncertainty (surprise) of an LM when it generates the next tokens. The higher the perplexity, the more surprised the LM is. As we see from the last column, with the exception of XSUM, the remaining datasets exhibit comparable perplexity scores. The higher perplexity in the case of XSUM is, again, attributed to its association with the news domain, a distinct characteristic compared to the other datasets, which predominantly encompass everyday scenarios. Also note that, LMs generally have lower perplexity scores on machine-generated data (as seen for CoPlan vs proScript).
+
+**Overlapping of the plans.** We additionally analyze the amount of overlap between the steps in the train and test set. To this end, we identify the direct noun object of a given goal (e.g., “Carry [a plate] to the kitchen”) and remove it from the goal (i.e., “Carry to the kitchen”) as well as all the steps in the corresponding plan (e.g., “Pick up the plate” –> “Pick up”. We then concatenate each goal with individual steps (i.e., “Carry to the kitchen. Pick up.”) and measure the maximum longest subsequence match of goal+step in the test set over all goal+step in the train set.
+
+In the ProScript dataset, we find that only 4.3% of steps in the test set have exact overlap with steps in the train set. If we relax the overlap to 90% and 80% (as opposed to an exact 100% overlap), this number increases to 5.5% and 10%, respectively. If the same is computed for plan overlap (as opposed to the step level; i.e., the direct object removed goal and plan—not individual steps—are concatenated), we observe 0% overlap.
+
+In the COPLAN dataset, commuting overlap w.r.t full train set is still in progress (due to its large scale). However, on a randomly sampled 10K instances from the train set, the numbers are 1.8%, 2%, 3.3% for exact, 90% and 80% overlap, respectively. And 0% for plan overlap.
+
+This suggests that differences in the object taken by the verb do not necessarily mean minimal changes to the plan. Intuitively speaking, this is sensical: changes in the direct object, in the real world, should affect the way we resolve a goal. For example, what extra steps we take (e.g., stack plates, but not mugs), the final goal location of the item (e.g., kitchen sink for plates, but the fridge for apples), or the manner of carrying (e.g., glasses vs. boxes) will affect the steps we take in a plan even if the goal is constant (i.e. “Carry X to the kitchen”). This is even more pronounced in CoPlan as it contains a broad set of everyday human goals (see Appendix A) which can lead to vastly distinct plans even when the event (verb) itself is the same. While learning is learning, the differences between the path taken to “Learn to play a violin” vs. “Learn to play Monopoly” vs. “Learn to speak Spanish fluently” are non-trivially different.
+
+## H DISCUSSION
+
+**On the importance of Distillation.** Finetuning LLMs requires updating models’ parameters which is not only costly but often inaccessible for the broader community. Reducing the scale and cost of strong models via teacher distillation is the key to developing open-sourced LMs that are accessible to all, facilitating fine-tuning and seamless adaptation to various domains and custom use cases. Given the large-scale training dataset used for PlaSma, we hope it can serve as a foundation model that
+
+24
+
+|**Goal**|**Condition**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|**Initial Plan** **Generated (Counterfactual) Plan**|
+|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+|Buy a new videogame||Find a store that sells videogames > Go to the store > Find the videogame you want to buy > Buy the videogame > Take the videogame home > Play the videogame|||||||||||||||||||
+||If the game stor is too far away|e Decide to buy a new videogame > Research online game stores > Compare prices and reviews > Select the game to buy > Purchase the game online > Wait for the game to be delivered > Buy a new videogame|||||||||||||||||||
+|||Decided to buy a new videogame > Decide on game > Get into car > Drive to game store > Walk into game store > Find the desired game > Buy a new videogame Decided to buy a new videogame > Decide on game > Search for the game on line > Com pare prices on line > Pur - chase the game on line > Wait for the game to be de liv ered > Un box the game > Play the game > En joy the game|||||||||||||||||||
+|||||fo|r th|e g|ame|on line >|||Com p||are|pric|es|on line||>|Pur -||
+|||||the|ga|me|on li|ne|>|Wa|it for|th|e g|ame|to|be|de liv ered game||||
+||||Un box ||the|ga|me |> P|la|y th|e game||> |En jo|y t|he|||||
+|Eat some ice from an ice c|cream ream shop|Find ice cream shop > Enter ice cream shop > Find ice cream > Choose ice cream > Eat ice cream|||||||||||||||||||
+||If you have allergies to dairy products|Decide to eat some ice cream from an ice cream shop > Find an ice cream shop > Walk into ice cream shop > Ask for a dairy-free ice cream > Pick out ice cream > Pay for ice cream > Eat some ice cream from an ice cream shop|||||||||||||||||||
+|||Decided to eat some ice cream from an ice cream shop > Decide to eat ice cream > Gather the family > Drive to ice cram parlor > Get fam- ily out and lock car > Walk in ice cream shop and sit > Eat some ice cream from an ice cream shop Decide to eat some ice cream from an ice cream shop > Re search ice cream shops in your area that of fer dairy - free op tions > Gather the family > Drive to ice cream parlor > Get family out and lock car > Walk in ice cream shop and sit > Ask the staff about their dairy - free op tions > Se lect a dairy - free op tion > Eat some ice cream from an ice cream shop|||||||||||||||||||
+|get extra exer|cise|Set a goal for how many hours a week you want to exercise > Research different types of exercise > Choose one type of exercise to start with > Make a plan to follow the exercise plan > Start exercising > Keep exercising|||||||||||||||||||
+||If the ftness activity presents a risk of injury Decide what type of exercise you would like to do > Re- search the activity to make sure you understand the risks and benefts > Consult with a medical professional to en- sure the activity is safe for you > Find a place to do the activity > Set a goal for how often you would like to do the activity > Start doing the activity > Monitor your progress and adjust the activity as needed > Get extra exercise Decided to get extra exercise > Open the calen- dar > Identify open time slots during the week > Schedule a ftness activity during free time > Set reminder for activity on phone > Attend weekly ftness activity > Get extra exercise Decide to get extra exercise > Open the calendar > Identify open time slots during the week > Re search and se lect a ft ness ac tiv ity that presents a low risk of in jury > Schedule the ftness activity during free time > Set reminder for activity on phone > Attend weekly ftness activity > Get extra exercise||||||||||||||||||||
+|||Decided to get extra exercise > Open the calen- dar > Identify open time slots during the week > Schedule a ftness activity during free time > Set reminder for activity on phone > Attend weekly ftness activity > Get extra exercise Decide to get extra exercise > Open the calendar > Identify open time slots during the week > Re search and se lect a ft ness ac tiv ity that presents a low risk of in jury > Schedule the ftness activity during free time > Set reminder for activity on phone > Attend weekly ftness activity > Get extra exercise|||||||||||||||||||
+|chop the woo|d|Get a chopping block > Get a chopping knife > Chop the wood > Clean the chopping block > Put the chopping block away|||||||||||||||||||
+||If you have a chainsaw|Pick up the wood > Place the wood on the ground > Set up the chainsaw > Sharpen the chainsaw > Start the chainsaw > Cut the wood > Chop the wood|||||||||||||||||||
+|||Pick up axe > Pick up a piece of wood > Check the condition of wood > Make sure wood is dry enough > Set the wood upright > Swing the axe at wood > Chop the wood Pick up the chainsaw > Pick up a piece of wood > Check the condition of wood > Make sure wood is dry enough > Set the wood upright > Start the chain saw > Guide the chain saw along the wood > Chop the wood|||||||||||||||||||
+
+Table 15: Additional PLASMA generations for _constrained planning_ and _counterfactual replanning_ tasks.
+
+can be quickly adapted to specific domains with minimal additional annotation (like we demonstrate by adapting Plasma to VirtualHome). Moreover, we could not augment most of the LLMs with our decoding-time algorithm due to limited access to the model’s log probabilities.
+
+25
+
+|Dataset|H1|H2|H3|MSTTR|Perplexity (GPT-med)|
+|---|---|---|---|---|---|
+|XSUM|10.45|15.49|17.15|0.80|18.55|
+|DialogSum|9.04|14.38|16.73|0.66|13.20|
+|TinyStories|8.65|14.25|17.80|0.61|7.53|
+|ProScript|8.86|13.67|15.61|0.59|12.93|
+|COPLAN|9.27|15.00|18.05|0.64|10.05|
+
+Table 16: Lexical Diversity of proScript and COPLAN.
+
+**“Symbolic” AI vs. “Symbolic” Knowledge Distillation.** We would like to draw attention to the evolving use of the term "symbolic" within the contemporary AI community, particularly in the context of natural language. It is important to note that the term "symbolic" has acquired multiple connotations, and its modern usage may differ from its original application in symbolic AI (Kambhampati et al., 2021).
+
+In our case, “Symbolic” (in symbolic knowledge distillation) refers to human-readable textual formats (West et al., 2022) rather than the transfer of obscure/soft model weights as in standard distillation (Hinton et al., 2015).
+
+## I EXTENDED RELATED WORKS
+
+**Building Smaller Models.** There is a recent line of work on building general-purpose small models for reasoning tasks such as Orca (Mukherjee et al., 2023). While our work shares a similar spirit with Orca, we find the key distinction in (1) our goal is to develop a specialized small model for procedural/counterfactual planning and replanning with potential application to an embodied domain, and (2) Orca is focused on learning from GPT-4 explanations (Chain of Thought) to improve models capabilities. Nonetheless, building specialized models on top of them can be explored in future works as we only worked on models that were accessible at the time of submission.
+
+26
+
+**==> picture [397 x 393] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Example Template: Given a goal write down a list of steps to achieve the goal: Goal: take a nap on the bed Step 1: sit on the bed for a little Step 2: pull back the blanket Step 3: pull back the sheet Step 4: fluff up the pillow Step 5: lay down on the bed Step 6: fall asleep on the bed Step 7: take a nap on the bed ... Goal: hire a dog walker Step 1: Prompt Prefix Generator: def generate_prompt_prefix(): w1_list = ["For a given goal", "Given a goal"] w2_list = ["write down", "break down into", "put down" "jot down"] w3_list = ["steps", "subgoals", "a list of steps", "several steps", "several subgoals", " some steps", "some small steps"] w4_list = ["to achieve the goal", "for achieving the goal", "to attain the goal"] w1 = random.sample(w1_list, 1)[0] w2 = random.sample(w2_list, 1)[0] w3 = random.sample(w3_list, 1)[0] w4 = random.sample(w4_list, 1)[0] prompt_prefix = f" { w1 } , { w2 } { w3 } { w4 } .\n\n" return prompt_prefix **----- End of picture text -----**
+
+Figure 7: Randomize prompt template for eliciting plans.
+
+27
+
+**Prompt Template (Counterfactual Plan)** You want to learn how to swim. How can you do this in 7 Steps? Step 1: Decided to learn how to swim; Step 2: Find swimming instructor; Step 3: Travel to pool; Step4: Meet swimming teacher; Step 5: Practice swimming during classes; Step 6: Review mistakes with teacher until right; Step 7: Learn how to swim.
+
+## **Prompt Template (Conditions)**
+
+You want to use social media. How can you do this in 7 steps? step 1: decided to use social media; step 2: Grab the phone; step 3: Open, Start phone; step 4: Go to app store; step 5: Download Facebook from store; step5: Open and use facebook; step6: use social media What is the hindrance that might afect the plan above? If your phone screen is cracked.
+
+You want to learn how to swim. How can you do this in several steps if you forget your swimsuit?
+
+You want to plant a tomato plant. How can you do this in 7 steps? step 1: decided to plant a tomato plant; step 2 : Go to nursery; step 3: Purchase tomato seedling.; step 4: Purchase potting soil and a pot.; step 5: Return to home.; step 6: Plant seedling in soil and pot.; step 7: plant a tomato plant What is a specification that might afect the plan above? If you want to use compost for soil.
+
+Step 1: Decided to learn how to swim; Step 2: Find swimming instructor; Step 3: Travel to pool; Step4: Meet swimming teacher; Step 5: If you have forgotten your swimsuit, ask the instructor if it is possible to borrow one or if there is a place where you can purchase one; Step 6: Practice swimming during classes; Step 7: Review mistakes with teacher until right; Step 8: Learn how to swim
+
+… x 3
+
+**==> picture [383 x 74] intentionally omitted <==**
+
+**----- Start of picture text -----**
+… … x 3 You want to print the report. How do you do this in 7 steps? You want to pick up pen. How can you do this in 6 steps? step 1: type the edited draft; step 2: save the edited draft; step 1: look for a pen; step 2: find a pen; step 3: walk over to step 3: open the file menu in the word processor; step 4: pen; step 4: extend hand out to pen; step 5: reach for pen; select print from the file menu; step 5: select printer settings; step 6: pick up pen step 6: send document to the printer; step 7: print the report You want to pick up pen. How can you do this in several What is the hindrance that might afect the plan above? steps if you want to pick up the pen from a high shelf? **----- End of picture text -----**
+
+Figure 8: Prompt templates for acquiring Conditions and Counterfactual Plans.
+
+**==> picture [332 x 146] intentionally omitted <==**
+
+**----- Start of picture text -----**
+88.0 88.0 91.33 [93.33] 93.33 [95.66] 86.33 83.66 90.0 88.66 78.00 73.33 68.0 69.0 44.33 42.33 **----- End of picture text -----**
+
+Figure 9: Human evaluation of constrained and counterfactual (re)planning tasks. We report the proportion of plans labeled as "Good" by annotators along with 95% confidence intervals. Applying statistical tests (t-test) indicates a significant difference between all PLASMA variants and Curie ( _p <_ 0.01) as well as a significant difference between students of different sizes ( _p <_ 0.05). No statistical significance was found between variants w/ or wo/ multitasking as well as between our best PLASMA and _×_ 16 larger text-davinci-003.
+
+28
+
+**==> picture [318 x 556] intentionally omitted <==**
+
+Figure 10: AMT human evaluation template for the original planning task. For validation round we substituted goal _achievability_ (is the goal achievable with appropriate steps?) for _overall_ question (is the plan overall good?).
+
+29
+
+**==> picture [318 x 519] intentionally omitted <==**
+
+Figure 11: AMT template for assessing validity of conditions for critic model training.
+
+30
+
+**==> picture [318 x 490] intentionally omitted <==**
+
+Figure 12: AMT human evaluation template for counterfactual re-planning. We use a similar layout for counterfactual planning task only removing the initial plan.
+
+31
+
diff --git a/open_review/iclr2024_8606.json b/open_review/iclr2024_8606.json
new file mode 100644
index 0000000000000000000000000000000000000000..e3fd733035d1ef33be390fdaf5e42f87c1249754
--- /dev/null
+++ b/open_review/iclr2024_8606.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8606",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "How do skip connections affect Graph Convolutional networks with graph sampling? A theoretical analysis on generalization",
+ "abstract": "Skip connections enable deep Graph Convolutional Networks (GCNs) to overcome oversmoothing, while graph sampling reduces computational demands by selecting a submatrix of the graph adjacency matrix during neighborhood aggregation. Learning deep GCNs with graph sampling has shown empirical success across various applications, but a theoretical understanding of the generalization guarantees remains limited, with existing analyses ignoring either graph sampling or skip connections. This paper presents the first generalization analysis of GCNs with skip connections using graph sampling.\nOur analysis demonstrates that the generalization accuracy of the learned model closely approximates the highest achievable accuracy within a broad class of target functions dependent on the proposed sparse effective adjacency matrix, denoted by $A^*$. Thus, graph sampling maintains generalization performance when $A^*$ accurately models data correlations. Notably, our findings reveal that skip connections lead to different sampling requirements across layers. In a two-hidden-layer GCN, the generalization is more affected by the sampled matrix deviations from $A^*$ of the first layer than the second layer. To the best of our knowledge, this marks the first theoretical characterization of skip connections' role in sampling requirements. We validate our theoretical results on benchmark datasets.",
+ "rebuttal": "## Question 1:\nWhat is OPT in Equation 13? $ \\mathcal{H}_{n, A^*} $ is defined as the target function, while $ y_n $ is the label of node $ n $. How is it possible that OPT is non-zero?\n\n## Answer Question 1:\n1. We revised the OPT definition, which is in equation (11) of the revision to resolve the confusion. \n We want to clarify that OPT is NOT the optimal value of the training problem. Instead, OPT is the smallest label prediction error of the best target function (over the choices of parameters $a_{\\mathcal{F}, r, i}^*$, $a_{\\mathcal{G}, r, i}^*$, $w^*_{r,i}$, $v_{r,i}^*$) in the concept class. OPT decreases as the concept class becomes more complex, such as increasing the integers $p_\\mathcal{F}, p_\\mathcal{G}$ and making activations $\\mathcal{F}$ and $\\mathcal{G}$ more complex. \n\n2. The definition of OPT does not consider learning, we only discuss the approximation accuracy of using some target function to approximate the labels. We will later use OPT to measure the generalization performance of our learned model. We realized the original presentation sequence of defining OPT after introducing the training algorithm may lead to confusion. We adjusted the sequence to define OPT immediately after the concept class and revised the definition based on the above discussion. \n\n## Question 2:\nIn Lemma 3.1 and Theorem 3.2: It is not clear with respect to which event the probability is taken.\n## Answer Question 2:\nHere the probability is with respect to the randomness in the SGD algorithm. The terminology is commonly used in theoretical generalization analysis, such as Theorem 3.1 in [1], and Theorem 1 in [2].\n\n## Question 3:\nIn Theorem 3.2: Could the authors present the assumptions better or give more intuitions?\n## Answer Question 3:\nAs shown in Weakness 6, we have simplified the assumptions in Theorem 3.2 to improve the presentation and we write a Proof overview in Appendix section C.1 to give more intuitions.\n\n## Question 4:\nWhy do the authors average in Equation 14 over all iterations of the SGD steps?\n## Answer Question 4:\nThis is a typical way to characterize the learning performance of SGD. Please see Theorem 1 in section 3.1 of paper [1] and Theorem 1 in section 6 of paper [2] also characterize the average performance of all SGD iterations. The intuition is that because the average performance is already good, considering that the models in the initial few iterations do not perform well, then the models learned at the end must have a desirable generalization.\n\n## Question 5:\nHow is $ (X, y_n) $ sampled, and how is $ D $ defined?\n## Answer Question 5:\nNote that our results are distribution-free. The setup of $(X, y_n)$ and $\\mathcal{D}$ are exactly the same as those in [3] see the first paragraph of page 7 of that paper. Specifically, in our paper, let $\\mathcal{D}_{{\\tilde{x}_n}}$ and\n$D_y$ denote the distribution from which the feature and label of node $n$ are drawn, respectively. \nLet $\\mathcal{D}$ denote the concatenation of these distributions.\n\nThen the given feature matrix $X$ and partial labels in $\\Omega$ can be viewed as $|\\Omega|$ identically distributed but correlated samples $(X, y_n)$ from $\\mathcal{D}$. The correlation results from the fact that the label of node $i$ depends on not only the feature of node $i$ but also neighboring features. We added this discussion after equation (10) in the revision.\n\n## Question 6:\nCould you elaborate on many assumptions, e.g., Section 3.4: it doesn't seem clear that the norms of the learned weight matrices are uniformly bounded.\n## Answer Question 6:\nWe prove that $ \\|W_t\\|_2 $ and $ \\|V_t\\|_2 $ are bounded by $\\tau_w$ and $\\tau_v$ in Appendix section B.3. Because $\\tau_w$ and $\\tau_v$ can be bounded by model complexity and sample complexity constants to simply the presentation of the paper, we removed $\\tau_w$ and $\\tau_v$ from the main text and replace them with their bounds using $ C_F $ and $ C_G $.\n\n## Reference\n1. Allen-Zhu, Zeyuan, Yuanzhi Li, and Yingyu Liang. \"Learning and generalization in overparameterized neural networks, going beyond two layers.\" Advances in neural information processing systems 32 (2019).\n2. Allen-Zhu, Zeyuan, and Yuanzhi Li. \"What can resnet learn efficiently, going beyond kernels?.\" Advances in Neural Information Processing Systems 32 (2019).\n3. Hongkang Li, Meng Wang, Sijia Liu, Pin-Yu Chen, and Jinjun Xiong. Generalization guarantee of training graph convolutional networks with graph topology sampling. In International Conference on Machine Learning (ICML), pp. 13014–13051. PMLR, 2022a.\n\n## Weakness 1:\nThe analyses focus on GCN structures with skip connections, utilizing edge sampling as the sampling strategy, which distinguishes them as novel aspects compared to previous generalization analyses on GCNs.\n## Answer Weakness 1:\nOur core sampling concept revolves around sampling edges between nodes of lower degrees with higher probability. Because the edges between lower-degree nodes correspond to larger entries in $A$, we want to sample larger entries with a higher probability and smaller entries with a lower probability. In our sampling strategy, we just divide entries in $A$ i [...]\n\n## Weakness 2:\nAnother example is in Section 3.1, where the authors highlight their own work in comparison to others by mentioning that other works only accommodate \"shallow GCNs\". However, the cited works also analyze two-layered GCNs.\n## Answer Weakness 2:\nWe understand that the reviewer would like to see a theoretical analysis of a network model that is more complicated than the current one. We agree that this is a valid point, and we would like to explore that direction in the future. However, we first need to stress that **the simple model we consider in this paper is already advancing t [...]\n\n## Weakness 4:\nAnother example is the final (untrained) layer in Equation 5, which is simply a matrix multiplication. Thus, does not satisfy universal approximation properties.\n## Answer Weakness 4:\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 3,
+ 5,
+ 5
+ ],
+ "score_mean": 4.75,
+ "score_variance": 1.58,
+ "score_spread": 3,
+ "score_min": 3,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The paper analyzes the generalization errors of a 2-layer GCN with skip connections and edge sampling as its design elements. The authors propose a sampling strategy that varies between layers and provides theoretical results for the performance of GCNs trained with SGD. Experimental evaluations on synthetic and real-world datasets align with the theoretical findings.\n\nStrengths of the paper:\n* The paper addresses an interesting and important problem by analyzing the impact of skip connections and edge sampling on the generalization performance of GCNs, distinguishing it from previous generalization analyses.\n* The paper provides solid theoretical results, which is a strength in understanding the behavior of GCNs with skip connections and edge sampling.\n\nWeaknesses of the paper:\n* Reviewers noted that the paper tends to overstate its results, particularly in claiming to analyze a large class of graph learning models when it focuses mainly on two-layer GCNs.\n* Some of the assumptions made in the paper are considered highly restrictive, such as assuming perfectly homophilous graphs, which may not reflect real-world scenarios.\n* Reviewers found issues with clarity, missing notations and definitions, and insufficient explanations in various parts of the paper, which can hinder understanding. The presentation of the paper is criticized for introducing numerous notations without proper explanation, making it difficult to follow.\n* The paper's focus on dense graphs and two-layer ski",
+ "forum_id": "J2pMoN2pon",
+ "primary_area": "learning theory",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_urgn",
+ "review_id": "fwSpjVJxu0",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 3058,
+ "edit_detected": true,
+ "edit_delta_seconds": 45953,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_8ATu",
+ "review_id": "CgTS6bkxkJ",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 2
+ },
+ "review_text_chars": 3479,
+ "edit_detected": true,
+ "edit_delta_seconds": 269666,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_cdgo",
+ "review_id": "TqrvTvTowG",
+ "scores": {
+ "rating": 5,
+ "soundness": 4,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1387,
+ "edit_detected": true,
+ "edit_delta_seconds": 835031,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_YYVW",
+ "review_id": "s1542y8WuA",
+ "scores": {
+ "rating": 5,
+ "soundness": 1,
+ "presentation": 1,
+ "contribution": 1,
+ "confidence": 5
+ },
+ "review_text_chars": 2813,
+ "edit_detected": true,
+ "edit_delta_seconds": 2400328,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8606.md b/open_review/iclr2024_8606.md
new file mode 100644
index 0000000000000000000000000000000000000000..93047e3345acca0764963d304ffc84806ac20ec7
--- /dev/null
+++ b/open_review/iclr2024_8606.md
@@ -0,0 +1,837 @@
+
+
+## - HOW DO SKIP CONNECTIONS AFFECT GRAPH CONVO - LUTIONAL NETWORKS WITH GRAPH SAMPLING? A THE ORETICAL ANALYSIS ON GENERALIZATION
+
+Authors withheld for review
+
+## ABSTRACT
+
+Skip connections enable deep Graph Convolutional Networks (GCNs) to overcome over-smoothing, while graph sampling reduces computational demands by selecting a submatrix of the graph adjacency matrix during neighborhood aggregation. Learning deep GCNs with graph sampling has shown empirical success across various applications, but a theoretical understanding of the generalization guarantees remains limited, with existing analyses ignoring either graph sampling or skip connections. This paper presents the first generalization analysis of GCNs with skip connections using graph sampling. Our analysis demonstrates that the generalization accuracy of the learned model closely approximates the highest achievable accuracy within a broad class of target functions dependent on the proposed sparse effective adjacency matrix, denoted by _A[∗]_ . Thus, graph sampling maintains generalization performance when _A[∗]_ accurately models data correlations. Notably, our findings reveal that skip connections lead to different sampling requirements across layers. In a two-hidden-layer GCN, the generalization is more affected by the sampled matrix deviations from _A[∗]_ of the first layer than the second layer. To the best of our knowledge, this marks the first theoretical characterization of skip connections’ role in sampling requirements. We validate our theoretical results on deep GCNs for benchmark datasets.
+
+## 1 INTRODUCTION
+
+Graph neural networks (GNNs) outperform traditional machine learning techniques when learning graph-structured data, that comprises a collection of features linked with nodes and a graph representing the correlation of the features. As one of the most popular variants of GNN, Graph Convolutional Networks (GCNs) (Kipf & Welling, 2017) perform the convolution operations on graphs by aggregating neighboring nodes to update the feature presentation of every node. GCNs have demonstrated great empirical success such as text classification (Norcliffe-Brown et al., 2018; Zhang et al., 2018) and recommendation systems (Wu et al., 2019; Ying et al., 2018).
+
+As the depth of vanilla GCNs increases, there is a tendency for the node representations to converge toward a common value, a phenomenon known as “over-smoothing” (Li et al., 2018). A widely adopted mitigation approach is to incorporate skip-connections, which allow features to bypass intermediate layers and directly contribute to future layers’ output (Li et al., 2019; Xu et al., 2018b). Moreover, skip connections are shown to accelerate the training process (Xu et al., 2021). Skip connections have thus become an essential component of deep GCNs.
+
+Processing large-scale graphs can be computationally demanding, particularly when dealing with the recursive neighborhood integration in deep GCNs. To alleviate this computational burden, graph sampling or sparsification methods select a subset of nodes or edges from the original graph when computing neighborhood aggregation. Various graph sampling approaches have been developed, including node sampling methods like GraphSAGE (Hamilton et al., 2017), layer-wise sampling like FastGCN (Chen et al., 2018), subgraph sampling methods like Graphsaint (Zeng et al., 2020), and other graph sparsification methods like (Li et al., 2020; Chen et al., 2021; You et al., 2020).
+
+While GCNs have demonstrated empirical success, their theoretical foundation remains relatively underdeveloped, particularly the generalization analysis for training GCNs with graph sampling. Du et al. (2019a) provides a theoretical framework connecting graph neural networks and graph kernels. Verma & Zhang (2019); Zhang et al. (2020a); Liao et al. (2020); Maskey et al. (2022);
+
+1
+
+Tang & Liu (2023) offer convergence and generalization guarantees for GCN without sampling. Xu et al. (2021) proves the implicit acceleration achieved by skip connections in linearized graph neural networks, ignoring graph sampling and non-linear activation. Li et al. (2022a); Zhang et al. (2023b) provide theoretical generalization analyses of training GCNs with sampling. However, their network architectures exclude skip connections and thus are oversimplified for deep GCNs.
+
+To the best of our knowledge, this paper provides the first theoretical generalization analysis of training GCNs with skip connections using graph sampling. We consider the semi-supervised node regression problem, where given all node features and partial labels, the objective is to predict the unknown node labels. Our major results include:
+
+(1) We analyze training two-hidden-layer GCNs with a skip connection, using graph topology sampling methods that prefer edges between low-degree nodes. Our analysis demonstrates that the generalization accuracy of the learned model approximates the highest achievable accuracy within a broad class of target functions, which map input features to labels. Each target function is a sum of a simpler base function that contributes significantly to the output and a more complicated composite function that has a comparatively smaller impact on the output. This class encompasses a wide range of functions, including two-hidden-layer GCNs with skip connections.
+
+(2) This paper proposes the concept of the sparse effective adjacency matrix, denoted as _A[∗]_ , to characterize the influence of graph sampling in GCNs with skip connections. This is an extension from the dense effective adjacency matrix introduced in (Li et al., 2022a) for GCNs lacking skip connections, This work demonstrates that the target functions depend on _A[∗]_ rather than the original graph’s adjacency matrix _A_ . _A[∗]_ can be sparser than _A_ . Consequently, even when the sampled adjacency matrix is very sparse and significantly deviates from _A_ , as long as it approximates _A[∗]_ closely enough to enable accurate feature-to-output mapping by the target functions, graph sampling does not compromise the model’s generalization performance.
+
+(3) This paper theoretically demonstrates that, owing to the presence of skip connections, sampling in different layers has varying impacts on the model’s output. Specifically, the first layer connects directly to the output through the skip connection, and as a result, the deviation of the sampled matrix from the sparse effective matrix _A[∗]_ has a more significant effect than the sampling deviation of the second layer. In contrast, the second layer influences the output through a composite function that contributes less significantly, allowing for more substantial deviations from _A[∗]_ in the sampling process without compromising error rates. To the best of our knowledge, this is the first theoretical characterization of how skip connections influence sampling requirements, while previous analyses such as (Li et al., 2022a) assumes that the sampling approach remains consistent across different layers.
+
+## 1.1 RELATED WORKS
+
+**Other theoretical analysis of GNNs** focus on expressive power and convergence analysis. Xu et al. (2018a); Morris et al. (2019) show the power of 1-hop message passing is upper bounded by 1-WL test. Feng et al. (2022); Wang & Zhang (2022) extend the analysis to k-hop message passing neural networks and spectral GNNs. Zhang et al. (2023a) explores the expressive power of GNNs from the perspective of graph biconnectivity. Oono & Suzuki (2020); Ramezani et al. (2020); Cong et al. (2021) investigates the optimization of GNN training.
+
+**Generalization analyses of Neural Networks (NNs).** Various approaches have been developed to analyze the generalization of feedforward NNs. The neural tangent kennel (NTK) approach shows that overparameterized networks can be approximated by kernel methods in the limiting case (Jacot et al., 2018; Du et al., 2019b). The model estimation approach assumes the existence of a ground-truth one-hidden-layer model with desirable generalization and estimates the model parameters using the training data (Zhong et al., 2017; Zhang et al., 2020b; Li et al., 2022b). The feature learning approach analyzes how a shallow NN learns important features during training and thus achieves desirable generalization (Li & Liang, 2018; Allen-Zhu & Li, 2022; 2023). All works ignore the skip connection except Allen-Zhu & Li (2019), which analyzes the generalization of two-hidden-layer ResNet. Our analysis builds upon Allen-Zhu & Li (2019) and extends to GCNs with graph sampling.
+
+**Various GNN sampling methods** . Node-wise sampling (Hamilton et al., 2017) randomly selects nodes and their multi-hop neighbors to create a localized subgraph. Layer-wise sampling (Chen et al., 2018; Zou et al., 2019; Huang et al., 2018) sample a fixed number of nodes in each layer. Subgraph-based sampling (Zeng et al., 2020; Chiang et al., 2019) generates subgraphs by sampling nodes and edges. As for graph sparsification, SGCN (Li et al., 2020) introduces the alternating direction method of multipliers (ADMM) to sparsify the adjacency matrix. UGS (Chen et al., 2021), Early-Bird (You et al., 2020) and ICPG (Sui et al., 2022) design a sparsifying strategy to prune the graph based on the lottery ticket hypothesis.
+
+2
+
+- 2 TRAINING GCNS WITH LAYER-WISE GRAPH SAMPLING: SUMMARY OF MAIN COMPONENTS
+
+## 2.1 GCN LEARNING SETUP
+
+Let _G_ = _{V, E}_ represent an undirected graph, where _V_ is the set of nodes with _|V|_ = _N_ nodes and _E_ is the set of edges. ∆ is the maximum degree of _G_ . An adjacency matrix _A_[˜] _∈ R[N][×][N]_ is defined to describe the overall graph topology where _A_[˜] ( _i, j_ ) = 1 if ( _vi, vj_ ) _∈E_ else _A_[˜] ( _i, j_ ) = 0. _A_ denotes the normalized adjacency matrix with _A_ = _D[−]_[1] 2 ( _A_[˜] + _I_ ) _D[−]_ 2[1] where _D_ is the degree matrix with diagonal elements _Di,i_ =[�] _j[A]_[˜][(] _[i, j]_[)][.][Each element] _[ A][ij]_[of the matrix] _[ A]_[ represents the normalized] weight of the edge between nodes _i_ and _j_ . _an_ denotes the _n_ th column of the _A_ . Let _X ∈_ R _[d][×][N]_ denote the feature matrix of _N_ nodes, where _x_ ˜ _n ∈_ R _[d]_ denotes the feature of node _n_ . Assume _∥x_ ˜ _n∥_ = 1 for all _n_ without loss of generality. _yn ∈_ R _[k]_ represents the label of node _n_ . Let Ω _⊂V_ denote the set of labeled nodes. Given _X_ and partial labels in Ω, the objective of semi-supervised node-regression is to predict the unknown labels in _V/_ Ω.
+
+We consider training a two-hidden-layer GCN with a single skip connection, where the function out : R _[d][×][N] ×_ R _[N][×][N] →_ R _[k][×][N]_ with
+
+**==> picture [310 x 11] intentionally omitted <==**
+
+where _σ_ ( _·_ ) applies the ReLU activation ReLU( _x_ ) = max( _x,_ 0) to each entry, _W ∈_ R _[m][×][d]_ , _U ∈_ R _[m][×][m]_ , and _C ∈_ R _[k][×][m]_ denote the first hidden-layer, second hidden-layer, and output layer weights, respectively. We only train _W_ and _U_ . The output of the _n_ th node can be written as out _n_ : R _[d][×][N] ×_ R _[N] →_ R _[k]_ is
+
+**==> picture [316 x 11] intentionally omitted <==**
+
+We focus on the _ℓ_ 2 regression task and the prediction loss of the _n_ th node is defined as
+
+**==> picture [311 x 21] intentionally omitted <==**
+
+The learning problem solves the following empirical risk minimization problem:
+
+**==> picture [299 x 27] intentionally omitted <==**
+
+## 2.2 TRAINING WITH STOCHASTIC GRADIENT DESCENT AND GRAPH SAMPLING
+
+(4) is solved by the stochastic gradient descent (SGD) method starting from random initialization. In each iteration, the gradient of the prediction loss of one randomly selected node is used to approximate the gradient of _L_ Ω. The recursive neighborhood aggregation through multiplying the feature matrix with _A_ is costly in both computation and memory. Graph sampling sparsify the adjacency matrix _A_ to reduce the computation and memory requirement. For example, edge sampling prunes a subset of edges in _E_ and the corresponding entries in _A_ . One common theme of various edge sampling methods is to keep the edge between nodes with smaller degrees while pruning edges between nodes with larger degrees (Chen et al., 2018; Zeng et al., 2020). The intuition is that if two nodes with smaller degrees are connected, they are more influential to each other, and therefore, the edge between them should be sampled with a higher probability.
+
+In this paper, we allow the sampling methods with different parameter settings in different layers and will characterize how sampling in different layers affects generalization differently. In the _t_ th SGD iteration, let _A_[1] _[t]_ and _A_[2] _[t]_ denote the sampled _A_ matrix in the first and second hidden layers, respectively. Let _W_[(] _[t]_[)] and _U_[(] _[t]_[)] denote the current estimation of _W_ and _U_ . When computing the stochastic gradient, instead of (2), we use[1]
+
+out( _X, A_[1] _[t] , A_[2] _[t]_ ; _W_[(] _[t]_[)] _, U_[(] _[t]_[)] ) = _Cσ_ ( _W_[(] _[t]_[)] _XA_[1] _[t]_ ) + _Cσ_ ( _U_[(] _[t]_[)] _σ_ ( _W_[(] _[t]_[)] _XA_[1] _[t]_ ) _A_[2] _[t]_ ) (5)
+
+> 1If different layers use different adjacency matrices, we specify both matrices in the function representation. Otherwise, we use one matrix to simplify notations.
+
+3
+
+## 3 MAIN ALGORITHM AND THEORETICAL RESULTS
+
+## 3.1 INFORMAL KEY THEORETICAL FINDINGS
+
+We first summarize our major theoretical insights and takeaways before formally presenting them.
+
+1. **The first theoretical generalization guarantee of two-hidden-layer GCNs with skip-connection.** We demonstrate that training a single skip-connection two-hidden-layer GCN using our Algorithm 1 returns a model that achieves the label prediction performance almost the same as the best prediction performance using a large class of target functions. We also characterize quantitatively the required number of labeled nodes, referred to as the sample complexity, to achieve the desirable prediction error. To the best of our knowledge, only Li et al. (2022a); Zhang et al. (2023b) provide explicit sample complexity bounds for node classification using graph neural networks, but for shallow GCNs with no skip connection. Our work is the first one that provides a theoretical generalization and sample complexity analysis for the practical GCN architecture with skip connections.
+
+2. **Graph sampling affects generalization through the sparse effective adjacency matrix** _A[∗]_ . We show that training with edge sampling produces a model with the same prediction accuracy as a model trained on a GCN with _A[∗]_ as the normalized adjacency matrix, i.e., replacing _A_ with _A[∗]_ in (1). The effective matrix is first discussed in (Li et al., 2022a), in the setup of node sampling for two-hidden-layer GCNs with no skip connection, but _A[∗]_ in (Li et al., 2022a) is dense. We show that the effective matrix also exists for edge sampling on GCNs with skip connection and can be sparse, indicating that the sampled matrices can be very sparse without sacrificing generalization.
+
+3. **Layer-Specific graph sampling due to skip connection** . We show that in the two-hiddenlayer GCN with a single skip connection, the first hidden-layer learns a simpler base function that contributes more to the output, while the second hidden-layer learns a more complicated function that contributes less to the output. Therefore, compared with the first hidden-layer, the second hidden-layer is more robust to graph sampling and can tolerate a deviation of the sampled matrix to _A[∗]_ without affecting the prediction accuracy. To the best of our knowledge, this is the first theoretical characterization of how skip connections affect the sampling requirements in different layers, while the previous analysis in (Li et al., 2022a) assumes the same matrix sampling deviations for all layers.
+
+## 3.2 GRAPH TOPOLOGY SAMPLING STRATEGY
+
+Our sampling strategy differs slightly from existing edge sampling methods due to our adjustments aiming to facilitate and simplify the theoretical analysis. Nevertheless, our core concept is still sampling edges between lower-degree nodes with a higher probability, while sampling edges between higher-degree nodes with a smaller probability. This approach aligns with practical edge sampling strategies such as Zeng et al. (2020).
+
+We follow the same assumption on node degrees as that in Li et al. (2022a). Specifically, the node degrees in _G_ can be divided into _L_ ( _L ≥_ 1) groups, with each group having _Nl_ nodes ( _l ∈_ [ _L_ ]). The degrees of all _Nl_ nodes in group _l_ are in the order of _dl_ , i.e., between _cdl_ and _Cdl_ for some constants _c ≤ C_ . _dl_ is order-wise smaller than _dl_ +1, i.e., _dl_ = _o_ ( _dl_ +1).
+
+Let matrix _ABij ∈_ R _[N][i][×][N][j]_ denote a submatrix of _A_ with rows in group _i_ and columns corresponding to group _j_ . Then all entries in _ABij_ are in the order of ~~_√_~~ _d_ 1 _idj_[.][Note that a relatively smaller entry in] _A_ corresponds to an edge between relatively higher-degree nodes. Let _p[k] ij_[in][ [0] _[,]_[ 1]][ (] _[k]_[= 1] _[,]_[ 2][) reflect] the sampling weights on smaller entries in _ABij_ in the first and second hidden layers, respectively. Our sampling strategy can be described as follows: at each iteration, for each submatrix _ABij_ ,
+
+(1) if _i > j_ , each of the top[2] _d_ 1� _ddji_[largest edge weights] _[ A][ij]_[in] _[ A][B][ij]_[is sampled independently with] probability 1 _− p[k] ij_[.][The remaining entries in] _[ A][B] ij_[are sampled independently with a probability of] _p[k] ij_[.]
+
+(2) if _i ≤ j_ , each of the top _d_ 1 largest _Aij_ in _ABij_ are sampled with probability 1 _− p[k] ij_[.][The] remaining entries in _ABij_ are sampled independently with a probability of _p[k] ij_[.]
+
+> 2The values _d_ 1 ~~�~~ _ddji_[and] _[ d]_[1][for selecting the top largest entries in] _[ A][ij]_[are chosen to simplify our theoretical] analysis. In fact, any values in these orders are sufficient for our theoretical analysis. Note that the main idea of sampling edges between nodes of lower degrees with higher probability is preserved in our sampling strategy.
+
+4
+
+**Algorithm 1** SGD with Hierarchical Layer Sampling (HLS)
+
+1: **Input:** Graph _G_ with normalized adjancey matrix _A_ , node features _X_ , known labels in Ω, step size _ηw_ and _ηv_ , number of iterations _T_ .
+
+2: Initialize _W_[(0)] , _V_[(0)] , _C_ . **W** 0 = 0, **V** 0 = 0
+
+3: **for** _t_ = 0 **to** _T −_ 1 **do** 4: Sample _A_[1] _[t]_ using _p_[1] _ij_[and sample] _[ A]_[2] _[t]_[ using] _[ p]_[2] _ij_[.] 5: Randomly sample _n_ from Ω. 6: Calculate the gradient of _L_ in (23) and update weight deviations through _∂L_ ( **W** _,_ **V** ) **W** _t_ +1 _←_ **W** _t − ηw ∂_ **W** ��� **W** = **W** _t,_ **V** = **V** _t_[,] _∂L_ ( **W** _,_ **V** ) **V** _t_ +1 _←_ **V** _t − ηw ∂_ **V** ��� **W** = **W** _t,_ **V** = **V** _t_ 7: **end for** 8: **Output:** _W_[(] _[T]_[ )] = _W_[(0)] + **W** _T_ , _V_[(] _[T]_[ )] = _V_[(0)] + **V** _T_ .
+
+We allow the sampling weights to vary in different layers and will quantify how these weights affect generalization differently. When others are fixed, a small _p[k] ij_[indicates sampling primarily low-degree] degree nodes, while a large _p[k] ij_[indicates sampling more edges between high-degree nodes.]
+
+To see why this sampling strategy prioritizes low-degree edges, consider the sampled edges between a fixed group _i_ and other groups _j_ . Assume _p[k] ij_[are the same for all groups for simplicity.][If] _[ d][j][< d][j][′]_ for two groups _j_ and _j[′]_ , then _d_ 1� _ddji[> d]_[1] � _ddji′_[, indicating that more lower-degree edges connecting] groups _i_ and _j_ are sampled, compared with edges connecting groups _i_ and _j[′]_ .
+
+To analyze the impact of this graph topology sampling on the learning performance, we define the _**sparse effective adjacency matrix** A[∗]_ where in each submatrix _A[∗] Bij_[:]
+
+(1) if _i > j_ , the top _d_ 1� _ddji_[largest values in] _[ A][B][ij]_[remain the same, while other entries are set to zero.]
+
+(2) if _i ≤ j_ , the top _d_ 1 largest values in _ABij_ remain the same, while other entries are set to zero.
+
+One can easily check from the definition that _∥A[∗] ∥_ 1 = _O_ (1), i.e., the maximum absolute column sum of _A[∗]_ is bounded by a constant. Moreover, _A[∗]_ is sparse by definition.
+
+3.3 CONCEPT CLASS AND HIERARCHICAL LEARNING
+
+Our theoretical generalization analysis shows that the returned GCN model achieves a prediction error that is a small constant times the minimum prediction error achieved by the best target function among a large concept class of functions. When the concept class characterizes the mapping function from node features to labels, the minimum prediction error by that class is close to zero, and so is the prediction error by the learned GCN model. Moreover, the concept class depends on the sparse _A[∗]_ , rather than the dense _A_ . As long as the sampled matrices are close _A[∗]_ , despite being very sparse, graph sampling does not degrade generalization.
+
+Consider a concept class of target functions _H_ consisting of two smooth functions _F_ and _G_ : R _[d][×][N] ×_ R _[N][×][N] →_ R _[k][×][N]_ and a constant _α ∈_ R[+] :
+
+_HA∗_ ( _X_ ) = _FA∗_ ( _X_ ) + _αGA∗_ ( _FA∗_ ( _X_ )) (6)
+
+where the _r_ th ( _r ∈_ [ _k_ ]) row of _FA∗_ and _GA∗_ , denoted by _F[r]_ and _G[r]_ : R _[d][×][N] ×_ R _[N][×][N] →_ R[1] _[×][N]_ , satisfy
+
+**==> picture [282 x 62] intentionally omitted <==**
+
+5
+
+where _pF , pG_ are positive integers. Given _r_ , _i_ , the scalers _a[∗] F ,r,i[, a] G[∗] ,r,i_[are in][ [] _[−]_[1] _[,]_[ 1]][, the vectors] _[ w] r,i[∗]_ are in R _[d]_ , and _vr,i[∗]_[are in][ R] _[k]_[.][For simplicity, we assume] �� _wr,i∗_ �� = �� _vr,i∗_ �� = ~~_√_~~ 12[for all] _[ r]_[,] _[ i]_[.] All _F[r,i] , G[r,i]_ : R _→_ R are smooth activation fuctions. We abuse notations in (7) to apply activations to every entry of a 1 _× N_ vector. The _n_ th column of _HA∗_ , denoted by _Hn,A∗_ : R _[d][×][N] ×_ R _[N][×][N] →_ R _[k]_ , represents the target function for node _n_ .
+
+_F_ and _G_ can both be viewed as one-hidde-layer GCNs with smooth activation functions and adjacent matrix _A[∗]_ . The target function _H_ includes the base signal _F_ , which is less complex yet contributes significantly to the target, and _G_ , which is more complicated but contributes less. Intuitively, we will show that using a two-hidden-layer GCN with a skip connection, the first hidden layer learns _F_ and the second hidden layer learns _G_ ( _F_ ).
+
+To quantify the complexity of target functions, we define model complexity constants _Cε_ and sample complexity constants _C_ s, follow those in Li et al. (2022a) (Section 1.2) and Allen-Zhu & Li (2019) (Section 4).
+
+Formally, for any smooth function _ϕ_ ( _z_ ) with its power series representation as _ϕ_ ( _z_ ) =[�] _[∞] i_ =0 _[c][i][z][i]_[,] define two useful parameters as follows,
+
+**==> picture [305 x 65] intentionally omitted <==**
+
+where _R ≥_ 0 and _C[∗]_ is a sufficiently large constant. C _ε_ and Cs represent the required number of model parameters and training samples to learn _ϕ_ up to _ϵ_ error, respectively. see Appendix B for more discussion.
+
+We will show that the learned GCN by our method performs almost the same as the best function in the concept class in predicting unknown labels. Let _Dx_ ˜ _n_ and _Dyn_ denote the distribution from which the feature and label of node _n_ are drawn, respectively. Let _D_ denote the concatenation of these distributions. Then the given feature matrix _X_ and partial labels in Ω can be viewed as _|_ Ω _|_ identically distributed but correlated samples ( _X, yn_ ) from _D_ . The correlation results from the fact that the label of node _i_ depends on not only the feature of node _i_ but also neighboring features.
+
+To measure the label approximation performance of the target function, define
+
+**==> picture [335 x 25] intentionally omitted <==**
+
+as the minimum prediction error achieved by the best target function (over the choices of parameters _a[∗] F ,r,i[, a] G[∗] ,r,i[, w] r,i[∗][v] r,i[∗]_[)][in][the][concept][class.][OPT][decreases][when][the][target][functions][are][more] complex, or the concept class enlarges, or if _A[∗]_ characterizes the node correlations properly.
+
+## 3.4 MODELING THE PREDICTION ERROR OF UNKNOWN LABELS
+
+To simplify the analysis and representation, we re-parameterize _U_ in (1) and (2) as _V C_ , where _V ∈_ R _[m][×][k]_ . Then, (2) can be rewritten as follows:
+
+**==> picture [347 x 23] intentionally omitted <==**
+
+We follow the conventional setup for theoretical analysis that _C_ is fixed at its random initialization, and only _W_ and _V_ are updated during training. _C_ , _W_[(0)] , _V_[(0)] are randomly initialized from Gaussian distributions, _Ci,j_ i.i.d. _∼N_ �0 _, m_[1] �, _Wi,j_[(0)] i.i.d. _∼N_ �0 _, σw_[2] � and _Vi,j_[(0)] i.i.d. _∼N_ �0 _, σv_[2] _[/m]_ �, respectively. _σw_ and _σv_ follow the parameter selection in Table 1.
+
+The algorithm is summarized in Algorithm 1. When computing the stochastic gradient of a sampled label _yn_ , the loss is represented as a function of the weight deviations **W** _,_ **V** from initiation _W_[(0)] and _V_[(0)] , i.e.,
+
+**==> picture [321 x 13] intentionally omitted <==**
+
+6
+
+**W** _t_ and **V** _t_ denote the weight deviations of the estimated weights _W_[(] _[t]_[)] and _V_[(] _[t]_[)] in iteration _t_ from _W_[(0)] and _V_[(0)] , i.e., _W_[(] _[t]_[)] = _W_[(0)] + **W** _t_ , _V_[(] _[t]_[)] = _V_[(0)] + **V** _t_ . We assume 0 _< α ≤ O_[�] � _C_ s( _G,∥_ 1 _A[∗] ∥_ 1) � throughtΘ (� _αC_ s( _G_ the _, ∥A_ training. _[∗] ∥_ 1)) during training, i.e.,We prove that _∥∥_ **WW** _t∥t∥_ 2 2 _≤_ andΘ (� _C∥_ s **V** ( _Ft∥_ ))2 , _∥_ are **V** _t∥_ bounded2 _≤_ Θ (� _αC_ bys(Θ ([�] _G, ∥CA_ s( _[∗] F∥_ 1)))) _<_ and 1 for all _t_ . See Appendix C.5 for the proof.
+
+The following lemma shows that graph sampling in different layers contributes to the output approximation differently. In other words, to maintain the same accuracy in the output, the tolerable sampling rates in different layers are different.
+
+**Lemma 3.1** _For any given constant E, if the first and second layer A_[1] _[t] and A_[2] _[t] are sampled with √didj E √didj E p_[1] _ij[≤]_[Θ(][�] _NiNj C_ s( _F ,∥A[∗] ∥_ 1)[)] _[ and][ p] ij_[2] _[≤]_[Θ(][�] _NiNj αC_ s( _F ,∥A[∗] ∥_ 1) _C_ s( _G,∥A[∗] ∥_ 1)[)] _[, respectively, then with the] probability over_ 1 _− e[−]_[Ω(] _[E][√] didj /C_ s( _F_ ))
+
+**==> picture [383 x 51] intentionally omitted <==**
+
+Note that Θ ([�] _αC_ s( _G, ∥A[∗] ∥_ 1)) _<_ 1, then the upper bound for _p_[2] _ij_[is higher than that for] _[ p]_[1] _ij_[in the] assumption. That means the sampling for the first hidden layer must focus more on low-degree edges, while such a requirement is relaxed in the second layer. Then, (13) indicates that a larger deviation of the sampled matrix from _A[∗]_ can be tolerated in the second hidden layer compared with the first layer. Lemma 3.1 reveals that the skip connection allows for a more flexible sampling strategy in deeper layers.
+
+We will show the learned model can achieve an error close to _O_ (OPT). Our main theorem can be sketched as follows,
+
+**Theorem 3.2** _For ϵ_ 0 = Θ([�] _α_[4] _C_ s( _G, ∥A[∗] ∥_ 1)[4] ) _<_ 1 _and ϵ_ = 10 _·_ OPT + _ϵ_ 0 _, suppose sampling √didj ϵ_ 0 _√didj ϵ_ 0 _probability p_[1] _ij[≤]_[Θ(][�] _NiNj C_ s( _F ,∥A[∗] ∥_ 1)[)] _[and][p]_[2] _ij[≤]_[Θ(][�] _NiNj αC_ s( _F ,∥A[∗] ∥_ 1) _C_ s( _G,∥A[∗] ∥_ 1)[)] _[,][there][exist]_ Θ(∆ _M_ � 0 =[4] _C_ polys( _F,_ � _∥CA_ s _[∗]_ ( _∥F_ 1 _,_ ) _∥_[2] _A∥A[∗] ∥[∗]_ 1 _∥_ )[4] 1 _, C_[log] s( _[ Nϵ] G, ∥[−] A_[2][)] _[∗][ such that for every] ∥_ 1) _, ∥A[∗] ∥_ 1 _, α[−]_[1][�] _, T[ m]_ 0 = _[≥]_ Θ _[M]_[�] �[0] _[,] ∥[ T] AC[∗]_ s _[≥] ∥_ (1 _F_ min _[T] ,∥_[0] _A{[and][∗]_ 0 _∥._ 11) _,ϵ[ |]_[2][2][Ω] _}[|]_ � _[≥] and[N]_[0] _N[, with]_ 0 = _high probability, the SGD algorithm satisfies_
+
+**==> picture [326 x 30] intentionally omitted <==**
+
+As a sanity check, when the concept class enlarges, OPT decreases. Theorem 3.2 shows that the required number of neurons _M_ 0 (model complexity) and labels _N_ 0 (sample complexity) both increase accordingly. _p_[1] _ij_[and] _[ p]_[2] _ij_[decreasing means that we should sample more high-weight edges.][Thus, our] theoretical bounds match the intuition that a larger model, more labels, and more high-weight edges improve the prediction accuracy. _N_ 0 is in the order of log _N_ , indicating that the unknown labels can be accurately predicted from partial labels. Moreover, when _∥A[∗] ∥_ 1 increases, _Cε_ and _C_ s, and _ϵ_ 0 all increase. Theorem 3.2 indicates the model complexity _M_ 0, _N_ 0, and the generalization error _ϵ_ all increasing, indicating worse prediction performance.
+
+This proof of Theorem 3.2 builds upon the proof of Theorem 1 in Allen-Zhu & Li (2019), which analyzes the generalization of a three-layer ResNet for a supervised regression problem. We extend the analysis to training GCNs with graph sampling for a semi-supervised node regression problem. The main technical challenge is to handle the dependence of labels on neighboring features and the error in adjacency matrices due to the sampling. Compared with Li et al. (2022a) which also considers training GCN with graph sampling, we consider a different sampling method from that in Li et al. (2022a). The resulting _A[∗]_ in Li et al. (2022a) is a dense matrix as _A_ , while _A[∗]_ in our paper is a sparse matrix. Our results thus allow the sampled matrices to be very sparse while still maintaining the generalization accuracy. Moreover, the sampling method is the same for both hidden layers in Li et al. (2022a), resulting the same deviation from _A[∗]_ in both layers. Our results indicate that the skip connection allows a more flexible sampling method in the second layer.
+
+7
+
+## 4 EMPIRICAL EXPERIMENT
+
+## 4.1 EXPERIMENT ON SYNTHETIC DATA
+
+We generate a graph _G_ with _N_ = 2000 nodes. _G_ has two-degree groups. Group 1 has _N_ 1 = 200 nodes, and the degree of each node follows a Gaussian distribution _N_ � _d_ 1 _, σ_[2][�] . Group 2 has _N_ 2 = 1800 nodes, and the degree of each node follows a Gaussian distribution _N_ � _d_ 2 _, σ_[2][�] . _d_ 1 = 200 and _σ_ = 20. The degrees are truncated to fall within the range of 0 to 500. Given _A_ , the sparse _A[∗]_ is obtained following the procedure in Section 3.2. The node labels are generated by the target function
+
+**==> picture [246 x 11] intentionally omitted <==**
+
+**==> picture [335 x 26] intentionally omitted <==**
+
+where _X ∈_ R _[d][×][N]_ , _W[∗] ∈_ R _[r][×][d]_ , _V[∗] ∈_ R _[r][×][k]_ , and _C ∈_ R _[k][×][r]_ are randomly generated with each entry i.i.d. from _N_ (0 _,_ 1). _d_ = 100, _k_ = 5, _r_ = 30, _α_ = 0 _._ 5. A two-hidden-layer GCN with a single skip-connection as defined in (2) with _m_ neurons in each hidden layer is trained on a randomly selected set Ω of labeled nodes. The rest _N −|_ Ω _|_ labels are used for testing. The test error is measured by the _ℓ_ 2 regression loss in (3).
+
+**Model and sample complexities with** _∥A[∗] ∥_ 1: In Figures 1 (a) (b), we vary _A[∗]_ by changing _d_ 2 and the corresponding _A_ . We directly train with _A[∗]_ to study the impact of _A[∗]_ on model and sample complexities. In Figures 1 (a), _|_ Ω _|_ = 1200 and the number of neurons per layer _m_ varies. To achieve the same test accuracy, when _∥A[∗] ∥_ 1 increases, the number of neurons also increases, verifying our model complexity _M_ 0 in Theorem 3.2. In Figures 1 (b), _m_ = 50 and _|_ Ω _|_ varies. To achieve the same test accuracy, when _∥A[∗] ∥_ 1 increases, the required number of labels also increases, verifying our sample complexity _N_ 0 in Theorem 3.2.
+
+**==> picture [329 x 116] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 1: Experiment on synthetic data (a) Test error with model complexity and _∥A[∗] ∥_ 1. (b) Test error with sample complexity and _∥A[∗] ∥_ 1. (c) The second hidden layer tolerates more error than the first hidden layer. See more details in Appendix D.
+
+**Layer-wise sampling impact on generalization** : We fix Ω= 1200, _m_ = 50, _∥A[∗] ∥_ 1 = 1 _._ 27. We sample adjacency matrices during training. Figure 1 (c) shows the relationship between the test error and the average deviation of sampled matrices ( _A_[1] _[t]_ and _A_[2] _[t]_ in the first and second hidden layers) from _A[∗]_ . One can see that sampling in the second hidden layer (yellow dashed line) contributes to generalization degradation much milder than sampling in the first hidden layer (red solid arrow). This verifies our Lemma 3.1 that the sampling requirements are more restrictive in the first layer than the second layer to maintain the same generalization accuracy.
+
+## 4.2 EXPERIMENT ON REAL DATA
+
+We evaluate on the large-scale Open Graph Benchmark (OGB) datasets for node multi-class classification tasks. The results on Ogbn-Arxiv are reported here. The results on Ogbn-Products and details of the datasets are in Appendix D. The task of Ogbn-Arxiv is to classify the 40 subject areas of arXiv CS papers. We use 60% of the data for training, 20% for testing, and 20% for verification. We deploy an 8-layer Jumping Knowledge Network (Xu et al., 2018b) GCN with concatenation layer aggregation as a learner network. Each hidden layer consists of 128 neurons. We treat the first four layers as shallow layers and the last four layers as deep layers. Shallow and deep layers are sampled
+
+8
+
+differently. The generalization is evaluated by the fraction of erroneous predictions of unknown labels.
+
+**Sampling in deep layers is more flexible with less generalization degradation** . In this experiment, we employ a simplified version of the graph sampling method discussed in Section 3.2. For the shallow layers, at each iteration _t_ , we obtain a sampled adjacency matrix _A_[1] _[t]_ as follows: we sample the top _q_ 1 fraction of the largest edge weights _Aij_ from the adjacency matrix _A_ with a 99% probability, and sample the remaining entries with a 1% probability. For the deep layers, the sampled adjacency matrix _A_[2] _[t]_ is generated similarly, but we use the top _q_ 2 fraction of largest _Aij_ , again sampling with probabilities of 99% and 1% for the top and remaining entries, respectively.
+
+Figure 2 (a) shows test error when _q_ 1 and _q_ 2 vary. One can see that the test error decreases more drastically when only increasing _q_ 1 (yellow dashed arrow) compared with only increasing _q_ 2 (red solid arrow), indicating that graph sampling in shallow layers has a more significant impact than graph sampling in deeper layers. When both _q_ 1 and _q_ 2 are greater than 0.6, the test error is always small (less than 0.29) for a wide range of _q_ 1 _, q_ 2. That may suggest the existence of multiple sparse _A[∗]_ such that sampled matrices with different _q_ 1 _, q_ 2 pairs approximate different _A[∗]_ , and all _A[∗]_ can accurately represent the data correlations in the mapping function from the features to the labels.
+
+**==> picture [256 x 115] intentionally omitted <==**
+
+**----- Start of picture text -----**
+- (a) (b) **----- End of picture text -----**
+
+Figure 2: Learning deep GCNs on Ogbn-Arxiv (a) Deeper layers tolerate higher sampling rates than shallow layers while maintaining accuracy. (b) Sampling more low-degree edges (small _s_ 1 _, s_ 2) outperforms sampling more high-degree edges (large _s_ 1 _, s_ 2). See 2D projection in Figure 4.
+
+**Lower-degree edges are more influential on generalization than high-degree edges** . Note that if nodes _i_ and _j_ have higher degrees, then _Aij_ has a smaller value. We sample one matrix for the shallow layers by keeping the values of _Aij_ that are in the range of top _s_ 1 to _s_ 1 + 0 _._ 5 fraction and setting all other values to zero. Similarly, we sample one matrix for the deep layers by keeping the values in the range of top _s_ 2 to _s_ 2 + 0 _._ 5 fraction and setting all other values to zero. These two sampled matrices are used during training. When _s_ 1 and _s_ 2 increase, the resulting matrices have the same number of nonzero entries, and the sampled entries focus more on high-degree edges. Figure 2 (b) shows the test error indeed increases as _s_ 1 _, s_ 2 increase. This justifies the sampling strategy to sample more low-degree edges.
+
+## 5 CONCLUSION
+
+This paper provides a theoretical generalization analysis of training GCNs with skip connections using graph sampling. To the best of our knowledge, this paper provides the first analysis of how skip connection affects the generalization performance. We show that for a two-hidden-layer GCN with a skip connection, the first hidden layer learns a simpler function that contributes significantly to the output, making the choice of sampling more crucial in the first hidden layer. In contrast, the second layer learns a composite function that contributes less to the output, allowing for a more flexible sampling approach while preserving generalization. This insight is verified on deep GCNs on benchmark datasets. Future works include generalization analysis of deep GCNs and designing layer-specific sampling strategies that optimize generalization within the constraints of available computational resources.
+
+9
+
+## REFERENCES
+
+Zeyuan Allen-Zhu and Yuanzhi Li. What can resnet learn efficiently, going beyond kernels? In _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc., 2019.
+
+- Zeyuan Allen-Zhu and Yuanzhi Li. Feature purification: How adversarial training performs robust deep learning. In _2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS)_ , pp. 977–988. IEEE, 2022.
+
+- Zeyuan Allen-Zhu and Yuanzhi Li. Towards understanding ensemble, knowledge distillation and selfdistillation in deep learning. In _The Eleventh International Conference on Learning Representations_ , 2023. URL [URL removed]
+
+- Jianfei Chen, Tianyi Ma, and Cao Xiao. Fastgcn: Fast learning with graph convolutional networks via importance sampling. In _International Conference on Learning Representations (ICLR)_ , 2018.
+
+- Ting Chen, Yidan Sui, Xiaohan Chen, Anima Zhang, and Zhihua Wang. A unified lottery ticket hypothesis for graph neural networks. In _International Conference on Machine Learning_ , pp. 1695–1706. PMLR, 2021.
+
+- Wei-Lin Chiang, Xuanqing Liu, Si Si, Yang Li, Samy Bengio, and Cho-Jui Hsieh. Cluster-gcn: An efficient algorithm for training deep and large graph convolutional networks. In _Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining_ , pp. 257–266, 2019.
+
+- Weilin Cong, Morteza Ramezani, and Mehrdad Mahdavi. On provable benefits of depth in training graph convolutional networks. _Advances in Neural Information Processing Systems_ , 34:9936–9949, 2021.
+
+- Simon S. Du, Keyulu Hou, Ruslan R. Salakhutdinov, Barnabas P´ oczos, Ruosong Wang, and Keyulu´ Xu. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. In _Advances in Neural Information Processing Systems_ , pp. 5724–5734, 2019a.
+
+- Simon S. Du, Xiyu Zhai, Barnabas P´ oczos, and Aarti Singh.´ Gradient descent provably optimizes over-parameterized neural networks. In _International Conference on Learning Representations (ICLR)_ , 2019b.
+
+- Jiarui Feng, Yixin Chen, Fuhai Li, Anindya Sarkar, and Muhan Zhang. How powerful are k-hop message passing graph neural networks. _Advances in Neural Information Processing Systems_ , 35: 4776–4790, 2022.
+
+- William L. Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In _Advances in Neural Information Processing Systems_ , pp. 1024–1034, 2017.
+
+- Wenbing Huang, Tong Zhang, Yu Rong, and Junzhou Huang. Adaptive sampling towards fast graph representation learning. In _Advances in Neural Information Processing Systems_ , pp. 4558–4567, 2018.
+
+- Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In _Advances in Neural Information Processing Systems_ , volume 31. Curran Associates, Inc., 2018.
+
+- Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In _International Conference on Learning (ICLR)_ , 2017.
+
+- Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem. Deepgcns: Can gcns go as deep as cnns? In _Proceedings of the IEEE/CVF international conference on computer vision_ , pp. 9267–9276, 2019.
+
+- Hongkang Li, Meng Wang, Sijia Liu, Pin-Yu Chen, and Jinjun Xiong. Generalization guarantee of training graph convolutional networks with graph topology sampling. In _International Conference on Machine Learning (ICML)_ , pp. 13014–13051. PMLR, 2022a.
+
+10
+
+Hongkang Li, Shuai Zhang, and Meng Wang. Learning and generalization of one-hidden-layer neural networks, going beyond standard gaussian data. In _2022 56th Annual Conference on Information Sciences and Systems (CISS)_ , pp. 37–42. IEEE, 2022b.
+
+- Jundong Li, Ting Zhang, Hanghang Tian, Shengnan Jin, Mingyi Fardad, and Reza Zafarani. Sgcn: A graph sparsifier based on graph convolutional networks. In _Pacific-Asia Conference on Knowledge Discovery and Data Mining_ , pp. 275–287. Springer, 2020.
+
+- Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In _Thirty-Second AAAI Conference on Artificial Intelligence_ , 2018.
+
+Yuanzhi Li and Yingyu Liang. Learning overparameterized neural networks via stochastic gradient descent on structured data. _Advances in neural information processing systems_ , 31, 2018.
+
+Renjie Liao, Raquel Urtasun, and Richard Zemel. A pac-bayesian approach to generalization bounds for graph neural networks. In _International Conference on Learning Representations_ , 2020.
+
+- Sohir Maskey, Ron Levie, Yunseok Lee, and Gitta Kutyniok. Generalization analysis of message passing neural networks on large random graphs. _Advances in neural information processing systems_ , 35:4805–4817, 2022.
+
+- Christopher Morris, Martin Ritzert, Matthias Fey, William L Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and leman go neural: Higher-order graph neural networks. In _Proceedings of the AAAI conference on artificial intelligence_ , 2019.
+
+- Will Norcliffe-Brown, Stathis Vafeias, and Sarah Parisot. Learning conditioned graph structures for interpretable visual question answering. _Advances in neural information processing systems_ , 31, 2018.
+
+- Kenta Oono and Taiji Suzuki. Optimization and generalization analysis of transduction through gradient boosting and application to multi-scale graph neural networks. _Advances in Neural Information Processing Systems_ , 33:18917–18930, 2020.
+
+- Morteza Ramezani, Weilin Cong, Mehrdad Mahdavi, Anand Sivasubramaniam, and Mahmut Kandemir. Gcn meets gpu: Decoupling “when to sample” from “how to sample”. _Advances in Neural Information Processing Systems_ , 33:18482–18492, 2020.
+
+- Yiding Sui, Xiaojie Wang, Ting Chen, Xiaoqiang He, and Tat-Seng Chua. Inductive lottery ticket learning for graph neural networks. In _International Conference on Learning Representations (ICLR)_ , pp. 1–18, 2022.
+
+- Huayi Tang and Yong Liu. Towards understanding the generalization of graph neural networks. In _Fortieth International Conference on Machine Learning (ICML)_ , 2023.
+
+- Saurabh Verma and Zhi-Li Zhang. Stability and generalization of graph convolutional neural networks. In _Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_ , pp. 1539–1548, 2019.
+
+- Xiyuan Wang and Muhan Zhang. How powerful are spectral graph neural networks. In _International Conference on Machine Learning_ , pp. 23341–23362. PMLR, 2022.
+
+- Qitian Wu, Hengrui Zhang, Xiaofeng Gao, Peng He, Paul Weng, Han Gao, and Guihai Chen. Dual graph attention networks for deep latent representation of multifaceted social effects in recommender systems. In _The world wide web conference_ , pp. 2091–2102, 2019.
+
+Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In _International Conference on Learning Representations_ , 2018a.
+
+- Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In _International conference on machine learning_ , pp. 5453–5462. PMLR, 2018b.
+
+- Keyulu Xu, Mengshi Zhang, Stefanie Jegelka, and Kenji Kawaguchi. Optimization of graph neural networks: Implicit acceleration by skip connections and more depth. In _International Conference on Machine Learning (ICML)_ . PMLR, 2021.
+
+11
+
+- Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In _Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining_ , pp. 974–983, 2018.
+
+- Haoxiang You, Changxiao Li, Pengcheng Xu, Yonggan Fu, Yang Wang, Xiaohan Chen, Richard G. Baraniuk, Zhihua Wang, and Yingyan Lin. Drawing early-bird tickets: Toward more efficient training of deep networks. In _International Conference on Learning Representations (ICLR)_ , 2020.
+
+- Hongyang Zeng, Hongyuan Zhou, Abhay Srivastava, Rajgopal Kannan, and Viktor Prasanna. Graphsaint: Graph sampling based inductive learning method. In _International Conference on Learning Representations (ICLR)_ , 2020.
+
+- Bohang Zhang, Shengjie Luo, Liwei Wang, and Di He. Rethinking the expressive power of gnns via graph biconnectivity. In _The Eleventh International Conference on Learning Representations_ , 2023a.
+
+- Shuai Zhang, Meng Wang, Sijia Liu, Pin-Yu Chen, and Jinjun Xiong. Fast learning of graph neural networks with guaranteed generalizability: one-hidden-layer case. In _International Conference on Machine Learning_ , pp. 11268–11277. PMLR, 2020a.
+
+- Shuai Zhang, Meng Wang, Pin-Yu Chen, Sijia Liu, Songtao Lu, and Miao Liu. Joint edge-model sparse learning is provably efficient for graph neural networks. In _The Eleventh International Conference on Learning Representations_ , 2023b. URL [URL removed] id=4UldFtZ_CVF.
+
+- Sijia Zhang, Mengqi Wang, Shichao Liu, Pin-Yu Chen, and Jinjun Xiong. Fast learning of graph neural networks with guaranteed generalizability: One-hidden-layer case. In _International Conference on Machine Learning_ , pp. 11268–11277, 2020b.
+
+- Yuhao Zhang, Peng Qi, and Christopher D Manning. Graph convolution over pruned dependency trees improves relation extraction. _arXiv preprint arXiv:1809.10185_ , 2018.
+
+- Kai Zhong, Zhao Song, Prateek Jain, Peter L Bartlett, and Inderjit S Dhillon. Recovery guarantees for one-hidden-layer neural networks. In _International conference on machine learning_ , pp. 4140–4149. PMLR, 2017.
+
+- D. Zou, Z. Hu, Y. Wang, S. Jiang, Y. Sun, and Q. Gu. Layer-dependent importance sampling for training deep and large graph convolutional networks. In _Advances in Neural Information Processing Systems_ , pp. 11249–11259, 2019.
+
+12
+
+## A PRELIMINARIES
+
+**Lemma A.1** _If M ∈_ R _[n][×][m] is a random matrix where Mi,j are i.i.d. from N_ (0 _,_ 1) _. Then,_
+
+**==> picture [215 x 13] intentionally omitted <==**
+
+**==> picture [120 x 13] intentionally omitted <==**
+
+**==> picture [307 x 18] intentionally omitted <==**
+
+**==> picture [153 x 19] intentionally omitted <==**
+
+_for all s-sparse vectors v ∈_ R _[m] ._
+
+Proof: The statement can be found in Proposition B.2. from Allen-Zhu & Li (2019)
+
+> **Lemma A.2** _Suppose δ ∈_ [0 _,_ 1] _and g_[(0)] _∈_ R _[m] is a random vector g_[(0)] _∼N_ (0 _, Im_ ) _. With probability at least_ 1 _− e[−]_[Ω(] _[mδ]_[2] _[/]_[3][)] _, for all vectors g[′] ∈_ R _[m] with ∥g[′] ∥_ 2 _≤ δ, letting D[′] ∈_ R _[m][×][m] be the diagonal matrix where_ ( _D[′]_ ) _k,k_ = **1** ( _g_ (0)+ _g′_ ) _k −_ **1** ( _g_ (0)) _k for each k ∈_ [ _m_ ] _, we have_
+
+**==> picture [192 x 13] intentionally omitted <==**
+
+Proof: The statement can be found in Proposition B.4. from Allen-Zhu & Li (2019)
+
+**Lemma A.3** _Given a sampling set X_ = _{xn}[N] n_ =1 _[that contains][ N][partly dependent random vari-] ables, for each n ∈_ [ _N_ ] _, suppose xn is dependent with at most dX random variables in X (including xn itself), and the moment generating function of xn satisfies_ E[ _e[sx][n]_ ] _≤ e[Cs]_[2] _for some constant C that may depend on xn. Then, the moment generation function of_[�] _[N] n_ =1 _[x][n][is bounded as]_
+
+**==> picture [108 x 14] intentionally omitted <==**
+
+Proof: The statement can be found in Lemma 7 from Zhang et al. (2020b)
+
+**Lemma A.4** _∥Xan∥≤∥A∥_ 1 _._
+
+Proof:
+
+**==> picture [284 x 116] intentionally omitted <==**
+
+**Lemma A.5** _If F_ : R _[d] →_ R _[k] has general complexity_ ( _p,_ Cs( _F_ ) _,_ C _ε_ ( _F_ )) _, then for every x, y ∈_ R _[d] , it satisfies ∥F_ ( _x_ ) _∥_ 2 _≤ √kp_ Cs( _F_ ) _· ∥x∥_ 2 _and ∥F_ ( _x_ ) _−F_ ( _y_ ) _∥_ 2 _≤ √kp_ Cs( _F_ ) _· ∥x − y∥_ 2 _._ Proof: The boundedness of _∥F_ ( _x_ ) _∥_ 2 is trivial so we only focus on _∥F_ ( _x_ ) _−F_ ( _y_ ) _∥_ 2 . For each component _g_ ( _x_ ) = _Fr,i ⟨[w] ∥_ 1 _[∗]_ ( _,x,i[,]_ 1)[(] _[x,] ∥_[1)] 2 _[⟩] ·_ � _w_ 2 _[∗] ,i[,]_[ (] _[x,]_[ 1)] � , denoting by _w_ 1 _[∗]_[as the first d coordinate of] � � _w_ 1 _[∗] ,i_[, and by] _[ w]_ 2 _[∗] ,i_[as the first d coordinates of] _[ w]_ 2 _[∗] ,i_[, we have]
+
+13
+
+**==> picture [417 x 65] intentionally omitted <==**
+
+This implies
+
+**==> picture [316 x 31] intentionally omitted <==**
+
+As a result, _|Fr_ ( _x_ ) _−Fr_ ( _y_ ) _| ≤_ 3 _p_ Cs ( _Fr,i_ ) .
+
+**Lemma A.6** _For every smooth function ϕ, every ϵ ∈_ (0 _, C_ ( _ϕ,a_ )1 ~~_√_~~ _a_[2] +1[)] _[,][there][exists][a][function] h_ : R[2] _→_ [ _−Cϵ_ ( _ϕ, a_ ) _√a_[2] + 1 _, Cϵ_ ( _ϕ, a_ ) _√a_[2] + 1] _that is also Cϵ_ ( _ϕ, a_ ) _√a_[2] + 1 _-Lipschitz continuous on its first coordinate with the following two (equivalent) properties: (a) For every x_ 1 _∈_ [ _−a, a_ ] _where a >_ 0 _:_
+
+**==> picture [210 x 20] intentionally omitted <==**
+
+_where α_ 1 _, β_ 1 _, b_ 0 _∼N_ (0 _,_ 1) _are independent random variables. (b) For every_ **w** _[∗] ,_ **x** _∈_ R _[d] with ∥_ **w** _[∗] ∥_ 2 = 1 _and ∥_ **x** _∥≤ a:_
+
+**==> picture [192 x 19] intentionally omitted <==**
+
+_where_ **w** _∼N_ (0 _,_ **I** ) _is an d-dimensional Gaussian, b_ 0 _∼N_ (0 _,_ 1) _. Furthermore, we have_ E _α_ 1 _,b_ 0 _∼N_ (0 _,_ 1)[ _h_ ( _α_ 1 _, b_ 0)[2] ] _≤_ ( _Cs_ ( _ϕ, a_ ))[2] ( _a_[2] + 1) _._ ˜ ˜ _(c) For every_ **w** _[∗] ,_ **x** _∈_ R _[d] with ∥_ **w** _[∗] ∥_ 2 = 1 _, let_ **w** = ( **w** _, b_ 0) _∈_ R _[d]_[+1] _,_ **x** = ( **x** _,_ 1) _∈_ R _[d]_[+1] _with ∥_ **x** ˜ _∥≤ √a_[2] + 1 _, then we have_
+
+**==> picture [258 x 20] intentionally omitted <==**
+
+_where_ **w** ˜ _∼N_ (0 _,_ **I** _d_ +1) _is an d-dimensional Gaussian. We also have_ E **w** ˜ _∈N_ (0 _,_ **I** _d_ +1)[ _h_ ( ˜ **w** [1 : _d_ ] _[⊤]_ **w** _[∗] ,_ **w** ˜ [ _d_ + 1])[2] ] _≤_ ( _Cs_ ( _ϕ, a_ ))[2] ( _a_[2] + 1) _._
+
+Proof: The statement can be found in Lemma B.1. from Li et al. (2022a)
+
+## B CONCEPT CLASS
+
+When the target function is more complex, _Hn_ will approach _yn_ , and _OPT_ will be closer to zero. To evaluate the complexity of the target function, we introduce model complexity constants C _ε_ and sample complexity constants Cs in (8) and (9) following the definitions in (Allen-Zhu & Li, 2019; Li et al., 2022a). Many population functions have bounded complexity. For instance, if _ϕ_ ( _z_ ) is exp( _z_ ), sin( _z_ ), cos( _z_ ) or polynomials of _z_ , then _Cϵ_ ( _ϕ, O_ (1)) _≤ O_ (poly(1 _/ϵ_ )) and _Cs_ ( _ϕ, O_ (1)) _≤ O_ (1).
+
+We define C _ε_ ( _F, ∥A[∗] ∥_ 1) = max _r,i_ �C _ε_ � _F[r,i] , ∥A[∗] ∥_ 1�� and Cs( _F, ∥A[∗] ∥_ 1) = max _r,i_ �Cs � _F[r,i] , ∥A[∗] ∥_ 1�� as the model and sample complexity of _F_ , respectively, and similarly define C _ε_ ( _G, ∥A[∗] ∥_ 1) and Cs( _G, ∥A[∗] ∥_ 1) for _G_ . _F_ and _G_ are composed by _pF_ and _pG_ different smooth functions. The complexity of _F_ is the most complex sub-target function _F[r,i]_ in the _pF_ functions.
+
+We define B _F_ := max _n ∥Fn,A∗_ ( _X_ ) _∥_ 2, B _F◦G_ := max _n ∥Gn,A∗_ ( _FA∗_ ( _X_ )) _∥_ 2 for all _X_ satisfying _∥xn∥_ = 1. Assume _G_ ( _·_ ) is L _G_ Lipschitz continuous. It is simple to verify (see Lemma A.5) that B _F ≤ √kpF_ Cs( _F, ∥A[∗] ∥_ 1) _∥A[∗] ∥_ 1, L _G ≤ √kpG_ Cs( _G,_ B _F ∥A[∗] ∥_ 1) and B _F◦G ≤ kpF_ Cs( _F, ∥A[∗] ∥_ 1) _· pG_ Cs( _G,_ B _F ∥A[∗] ∥_ 1)B _F ∥A[∗] ∥_ 1.
+
+14
+
+## C THEOREM 3.2 PROOF DETAILS
+
+Let us define learner networks that are single-skip two-hidden-layer with ReLU activation out _n_ : R _[d][×][N] ×_ R _[N] →_ R _[k]_ with
+
+**==> picture [318 x 12] intentionally omitted <==**
+
+and
+
+**==> picture [288 x 13] intentionally omitted <==**
+
+**==> picture [270 x 13] intentionally omitted <==**
+
+where
+
+**==> picture [330 x 12] intentionally omitted <==**
+
+- _X ∈ R[d][×][N]_ denotes the the matrix of _d_ dimension features of _N_ nodes.
+
+- _W ∈ R[m][×][d]_ denotes the first hidden layer weight.
+
+- _V ∈ R[m][×][k]_ denotes the second hidden layer weight.
+
+**==> picture [185 x 11] intentionally omitted <==**
+
+**==> picture [370 x 42] intentionally omitted <==**
+
+The _l_ 2 loss is represented as a function of the weight deviations **W** _,_ **V** from initiation _W_[(0)] and _V_[(0)] , i.e.,
+
+**==> picture [321 x 12] intentionally omitted <==**
+
+Let _W_[(] _[t]_[)] = _W_[(0)] + **W** _t_ , _V_[(] _[t]_[)] = _V_[(0)] + **V** _t_ . We assume 0 _< α ≤ O_[�] � _kpG_ Cs( _G,_ B1 _F ∥A[∗] ∥_ 1) � throught the training. We prove that _∥_ **W** _t∥_ 2 and _∥_ **V** _t∥_ 2 are bounded by _τw_ and _τv_ in Table 1 during training, i.e., _∥_ **W** _t∥_ 2 _≤ τw_ , _∥_ **V** _t∥_ 2 _≤ τv_ for all _t_ . See Appendix C.5 for the proof.
+
+Table 1: Parameter choices
+
+**==> picture [392 x 48] intentionally omitted <==**
+
+C.1 PROOF OVERVIEW
+
+In practice, for computational efficiency, we use the sampled adjacency matrix _A[t]_ in the learning network. Therefore, we should consider the discrepancy between the target function with _A[∗]_ and the practical learning network:
+
+**==> picture [385 x 40] intentionally omitted <==**
+
+First, we prove the existence of **W** _[∗]_ and **V** _[∗]_ with _m ≥ M_ 0, _T ≥ T_ 0 and Ω _≥ N_ 0 such that
+
+**==> picture [293 x 12] intentionally omitted <==**
+
+Second, we demonstrate that
+
+**==> picture [402 x 30] intentionally omitted <==**
+
+15
+
+For the inequality �� _Cσ_ ( _WXa_ 1 _nt_[)] _[ −][Cσ]_[(] _[WXa][∗] n_[)] ��2 _[≤][ϵ]_[0][ to hold, it is required that] �� _A_ 1 _t − A∗_ ��1 _[≤]_ Θ(� _Cϵ_ s0( _F_ ))[and similarly,] �� _A_ 2 _t − A∗_ ��1 _[≤]_ Θ(� _αC_ s( _F_ ) _Cϵ_ s0( _G,∥A∗∥_ 1))[.] Third, we establish that with appropriate sampling probabilities _p_[1] _ij_[and] _[ p]_[2] _ij_[, the norms] �� _A_ 1 _t − A∗_ ��1 and �� _A_ 2 _t − A∗_ ��1[can be sufficiently small.] Finally, consider the definition of OPT, we can prove �� _yn −_ out _n_ � _X, A_[1] _[t] , A_[2] _[t]_ ; **W** _t,_ **V** _t_ ���2 _[≤][ϵ]_[.]
+
+## C.2 COUPLING
+
+**Lemma C.1** _We show that the weights after a properly bounded amount of updates stay close to the initialization, and many good properties occur. Suppose that ∥_ **W** _∥_ 2 _≤ τw, ∥_ **V** _∥_ 2 _≤ τv, W_ 0 _from N_ �0 _, σw_[2] � _and V_ 0 _from N_ �0 _, σv_[2] _[/m]_ � _, we have that_
+
+_1._
+
+**==> picture [275 x 25] intentionally omitted <==**
+
+_2._
+
+**==> picture [377 x 34] intentionally omitted <==**
+
+_3._
+
+_4._
+
+**==> picture [264 x 54] intentionally omitted <==**
+
+_5._
+
+_6._
+
+**==> picture [322 x 83] intentionally omitted <==**
+
+_7._
+
+**==> picture [325 x 14] intentionally omitted <==**
+
+Proof:
+
+**==> picture [375 x 132] intentionally omitted <==**
+
+_s_ Using Lemma A.1, for every _s_ -sparse vector **y** , it satisfies _∥_ **Ay** _∥_ 2 _≤ e[O]_[(] _[√] m_[)] _∥_ **y** _∥_ 2 with high probability. The sparsity of the second term is _s_ = ( _σwτ∥wA∥_ 1[)][2] _[/]_[3] _[m]_[2] _[/]_[3][,][so][we][have] ~~_√_~~ _s_ ~~_√_~~ _s_ �� **C** � _D_ **W** _[n]_ 0 _[−][D]_ **W** _[n]_ + _W_ 0� **W** 0 _Xan_ ��2 _[≤][O]_[�] � ~~_√_~~ _m_ � _· ∥_ **W** _Xan∥_ 2 _≤ O_[�] � ~~_√_~~ _m[τ][w][ ∥][A][∥]_[1] �.
+
+16
+
+3. ��out1 _n_[(] _[X, A]_[)] ��2 _[≤]_ �� **C** _D_ **W** _n_ + **W0[W]** _[Xa][n]_ ��2[+] �� **C** _D_ **W** _n_ + **W0[W]** _[Xa][n][ −]_ **[C]** _[D]_ **W** _[n]_ + **W0**[(] **[W]**[ +] **[ W]**[0][)] _[ Xa][n]_ ��2[.] Using _∥C∥_ 2 _≤_ 1 with high probability, we have �� **C** _D_ **W** _n_ + **W0** _[Xa][n]_ ��2 _[≤][O]_[�][(] _[τ][w][ ∥][A][∥]_[1][)]
+
+4. Similar to (26), �� _V_ out1( _X, A_ ) _an_ ��2 _[≤][τ][v]_ ��out1( _X, A_ ) _an_ ��2[and] � _V_ 0 _,_ out[1] ( _X, A_ ) _an_ � _j[∼] N_ (0 _,_ ��out1( _X, A_ ) _an_ ��22 _[σ] v_[2][)][, using Lemma A.2 we can prove it.]
+
+5. We write **C** _D_ **V** _[n]_ + **V0[V]**[ out][1][(] _[X, A]_[)] _[a][n] −_ **C** _D_ **V** _[n]_ + **V0**[(] **[V]**[ +] **[ V]**[0][) out][1][(] _[X, A]_[)] _[a][n]_ = _−_ **C** _D_ **V** _[n]_ 0 **[V]**[(0)][ out][1][(] _[X, A]_[)] _[a][n]_[+] **[C]** � _D_ **V** _[n]_ 0 _[−][D]_ **V** _[n]_ +� _V_ 0� **V** 0 out[1] ( _X, A_ ) _an_ . Similar to (27), we have _∥_ **C** _D_ **V** _[n]_ 0 **[V]**[(0)][ out][1][(] _[X, A]_[)] _[a][n][∥]_[2] _≤ O_ ( _√k/[√] m_ ) _· O_ � _σv∥_ out[1] ( _X, A_ ) _an∥_ 2� � ~~_√_~~ _s_
+
+and �� **C** � _D_ **V** _[n]_ 0 _[−][D]_ **V** _[n]_ + _V_ 0� **V** 0 out[1] ( _X, A_ ) _an_ ��2 _≤ O_ � ~~_√_~~ _m[τ][v][∥]_[out][1][(] _[X, A]_[)] _[a][n][∥]_[2] �. _∥_ out[1] ( _X, A_ ) _an∥_ 2 _≤∥_ out[1] _n_[(] _[X, A]_[)] _[∥]_[2] _[∥][A][∥]_[1]
+
+6. From 5, it is easy to get.
+
+7. From 3, it is easy to get.
+
+C.3 EXISTANTIAL
+
+**==> picture [397 x 45] intentionally omitted <==**
+
+where _W[∗]_ is a given matrix, _W_[0] is a random matrix where each _wi_[(0)] is i.i.d. from _N_ �0 _, m_ **[I]** � and _ar,i_ is i.i.d. from _N_ (0 _,_ 1).
+
+Based on Lemma B.1. from Li et al. (2022a) and Lemma E.1. from Allen-Zhu & Li (2019), we have
+
+**Lemma C.2** _Given any F_ : R _[d] →_ R _[k] with general complexity_ ( _p,_ Cs( _F, ∥A∥_ 1) _∥A∥_ 1 _,_ C _ε_ ( _F, ∥A∥_ 1) _∥A∥_ 1) _, for every ϵ ∈_ �0 _, pk_ Cs( _F ,∥_ 1 _A∥_ 1) _∥A∥_ 1 � _, there exist M_ = poly (C _ε_ ( _F, ∥A∥_ 1) _, ∥A∥_ 1 _,_ 1 _/ε_ ) _such that if m ≥ M , then with high probability there is a construction_ **W** _[∗]_ = ( _w_ 1 _[∗][, . . . , w] m[∗]_[)] _[ ∈]_[R] _[m][×][d][ with]_
+
+**==> picture [380 x 25] intentionally omitted <==**
+
+_satisfying, for every xn ∈ R[d] and ∥xn∥_ 2 _≤_ 1 _, with probability at least_ 1 _− e[−]_[Ω(] ~~_[√]_~~ _m_ )
+
+**==> picture [398 x 118] intentionally omitted <==**
+
+Using Lemma A.6 we have �� _h_ ( _r,i_ )�� _≤_ C _ε_ ( _F, ∥A∥_ 1) _∥A∥_ 1 and using Lemma E.1. from AllenZhu & Li (2019), we have for our parameter choice of _m_ , with probability at least 1 _− e[−]_[Ω][(] _[mε]_[2] _[/]_[(] _[k]_[4] _[p]_[2][C] _[ε]_[(] _[F][,][∥][A][∥]_[1][)] _[∥][A][∥]_[1][))]
+
+**==> picture [144 x 19] intentionally omitted <==**
+
+**==> picture [398 x 70] intentionally omitted <==**
+
+17
+
+Applying Hoeffding’s concentration, we have with probability at least 1 _− e[−]_[Ω(] ~~_[√]_~~ _m_ )
+
+**==> picture [349 x 61] intentionally omitted <==**
+
+_k_[2] _p_[2] (Cs( _F ,∥A∥_ 1) _∥A∥_ 1)[2] Putting this back to (37) we have _∥_ **W** _[∗] ∥_[2] _F[≤][O]_[�] � _m_ �.
+
+� **Lemma C.3** _Under the assumptions of Lemma C.1, suppose α ∈_ (0 _,_ 1) _and α_ = _k_ ( _pF_ Cs( _F ,∥A∥_ 1)+ _α pG_ Cs( _G,∥A∥_ 1)) _[, there exist][ M]_[= poly] �C _α_ �( _F, ∥A∥_ 1) _,_ C _α_ �( _G, ∥A∥_ 1) _, ∥A∥_ 1 _,_ � _α[−]_[1][�] _satisfying that for every m ≥ M ,∥_ **W** _[∗] ∥F ≤ O_[�] ( _kpF_ Cs( _F_ )) _and ∥_ **V** _[∗] ∥F ≤ O_[�] ( _αkp_ � _G_ Cs( _G_ )) _with high probability_
+
+_1._
+
+**==> picture [309 x 14] intentionally omitted <==**
+
+_2._
+
+**==> picture [355 x 13] intentionally omitted <==**
+
+_3._
+
+**==> picture [313 x 13] intentionally omitted <==**
+
+_4._
+
+**==> picture [289 x 47] intentionally omitted <==**
+
+_5._
+
+E _n∈V,_ ( _X,yn_ ) _∼D_ ��� **C** _D_ **W** _n_ **0** + **W**[(] **[W]** _[∗][−]_ **[W]**[)] _[Xa][n][−]_[(] _[F][n]_[(] _[X, A]_[)] _[ −]_[out][1] _n_[(] _[X, A]_[))] ��2� _≤ α_ �[2] _∥A∥_ 1 (43)
+
+Proof:
+
+1. Using Lemma C.2, we can find a **W** _[∗]_ satisfying �� **C** _D_ **W** _n_ **0** + **W[W]** _[∗][Xa][n][ −F][n]_[(] _[X, A]_[)] ��2[small] enough with probability at least 1 _− e[−]_[Ω(] ~~_[√]_~~ _m_ ).
+
+2. Using Lemma C.2 and ��out1( _X, A_ ) _an_ ��2 _[≤∥]_[out] _n_[1][(] _[X, A]_[)] _[∥]_[2] _[∥][A][∥]_ 1[, we can easily prove it.] 3. _∥_ **W** _[∗] Xan∥_ 2 _≤ O_ ( _∥_ **W** _[∗] ∥F ∥Xan∥_ 2) _≤ O_ ( _τw ∥A∥_ 1). �� **C** ( _D_ **W** _n[−][D]_ **W** _[n]_ **0**[)] **[W]** _[∗][Xa][n]_ ��2 _[≤] O_ ( _[√] sτw ∥A∥_ 1 _/[√] m_ ) where _s_ is the maximum sparsity of ( _D_ **W** _[n][−][D]_ **W** _[n]_ **0**[)][.][Using (26), we] know _s ≤ O_ �( _σ[τ][w] w_[)][2] _[/]_[3] _[m]_[2] _[/]_[3][�] . This, combining with (39) gives
+
+**==> picture [359 x 50] intentionally omitted <==**
+
+**==> picture [373 x 21] intentionally omitted <==**
+
+5. Using (27) and (41), with larger enough _m_ , we can prove it.
+
+18
+
+## C.4 OPTIMIZATION
+
+We write the gradient of loss function as _∇_ **W** Obj _n_ ( **W** ) = _∇_ **W** Obj[1] _n_[(] **[W]**[)][+] _[∇]_ **[W]**[Obj][2] _n_[(] **[W]**[)][,] where _∇_ **W** Obj[1] _n_[(] **[W]**[)][=] _[∇]_ **[W]**[out][1] _n_[(] _[X, A]_[)][ and] _[∇]_ **[W]**[Obj][2] _n_[(] **[W]**[)][=] _[∇]_ **[W]** _[CD] V[n][V]_[out][1][(] _[X, A]_[)] _[a][n]_[,][we] can write its gradient as follows.
+
+**==> picture [344 x 46] intentionally omitted <==**
+
+**==> picture [406 x 133] intentionally omitted <==**
+
+**==> picture [347 x 46] intentionally omitted <==**
+
+Let us define _f_ ( **W** _[′]_ ) = _CDW[n]_ + _W_ 0 _[W][ ′][Xa][n]_[+] _[ CD] V[n]_ + _V_ 0[(] **[V]**[(0)][+] **[ V]**[)] _[C]_[(] _[D][W]_[ +] _[W]_ 0 _[⊙][W][ ′][XA]_[)] _[a][n]_[and] _g_ ( **V** _[′]_ ) = _CDV[n]_ + _V_ 0 **[V]** _[′]_[ out(] _[X]_[)] _[a][n]_[.][Therefore,]
+
+**==> picture [357 x 12] intentionally omitted <==**
+
+**Claim C.4** _We have that for all_ **W** _and_ **V** _satisfying ∥_ **W** _∥F ≤ τw and ∥_ **V** _∥F ≤ τv, it holds that ∥∇_ **W** Obj( **W** _,_ **V** ; ( _x, y_ )) _∥F ≤∥A∥_ 1 _∥yn −_ out _n_ ( _X, A_ ) _∥_ 2 _· O_ ( _σv_ + 1) (49)
+
+**==> picture [382 x 110] intentionally omitted <==**
+
+Proof:
+
+In (51), the last inequality uses _∥V_[(0)] _∥_ 2 = _O_ ( _τv_ ) and _∥C∥_ 2 _≤_ 1.
+
+**==> picture [375 x 42] intentionally omitted <==**
+
+In (52), the last inequality uses (28) and _∥C∥_ 2 _≤_ 1.
+
+19
+
+**Claim C.5** _In the setting of Lemma C.1, we have f_ ( **W** _[∗] −_ **W** ) + _g_ ( **V** _[∗] −_ **V** ) = _Hn,A∗_ ( _X, A_ ) _−_ out _n_ ( _X, A_ ) + _Errn with_
+
+**==> picture [408 x 50] intentionally omitted <==**
+
+Proof: Based on the definition of _f_ ( **W** _[′]_ ) and _g_ ( **V** _[′]_ ), we have
+
+**==> picture [409 x 149] intentionally omitted <==**
+
+1. For the _♣_ term,
+
+**==> picture [357 x 76] intentionally omitted <==**
+
+1 together with _τv ≤_ polylog ( _m_ ) _[σ][v]_[.]
+
+2. For the _♠_ term,
+
+**==> picture [385 x 44] intentionally omitted <==**
+
+The first term uses (39), the second term uses (40) and the third term uses the Lipscthiz continuity of _G_ , so we have
+
+**==> picture [400 x 66] intentionally omitted <==**
+
+We use _σ_ 1 _v[≤][τ]_[ 2] _v_[and definition of] _[α]_[�][.]
+
+3. For the _♢_ term,
+
+**==> picture [296 x 13] intentionally omitted <==**
+
+where the inequality uses (27) and (30).
+
+In sum, we have
+
+**==> picture [362 x 14] intentionally omitted <==**
+
+20
+
+satisfy
+
+**==> picture [365 x 75] intentionally omitted <==**
+
+Using _∥_ out[1] _n_[(] _[x]_[)] _[ ∥]_[2] _[≤∥]_[out][1] _n_[(] _[X, A]_[)] _[ −F]_[(] _[x]_[)] _[∥]_[2][+][ B] _[F]_[, we have]
+
+**==> picture [392 x 55] intentionally omitted <==**
+
+**==> picture [398 x 62] intentionally omitted <==**
+
+**Claim C.6** _In the setting of Lemma C.1, if τv ∥A∥_ 1 _≤ polylog_ 1 ( _m_ ) _[, we have]_
+
+��out1 _n_[(] _[X, A]_[)] _[ −F][n]_[(] _[X]_[)] ��2 _[≤]_[2] ��out1 _n_[(] _[X, A]_[)] _[ −H][n]_[(] _[X, A]_[)] ��2[+] _[ α]_[B] _[F◦G]_[+] _[O]_[�][ (] _[τ][v][ ∥][A][∥]_[1][B] _[F]_[)][(63)]
+
+Proof: Using 32 and _∥G_ ( _F_ ( _X_ ) _, an_ ) _∥_ 2 _≤_ B _F◦G_ , we have
+
+**==> picture [375 x 31] intentionally omitted <==**
+
+Using _τv ∥A∥_ 1 small enough, we have
+
+**==> picture [390 x 15] intentionally omitted <==**
+
+C.5 PROOF OF THEOREM 3.2
+
+Proof: Using (48) and Claim C.5, in iteration _t_ , we have
+
+**==> picture [328 x 39] intentionally omitted <==**
+
+We also have
+
+**==> picture [340 x 106] intentionally omitted <==**
+
+21
+
+Using Algorithm 1, we have **W** _t_ +1 = **W** _t − ηw∇_ **W** Obj _n_ ( **W** _t,_ **V** _t_ ) and **V** _t_ +1 = **V** _t − ηv∇_ **V** Obj _n_ ( **W** _t,_ **V** _t_ ), so we have
+
+**==> picture [196 x 11] intentionally omitted <==**
+
+**==> picture [392 x 126] intentionally omitted <==**
+
+Using Claim C.4 and change all _A_ to _A[∗]_ , we have
+
+**==> picture [398 x 89] intentionally omitted <==**
+
+After telescoping for _t_ = 0 _,_ 1 _, . . . , T_ 0 _−_ 1,
+
+**==> picture [388 x 132] intentionally omitted <==**
+
+Using _O_ ( _τv ∥A∥_ 1 + _α_ L _G_ ) _≤_ 0 _._ 1, we have
+
+where
+
+**==> picture [331 x 84] intentionally omitted <==**
+
+In practice, for computational efficiency, we use the sampled adjacency matrix _A[t]_ in the learning network, so we should consider the discrepancy between the target function and the practical output
+
+**==> picture [365 x 34] intentionally omitted <==**
+
+**==> picture [398 x 57] intentionally omitted <==**
+
+22
+
+Using (28), we have
+
+�� _Cσ_ ( _WXa_ 1 _nt_[)] _[ −][CσWXa][∗] n_ ��2 _[≤][τ][w]_ �� _Xa_ 1 _nt[−][Xa][∗] n_ ��2 _[≤∥]_[Err] _[t][∥]_[2] (77) For the above equation to hold, it requires
+
+**==> picture [253 x 26] intentionally omitted <==**
+
+Using _∥A[∗] ∥_ 1 _≤ O_ (1) and (32), we have
+
+**==> picture [398 x 59] intentionally omitted <==**
+
+Under assumptions of Lemma C.7, with high probability, we can ensure �� _A_ 1 _t − A∗_ ��2 _[≤]_ ��� _Errτw t_ ���2[,] _A_ 2 _t − A∗ Errt_ �� ��1 _[≤]_ ��� _τvτw_ ���2[.] Using _∥_ **W** _[∗] ∥F ≤ τw/_ 10 _, ∥_ **V** _[∗] ∥F ≤ τv/_ 10 and _ϵ ≥_ OPT + _ϵ_ 0, we have
+
+**==> picture [397 x 58] intentionally omitted <==**
+
+Finally, we should check _∥_ **W** _t∥F ≤ τw_ and _∥_ **V** _t∥F ≤ τv_ hold.
+
+**==> picture [379 x 27] intentionally omitted <==**
+
+Using the relationship _η[τ] w_[ 2] _w_[=] _η[τ] v_[ 2] _v_[, we have]
+
+**==> picture [358 x 27] intentionally omitted <==**
+
+Therefore, choosing _T_ = Θ[�] � _∥A[∗] ∥_ 1 min _τw_[2] _{_ 1 _,ϵ_[2] _}_ � and _ηw_ = Θ(min[�] _{_ 1 _, ϵ}_ ) _≤_ 0 _._ 1, we can ensure 2 2 _∥_ **[W]** _T_ 0 _∥F F τw_[2] + _[∥]_ **[V]** _τ[T] v_[2][0] _[∥] ≤_ 1.
+
+C.6 GRAPH SAMPLING
+
+**Lemma C.7** _Given a graph G with the minimum degree δ_ ( _G_ ) _≥_ Ω(��� _Errτw t_ ���2[)] _[,][in iteration][t][,][for] the first layer A_[1] _[t] is generated from the sampling strategy with the sampling probability p_[1] _ij[≤] √didj ∥Errt∥_ 2 _O_ ( _nij τw_ ) _and for the second layer A_[2] _[t] is generated from the sampling strategy with the √didj ∥Errt∥_ 2 _sampling probability p_[2] _ij[≤][O]_[(] _nij τwτv_ ) _, we have_
+
+**==> picture [327 x 66] intentionally omitted <==**
+
+23
+
+Proof: The difference between _A[t] Bij_[and] _[ A] B[∗] ij_[is]
+
+**==> picture [285 x 30] intentionally omitted <==**
+
+where _nij_ is the number of elements in _A[∗] Bij_[and][(] _[a][t] ij[−][a][∗] ij_[)][are][iid,][with] _[µ][ij]_[=][E][[∆] _[B] ij_[]][=] _nijpij_ ~~_√_~~ _d_ 1 _idj_[.][The Moment-generating function of][ (] _[a][t] ij[−][a][∗] ij_[)][ is]
+
+**==> picture [289 x 84] intentionally omitted <==**
+
+Thus, for any _t >_ 0, using Markov’s inequality and the definition of MGF, we have
+
+**==> picture [285 x 66] intentionally omitted <==**
+
+If 0 _≤ δij ≤_ 1, we plug in _kij_ = (1 + _δij_ ) _µij_ and the optimal value of _sij_ = ~~�~~ _didj_ ln(1 + _ϵij_ ) to the above equation:
+
+**==> picture [398 x 110] intentionally omitted <==**
+
+C.7 SAMPLE COMPLEXITY
+
+1 **Lemma C.8** _Given a graph G with |V_ ( _G_ ) _|_ = _N , if the maximum degree_ ∆( _G_ ) _≤ O_ (( _Nϵ_[2] ) 4 ) _and sample complexity_ Ω _≥ O_ ([∆][(] _[G]_[)][2][(] _[τ][w][∥] ϵ[A]_[2] _[∥]_[1][)][2][ lo][g] _[ N]_ ) _, with probability_ 1 _− N[−][τ][w][∥][A][∥]_[1] _, we have_ ���� _n∈V,_ ( _X,y_ E _n_ ) _∼Z_ �� _yn −_ out _n_ � _X, A_[1] _[t] , A_[2] _[t]_[���] 2 _[−] n∈V,_ ( _X,y_ E _n_ ) _∼D_ �� _yn −_ out _n_ � _X, A_[1] _[t] , A_[2] _[t]_[���] 2���� _≤ ϵ._
+
+Proof: For the set of samples Z define
+
+**==> picture [364 x 30] intentionally omitted <==**
+
+Denote the generalization error as
+
+**==> picture [364 x 53] intentionally omitted <==**
+
+24
+
+By Hoeffding’s inequality and _∥_ out _n_ ( _X, an_ ) _∥_ 2 _≤ O_ ( _τw ∥A∥_ 1) , we have
+
+**==> picture [381 x 32] intentionally omitted <==**
+
+Define maximum degree of G is ∆( _G_ ). It is easy to know that ��out _n_ � _X, A_[1] _[t] , A_[2] _[t]_[���] 2[is][de-] pendent with at most its second order neighbor, so the maximum number of nodes related with ��out _n_ � _X, A_[1] _[t] , A_[2] _[t]_[���] 2[is][ ∆(] _[G]_[)][2][.][By Lemma 7 in Shuai, we have]
+
+**==> picture [304 x 15] intentionally omitted <==**
+
+**==> picture [387 x 41] intentionally omitted <==**
+
+**==> picture [398 x 83] intentionally omitted <==**
+
+with
+
+**==> picture [269 x 23] intentionally omitted <==**
+
+## D ADDITIONAL EXPERIMENT
+
+## D.1 ADDITIONAL EXPERIMENT ON SYNTHETIC DATA
+
+**Model and sample complexities with** _∥A[∗] ∥_ 1: In Figures 3 (a) (b), we generate a graph _G_ with _N_ = 2000 nodes. _G_ has one-degree groups and the degree of each node follows a Gaussian distribution _N_ � _d, σ_[2][�] . _d_ = 200. The degrees are truncated to fall within the range of 0 to 500. We vary _A[∗]_ by changing _σ_ and the corresponding _A_ . We directly train with _A[∗]_ to study the impact of _A[∗]_ on model and sample complexities.
+
+In Figures 3 (a), _|_ Ω _|_ = 1200 and the number of neurons per layer _m_ varies. Fig. 3 (a) shows the testing error decreases as _m_ increases. When _m_ is the same, the testing error increases as _∥A[∗] ∥_ 1 increases. This verifies our model complexity in Theorem 3.2. In Figures 3 (b), _m_ = 50 and _|_ Ω _|_ varies. Fig. 3 (b) shows the testing error decreases as Ω increases. When Ω is the same, the testing error increases as _∥A[∗] ∥_ 1 increases. This verifies our model complexity in Theorem 3.2.
+
+Fig. 3 (c) is a 2D vertical projection of the 3D Fig. 1 (c).
+
+## D.2 ADDITIONAL EXPERIMENT ON REAL DATA
+
+A summary of Ogbn datasets’ statistics is presented in Table 2.
+
+Table 2: Ogbn datasets statistics.
+
+|**Dataset**|**Nodes**|**Edges**|**Features**|**Classes**|**Metric**|
+|---|---|---|---|---|---|
+|Ogbn-Arxiv|169,343|1,166,243|128|40|Accuracy|
+|Ogbn-Products|2,449,029|61,859,140|100|47|Accuracy|
+
+25
+
+**==> picture [120 x 91] intentionally omitted <==**
+
+**==> picture [120 x 90] intentionally omitted <==**
+
+**==> picture [120 x 91] intentionally omitted <==**
+
+**==> picture [273 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) (c) **----- End of picture text -----**
+
+Figure 3: Experiment on synthetic data. (a) Test error with model complexity and _∥A[∗] ∥_ 1. (b) Test error with sample complexity and _∥A[∗] ∥_ 1. (c) 2D heatmap of 3D Fig. 1 (c)
+
+**==> picture [258 x 128] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) (b) **----- End of picture text -----**
+
+Figure 4: Learning deep GCNs on Ogbn-Arxiv (a) 2D Heatmap of 3D Fig. 2 (a). (b) 2D Heatmap of 3D Fig. 2 (b).
+
+For the Ogbn-Products dataset, we deploy a 4-layer Jumping Knowledge Network (Xu et al., 2018b) GCN with concatenation layer aggregation. Each hidden layer consists of 128 neurons. We define the first two layers as shallow layers and the last two layers as deep layers. with sampling rate _p_ 2. The task of Ogbn-Products is to classify the category of a product in a multi-class, where the 47 top-level categories are used for target labels. We use 60% of the data for training, 20% for testing, and 20% for verification.
+
+We run the similar experiment as Figure 2 (a) for Obgn-Arxiv dataset. We fix _q_ 1 = 0 _._ 1 and vary _q_ 2 from 0.1 to 1.0 at increments of 0.1, then fix _q_ 2 = 0 _._ 1 and vary _q_ 1 from 0.1 to 1.0 at increments of 0.1. Figure 5 shows that with the increasing sampling rate in shallow layers, the test accuracy is higher than the test accuracy with the increasing sampling rate in deep layers. It suggests that the generalization is more sensitive to the sampling in the shallow layers rather than deep layers, consistent with observations in other datasets.
+
+**==> picture [160 x 118] intentionally omitted <==**
+
+Figure 5: Layer-wise Sampling Rate Effect on Ogbn-Products
+
+26
+
diff --git a/open_review/iclr2024_8610.json b/open_review/iclr2024_8610.json
new file mode 100644
index 0000000000000000000000000000000000000000..e7a7846b481060aeb1a12a1f059f9c5819248e2b
--- /dev/null
+++ b/open_review/iclr2024_8610.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8610",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Decoupled Actor-Critic",
+ "abstract": "Actor-Critic methods are in a stalemate of two seemingly irreconcilable problems. Firstly, critic proneness towards overestimation requires sampling temporal-difference targets from a conservative policy optimized using lower-bound Q-values. Secondly, well-known results show that policies that are optimistic in the face of uncertainty yield lower regret levels. To remedy this dichotomy, we propose Decoupled Actor-Critic (DAC). DAC is an off-policy algorithm that learns two distinct actors by gradient backpropagation: a conservative actor used for temporal-difference learning and an optimistic actor used for exploration. We test DAC on DeepMind Control tasks in low and high replay ratio regimes and ablate multiple design choices. Despite minimal computational overhead, DAC achieves state-of-the-art performance and sample efficiency on locomotion tasks.",
+ "rebuttal": "### Further response to Reviewer HF8k\nThe Reviewer brought 6 weaknesses/questions in their review, out of which 4 were addressed in the originally reviewed manuscript and the remaining 2 were comprehensively answered in our rebuttals. As the rebuttal period is closing in few hours, we kindly ask the Reviewer to acknowledge our rebuttal and reconsider their initial score.\n\n### Meta-comment\nWe thank the Reviewers for their time working on our paper. We are very happy that the following aspects of our work were acknowledged by the Reviewers: approach was described as ‘well-motivated’ [HF8k; 7ruN] and ‘solid' / 'very neat’ [HF8k; XQ6P]; the manuscript ‘well-written’ [XQ6P]; algorithm presentation ‘clear’ [SCgY]; performance gains ‘significant’ [HF8k] and ‘promising ’[XQ6P]; and that the number of experiments conducted was appreciated [HF8k, SCgY]. Reviewer feedback allowed us to make a number of improvements to the experimental section and the manuscript. Below we [...]\n\n### Meta-comment 2\nWe thank the Reviewers again for their time and suggestions on how to improve the quality of our manuscript. Following our commitment, we uploaded a revised version of the manuscript. In the revised version, we colour major changes red for an easy read. We summarize the implemented changes below.\n\n*ADDITIONAL EXPERIMENTS* - we add a paragraph describing the experiments on the dog domain, as well as extended runs on the humanoid domain. We add the two evaluations on this domain:\n1. 1mln environment steps - where we run the algorithms in a setting consistent with the high repl [...]\n\n### Response to Reviewer 7ruN\nWe thank the Reviewer for their time writing the review. We are happy that the Reviewer finds our approach “well-motivated” and appreciated the proposed adaptive mechanisms that address OAC shortcomings. We would like to point the Reviewer’s attention to the new results added to our experiments (described in our meta-comment). In those results, DAC appears to significantly outperform model-based DMC SOTA (TD-MPC) and to the best of our knowledge represents the best recorded sample efficiency on the dog/humanoid domains of a model-free RL algorithm . Please find ou [...]\n\n### Response to Reviewer HF8k (1)\nWe thank the Reviewer for their time writing the review. We are happy that the Reviewer finds the proposed approach “well-motivated” and “solid”, the performance gains “significant” and the experiments “extensive”. We would like to point the Reviewers attention to new experimental results described in our meta-comment. The new results further indicate that DAC achieves very strong performance on locomotion tasks, significantly outperforming both model-based (TD-MPC) and model-free (SR-SAC) SOTA on the dog domain. Below, we respond to each question/weakness lis [...]\n\n### Response to Reviewer HF8k (2)\n> Is it consistently better than SAC/TD3/other baselines? This is a huge claim, and would definitely be a huge strength of the work if it is true.\n\nAs shown in our experiments (Figures 1, 4, 5 & 6), DAC indeed achieves significantly better performance than other baselines within our experiments regime (DMC locomotion). Below, we leave additional comments for each of the Figures:\n\n1. Figure 1 - Here, we show sample efficiency (mean performance across all tested tasks) for two replay ratio regimes. The Figure contains a 95% CI calculated using RLiable package [2 [...]\n\n### Response to Reviewer SCgY (1)\nWe thank the Reviewer for their time. We are happy that the Reviewer finds our algorithm presentation clear, the considered problem interesting and that the Reviewer appreciates the amount of experiments performed within our work. We particularly thank the Reviewer for the suggestion regarding the overestimation experiment. Furthermore, we perform additional experiments on the dog domain. There, we record that DAC achieves significantly better performance than model-based and model-free DMC SOTA. We describe the experiments in our meta-response. Below, we resp [...]\n\n### Response to Reviewer SCgY (2)\n> Verify the proposed method indeed mitigate overestimation comparing with an algorithm without using any correction, e.g., compare the estimate value and MC estimation; \n\nWe added the proposed experiment on four DMC tasks of varying difficulty (500k steps, 5 seeds). There, we compare the overestimation of DAC, SAC and DAC using only optimistic actor. It shows that the decoupled design is indeed critical to mitigate bias bigger than that of standard SAC. We summarize the results in the table below.\n| Bias | Conservative | Decoupled | Optimistic |\n|:-- [...]\n\n### Response to Reviewer SCgY (3)\n> The algorithm introduces many more hyper parameters comparing with commonly seen SAC or TD3 due to the added components in the losses, I would not consider the comparison to be fair with other baselines, unless evidence of similar efforts have been made to thoroughly sweep baseline’s hyper-parameters is provided. \n\nWe would like to respond to the above assertion in three points:\n\n1. SAC/TD3 are arguably the most popular RL algorithms at the time of writing this response. Both were evaluated numerous times on DMC locomotion, which is one of the most popular R [...]\n\n### Response to Reviewer SCgY (4)\n[1] Ciosek, Kamil, et al. \"Better exploration with optimistic actor critic.\" Advances in Neural Information Processing Systems. 2019.\n\n[2] Moskovitz, Ted, et al. \"Tactical optimism and pessimism for deep reinforcement learning.\" Advances in Neural Information Processing Systems. 2021.\n\n[3] Boyd, Stephen P., and Lieven Vandenberghe. Convex optimization. Cambridge university press. 2004.\n\n[4] Haarnoja, Tuomas, et al. \"Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor.\" International Conference on Machine Learning. [...]\n\n### Response to Reviewer XQ6P (1)\nWe thank the Reviewer for a thorough and insightful review. We are excited that the Reviewer finds our approach “neat”,\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 6,
+ 6,
+ 5
+ ],
+ "score_mean": 5.75,
+ "score_variance": 0.25,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "This work proposes to use two actors to achieve optimism and conservation separately. Performance improvements are observed in empirical study.\n\nStrengths: The experiments are extensive and improvements are observed over baselines. \n\nWeakness: This paper combines many different ideas / ingredients from many existing works. Despite that this combination appears novel, none of the individual idea seems new. Moreover, there is not a theoretical analysis that oversees the entire architecture, analyzing how each component affects the other and where the entire ship goes.\n\nIt is also worth mentioning that in Figure 1 (a), the OAC and TD3 perform exactly the same, which might be from some bug of the plotting program. I remark that this is just a side note and does not factor into the decision at all.",
+ "forum_id": "op19LjpHkH",
+ "primary_area": "reinforcement learning",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_SCgY",
+ "review_id": "9O3zH08SHq",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 4071,
+ "edit_detected": true,
+ "edit_delta_seconds": 1741661,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_XQ6P",
+ "review_id": "Mw5fsxlJ6J",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 4
+ },
+ "review_text_chars": 3520,
+ "edit_detected": true,
+ "edit_delta_seconds": 1722658,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_7ruN",
+ "review_id": "piO2NfXQLS",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1220,
+ "edit_detected": true,
+ "edit_delta_seconds": 898977,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_HF8k",
+ "review_id": "c5RKFIQfnK",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 1,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1803,
+ "edit_detected": true,
+ "edit_delta_seconds": 2170891,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8610.md b/open_review/iclr2024_8610.md
new file mode 100644
index 0000000000000000000000000000000000000000..c6e3b2f0c88dfe92124eb35bce5d15a9247185d6
--- /dev/null
+++ b/open_review/iclr2024_8610.md
@@ -0,0 +1,805 @@
+
+
+## DECOUPLED ACTOR-CRITIC
+
+Authors withheld for review
+
+## ABSTRACT
+
+Actor-critic methods are in a stalemate of two seemingly irreconcilable problems. Firstly, critic proneness towards overestimation requires sampling temporaldifference targets from a conservative policy optimized using lower bound Q- values. Secondly, well-known results show that policies that are optimistic in the face of uncertainty yield lower regret levels. To remedy this dichotomy, we propose Decoupled Actor-Critic (DAC). DAC is an off-policy algorithm that learns two distinct actors by gradient backpropagation: a conservative actor used for temporal-difference learning and an optimistic actor used for exploration. We test DAC on DeepMind Control tasks in low and high replay ratio regimes and ablate multiple design choices. Despite minimal computational overhead, DAC achieves state-of-the-art performance and sample efficiency on locomotion tasks.
+
+## 1 INTRODUCTION
+
+Deep Reinforcement Learning (RL) is still in its infancy, with a variety of tasks unsolved (Sutton & Barto, 2018; Hafner et al., 2023) or solved within an unsatisfactory amount of environment interactions (Zawalski et al., 2022; Schwarzer et al., 2023). Whereas increasing the replay ratio (ie. the number of parameter updates per environment interactions step) is a promising general approach for increasing sample efficiency and final performance of RL agents (Janner et al., 2019; Chen et al., 2020; Nikishin et al., 2022; Li et al., 2022), it is characterized by quickly diminishing gains (D’Oro et al., 2022) combined with linearly increasing computational cost (Rumelhart et al., 1986; Kingma & Ba, 2014). Moreover, the limitations of robot hardware and data acquisition frequency constrain the maximum achievable replay ratio (Smith et al., 2022). As such, it is worthwhile to pursue orthogonal techniques such as enhancing the properties of the underlying model-free agents. One continuously researched theme is how a particular algorithm handles the _exploration-exploitation_ dilemma (Hessel et al., 2018; Fujimoto et al., 2019; Ciosek et al., 2019; Ecoffet et al., 2021).
+
+In Actor-Critic (AC) algorithms, it’s common to employ a single policy for both exploration (gathering new data to improve the current best policy) and exploitation (leveraging gathered data to determine the best policy) (Silver et al., 2014; Schulman et al., 2015; Wu et al., 2017; Schulman et al., 2017; Moskovitz et al., 2021). Algorithms like TD3 (Fujimoto et al., 2018) or SAC (Haarnoja et al., 2018) achieve exploration by introducing symmetric noise to an exploitative action. However, this noisy exploitation strategy necessitates careful balancing of policy entropy (Duan et al., 2016). Whereas insufficient entropy leads to suboptimal policies due to inadequate exploration (Haarnoja et al., 2018), excessive entropy results in suboptimal policies due to noisy critic network updates and, consequently, poor Q-value approximator convergence (Van Seijen et al., 2009). Additionally, optimizing the policy towards Q-value lower bound leads to an inadequate exploration of the state-action subspace that yields critic disagreement (Ciosek et al., 2019; Moskovitz et al., 2021).
+
+Using a single policy for both exploration and exploitation in AC algorithms has its roots in the Policy Gradient (PG) Theorem (Sutton et al., 1999) which states that PG is a function of Q-values under the current policy. Thus, approaches building on PG would often use SARSA-type updates to train the critic (Silver et al., 2014; Hafner et al., 2019a; Cetin & Celiktutan, 2023), as SARSA converges to on-policy Q-values (Sutton & Barto, 2018). This in turn reinforces a single-policy setup for AC algorithms. Recently, there have been works in relaxing the PG Theorem toward a dual-policy, fully off-policy setup (Laroche & Tachet des Combes, 2021). An example of a dual-policy implementation is Optimistic Actor-Critic (OAC) (Ciosek et al., 2019). OAC uses two policies: optimistic for exploration (ie. sampling actions when interacting with the environment); and conservative for exploitation (ie. sampling actions for temporal-difference learning). Both policies are extracted
+
+1
+
+**==> picture [96 x 76] intentionally omitted <==**
+
+**==> picture [96 x 76] intentionally omitted <==**
+
+**==> picture [96 x 76] intentionally omitted <==**
+
+**==> picture [96 x 75] intentionally omitted <==**
+
+**==> picture [375 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Low Replay Ratio (b) High Replay Ratio (c) Scaling-by-Resetting (d) DAC & DreamerV3 **----- End of picture text -----**
+
+Figure 1: Decoupled Actor-Critic (DAC) achieves significant improvements on DeepMind Control Suite despite minimally higher computational costs than Soft Actor-Critic (SAC), demonstrating state-of-the-art performance in complex locomotion tasks. Figure 1a reports compute efficient experiments, where algorithms perform only 3 updates per environment step. Figure 1b reports a sample efficient, high replay ratio experimental setup. Figure 1c shows that DAC matches the performance of state-of-the-art Scaled-by-Resetting (SR) SR-SAC despite using 5-times lower replay ratio and no parameter resets, whereas SR-DAC outperforms both. Figure 1d compares low replay DAC, DreamerV3, MPO and D4PG. The Figure highlights DAC’s competitive performance despite significantly lower complexity, runtime, and computational demands than the model-based algorithm. We detail the setting in Section 4 and Appendix G. 10 seeds, mean and 95% bootstrapped CI.
+
+from a single conservative actor. Whereas the conservative policy is directly parameterized by the actor, the optimistic policy stems from a local linear approximation of Q-value upper bound constrained by a desired Kullback-Leibler (KL) divergence. This yields an approximation of a policy that is Optimistic in the Face of Uncertainty (OFU) (Wang et al., 2020b; Neu & Pike-Burke, 2020). Unfortunately, OAC exploration is highly dependent on the chosen hyperparameter values.
+
+To address the above shortcomings, we propose Decoupled Actor-Critic (DAC). DAC tackles the exploration-exploitation dilemma by adopting a novel decoupled actor AC approach. As such, DAC employs two actors, each independently optimized using gradient backpropagation with different objectives. The optimistic actor is trained to maximize an optimistic Q-value upper bound while adjusting optimism levels automatically. This actor is responsible for exploration (sampling transitions added to the experience buffer). In contrast, the conservative actor is trained using standard lower bound soft policy learning (Haarnoja et al., 2018) and is used for sampling temporal-difference (TD) targets and evaluation. Secondly, DAC addresses the shortcomings of OAC. By relaxing the firstorder Taylor approximation and explicitly modeling the second policy via an actor network DAC can accurately approximate the maximum of arbitrary complexity Q-value upper bound (Hornik et al., 1989). We perform experiments summarized in Figure 1, and show that DAC outperforms other model-based RL agents. We highlight the main contributions of DAC below:
+
+- We propose a novel off-policy dual-actor AC setup where each actor is trained via gradient backpropagation of a specialized objective. We define the optimistic policy objective and formulate a robust framework that introduces easily interpretable hyperparameters.
+
+- We implement a module that automatically adjusts the level of optimism applied during Q-value upper bound approximation, as well as the impact of the KL penalty. This in turn allows DAC to accommodate various levels of epistemic and aleatoric uncertainties and different reward scales without hyperparameter tuning.
+
+- We show that DAC outperforms model-free benchmarks in terms of both sample efficiency and final performance, in both low and high replay regimes. To facilitate further research, we perform extensive ablations on various design choices (over 2000 training runs). We release training logs, as well as implementations of DAC under the following URL.
+
+## 2 PRELIMINARIES
+
+In this paper, we address policy learning in continuous action spaces. We consider an infinite-horizon Markov Decision Process (MDP) (Puterman, 2014) which is described with a tuple ( _S, A, R, p, γ_ ), where states _S_ and actions _A_ are continuous, _R_ ( _s, a, s[′]_ ) is the transition reward, _p_ ( _s[′] |s, a_ ) is a transition kernel and _γ ∈_ (0 _,_ 1] is a discount factor. A policy _π_ ( _a|s_ ) is a state-conditioned action
+
+2
+
+**==> picture [116 x 103] intentionally omitted <==**
+
+**==> picture [116 x 103] intentionally omitted <==**
+
+**==> picture [116 x 103] intentionally omitted <==**
+
+**==> picture [326 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Critic Variance (b) Conservative Actor (c) Optimistic Actor **----- End of picture text -----**
+
+Figure 2: Pessimistic underexploration and state-action space coverage on the Pendulum task with state representation embedded into 1 dimension. The dots represent 500 state-action samples gathered using the latest policy (conservative (black) or optimistic (red)). Figure 2a displays the standard deviation ( _σ_ ) of the two critics, with smaller values observed in well-explored state-action regions. In Figure 2b, we depict conservative policy probabilities. Due to lower bound optimization, the actor prioritizes state-action subspaces that have already been explored and do not yield critic disagreement. Figure 2c illustrates optimistic policy probabilities. Despite having similar entropy levels, following the upper bound policy results in better coverage within critic disagreement regions.
+
+distribution. Value is the expected discounted return from following the policy at a given state _V[π]_ ( _s_ ) = � [ _R_ ( _s, a, s[′]_ ) + _γV_ ( _s[′]_ )] _ds[′] a_ . Q-value is the expected discounted return from performing an action and following the policy thereafter _Q[π]_ ( _s, a_ ) = � _p_ ( _s[′]_ ) [ _R_ ( _s, a, s[′]_ ) + _γV_ ( _s[′]_ )] _ds[′]_ . A policy is said to be optimal if it maximizes discounted return for starting state distribution. ActorCritic (AC) for continuous action spaces performs simultaneous gradient-based learning of Q-values ( _critic_ ) and policy ( _actor_ ) that seeks local optimum of said Q-values (Silver et al., 2014; Ciosek & Whiteson, 2020). Critic parameters are updated by minimizing the SARSA temporal-difference variants (Sutton & Barto, 2018). Modern AC methods employ a variety of countermeasures to overestimation of Q-values, with bootstrapping using target network (Van Hasselt et al., 2016) and lower bound Q-value approximation (Fujimoto et al., 2018) being most prominent. Soft SARSA updates include policy stochasticity according to the following (Haarnoja et al., 2018):
+
+**==> picture [380 x 13] intentionally omitted <==**
+
+Where _πϕ_ is the actor; _Q[π] θ_[is the critic;] _[ Q][π] lb_[is the Q-value lower bound;] _[ α]_[ is the entropy temperature;] and _D_ denotes the experience buffer (Mnih et al., 2015). To achieve a locally optimal policy, the actor takes gradient steps aimed at maximizing the critic’s lower bound (Moskovitz et al., 2021). The policy can use an exploration schedule (Fujimoto et al., 2018) or optimize its variance through soft policy improvement based on an entropy target (Haarnoja et al., 2018):
+
+**==> picture [304 x 13] intentionally omitted <==**
+
+As the actor models a parameterized distribution, gradients can be computed using the reparametrization trick (Kingma et al., 2014). When enforcing action domain constraints through hyperbolic tangent, minimizing policy log probabilities not only enhances exploration but also encourages the policy to maintain means within the non-saturated region of the hyperbolic tangent (Wang et al., 2020a). Additionally, the temperature can be automatically adjusted to ensure that average log probabilities match a specified target (Haarnoja et al., 2018):
+
+**==> picture [327 x 13] intentionally omitted <==**
+
+Where _H[∗]_ is the fixed entropy target which is often a function of action dimensionality. Contrary to fixed exploration scheduling, this method allows for heterogeneous variances across states. Given the optimization objective, this mechanism promotes exploration in states that offer lower Q-value
+
+3
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [331 x 11] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Qπ [σ][/Q][µ] π ( × 10 [2] ) (b) Optimism (c) KL Penalty Weight **----- End of picture text -----**
+
+Figure 3: Varying reward scales, uncertainty levels, and Q-value non-stationarity pose challenges in setting fixed optimism ( _β[ub]_ ) and KL penalty weights. We examine three versions of the Cheetah Run task: regular (blue), equivalent to the vanilla DMC task; scale (orange), where we rescale Q- values by multiplying rewards; and uncertainty (pink), where we add Gaussian noise to rewards to increase aleatoric uncertainty. In Figure 3a), we observe how the ratios _Q[σ] π/Q[µ] π_ change during training for these task variants. As training progresses, the divergence between policies maximizing Q-value lower and upper bounds decreases for any fixed _β[ub]_ . In Figure 3b), we illustrate the DAC optimism adjustment mechanism, which adapts _β[ub]_ to achieve a desired empirical KL divergence between optimistic and conservative actors. This allows for task-dependent and phase-specific levels of optimism _β[ub]_ . Finally, Figure 3c presents DAC’s KL penalty weight ( _τ_ ) on a logarithmic scale. Similarly to optimism, DAC adjusts the impact of the KL until the divergence reaches target levels.
+
+gradients. For both actor and critic, an ensemble statistic of _k_ critic networks gives the Q-value lower bound. Most commonly, an ensemble of _k_ = 2 is used. Then:
+
+**==> picture [387 x 45] intentionally omitted <==**
+
+This observation generalized Q-value lower bound (Ciosek et al., 2019; Moskovitz et al., 2021):
+
+**==> picture [274 x 12] intentionally omitted <==**
+
+Where _Q[µ] π_[is the critic ensemble mean;] _[ Q][σ] π_[is the critic ensemble standard deviation; and hyperpa-] rameter _β[lb]_ controls the level of conservatism of the algorithm (ie. decreasing _β[lb]_ leads to bigger penalization of critic disagreement). Setting _β[lb]_ = _−_ 1 is equivalent to the standard minimum of the two critics. Optimizing the actor with respect to the Q-value lower bound demotes state actions for which the critic ensemble disagrees. Such effect is referred to as pessimistic underexploration (showed in Figure 2) (Ciosek et al., 2019; Cetin & Celiktutan, 2023). OAC tackles the underexploration by exploring according to an optimistic policy _πϕ[o]_[,][which][is][itself][extracted][from][the] conservative actor _π[c]_[As][such,][OAC][explores][according][to][a][transformed][conservative][policy] _[π][o] ϕ_[.] given by the following Lagrangian:
+
+**==> picture [339 x 33] intentionally omitted <==**
+
+Where _δ_ is the boundary hyperparameter, _Q[π] ub_[is the Q-value upper bound approximated via a linear] first-order Taylor series, and _β[ub]_ hyperparameter controls the level of optimism. OAC exploration was shown to improve sample efficiency and performance as compared to SAC (Ciosek et al., 2019).
+
+## 3 DECOUPLED ACTOR-CRITIC
+
+Traditionally, AC algorithms use a single actor network for three main tasks: _exploration_ (ie. sampling an action to add a transition to the experience buffer); _temporal-difference learning_ (ie. sampling an action to calculate the TD target); and _evaluation_ (ie. sampling an action to assess the
+
+4
+
+performance of an agent). Using a single actor for all tasks requires a delicate balance between optimism and conservatism. Exploration tends to favor optimistic behavior policies due to lower regret guarantees (Wang et al., 2020b), while TD learning leans towards conservatism due to the critic’s tendency to overestimate (Hasselt, 2010). DAC addresses this dichotomy by introducing two distinct actor networks: an optimistic one and a conservative one. The optimistic actor is trained to maximize the upper bound of the Q-value and is exclusively used for exploration. On the other hand, the conservative actor is trained to maximize the lower bound of the Q-value and is employed for both TD learning and evaluation. By performing conservative Q-value updates on optimistic state-action samples, DAC achieves more effective exploration without the issue of Q-value overestimation.
+
+## **Algorithm 1** Decoupled Actor-Critic Step
+
+1: **Input Models:** _πϕ[c]_[- conservative actor;] _[ π] η[o]_[- optimistic actor;] _[ Q][π] θ_[- critic ensemble;] _[ Q] t[π]_[- target] critic; _α_ - entropy temperature; _β[ub]_ - optimism; _τ_ - KL penalty weight; 2: **Input Hyperparameters:** _fσ_ - variance multiplier described in Eq. 7; _x_ - copying frequency; _KL[∗]_ - target KL divergence described in Eq. 9; _β_ 0 _[ub]_[- initial] _[ β][ub]_[;] _[ τ]_[0][- initial] _[ τ]_ 3: _s[′] , r, t_ = ENV.STEP( _a_ ) _with a ∼ fσ_ ( _πη[o]_[(] _[a][|][s]_[))] _{_ sample from the optimistic actor _}_ 4: BUFFER.ADD( _s, a, r, s[′] , t_ ) 5: **if** _train_ ~~_s_~~ _tep_ modulo _x_ = 0; **then** 6: _η ←− ϕ_ ; _β[ub] , τ ←− β_ 0 _[ub][, τ]_[0] _[{]_[copy conservative parameters; reinitialize] _[ β][ub]_[and] _[ τ][}]_ 7: **end if**
+
+8: **for** _i_ = 1 **to** ReplayRatio **do**
+
+9: _s, a, r, s[′] ∼_ BUFFER.SAMPLE 10: _θ ←− θ −∇θL[θ]_ ( _s, a, r, s[′] , a[′]_ ) _with a[′] ∼ πϕ[c] {_ update critic according to Eq. 1 _}_ 11: _ϕ ←− ϕ −∇ϕL[ϕ]_ ( _s, a_ ) _with a ∼ πϕ[c] {_ update conservative actor according to Eq. 2 _}_ 12: _η ←− η −∇ηL[η]_ ( _s, a_ ) _with a ∼ fσ_ ( _πη[o]_[)] _{_ update optimistic actor according to Eq. 7 _}_ 13: _α ←− α −∇αL[α] {_ update entropy temperature according to Eq. 3 _}_ 14: _β[ub] ←− β[ub] −∇βL[β] {_ update optimism according to Eq. 9 _}_ 15: _τ ←− τ −∇τ L[τ] {_ update KL penalty weight according to Eq. 10 _}_ 16: _Q[π] t_[=][P][OLYAK][(] _[Q][π] θ[, Q] t[π]_[)] _{_ standard Polyak averaging _}_ 17: **end for**
+
+The pseudo-code illustrates a single DAC training step, where changes with respect to SAC are colored. We summarize the most important novelties of the proposed algorithm: [1] _Decoupled Actors_ - the conservative actor is used for TD learning (pseudo-code line 10) and the optimistic actor is used for exploration (pseudo-code line 3); [2] _Unique Variance_ - the exploration policy can have a different level of entropy as compared to the TD learning policy (pseudo-code line 3); [3] _Optimistic Policy Objective_ - the optimistic actor learns to maximize the regularized Q-value upper bound (pseudo-code line 12) with the levels of optimism and KL penalty weight adjusted such that the divergence target is met (pseudo-code lines 14 and 15). We describe all DAC modules in the following subsections and provide a detailed comparison to OAC in Appendix B.2.
+
+## 3.1 CONSERVATIVE ACTOR, ENTROPY TEMPERATURE AND CRITIC
+
+The conservative actor denoted as _π[c] ϕ_[, optimizes a standard soft policy target described in Equation] 2. Using a soft policy target allows for state-dependent exploration and regularizes the policy such that the hyperbolic tangent output remains unsaturated. Furthermore, the non-zero variance of the conservative actor regularizes the critic TD learning. Since the data in _D_ is collected exclusively by the optimistic actor, the conservative actor is updated fully off-policy. Following standard SAC, we update the entropy temperature and the critic via Equations 3 and 1 respectively. For both updates, the sampling is performed from the conservative actor _πϕ[c]_[.][Whereas][in][principle][detaching] exploration from exploitation allows for zero variance when sampling the TD targets, we find that including some levels of noise regularizes the critic. Finally, the critic uses layer normalization (Ba et al., 2016) before every activation, which we found to slightly increase the base agent’s performance. We discuss the design choices in more detail in Appendix A.
+
+5
+
+3.2 OPTIMISTIC ACTOR
+
+The optimistic actor, denoted as _πη[o]_[, optimizes an optimistic policy objective defined as follows:]
+
+**==> picture [370 x 28] intentionally omitted <==**
+
+Where _β[ub]_ is the optimism, _τ_ is the KL penalty weight, _D_ KL is the KL divergence between the conservative and optimistic policies, and _fσ_ is the standard deviation multiplier. Optimizing for the Q-value upper bound results in a policy that is optimistic in the face of uncertainty, but also promotes actions that generate critic disagreement. Since ensemble disagreement is often treated as a proxy for sample novelty (Yahaya et al., 2019; Han et al., 2021), following such a policy yields more diverse samples and as a result better coverage of the state-action space (Pathak et al., 2019; Lee et al., 2021). Whereas coverage is not explicitly optimized for in traditional RL, there is a growing body of research that hints toward the importance of data diversity in the context of RL (Xie et al., 2022; Foster et al., 2022; Zhan et al., 2022). KL divergence, the second objective term, regularizes the optimistic policy. While policies can be represented by various parameterized distributions, we implement both actors as simple diagonal normal distributions, transformed by the hyperbolic tangent activation. We compute the KL divergence in a closed form using the change of variables:
+
+**==> picture [357 x 31] intentionally omitted <==**
+
+We derive the above statement in Appendix A. Using KL stabilizes the off-policy learning by ensuring that the sampled trajectories are probable under the conservative actor policy (Sutton & Barto, 2018; Ciosek et al., 2019). Secondly, it guarantees that the optimistic policy optimizes for a specified level of variance, which can be distinct from _πϕ[c]_[.][To this end, we define the function] _[ f][σ]_[as a simple] variance multiplication. As such, the optimistic actor will have a standard deviation _fσ_ -times bigger than the conservative policy (this is implemented by simply multiplying the modeled standard deviations by _fσ_ ). This mechanism allows for separate entropy for TD learning and exploration while retaining standard convergence guarantees of AC algorithms. In fact, as lim _D→∞ Q[σ] π_[(] _[s, a]_[)][=][0] (Van Hasselt et al., 2016), it follows that in the limit both actors recover a policy that differs only by _fσ_ . As shown in Figure 4, including the KL penalty is essential for the approach’s success.
+
+**==> picture [378 x 97] intentionally omitted <==**
+
+Figure 4: Evaluating the impact of various design choices in DAC. The ablated design choices include: (+ _KL_ ) KL penalty on both actors; ( _−π_ ) only optimistic actor; ( _−KL_ ) not using KL at all; (+ _Det_ ) a deterministic conservative actor; ( _−τ_ ) a fixed value of _τ_ ; ( _−β_ ) a fixed value of _β[ub]_ ; ( _−τ_ & _β_ ) fixed values of both; ( _−σ_ ) same variance on both actors; ( _−copy_ ) not copying parameters during the training; and ( _−LN_ ) DAC without layer normalisation. As follows, the application of KL is of great importance, with both using KL penalty on both agents and not using it at all leading to bad policies. _β[ub]_ adjustment has more impact on the performance than _τ_ adjustment. Finally, using DAC with parameter copying and layer normalization with DAC is beneficial. RR=3, 500k steps, 10 tasks, 10 seeds, and 95% bootstrapped CI. We detail the tested variations in Appendix G.
+
+6
+
+## 3.3 ADJUSTMENT OF _β[ub]_ AND _τ_
+
+Since values of _Q[µ] π_[and] _[ Q][σ] π_[depend on reward scales, as well as aleatoric and epistemic uncertainty] of the environment, the value of _β[ub]_ cannot be easily set. Furthermore, as shown in Figure 3, fixed levels of _β[ub]_ yield decreasing the impact of uncertainty on the optimistic policy. DAC leverages an observation that for _β[ub]_ = _−β[lb]_ the optimistic actor recovers the objective of the conservative actor. Then, _β[ub]_ can be defined such that the divergence between the conservative baseline policy and the optimistic policy reaches a desired level. To this end, implement a module that automatically adjusts the levels of optimism _β[ub]_ :
+
+**==> picture [364 x 26] intentionally omitted <==**
+
+Where _KL[∗]_ is the KL divergence target between the optimistic and transformed conservative policies, _D_ KL is the empirical KL divergence, and _|A|_ is the action dimensionality. If the empirical KL divergence is bigger than the KL target, then _β[ub]_ is reduced with a limit at _β[lb]_ . On the other hand, if the empirical KL divergence is smaller than the target, then _β[ub]_ is increased with a limit at _∞_ . This update mechanism allows us to define optimism level as a divergence between optimistic and conservative policies. We update the KL penalty weight _τ_ in the opposite direction:
+
+**==> picture [330 x 27] intentionally omitted <==**
+
+By dividing by _|A|_ we allow for divergence per degree of freedom. As _τ_ is increased when the empirical KL target is bigger than the desired KL target, DAC can regularize the divergence between two actors even if the _β[ub]_ is at its negative limit. Conversely, an automatic reduction of _τ_ accompanies the increase of _β[ub]_ if reaching the divergence limit proves challenging. This adaptive approach, as illustrated in Figure 3c, accommodates different scales of Q-values and contrasts with setups like OAC, where optimism is predefined by fixing _β[ub]_ at a specific value. However, if the adjustment mechanism operates too slowly, the KL penalty may not be effectively enforced during training, potentially causing the two agents to diverge. This divergence can result in fully off-policy learning, insufficient coverage in the conservative policy region, and ultimately, suboptimal agent performance. We believe that this issue may be connected to the deadly triad (Thrun & Schwartz, 2014; Sutton & Barto, 2018) and recent findings highlighting the limitations of fully off-policy learning, such as in the tandem setting (D’Oro et al., 2022). To mitigate the divergence problem, we observed that initializing both agents with identical parameter values ( _ϕ_ 0 = _η_ 0) makes them less likely to diverge. Additionally, during training, we employ a hard parameter copy of the conservative actor and reinitialize the optimistic actor with copies of these parameters.
+
+## 4 EXPERIMENTS
+
+We build our experiments on JaxRL code base (Kostrikov, 2021). Since all considered algorithms other than SAC are extensions of thereof, we fix the pool of common hyperparameters on values that are known to work well with SAC (Nikishin et al., 2022; D’Oro et al., 2022). All algorithm-specific hyperparameters have fixed values between low and high replay ratio settings and are reported in Appendix E. Similarly, all algorithms except RedQ use the same network architectures and a standard
+
+**==> picture [124 x 47] intentionally omitted <==**
+
+**==> picture [124 x 47] intentionally omitted <==**
+
+**==> picture [124 x 47] intentionally omitted <==**
+
+Figure 5: Impact of DAC hyperparameters on the final performance. All tested setups outperformed baseline SAC (orange), demonstrating DAC robustness and stability. The thick dot is the configuration used in the main experiment. 500 _k_ steps, 10 tasks, 10 seeds, mean and 95% bootstrapped CI.
+
+7
+
+ensemble of two critics (Fujimoto et al., 2018; Haarnoja et al., 2018; Ciosek et al., 2019; Moskovitz et al., 2021; Cetin & Celiktutan, 2023). For all experiments, we report robust evaluation statistics generated via the RLiable package (Agarwal et al., 2021). The results for the main experiments are presented in Figures 1, 6 & 7. Additionally, we run ablations on various design choices and hyperparameters which we report in Figures 4 & 5. We provide further experimental results in Appendix D and information on the experimental settings in Appendix G
+
+**Low and High Replay** We consider a set of 10 proprioceptive DeepMind Control Suite (DMC) tasks (Tassa et al., 2018) listed in Appendix F for which we run experiments in low and high replay regimes. In both, we use 10[6] environment steps for each task and algorithm. Firstly, we consider a low replay ratio of 3 gradient steps per environment step. Such a low replay does not induce loss of plasticity or overfitting in tested algorithms (Nikishin et al., 2022; Li et al., 2022). As such, no parameter resets are required (D’Oro et al., 2022). We consider the following baselines: OAC (Ciosek et al., 2019); ND-TOP (Moskovitz et al., 2021); SAC (Haarnoja et al., 2018); and TD3 (Fujimoto et al., 2018). Furthermore, we consider a high replay of 15 gradient steps per environment step. Such replay is known to degenerate the performance of most algorithms unless regularization is used (Chen et al., 2020; D’Oro et al., 2022). To this end, all algorithms perform full-parameter resets in 50000 _th_ step, as well as every 250000 environment steps (Nikishin et al., 2022; D’Oro et al., 2022). In this setup, we consider SR-SAC (D’Oro et al., 2022), SR-TOP and SR-OAC.
+
+**==> picture [397 x 64] intentionally omitted <==**
+
+**==> picture [396 x 81] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Low Replay Ratio; No Resets (b) High Replay Ratio; Full Resets **----- End of picture text -----**
+
+Figure 6: RLiable results for two regimes. Tasks used in the evaluation are listed in Appendix F. DAC achieves the best final performance, with a pretty sizeable performance gap in the low replay ratio regime. We use 10 tasks, 10 random seeds, and 10[6] environment steps. The bars indicate the 95% bootstrapped CI. We provide detailed training curves in Appendix H.
+
+We find that low replay DAC achieves significantly better performance than the baseline algorithms (Figures 1a and 6a). Notably, low replay DAC matches the performance of SR-SAC (Scaled-byResetting SAC), despite SR-SAC utilizing 5-times bigger replay and resets (Figure 1c). Similarly, scaled-by-resetting DAC (SR-DAC) outperforms the baseline algorithms in the high replay regime. As shown in Figures 1b and 6b, SR-DAC achieves better performance than the baseline algorithms and significantly surpasses the state-of-the-art model-free SR-SAC.
+
+**Dog Domain** We assess DAC performance on three tasks from the complex dog domain. The domain features a significantly larger action space than humanoid (31 dimensions compared to humanoid’s 21). and remains unsolved by a model-free agent with proprioceptive input. Recently, it was shown that a model-based agent TD-MPC achieves substantial improvements to SAC on the dog tasks (Hansen et al., 2022). As such, we evaluate whether DAC can find policies better than SAC and if it is capable of surpassing the performance of model-based TD-MPC on dog tasks. As TDMPC uses a variety of annealing mechanisms, a prioritized experience buffer, and a much greater number of parameters, we decided to add one hidden layer to each network in DAC and increase the copying frequency of the optimistic agent. We refer to such changed implementation as SR-DAC+. We run the algorithm for 30[6] environment steps and compare its performance against both SR-SAC and TD-MPC. We detail this experimental setting in Appendix G and E. We summarize the results in Figure 7 and provide an additional comparison against TD-MPC in Appendix D.
+
+8
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+Figure 7: We find that SR-DAC achieves substantially better performance than SR-SAC, and SR-DAC+ outperforms TD-MPC. To the best of our knowledge, SR-DAC+ achieves the highest recorded performance on the dog tasks of a model-free RL algorithm. SR-DAC and SR-SAC use 10 seeds each, and SR-DAC+ and TD-MPC use 5 seeds each. Mean and 95% bootstrapped CI.
+
+Whereas SR-SAC is unable to find a performing policy in the dog domain (a result consistent with the evaluations performed in Hansen et al. (2022)), DAC is able to party solve all of the dog tasks. Furthermore, we find that the SR-DAC+ matches the state-of-the-art model-based TD-MPC.
+
+## 5 LIMITATIONS
+
+Besides the limitations that DAC inherits from the soft actor-critic algorithmic family, DAC divergence minimization presents unique optimization challenges. Unlike typical uses of KL divergence, where the target distribution remains fixed (eg. Variational Autoencoders (VAE) (Kingma et al., 2014)), DAC deals with a constantly evolving policy that is continually improving. Consequently, the optimistic actor needs to keep up with the conservative actor’s changes. As depicted in Figure 4, DAC heavily relies on maintaining a low divergence between the actors. While DAC adjustment mechanisms proved effective in the tested environments, there is no guarantee that they will suffice in more complex ones. The second drawback of DAC lies in its inherent use of two actor networks, which results in slightly increased memory and computational demands compared to the standard Soft Actor-Critic (SAC) approach. In practice, the wall-clock time of DAC is around 10% greater than that of SAC and is indistinguishable from the overhead induced by OAC, which requires additional backpropagation through the critic ensemble. Moreover, since DAC initializes both actors with identical parameters, they must share the same network architecture. However, as indicated by Figure 4, simply copying parameters between them offers only minimal performance enhancement. In light of this, we believe that the necessity for identical architectures can be mitigated by employing techniques like delayed policy updates (Fujimoto et al., 2018) or by learning rate scheduling.
+
+## 6 CONCLUSIONS
+
+In this paper, we introduced DAC, an off-policy algorithm that leverages two distinct actors trained via specialized objectives. One actor, known as the conservative actor, is dedicated to TD learning and evaluation tasks, while the other, the optimistic actor, is used in exploration. This allows DAC to perform conservative Q-value updates at optimistic state-action samples. As a result, DAC directly addresses the optimism-pessimism dilemma commonly encountered in Actor-Critic agents. To evaluate the effectiveness of the proposed method, we conducted experiments on a set of 10 complex locomotion tasks, considering two different replay ratio regimes. Our results demonstrated that DAC significantly outperforms established benchmark algorithms in terms of both performance and sample efficiency. To assess the impact of individual DAC components, we conducted extensive ablation studies consisting of over 2000 runs. Finally, we showcased the robustness of DAC across a range of hyperparameter settings, underscoring its suitability for practical applications.
+
+## REPRODUCIBILITY
+
+We provide the DAC implementation, results and scripts used to generate the results at the following URL. For pseudo-code, implementation details, or additional information about specific design choices, please refer Appendix A. We describe experimental settings in Section 4 and Appendix G. Finally, we point the reader towards Appendix E for the hyperparameters used in experiments
+
+9
+
+## REFERENCES
+
+- Abbas Abdolmaleki, Jost Tobias Springenberg, Yuval Tassa, Remi Munos, Nicolas Heess, and Martin Riedmiller. Maximum a posteriori policy optimisation. In _International Conference on Learning Representations_ , 2018.
+
+- Rishabh Agarwal, Max Schwarzer, Pablo Samuel Castro, Aaron C Courville, and Marc Bellemare. Deep reinforcement learning at the edge of the statistical precipice. _Advances in neural information processing systems_ , 34:29304–29320, 2021.
+
+- Shun-Ichi Amari. Natural gradient works efficiently in learning. _Neural computation_ , 10(2):251– 276, 1998.
+
+- Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. _Machine learning_ , 47:235–256, 2002.
+
+- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. _arXiv preprint arXiv:1607.06450_ , 2016.
+
+- Philip Ball, Jack Parker-Holder, Aldo Pacchiano, Krzysztof Choromanski, and Stephen Roberts. Ready policy one: World building through active learning. In _International Conference on Machine Learning_ , pp. 591–601. PMLR, 2020.
+
+- Gabriel Barth-Maron, Matthew W Hoffman, David Budden, Will Dabney, Dan Horgan, TB Dhruva, Alistair Muldal, Nicolas Heess, and Timothy Lillicrap. Distributed distributional deterministic policy gradients. In _International Conference on Learning Representations_ , 2018.
+
+- Marc G Bellemare, Will Dabney, and R´emi Munos. A distributional perspective on reinforcement learning. In _International conference on machine learning_ , pp. 449–458. PMLR, 2017.
+
+- Edoardo Cetin and Oya Celiktutan. Learning pessimism for reinforcement learning. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 37, pp. 6971–6979, 2023.
+
+- Richard Y Chen, Szymon Sidor, Pieter Abbeel, and John Schulman. Ucb exploration via q- ensembles. _arXiv preprint arXiv:1706.01502_ , 2017.
+
+- Xinyue Chen, Che Wang, Zijian Zhou, and Keith W Ross. Randomized ensembled double q- learning: Learning fast without a model. In _International Conference on Learning Representations_ , 2020.
+
+- K Ciosek and S Whiteson. Expected policy gradients for reinforcement learning. _Journal of Machine Learning Research_ , 21(2020), 2020.
+
+- Kamil Ciosek, Quan Vuong, Robert Loftin, and Katja Hofmann. Better exploration with optimistic actor critic. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Will Dabney, Mark Rowland, Marc Bellemare, and R´emi Munos. Distributional reinforcement learning with quantile regression. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 32, 2018.
+
+- Pierluca D’Oro, Max Schwarzer, Evgenii Nikishin, Pierre-Luc Bacon, Marc G Bellemare, and Aaron Courville. Sample-efficient reinforcement learning by breaking the replay ratio barrier. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In _International conference on machine learning_ , pp. 1329–1338. PMLR, 2016.
+
+- Adrien Ecoffet, Joost Huizinga, Joel Lehman, Kenneth O Stanley, and Jeff Clune. First return, then explore. _Nature_ , 590(7847):580–586, 2021.
+
+- Sarah Filippi, Olivier Capp´e, and Aur´elien Garivier. Optimism in reinforcement learning and kullback-leibler divergence. In _2010 48th Annual Allerton Conference on Communication, Control, and Computing (Allerton)_ , pp. 115–122. IEEE, 2010.
+
+10
+
+- Dylan J Foster, Akshay Krishnamurthy, David Simchi-Levi, and Yunzong Xu. Offline reinforcement learning: Fundamental barriers for value function approximation. In _Conference on Learning Theory_ , pp. 3489–3489. PMLR, 2022.
+
+- Scott Fujimoto, Herke Hoof, and David Meger. Addressing function approximation error in actorcritic methods. In _International conference on machine learning_ , pp. 1587–1596. PMLR, 2018.
+
+- Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In _International conference on machine learning_ , pp. 2052–2062. PMLR, 2019.
+
+- Aur´elien Garivier and Eric Moulines. On upper-confidence bound policies for switching bandit problems. In _International Conference on Algorithmic Learning Theory_ , pp. 174–188. Springer, 2011.
+
+- Florin Gogianu, Tudor Berariu, Mihaela C Rosca, Claudia Clopath, Lucian Busoniu, and Razvan Pascanu. Spectral normalisation for deep reinforcement learning: an optimisation perspective. In _International Conference on Machine Learning_ , pp. 3734–3744. PMLR, 2021.
+
+- Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, et al. Soft actor-critic algorithms and applications. _arXiv preprint arXiv:1812.05905_ , 2018.
+
+- Danijar Hafner, Timothy Lillicrap, Jimmy Ba, and Mohammad Norouzi. Dream to control: Learning behaviors by latent imagination. In _International Conference on Learning Representations_ , 2019a.
+
+- Danijar Hafner, Timothy Lillicrap, Ian Fischer, Ruben Villegas, David Ha, Honglak Lee, and James Davidson. Learning latent dynamics for planning from pixels. In _International conference on machine learning_ , pp. 2555–2565. PMLR, 2019b.
+
+- Danijar Hafner, Jurgis Pasukonis, Jimmy Ba, and Timothy Lillicrap. Mastering diverse domains through world models. _arXiv preprint arXiv:2301.04104_ , 2023.
+
+- Xu Han, Xiaohui Chen, and Li-Ping Liu. Gan ensemble for anomaly detection. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 35, pp. 4090–4097, 2021.
+
+- N Hansen, X Wang, and H Su. Temporal difference learning for model predictive control. In _International Conference on Machine Learning, PMLR_ , 2022.
+
+- Hado Hasselt. Double q-learning. _Advances in neural information processing systems_ , 23, 2010.
+
+- Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In _Proceedings of the AAAI conference on artificial intelligence_ , volume 32, 2018.
+
+- Takuya Hiraoka, Takahisa Imagawa, Taisei Hashimoto, Takashi Onishi, and Yoshimasa Tsuruoka. Dropout q-functions for doubly efficient reinforcement learning. In _International Conference on Learning Representations_ , 2021.
+
+- Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. _Neural networks_ , 2(5):359–366, 1989.
+
+- Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Modelbased policy optimization. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Piotr Januszewski, Mateusz Olko, Michał Kr´olikowski, Jakub Swiatkowski, Marcin Andrychowicz, Łukasz Kuci´nski, and Piotr Miło´s. Continuous control with ensemble deep deterministic policy gradients. In _Deep RL Workshop NeurIPS 2021_ , 2021.
+
+- Sham M Kakade. A natural policy gradient. _Advances in neural information processing systems_ , 14, 2001.
+
+- Emilie Kaufmann, Olivier Capp´e, and Aur´elien Garivier. On bayesian upper confidence bounds for bandit problems. In _Artificial intelligence and statistics_ , pp. 592–600. PMLR, 2012.
+
+11
+
+Michael J Kearns and Satinder Singh. Bias-variance error bounds for temporal difference updates. In _COLT_ , pp. 142–147, 2000.
+
+- Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _arXiv preprint arXiv:1412.6980_ , 2014.
+
+- Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. _Advances in neural information processing systems_ , 27, 2014.
+
+- Ilya Kostrikov. JAXRL: Implementations of Reinforcement Learning algorithms in JAX, 10 2021. URL [URL removed]
+
+- Anders Krogh and John Hertz. A simple weight decay can improve generalization. _Advances in neural information processing systems_ , 4, 1991.
+
+- Romain Laroche and Remi Tachet des Combes. Dr jekyll & mr hyde: the strange case of off-policy policy updates. _Advances in Neural Information Processing Systems_ , 34:24442–24454, 2021.
+
+- Misha Laskin, Kimin Lee, Adam Stooke, Lerrel Pinto, Pieter Abbeel, and Aravind Srinivas. Reinforcement learning with augmented data. _Advances in neural information processing systems_ , 33: 19884–19895, 2020.
+
+- Kimin Lee, Michael Laskin, Aravind Srinivas, and Pieter Abbeel. Sunrise: A simple unified framework for ensemble learning in deep reinforcement learning. In _International Conference on Machine Learning_ , pp. 6131–6141. PMLR, 2021.
+
+- Qiyang Li, Aviral Kumar, Ilya Kostrikov, and Sergey Levine. Efficient deep reinforcement learning requires regulating overfitting. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Zhuang Liu, Xuanlin Li, Bingyi Kang, and Trevor Darrell. Regularization matters in policy optimization-an empirical study on continuous control. In _International Conference on Learning Representations_ , 2020.
+
+- Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. _nature_ , 518(7540):529–533, 2015.
+
+- Ted Moskovitz, Jack Parker-Holder, Aldo Pacchiano, Michael Arbel, and Michael Jordan. Tactical optimism and pessimism for deep reinforcement learning. _Advances in Neural Information Processing Systems_ , 34:12849–12863, 2021.
+
+- Gergely Neu and Ciara Pike-Burke. A unifying view of optimism in episodic reinforcement learning. _Advances in Neural Information Processing Systems_ , 33:1392–1403, 2020.
+
+- Evgenii Nikishin, Max Schwarzer, Pierluca D’Oro, Pierre-Luc Bacon, and Aaron Courville. The primacy bias in deep reinforcement learning. In _International conference on machine learning_ , pp. 16828–16847. PMLR, 2022.
+
+- Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped dqn. _Advances in neural information processing systems_ , 29, 2016.
+
+- Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Deepak Pathak, Dhiraj Gandhi, and Abhinav Gupta. Self-supervised exploration via disagreement. In _International conference on machine learning_ , pp. 5062–5071. PMLR, 2019.
+
+Jan Peters and Stefan Schaal. Natural actor-critic. _Neurocomputing_ , 71(7-9):1180–1190, 2008.
+
+Murray H Protter, B Charles Jr, et al. _A first course in real analysis_ . Springer Science & Business Media, 2012.
+
+12
+
+Martin L Puterman. _Markov decision processes: discrete stochastic dynamic programming_ . John Wiley & Sons, 2014.
+
+- David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. _nature_ , 323(6088):533–536, 1986.
+
+- Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre, Simon Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, et al. Mastering atari, go, chess and shogi by planning with a learned model. _Nature_ , 588(7839):604–609, 2020.
+
+- John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In _International conference on machine learning_ , pp. 1889–1897. PMLR, 2015.
+
+- John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. _arXiv preprint arXiv:1707.06347_ , 2017.
+
+- Max Schwarzer, Johan Samir Obando Ceron, Aaron Courville, Marc G Bellemare, Rishabh Agarwal, and Pablo Samuel Castro. Bigger, better, faster: Human-level atari with human-level efficiency. In _International Conference on Machine Learning_ , pp. 30365–30380. PMLR, 2023.
+
+- Ramanan Sekar, Oleh Rybkin, Kostas Daniilidis, Pieter Abbeel, Danijar Hafner, and Deepak Pathak. Planning to explore via self-supervised world models. In _International Conference on Machine Learning_ , pp. 8583–8592. PMLR, 2020.
+
+- Tim Seyde, Igor Gilitschenski, Wilko Schwarting, Bartolomeo Stellato, Martin Riedmiller, Markus Wulfmeier, and Daniela Rus. Is bang-bang control all you need? solving continuous control with bernoulli policies. _Advances in Neural Information Processing Systems_ , 34:27209–27221, 2021.
+
+- Tim Seyde, Wilko Schwarting, Sertac Karaman, and Daniela Rus. Learning to plan optimistically: Uncertainty-guided deep exploration via latent model ensembles. In _Conference on Robot Learning_ , pp. 1156–1167. PMLR, 2022.
+
+- David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In _International conference on machine learning_ , pp. 387–395. PMLR, 2014.
+
+- David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. _nature_ , 550(7676):354–359, 2017.
+
+- Laura Smith, Ilya Kostrikov, and Sergey Levine. A walk in the park: Learning to walk in 20 minutes with model-free reinforcement learning. _arXiv preprint arXiv:2208.07860_ , 2022.
+
+- Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. _The journal of machine learning research_ , 15(1):1929–1958, 2014.
+
+- Richard S Sutton and Andrew G Barto. _Reinforcement learning: An introduction_ . MIT press, 2018.
+
+- Richard S Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. _Advances in neural information processing systems_ , 12, 1999.
+
+- Yuval Tassa, Yotam Doron, Alistair Muldal, Tom Erez, Yazhe Li, Diego de Las Casas, David Budden, Abbas Abdolmaleki, Josh Merel, Andrew Lefrancq, et al. Deepmind control suite. _arXiv preprint arXiv:1801.00690_ , 2018.
+
+- Sebastian Thrun and Anton Schwartz. Issues in using function approximation for reinforcement learning. In _Proceedings of the 1993 connectionist models summer school_ , pp. 255–263. Psychology Press, 2014.
+
+- Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q- learning. In _Proceedings of the AAAI conference on artificial intelligence_ , volume 30, 2016.
+
+13
+
+- Harm Van Seijen, Hado Van Hasselt, Shimon Whiteson, and Marco Wiering. A theoretical and empirical analysis of expected sarsa. In _2009 ieee symposium on adaptive dynamic programming and reinforcement learning_ , pp. 177–184. IEEE, 2009.
+
+- Che Wang, Yanqiu Wu, Quan Vuong, and Keith Ross. Striving for simplicity and performance in off-policy drl: Output normalization and non-uniform sampling. In _International Conference on Machine Learning_ , pp. 10070–10080. PMLR, 2020a.
+
+- Yining Wang, Ruosong Wang, Simon Shaolei Du, and Akshay Krishnamurthy. Optimism in reinforcement learning with generalized linear function approximation. In _International Conference on Learning Representations_ , 2020b.
+
+- Yuhuai Wu, Elman Mansimov, Roger B Grosse, Shun Liao, and Jimmy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. _Advances in neural information processing systems_ , 30, 2017.
+
+- Tengyang Xie, Dylan J Foster, Yu Bai, Nan Jiang, and Sham M Kakade. The role of coverage in online reinforcement learning. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Salisu Wada Yahaya, Ahmad Lotfi, and Mufti Mahmud. A consensus novelty detection ensemble approach for anomaly detection in activities of daily living. _Applied Soft Computing_ , 83:105613, 2019.
+
+- Denis Yarats, Ilya Kostrikov, and Rob Fergus. Image augmentation is all you need: Regularizing deep reinforcement learning from pixels. In _International conference on learning representations_ , 2020.
+
+- Weirui Ye, Shaohuai Liu, Thanard Kurutach, Pieter Abbeel, and Yang Gao. Mastering atari games with limited data. _Advances in Neural Information Processing Systems_ , 34:25476–25488, 2021.
+
+- Michał Zawalski, Michał Tyrolski, Konrad Czechowski, Tomasz Odrzyg´o´zd´z, Damian Stachura, Piotr Piekos, Yuhuai Wu, Łukasz Kuci´nski, and Piotr Miło´s. Fast and precise: Adjusting planning horizon with adaptive subgoal search. In _The Eleventh International Conference on Learning Representations_ , 2022.
+
+- Wenhao Zhan, Baihe Huang, Audrey Huang, Nan Jiang, and Jason Lee. Offline reinforcement learning with realizability and single-policy concentrability. In _Conference on Learning Theory_ , pp. 2730–2775. PMLR, 2022.
+
+## APPENDIX CONTENTS
+
+We divide the Appendix into the following sections:
+
+1. Further Description of DAC (Appendix A) — We provide additional rationale for certain design choices in DAC, as well as additional implementation details.
+
+2. Related Work (Appendix B) — We expand on the works related to DAC and provide a detailed comparison to the mechanisms leveraged by Optimistic Actor-Critic (OAC).
+
+3. Future Work (Appendix C) – we discuss a variety of research directions related to DAC
+
+4. Additional Experiments (Appendix D) — We report the additional tests of decoupled architecture in the context of value overestimation; performance impact of action repeat; and additional evaluation against TD-MPC.
+
+5. Hyperparameter Settings (Appendix E) — We list all hyperparameter settings required for the reproduction of the experiments.
+
+6. Tested Environments (Appendix F) — We list all DMC tasks using low replay, high replay, and DreamerV3 experiments.
+
+7. Experimental Settings (Appendix G) — We provide a detailed description of all experimental settings used in the paper.
+
+8. Learning Curves (Appendix H) — We share learning curves for the low replay, high replay, and DreamerV3 comparisons.
+
+14
+
+## A FURTHER DESCRIPTION OF DAC
+
+## A.1 SOFT CONSERVATIVE ACTOR
+
+When using a Tanh-Normal distribution to represent a policy, the soft policy learning (Haarnoja et al., 2018) serves two key purposes: _enforcing entropy_ ; and _enforcing non-saturation_ .
+
+**Enforcing entropy** soft policy learning ensures a specific level of policy entropy, thereby ensuring exploration during the learning (Haarnoja et al., 2018). Additionally, optimizing the objective function that balances entropy maximization and Q-values, enables policies to exhibit state-dependent entropy promoting more exploration in low Q-value states. This stands in contrast to traditional exploration methods employed by algorithms such as TD3, or TOP, where the policy maintains a constant entropy across different states.
+
+**Enforcing non-saturation** since the Tanh function saturates, increasing the distance between the unsquashed distribution expected value and zero naturally decreases the distribution variance after squashing, as illustrated in Figures 8a and 8b. Consequently, when employing soft learning, the agent experiences a loss when shifting the policy away from zero. As depicted in Figures 8c and 8d, this results in policies that concentrate within the non-saturated region of Tanh (Wang et al., 2020a) and thus avoid bang-bang behaviour (Seyde et al., 2021).
+
+**==> picture [96 x 66] intentionally omitted <==**
+
+**==> picture [96 x 66] intentionally omitted <==**
+
+**==> picture [96 x 69] intentionally omitted <==**
+
+**==> picture [96 x 69] intentionally omitted <==**
+
+**==> picture [353 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Normal (b) Tanh-Normal (c) Pre-Tanh µ (d) Post-Tanh Actions **----- End of picture text -----**
+
+Figure 8: Soft policy learning enforces prevents policy saturation. Figures 8a and 8b show three Gaussians and the Tanh transformed counterparts. Before Tanh transformation, all policies have equal variance (8a). However, since Tanh is nonlinear, applying the transformation changes the policy variance depending on the location of the mean (8b). Because of this effect, when using soft policy learning, the agent incurs loss when moving along the saturated portions of the Tanh activation function. Figures 8c and 8d show policy means and executed actions for SAC with and without soft policy learning on a Humanoid-Stand task. As follows, SAC without the entropy objectives follows a bang-bang policy, whereas regular SAC anchors the policy within the non-saturated portion of Tanh. To this end, soft policy learning reduces the risk of a bang-bang policy.
+
+When designing DAC, we were interested in enforcing entropy and non-saturation on both conservative and optimistic actors. DAC achieves this by using soft policy learning on the conservative actor (enforcing entropy and non-saturation) and using KL divergence on the optimistic actor (enforcing similarity between the optimistic and conservative actors).
+
+## A.2 OPTIMISTIC POLICY LEARNING AND PARAMETER COPYING
+
+We define the optimistic policy learning objective as follows:
+
+**==> picture [377 x 28] intentionally omitted <==**
+
+For an explanation of each symbol, please refer to Section 3.2. In our approach, we emphasize explicit upper bound optimization as the core principle of the optimistic policy objective. This aspect of the objective aims to find a policy with minimal regret. It’s important to note that the optimistic actor is exclusively employed for exploration purposes, ensuring that it doesn’t interfere
+
+15
+
+with Q-value learning. This approach stands in contrast to the pessimistic lower bound approach used in baseline algorithms such as SAC or TOP.
+
+Furthermore, the optimistic policy objective features a KL divergence penalty. As shown in ablation studies in Figure 4, such a penalty is of crucial importance for DAC performance. The penalty is applied only to the optimistic actor and serves multiple purposes:
+
+1. Reducing the degree of off-policy learning - since the exploration is done solely by the optimistic actor, the conservative actor is updated fully off-policy (ie. on transitions sampled from the optimistic policy). This practice can lead to unstable learning, a problem known as the ”deadly triad” (Sutton & Barto, 2018). By incorporating KL divergence into the optimistic objective, we ensure that the transitions sampled from the optimistic policy align with the probabilities expected under the conservative policy. This serves to mitigate the extent of off-policy learning.
+
+2. Anchoring the adjustment mechanisms - as discussed in Section 3.3, the automatic adjustment of _β[ub]_ (optimism) and _τ_ (KL penalty weight) is anchored on some desired divergence value (ie. it is designed to adjust _β[ub]_ and _τ_ such that the divergence target is met). To this end, without including the divergence penalty we would not be able to use the adjustment mechanisms as designed.
+
+3. Enforcing non-saturation of the optimistic policy - by minimizing KL between the conservative actor and itself, the optimistic actor is enforced to mimic a policy that is trained via soft policy learning. As such, the optimistic actor becomes disincentivized from saturating.
+
+As discussed in Section **??** , any differentiable divergence or distance function could be used in place of the KL. What makes KL divergence appealing is that it has a closed-form solution for any invertible and differentiable transformation of given distributions. Although it is a well-known result, we leave it below for completeness. We denote _x_ as samples from policy distributions before applying the Tanh activation, _pc_ and _po_ as conservative and optimistic distributions on _x_ , Tanh application as _y_ = _h_ ( _x_ ) and the resulting distributions as _πc, πo_ . Then leveraging the change of variables formula:
+
+**==> picture [329 x 85] intentionally omitted <==**
+
+The above holds true for any distributions _pc_ and _po_ . Since we assume them to be diagonal Gaussian, it follows that:
+
+**==> picture [337 x 26] intentionally omitted <==**
+
+Which concludes the derivation.
+
+## A.3 CRITIC REGULARIZATION
+
+Recently, there has been a surge of works exploring the importance of critic regularization (Liu et al., 2020; Laskin et al., 2020; Hiraoka et al., 2021; Gogianu et al., 2021; Li et al., 2022; D’Oro et al., 2022). Whereas there is still a lot to understand about the interplay of TD learning and network regularization, it is clear that a regularized critic allows a higher replay ratio to be used (Hiraoka et al., 2021; Li et al., 2022; D’Oro et al., 2022). In this paper, we explore only two regularization methods: layer normalization (Ba et al., 2016) and full-parameter resets (Nikishin et al., 2022). Given the effectiveness of the only regularization we tested, we hypothesize that experimenting with
+
+16
+
+methods like weight decay (Krogh & Hertz, 1991), spectral normalization (Gogianu et al., 2021) or dropout (Srivastava et al., 2014) could further improve DAC performance. As follows from the Figure 9, layer normalization has positive effects on DAC performance, particularly in the high replay ratio regime. This suggests, somewhat surprisingly, that layer normalization might have some synergy effect with full-parameter resets.
+
+**==> picture [179 x 141] intentionally omitted <==**
+
+**==> picture [179 x 141] intentionally omitted <==**
+
+Figure 9: Layer normalization applied to critic slightly improves the performance of DAC. 10 tasks, 10 seeds, mean and 95% bootstrapped CI.
+
+## B RELATED WORK
+
+## B.1 UNCERTAINTY EXPLORATION AND KL CONSTRAINED POLICIES
+
+The exploration-exploitation dilemma has been the subject of extensive research. One prominent principle that has emerged in addressing this dilemma is Optimism in the Face of Uncertainty (OFU) (Auer et al., 2002; Filippi et al., 2010; Ciosek et al., 2019), which prioritizes actions with a balance of high expected rewards and uncertainty. Whereas OFU has been extensively studied in the tabular and bandit RL setting (Auer et al., 2002; Garivier & Moulines, 2011; Kaufmann et al., 2012), it has not yet become as standard in deep RL. However, it has been shown that DQN ensembles used for uncertainty-driven updates can provide performance improvements (Osband et al., 2016; Chen et al., 2017; Osband et al., 2018; Lee et al., 2021). Similarly, OAC (Ciosek et al., 2019) and TOP (Moskovitz et al., 2021) leverage uncertainty estimates over the state-action value function for exploration, albeit still using one conservative actor.
+
+The optimism-driven exploration was also considered for model-based agents. Sekar et al. (2020) and Seyde et al. (2022) consider exploration driven by reward model ensemble. Similarly to DAC, Seyde et al. (2022) considers using an optimistic upper bound exploration policy and a distinct exploitation policy. Furthermore, agents like RP1 (Ball et al., 2020) leverage reward uncertainty despite access to the nominal rewards. Finally, a variety of agents that leverage MCTS have been proposed (Silver et al., 2017; Schrittwieser et al., 2020; Zawalski et al., 2022). On a different note, DAC might seem similar to natural actor-critic (Amari, 1998; Kakade, 2001; Peters & Schaal, 2008; Schulman et al., 2015) due to the KL constraint in actor optimization. Whereas the natural policy gradient uses KL to enforce the similarity between policies resulting in subsequent updates, DAC leverages KL to constrain the optimistic policy to be within some range from the conservative policy that is used for TD learning. This allows for optimistic exploration without Q-value overestimation.
+
+## B.2 COMPARISON TO OAC
+
+DAC leverages two policies: a conservative one used for sampling the temporal-difference target and evaluation; and an optimistic one used for sampling transitions added to the experience buffer. Similarly to DAC, OAC performs evaluation and Bellman backups according to a conservative lower bound policy. However, DAC differs from OAC on three main design choices: _how to model the optimistic policy_ ; _how to constraint the optimistic policy_ ; and _how to set the level of optimism β[ub]_ .
+
+17
+
+**How to model the optimistic policy** OAC models the optimistic policy by combining conservative policy with the linear approximation of Q-value upper bound, and as such uses one actor network. The linear approximation combined with constrained optimization results in simplistic solutions along the constraint boundary (Protter et al., 2012). As such, OAC’s applicability is limited to small _δ_ values due to the Taylor theorem. In contrast to that, DAC uses two actors. Modeling the second policy via an actor network allows for exploration policies that are far more complex than a linear approximator. Whereas this introduces a computational cost, employing techniques like delayed policy updates can result in costs smaller than that of OAC.
+
+**How to constraint the optimistic policy** OAC enforces a hard KL constraint by directly solving a Lagrangian. Since the Q-value upper bound is approximated via a linear function, the solution is placed on the constraint boundary unless the slope is zero (Protter et al., 2012). In contrast, DAC imposes KL as a soft constraint. Paired with the neural network approximator, this allows DAC to balance the KL with potential gains to the upper bound and generate complex exploration policies.
+
+**How to set the level of optimism** _β[ub]_ Finally, OAC treats _β[ub]_ as a hyperparameter which is fixed during the training. Since values of _Q[µ] π_[and] _[Q][σ] π_[depend][on][reward][scales,][as][well][as][aleatoric][and] epistemic uncertainty of the environment, the value of _β[ub]_ has to be searched per task. Furthermore, as shown in Figure 3, fixed levels of _β[ub]_ yield decreasing the impact of uncertainty on the optimistic policy. DAC leverages that the desired level of optimism can be defined through divergence between the conservative baseline policy and the optimistic policy optimizing objective related to _β[ub]_ . Such definition allows for dynamics adjustment of both _β[ub]_ and the KL penalty weight _τ_ .
+
+## B.3 REPLAY RATIO SCALING
+
+Increasing the replay ratio was the key ingredient in increasing the sample efficiency and final performance of many recent RL agents (Janner et al., 2019; Chen et al., 2020; Hiraoka et al., 2021; Nikishin et al., 2022; Schwarzer et al., 2023). Moreover, many of the novelties brought by those agents were focused on stabilizing the learning given the high-replay regime (Janner et al., 2019; Chen et al., 2020; Hiraoka et al., 2021). A particularly interesting technique is scaling-by-resetting, as it is applicable to most off-policy RL algorithms. DAC improvements are largely orthogonal to the direction of increasing the replay ratio, but DAC also takes advantage of the scaling-by-resetting technique. However, as the available replay ratio is often an exogenous constraint (eg. when running models on the robot), we believe that testing new algorithms in both high and low replay is valuable.
+
+## C FUTURE WORK
+
+One of the critical functions of DAC is limiting the divergence between the two actors (see Figure 4). This aspect raises an interesting question about the potential tradeoff between the performance gains achieved by adhering to a low-regret optimistic policy and the performance losses incurred from fully off-policy updates. To control the divergence between the two actors, we employ a KL penalty, although we believe that alternative divergence or distance metrics could also be effective. The main reason for using KL divergence in our implementation of DAC is that it is known to have a closed-form solution for Tanh-Normal distributions which we use to model both policies. We think that implementing DAC with regularization other than KL might result in better learning stability.
+
+Novel mechanisms used by DAC are orthogonal to many recent improvements in DRL. As such, investigating synergies between DAC and techniques like receding TD horizon (Kearns & Singh, 2000; Schwarzer et al., 2023), critic regularization (Gogianu et al., 2021), discount factor annealing (Ye et al., 2021; Schwarzer et al., 2023), AVTD (Li et al., 2022), TOP (Moskovitz et al., 2021) or increasing model size (Schwarzer et al., 2023; Hafner et al., 2023) might improve DAC performance. Furthermore, distributional critics offer a capability to directly model both aleatoric and epistemic uncertainties (Bellemare et al., 2017; Dabney et al., 2018; Moskovitz et al., 2021). We think that this aligns with the DAC, as it builds policies leveraging epistemic uncertainty. Similarly, expanding the size of the critic ensemble could lead to synergies and improvements surpassing those achieved by conventional ensemble AC approaches (Lee et al., 2021; Januszewski et al., 2021). Finally, as shown in Figure 4, the deterministic version of DAC underperforms its stochastic counterpart. Investigating the factors contributing to this difference in performance is a compelling avenue for research.
+
+18
+
+## D ADDITIONAL EXPERIMENTS
+
+## D.1 CRITIC OVERESTIMATION
+
+In this subsection, we investigate whether the decoupled architecture (using a conservative policy for TD updates and optimistic policy for exploration) indeed mitigates Q-value overestimation characteristic for non-conservative updates (Fujimoto et al., 2018; Moskovitz et al., 2021). As such, we compare the environment returns to the returns implied by the critic of three actor-critic architectures.
+
+1. Conservative - SAC agent performing conservative ( _β[lb]_ = _−_ 1)
+
+2. Optimistic - SAC agent performing optimistic updates ( _β[lb]_ = 1)
+
+3. Decoupled - DAC performing conservative updates on the critic and the conservative actor; optimistic updates on the optimistic actor ( _β[lb]_ = _−_ 1)
+
+We conduct such measurements on 3 DMC environments of varying difficulty: hopper-hop; quadruped-run; and humanoid-walk. The results are summarized in Figure 10. Assuming deterministic transitions, the soft Q-value modeled by the critic is equal to the sum of discounted returns and policy entropy. As such, to calculate the bias we have to subtract the entropy term from the critic’s output. We estimate the entropy sum term by a geometric sum of negative average policy log probabilities. Then, we again use the geometric sum and average recorded return to estimate the real Q-values.
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [324 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Hopper-Hop (b) Quadruped-Run (c) Humanoid-Walk **----- End of picture text -----**
+
+Figure 10: We evaluate critic overestimation associated with conservative (SAC with _β[lb]_ = _−_ 1), optimistic (SAC with _β[lb]_ = 1) and decoupled agents (DAC). We observe that the baseline conservative SAC tends to underestimate the returns. 5 seeds, mean, and 3 std.
+
+We find that the decoupled architecture indeed prevents the overestimation associated with optimistic TD updates. Interestingly, we observe that both conservative and decoupled architectures tend to underestimate the returns. This observation is consistent with the earlier results pointing towards over-conservatism of clipped double Q-learning (Moskovitz et al., 2021; Cetin & Celiktutan, 2023).
+
+## D.2 ACTION REPEAT EXPERIMENT
+
+Furthermore, we validate the findings of our main experiment under a different setting of environment Action Repeat (AR). AR is a key environment parameter that reduces the agent’s action frequency while preserving the underlying environment dynamics. It achieves this by having the agent repeat the same action for a set number of consecutive time steps instead of selecting a distinct action at each time step. When AR is employed, the transitions resulting from these repeated actions are merged into a single transition, with rewards summed and the final next state used. Consequently, higher AR values decrease the length of trajectories, thereby enhancing the diversity of data the agent encounters within a fixed number of interactions. Action repeat is known to impact the sample efficiency and the final performance of agents, and in the case of DMC, a variety of AR settings have been considered. Common choices include repeats of: 1 (ie. no repeat) (D’Oro et al., 2022; Li et al., 2022); 2 (ie. single repeat) (Hafner et al., 2019a; Nikishin et al., 2022); or varying setting between the tasks (Hafner et al., 2019b; Yarats et al., 2020). As noted in Appendix E, we use an action repeat of 2 throughout our experiments. However, for a matter of completeness, we include an evaluation for AR of 1 on our benchmark of 10 DMC tasks in Figure 11 below.
+
+19
+
+**==> picture [159 x 126] intentionally omitted <==**
+
+**==> picture [159 x 126] intentionally omitted <==**
+
+**==> picture [396 x 77] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) AR= 1 & AR= 2 (b) AR= 1 Sample Efficiency (c) AR= 1 Aggregate **----- End of picture text -----**
+
+Figure 11: DAC consistently improves performance across various AR settings. In Figure 11a, we compare SAC and DAC under low replay conditions for two AR configurations. As evident, higher AR values generally lead to superior performance for both algorithms, with DAC significantly outperforming SAC in both scenarios. Figures 11b and 11c present additional results when AR is set to 1. RedQ performs similarly to a well-tuned SAC with a replay of 3, whereas DAC outperforms both. We include SR-SAC and RedQ as reported in D’Oro et al. (2022). 10 seeds (except for SRSAC which has 5 seeds), 10 tasks, and 95% bootstrapped CI.
+
+## D.3 TD-MPC EVALUATION
+
+Figure 12 summarizes additional results for the TD-MPC comparison. We list all hyperparameter differences to regular DAC implementation in Table 2..
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 85] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 85] intentionally omitted <==**
+
+**==> picture [128 x 86] intentionally omitted <==**
+
+**==> picture [128 x 85] intentionally omitted <==**
+
+Figure 12: We compare SR-DAC against SR-SAC and TD-MPC. We find that SR-DAC achieves substantially better performance than SR-SAC, whereas SR-DAC+ performs better than TD-MPC. The lower right graph shows the average from the following 6 tasks: hopper-hop; cheetah-run; quadruped-run; humanoid-stand; fish-swim and cartpole-swingup ~~s~~ parse. SR-DAC and SR-SAC use 10 seeds for each task, and SR-DAC+ and TD-MPC use 5 seeds for each task.
+
+20
+
+## E HYPERPARAMETER SETTINGS
+
+In all experiments, all algorithms use the same network architectures and a standard ensemble of two critics (except RedQ, which by design is required to increase the ensemble size). We fix the shared pool of hyperparameters to single values, which we list under the category share in the table below. We use the hyperparameter values which are known to work well with SAC (Nikishin et al., 2022; D’Oro et al., 2022).
+
+Table 1: Hyperparameter values used in the experiments.
+
+|HYPERPARAMETER|NOTATION|VALUE|
+|---|---|---|
+|NETWORKSIZE ACTIONREPEAT OPTIMIZER LEARNINGRATE BATCHSIZE DISCOUNT INITIALTEMPERATURE INITIALSTEPS TARGETENTROPY POLYAKWEIGHT PESSIMISM|NA NA NA NA _B_ _γ_ _α_0 NA _H∗_ _τ_ _βlb_|(256_,_256) 2 ADAM 3_e −_4 3_e −_4 0_._99 1_._0 10000 _|A|/_2 0_._005 _−_1_._0|
+|TD3|||
+|POLICYUPDATEDELAY EXPLORATION_σ_ TARGETPOLICY_σ_ EXPLORATIONNOISECLIP|NA NA NA NA|2 0_._5 0_._2 [_−_0_._5_,_0_._5]|
+|OAC / SR-OAC|||
+|OPTIMISM KL DIVERGENCECONSTRAINT|_βub_ _δ_|4_._36 3_._69|
+|ND-TOP / SR-TOP|||
+|OPTIMISMARMS BANDITLEARNINGRATE POLICYUPDATEDELAY EXPLORATION_σ_ TARGETPOLICY_σ_ EXPLORATIONNOISECLIP|NA NA NA NA NA NA|[0_,_1] 0_._1 2 0_._5 0_._2 [_−_0_._5_,_0_._5]|
+|REDQ|||
+|ENSEMBLESIZE ENSEMBLESUBSETSIZE|NA NA|10 2|
+|DAC / SR-DAC|||
+|INITIALOPTIMISM INITIALKL WEIGHT TARGETKL DIVERGENCE STANDARDDEVIATIONMULTIPLIER ADJUSTMENTLEARNINGRATE ADJUSTMENTLEARNINGRATEBETA|_βub_ 0 _τ_0 _KL∗_ _fσ_ NA NA|0_._0 1_._0 0_._5 1_._25 3_e −_5 0_._5|
+|DAC+|||
+|INITIALSTEPS NETWORKSIZE COPYINGFREQUENCY|NA NA NA|25000 (256_,_256_,_256) every20000steps|
+
+In the low replay ratio regime, all algorithms use 3 gradient steps per environment step. DAC performs parameter copying in 60000th and 500000th steps. In the high replay ratio regime,
+
+21
+
+all algorithms use 15 gradient steps per environment step. All algorithms perform full parameter resets in [50000 _,_ 250000 _,_ 500000 _,_ 750000] steps. DAC performs parameter copying in [25000 _,_ 125000 _,_ 375000 _,_ 625000 _,_ 875000] steps.
+
+## F TESTED ENVIRONMENTS
+
+Below, we list tasks used in the low and high replay ratio regimes, as well as the ablation and hyperparameter studies. We choose tasks from the benchmark, but we drop those that are trivially solved by all the considered methods.
+
+Table 2: 10 DMC tasks used in the model-free benchmark.
+
+|DOMAIN|TASK|
+|---|---|
+|CARTPOLE CHEETAH FISH HUMANOID HOPPER PENDULUM SWIMMER QUADRUPED|SWINGUP-SPARSE RUN SWIM RUN, STAND, WALK HOP SWINGUP SWIMMER6 RUN|
+
+When comparing against model-based, we choose the tasks proposed by the authors of DreamerV3 (Hafner et al., 2023). As such, we use 18 DMC tasks of easy to moderate level of difficulty. Moreover, we use the DreamerV3 performance curves provided by the authors.
+
+Table 3: 18 DMC tasks used in the DreamerV3 benchmark.
+
+|DOMAIN|TASK|
+|---|---|
+|ACROBOT CARTPOLE CUP FINGER HOPPER PENDULUM REACHER WALKER|SWINGUP BALANCE(SPARSE), SWINGUP(SPARSE) CATCH SPIN, TURN-EASY, TURN-HARD HOP, STAND SWINGUP EASY, HARD RUN, STAND, WALK|
+
+## G EXPERIMENTAL SETTINGS
+
+## G.1 LOW AND HIGH REPLAY REGIMES
+
+We consider the following set of continuous-action RL algorithms:
+
+1. DAC / SR-DAC - Decoupled Actor-Critic. The approach proposed in this paper. DAC refers to the base algorithm; SR-DAC refers to DAC with a high replay ratio and periodical full-parameter resets.
+
+2. SAC / SR-SAC - Soft Actor-Critic (Haarnoja et al., 2018) builds on DDPG (Silver et al., 2014). SAC extends the standard approach with the following: stochastic policy with gradients calculated via the reparametrization trick; automatic adjustment of entropy temperature; clipped Q-learning; and maximum entropy updates on actor and critic networks. SR-SAC refers to SAC with a high replay ratio and periodic resets of all networks (D’Oro et al., 2022).
+
+3. OAC / SR-OAC - Optimistic Actor-Critic (Ciosek et al., 2019) extends SAC by designing an optimistic exploration policy that is a linear approximation to the Q-value upper bound.
+
+22
+
+OAC was shown to perform better than SAC in the regime of a low replay ratio. SR-OAC refers to OAC with a high replay ratio and periodic resets of all networks (D’Oro et al., 2022).
+
+4. ND-TOP / SR-TOP - Non-Distributional Tactical Optimism and Pessimism (Moskovitz et al., 2021) builds. The algorithm builds on TD3 (Fujimoto et al., 2018) and addresses the optimism-pessimism problem by introducing an external discrete bandit that learns _β[lb]_ from a set of predefined values. TOP was shown to perform better than OAC and SAC in the regime of a low replay ratio. SR-TOP refers to TOP with a high replay ratio and periodic resets of all networks (D’Oro et al., 2022).
+
+5. RedQ - Randomized Ensembled Double Q-Learning (Chen et al., 2020) is an algorithm designed explicitly for high replay ratio regimes. RedQ avoids plasticity loss/overfitting by using an ensemble of Q-networks and performing every update using a small subset of the ensemble.
+
+6. D4PG - Distributed Distributional Deterministic Policy Gradients (Barth-Maron et al., 2018) is a distributed version of DDPG leveraging distributional critics, prioritized experience buffer and N-step returns.
+
+7. MPO - Maximum a Posteriori Policy Optimisation (Abdolmaleki et al., 2018) is an offpolicy algorithm based on coordinate ascent on a relative entropy objective.
+
+8. DreamerV3 - a state-of-the-art model-based algorithm (Hafner et al., 2023). It was shown to perform well across a wide range of tasks, including DMC. We use the results provided by the authors.
+
+9. TD-MPC - Temporal Difference Learning for Model Predictive Control (Hansen et al., 2022) a state-of-the-art model-based algorithm leveraging model of the environment for critic-bootstrapped model-predictive control. In particular, TD-MPC was the first algorithm to reliably solve the dog domain tasks for proprioceptive control.
+
+We take the maximum average performance of all algorithms (eg. first average over the seeds and tasks, then take the results from the _argmax_ of the average). In those experiments, the algorithms are tested on 10 tasks listed in Table 2. Each is run for 10[6] environment steps and 10 random seeds.
+
+## G.2 DREAMERV3 AND TD-MPC COMPARISON
+
+In Figure 1d we compare DAC to DreamerV3. For this comparison, we use the results provided by the authors of Hafner et al. (2023) in their official repository. As such, we restrict the comparison to 18 tasks considered in the DreamerV3 paper (Hafner et al., 2023) listed in Table 3. For this comparison, the low replay DAC uses 10 seeds and DreamerV3 uses 5 seeds.
+
+In Figures 7 and 12 we compare DAC to TD-MPC. For this comparison we use the results provided by the authors of Hansen et al. (2022) provided in their official repository. We run SR-SAC and SRDAC for 10[6] and SR-DAC+ for 30[6] environment steps. For this comparison, SR-SAC and SR-DAC use 10 seeds each, whereas SR-DAC+ and TD-MPC use 5 seeds each.
+
+## G.3 ABLATION STUDIES
+
+In Figure 4, we evaluate the impact of removing or adding components to DAC. The ablation study features DAC and 10 other variations thereof in low replay ratio (3 gradient steps per environment step) without using layer normalization on the critic network. Below, we describe the variations:
+
+1. (+ _KL_ ) - in DAC, only the optimistic actor backpropagates the KL penalty portion of the loss (ie. only the optimistic actor adjusts its parameters such that the KL is minimized). We add the KL penalty to the conservative actor as well. This results in low divergence between the two actors, at the cost of both policies being suboptimal.
+
+2. ( _−π_ ) - in this ablated setting, we consider SAC with only an optimistic actor. As such, this setting performs exploration, TD learning, and evaluation according to the optimistic policy. As in this version, there is only one actor, we cannot use the optimism adjustment mechanism.
+
+23
+
+3. ( _−KL_ ) - this tested configuration does not use KL penalty on any of the actors. As such, the optimistic actor is unconstrained and can diverge from the conservative one. This results in fully off-policy learning and poor coverage of the state-action space that is used in the TD updates.
+
+4. (+ _Det_ ) - here, we set the conservative actor to be a fully deterministic policy. To this end, the optimistic actor performs exploration and is stochastic, whereas the conservative one performs deterministic TD updates. We find that such a setup quite often results in an overestimation of the Q-values, pinpointing towards regularizing properties of the soft SARSA. This is the first configuration to work better than the baseline SAC.
+
+5. ( _−τ_ & _β_ ) - this configuration does not use automatic adjustment of optimism or the KL penalty weight. As such, it is DAC with fixed optimism and fixed KL penalty weight throughout the training. Despite its simplicity, this configuration works significantly better than vanilla SAC.
+
+6. ( _−β_ ) - this configuration does not use the automatic adjustment of optimism, but it still uses automatic adjustment of the KL penalty weight. Results indicate that the adjustment of optimism has a bigger impact on the performance than the adjustment of the KL penalty weight alone.
+
+7. ( _−τ_ ) - this configuration does not use automatic adjustment of KL penalty but still uses automatic adjustment of the optimism. Removing the automatic adjustment of the KL penalty did not have a very big impact on the performance. We hypothesize that this is due to the constant scale of returns between the environments.
+
+8. ( _−Copy_ ) - here, we use DAC but we omit the optimistic actor parameter copying as well as optimism and KL penalty weight reinitialization. We find that parameter copying offered marginal performance benefits.
+
+9. ( _−σ_ ) - in this version of the algorithm, we do not use the _σ_ multiplier. As such, the same level of variance is applied for exploration, as well as TD updates. We find that using _σ_ multiplier yields marginal improvements.
+
+10. ( _−LN_ ) - here, we use complete DAC formulation, albeit we skip the layer normalization in the critic. We find that adding layer normalization increases the performance as compared to basic DAC.
+
+We take the maximum average performance of all algorithms (eg. first average over the seeds and tasks, then take the results from the _argmax_ of the average). Each tested variation is run on the entire set of 10 hard DMC tasks listed in Table 2. Each variation is run for 500 _k_ environment steps and 10 random seeds. As such, the results shown in Figure 4 feature 1200 training runs.
+
+## G.4 HYPERPARAMETER SEARCH
+
+Figure 5 features the results of the hyperparameter stability tests. To this end, we conduct 500 _k_ environment step training runs of DAC with different hyperparameter settings in the low replay ratio regime (3 gradient steps per environment step). We consider a variety of values for 3 hyperparameters that are specific to DAC:
+
+1. KL Divergence Target ( _KL[∗]_ ) - The target KL divergence between two actor networks. DAC adjusts optimism and KL penalty weight until the target divergence is met. We test 4 configurations of _KL[∗]_ .
+
+2. Standard Deviation Multiplier ( _fσ_ ) - A multiplier defining how much bigger or smaller the standard deviation of an optimistic actor is as compared to the conservative one. We test 5 configurations of _fσ_ .
+
+3. Copying Frequency - The frequency of optimistic actor copying conservative actor parameters. We consider the following settings: performing no copying; copying in the early stage of the training (50 _k_ step); copying every 250 _k_ steps; copying every 125 _k_ steps and copying every 67 _._ 5 _k_ steps.
+
+Similarly to the ablation study, each hyperparameter setting is tested on tasks listed in Table 1. Each setting is run for 500 _k_ environment steps and 10 random seeds. As such, the results shown in Figure
+
+24
+
+5 feature 1300 training runs. We find that DAC consistently improves on SAC performance across a variety of hyperparameter setting.
+
+## H LEARNING CURVES
+
+In the following section, we share the training curves for the Dreamer, low replay ratio, and high replay ratio experiments.
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 82] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 82] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 82] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+**==> picture [124 x 83] intentionally omitted <==**
+
+Figure 13: Results for the Dreamer evaluation. DAC uses no LayerNorm, a low replay ratio ( _RR_ = 3) and no parameter resets. 500 _k_ steps, 10 seeds, mean and 3 standard deviations CI.
+
+25
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 126] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 126] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+Figure 14: Results for low replay ratio ( _RR_ = 3) experiments. 10[6] environment steps, 10 seeds, mean, and 3 standard deviations CI.
+
+26
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 126] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 126] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+**==> picture [187 x 125] intentionally omitted <==**
+
+Figure 15: Results for high replay ratio ( _RR_ = 15) experiments. 10[6] environment steps, 10 seeds, and 3 standard deviations of the mean.
+
+27
+
diff --git a/open_review/iclr2024_8612.json b/open_review/iclr2024_8612.json
new file mode 100644
index 0000000000000000000000000000000000000000..466f747cf695fb12353db84908a7d379cb5b71d8
--- /dev/null
+++ b/open_review/iclr2024_8612.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8612",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Are Models Biased on Text without Gender-related Language?",
+ "abstract": "Gender bias research has been pivotal in revealing undesirable behaviors in large language models, exposing serious gender stereotypes associated with occupations, and emotions. A key observation in prior work is that models reinforce stereotypes as a consequence of the gendered correlations that are present in the training data. In this paper, we focus on bias where the effect from training data is unclear, and instead address the question: *Do language models still exhibit gender bias in non-stereotypical settings?* To do so, we introduce **UnStereoEval (USE)**, a novel framework tailored for investigating gender bias in stereotype-free scenarios. USE defines a sentence-level score based on pretraining data statistics to determine if the sentence contain minimal word-gender associations. To systematically benchmark the fairness of popular language models in stereotype-free scenarios, we utilize USE to automatically generate benchmarks without any gender-related language. By leveraging USE's sentence-level score, we also repurpose prior gender bias benchmarks (Winobias and Winogender) for non-stereotypical evaluation. Surprisingly, we find low fairness across all 28 tested models. Concretely, models demonstrate fair behavior in only 9%-41% of stereotype-free sentences, suggesting that bias does not solely stem from the presence of gender-related words. These results raise important questions about where underlying model biases come from and highlight the need for more systematic and comprehensive bias evaluation. We release the full dataset and code at [ucinlp.github.io/unstereo-eval](https://ucinlp.github.io/unstereo-eval).",
+ "rebuttal": "- [importance of building non-stereotypical evaluation data]\n - Please refer to the General comments on [Relevance of studying neutral/non-stereotypical scenarios].\n- [how changes in pretraining dataset statistics affect fairness metrics]\n - Thank you for highlighting this critical aspect. We concur with the significance of investigating the effects of varying pretraining data statistics on models' behavior and fairness metrics. However, given their size, calculating the statistics of different pretraining data corpus may not be straightforward (e.g., computationally expensive, data unavailability). \n - If we understand correctly, you are referring to the fact that duplicates in the training data may lead to more biases concerning specific gendered nouns. This is a fair point, which is the reason behind our explorations on the impact of data deduplication on Pythia models. The analysis carried out in the paper (Table 2) shows mixed results between deduplicated data (worsening fairness measurements for Pythia-410M, Pythia-1.4B, and Pythia-12B but improvement for all other model sizes). Additional experiments in using a Pythia-6.9B trained on a deduplicate (D) and gender-swapped (GS) version of the training dataset (https://arxiv.org/abs/2304.01373) seem to yield different conclusions for different datasets - showing an increase in the % preferred females across Ours-5 and Ours-20 benchmarks, but worsening the % preferred males in the other 3 benchmarks. See Tables 12-15 for the results associated with Pythia-6.9 (D+GS). \n- [parameter of v(w)]: \n - Thank you for your observation regarding this typo in our paper. This parameter of v(w) was a remnant from an alternative formulation we previously explored, and has been removed.\n- [generated dataset contents]\n - We appreciate your question about the content of our generated dataset, particularly regarding the topics of the generated sentences. In designing our dataset, we refrained from constraining our pipeline to specific topics and instead used different words and sentence lengths. We do this intentionally to encourage diversity in generated content. Regarding examples and topics of sentences generated, we refer the reviewer to the General Comments [Finding patterns on LLMs across benchmarks].\n\n- Please see General comments on [Bias definition]. We’ve addressed this concern by adding a few sentences to the main paper that comment on the ongoing discussion between upstream and downstream biases.\n- [How can findings be used in studying the fairness and potential harms of downstream tasks]\n - We have updated the introduction of the paper to make the contribution and potential impact of this work more obvious. We agree with the comment that it would be relevant to measure model behavior on a downstream task by studying the behavior of counterfactuals or by transforming the sentences in [...]\n\n- [why we need to care about this neutral setting]\n - Please see General comments on [Relevance of studying non-stereotypical setting].\n- [deeper understanding of under which case models prefer certain gender]\n - This is a relevant point! We find that sentences cover diverse topics and do not contain any apparent implicit biases, which is desired for our benchmark. Please see General comments [Finding patterns on LLMs preferences across benchmarks] for examples and details on the performed analysis.\n- [Models training set and transferability of results]\n - Not all models in our study hav [...]\n\n- The correctness of generated sentences\n - [Design of pipeline]: Given the strong capabilities of ChatGPT at instruction-following, we carefully constructed a generation pipeline to increase diversity and produce gender bias-free outputs: (1) we use words that correlate equally with both gendered pronouns to bootstrap our benchmark, (2) we construct prompts emphasizing gender-neutral generations, (3) we create Ours-5 using fewer words per sentence to minimize cofounders (median sentence length of Ours-5 is 6), (4) we restrict evaluation to the subset of examples satisfying a $\\textrm{MaxPM [...]\n\n### General Comments\nDear Reviewers,\n\nWe sincerely thank you for your valuable feedback and insightful comments. We are particularly grateful for recognizing our work’s contribution to an important area in the field of language technology. Reviewer 1's appreciation of our thorough analysis, considering various impacting factors, is encouraging. Also, we are pleased with Reviewer 2 acknowledgement of our efforts in analyzing different model families and demonstrating clear gender preferences in the models. Reviewer 3's remarks on our interesting analysis of gender preference in neutral contexts [...]",
+ "initial_scores": [
+ 5,
+ 6,
+ 6,
+ 5
+ ],
+ "score_mean": 5.5,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "This paper asks an important question: are language models gender-biased in the non-stereotypical cases (i.e., no gender-related words in the sentence)? The answer is, unfortunately, yes. They build a benchmark dataset and conduct rigorous research using 23 language models to show this gender bias. While the reviewers had some minor concerns, this paper makes significant contributions in an important topic and will lead to meaningful progress in LLM research.",
+ "forum_id": "w1JanwReU6",
+ "primary_area": "societal considerations including fairness, safety, privacy",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_WuG5",
+ "review_id": "6oRdAHMQ49",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2049,
+ "edit_detected": true,
+ "edit_delta_seconds": 321292,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Kwnc",
+ "review_id": "vdCvfl8Xew",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 1133,
+ "edit_detected": true,
+ "edit_delta_seconds": 3522118,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_Uaff",
+ "review_id": "psGhQfKpNv",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2754,
+ "edit_detected": true,
+ "edit_delta_seconds": 840479,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_NYBN",
+ "review_id": "VE4OmTjmat",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1833,
+ "edit_detected": true,
+ "edit_delta_seconds": 867212,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8612.md b/open_review/iclr2024_8612.md
new file mode 100644
index 0000000000000000000000000000000000000000..4f74924119db1d6b3560570800d6c07937acf12f
--- /dev/null
+++ b/open_review/iclr2024_8612.md
@@ -0,0 +1,1234 @@
+
+
+## - ARE MODELS BIASED ON TEXT WITHOUT GENDER RELATED LANGUAGE?
+
+Authors withheld for review
+
+## ABSTRACT
+
+Gender bias research has been pivotal in revealing undesirable behaviors in large language models, exposing serious gender stereotypes associated with occupations, and emotions. A key observation in prior work is that models reinforce stereotypes as a consequence of the gendered correlations that are present in the training data. In this paper, we focus on bias where the effect from training data is unclear, and instead address the question: _Do language models still exhibit gender bias in non-stereotypical settings?_ To do so, we introduce **UnStereoEval** (USE), a novel framework tailored for investigating gender bias in stereotype-free scenarios. USE defines a sentence-level score based on pretraining data statistics to determine if the sentence contain minimal word-gender associations. To systematically benchmark the fairness of popular language models in stereotype-free scenarios, we utilize USE to automatically generate benchmarks without any gender-related language. By leveraging USE’s sentence-level score, we also repurpose prior gender bias benchmarks (Winobias and Winogender) for non-stereotypical evaluation. Surprisingly, we find low fairness across all 28 tested models. Concretely, models demonstrate fair behavior in only 9%-41% of stereotype-free sentences, suggesting that bias does not solely stem from the presence of gender-related words. These results raise important questions about where underlying model biases come from and highlight the need for more systematic and comprehensive bias evaluation. We release the full dataset and code at [URL removed]
+
+## 1 INTRODUCTION
+
+The widespread adoption of Language Models (LMs) raises concerns about potential encoded biases and their risks for marginalized populations (Bender et al., 2021; Bommasani et al., 2021). In an attempt to track and gauge prejudices in LMs, evaluation practices have been augmented with various fairness benchmarks (Zhao et al., 2018; Rudinger et al., 2018; Nangia et al., 2020; Nadeem et al., 2021; Smith et al., 2022). The incorporation of such testbeds has enabled the detection of numerous undesirable harms and stereotypes within existing LMs, including occupation and emotion stereotypes (Wang et al., 2024; del Arco et al., 2024).
+
+An underlying assumption in prior research is that LMs perpetuate biases by leveraging gender correlations present in the pretraining data. Considering the widespread deployment of these models in diverse open-ended generation scenarios, it is also crucial to contemplate the possibility of societal biases manifesting in non-stereotypical sentences. Such biases, which might not be immediately apparent, could represent a significant blind spot in our current understanding and application of these models. These ideas lead to an important yet unaddressed question: _how do LMs behave in non-stereotypical settings_ ?
+
+To address this question, we introduce _**UnStereoEval**_ , a novel evaluation framework explicitly focusing on stereotype-free scenarios. Leveraging gendered pronouns[1] , _UnStereoEval_ determines
+
+1While we recognize the complexity of gender and its diverse expressions, this paper focuses on the binary gender expression constituting the male and female groups and uses English binary pronouns “ _he_ ”/“ _his_ ”/“ _him_ ” and “ _she_ ”/“ _her_ ” to refer to individuals within each group.
+
+1
+
+**==> picture [396 x 209] intentionally omitted <==**
+
+Figure 1: **Preferences of 28 LMs for three non-stereotypical sentence pairs** . Despite being grammatically and semantically correct under both masculine ( _sM_ ) and feminine ( _sF_ ) completions and free of words with strong gender connotations, the majority of LMs assigns more probability mass to one completion over the other.
+
+whether models remain fair when presented with _non-stereotypical_ sentence pairs. We define nonstereotypical sentence pairs as: (1) _gender-invariant_ , i.e., remain semantically and grammatically correct regardless of the gendered version of the sentence in the pair; and (2) free of _gender cooccurring words_ , i.e., there are no words in the sentence that, according to the pretraining corpora, correlate strongly with one specific gender. The magnitude of gender co-occurrence is determined in terms of LMs pretraining data word frequency statistics. Figure 1 shows three examples of sentence pairs satisfying the two previous properties. Ideally, since LMs are trained to learn the distribution of the pretraining corpora, models should not display gender skews for non-stereotypical sentence pairs, such as “ _We appreciate that {_ PRONOUN _}’s here._ ”. However, as shown in Figure 1, 22 out of 28 tested LMs do exhibit preferences for the sentence with the male pronoun.
+
+To systematically evaluate the models in non-stereotypical settings, we develop a pipeline to automatically create gender-invariant evaluation sentence pairs without gender-correlated words. Using this pipeline, we create benchmarks with diverse syntactic and semantic structures. Additionally, we utilize _UnStereoEval_ to repurpose two commonly used fairness benchmarks whose sentences are already gender-invariant — Winobias (WB) and Winogender (WG) (Zhao et al., 2018; Rudinger et al., 2018). In particular, we limit the gender-related language in them by excluding sentences containing gender co-occurring words. We evaluate the fairness of 28 LMs, including Llama-2, Mistral, and OLMo, across all benchmarks. Fairness is quantified as the percentage of instances where a model displays no gender preference. Across all benchmarks, models exhibit low fairness, with values between 9% to 41%. Moreover, we find that models consistently favor male sentences in WB and WG. Our results indicate alarming levels of gender bias in LMs for sentences without stereotypes.
+
+By showing that **LMs exhibit concerning skews when tested in stereotype-free scenarios** , our work emphasizes the presence of complex model behaviors that warrant further investigation. As we observe the widespread deployment of LMs, it is imperative to develop more exhaustive evaluation testbeds that encompass both stereotype and stereotype-free benchmarks. This will be essential for advancing our understanding of model behavior and ensuring the responsible use of LMs.
+
+## 2 UNSTEREOEVAL
+
+This section introduces **UnStereoEval** , an evaluation framework specifically tailored for assessing LMs’ fairness in non-stereotypical gender scenarios. We begin by describing how we measure word- and sentence-level gender correlations. Subsequently, we show how to use sentence-level
+
+2
+
+correlations to produce non-stereotypical evaluation benchmarks. Finally, we define the fairness metrics that we use in this paper.
+
+## 2.1 GENDER CO-OCCURRING WORDS
+
+Word-gender correlations are determined empirically using word co-occurrence statistics from PILE – a high-quality and publicly available pretraining set used to train popular LMs (Gao et al., 2021). After tokenizing and removing stopwords, both word and word co-occurrence counts are collected over windows of size 10 that are swept over all the pretraining text in PILE (Razeghi et al., 2022b). One method to determine word-gender co-occurrences using word statistics is through _p_ data( _w,g_ ) Pointwise Mutual Information (PMI), defined as PMI( _w, g_ ) = log _p_ data( _w_ ) _p_ data( _g_ )[.][Specifically, for] a corpus _D_ , PMI estimates how much more likely a word _w_ (e.g., “ _vacations_ ”) is to co-occur with a gendered word _g_ (e.g., “ _she_ ”) than would be expected by random chance.
+
+To determine whether a word is more likely to correlate with one gender, we propose the PMI-based score _δ_ ( _w_ ) defined in Equation 1. Note that, similarly to previous literature (Bolukbasi et al., 2016), we use the pronouns “ _he_ ” and “ _she_ ” to represent gendered groups[2] . Positive _δ_ ( _w_ ) values imply stronger correlations between the words and the female group, whilst negative values imply stronger correlations with the male group.
+
+**==> picture [280 x 11] intentionally omitted <==**
+
+## 2.2 ENFORCING MINIMAL GENDER CO-OCCURRENCES
+
+To evaluate LMs in non-stereotypical scenarios, we use sentence pairs that have minimal gender correlations. The gender correlation of a sentence can be measured by combining the _|_ **s** _|_ word-level scores in the sentence **s** = _w_ 1 _w_ 2 _...w|_ **s** _|_ into a single score. There are many ways of combining wordlevel scores, including averaging word-level scores or computing the fraction of words exhibiting small gender correlations. In this work, we build upon existing research on the impact of individual words on LM behavior (Gardner et al., 2021) and quantify the sentence-level gender correlations in terms of a single most prominent gender co-occurring word score in the pair (see Equation 2).
+
+**==> picture [212 x 148] intentionally omitted <==**
+
+**----- Start of picture text -----**
+arg max |δ [′] | (2) δ [′] ∈{δ ( w 1) ,...,δ ( w| s | ) } 100% 80% 60% Dataset USE-5 40% Winobias Winogender 20% USE-10 USE-20 0% 0 . 0 0 . 5 1 . 0 1 . 5 2 . 0 η Dataset of Percentage **----- End of picture text -----**
+
+**==> picture [63 x 11] intentionally omitted <==**
+
+Using the previous definition, a sentence **s** is said to be devoid of gender co-occurring words if all its words exhibit gender correlations lower than a user-defined threshold _η_ , i.e., if _|_ MaxPMI( **s** ) _| ≤ η_ is satisfied. This constraint can then be used to filter out sentences of gender-invariant datasets, such as Winobias (WB) or Winogender (WG), and, thus, restrict the evaluation to a subset with minimal gender correlations. Despite leading to less stereotypical datasets, lower values of _η_ may also lead to considerably smaller datasets (see Figure 2). As observed, the reduction in size is larger when applying the constraints to stereotypical datasets, like WB and WG, since they are created to surface stereotypical biases (e.g., gender-occupation, gender-emotion) known to be pervasive in training datasets.
+
+Figure 2: **Percentage of examples remaining after enforcing gender co-occurrences across 5 datasets** (i.e., _|_ MaxPMI( **s** ) _| ≤ η_ ). When _η_ = 0 _._ 5, three datasets preserve less than 35% of its original sentences.
+
+## 2.3 BENCHMARK CONSTRUCTION
+
+The focus on stereotypes in popular fairness benchmarks makes it impractical to enforce gender co-occurrence constraints, often leading to substantially smaller datasets with limited syntactic and
+
+> 2 Throughout the paper, we use _δ_ ( _w_ ) to quantify word-level gender correlations. See Appendix A for additional details considering other gendered expressions.
+
+3
+
+**==> picture [397 x 128] intentionally omitted <==**
+
+Figure 3: **Overview of the pipeline for generating non-stereotypical benchmarks** : 1) Word selection stage chooses seed words using a PMI-based score to guide sentence generation; 2) Sentence pairs generation stage produces sentences for each (gender, seed word) pair, followed by the creation of the opposite gender variant, and subsequent removal of unnatural pairs or any pair containing gender co-occurring words (operationalized as _|_ MaxPMI( **s** ) _| ≤ η_ ).
+
+semantic diversity. However, to reliably assess fairness for stereotype-free scenarios, it is essential to use varied and natural-sounding sentences. To address this requirement, we develop an automated pipeline to create non-stereotypical sentence pairs. Illustrated in Figure 3, the proposed pipeline ensures greater diversity of topics by curating a collection of 500 words with minimal gender cooccurrences and, subsequently, generating sentences that incorporate these words without implying a specific gender. By employing instruction fine-tuned LMs for sentence generation, the proposed pipeline yields realistic and semantically-diverse sentences at scale, and circumvents limitations of template-based evaluation (Seshadri et al., 2022; Selvam et al., 2023).
+
+_**Stage 1. Word Selection:**_ Together with predefined gender words, seed words guide sentence generation. For instance, the pair (“ _she_ ”, “ _adolescent_ ”) is used to indicate that a sentence should contain both words. To guarantee the selection of English seed words, we preprocess PILE’s vocabulary (see Appendix B) and only then sample the final words (Appendix C) based on their _δ_ ( _w_ ) score. Given the tension between selecting truly gender-uncorrelated words (i.e., _δ_ ( _w_ ) = 0) and attaining diversity of topics and sentences, we randomly sample 500 words from a small subset of the _δ_ ( _w_ ) distribution centered around 0. This subset, corresponding to _δ_ ( _w_ ) _∈_ [ _−_ 0 _._ 263 _,_ 0 _._ 263]) was determined based on the creation of 20 equal-sized bins from the empirical distribution of _δ_ ( _w_ ). Additionally, the authors carefully vet a sample of 300 words (out of 21 _._ 7k words in the bin) to ensure no strongly gender-correlated word is present. Our analysis reveals that the interval contains common words like “ _time_ ”, “ _good_ ”, and “ _work_ ”, as well as less common ones like “ _disarrange_ ”, “ _euphorically_ ”, and “ _tantalizes_ ”. Furthermore, since we do not only consider sampling words satisfying _δ_ ( _w_ ) = 0, we also analyse the words in the extreme words in the interval, concluding that the words are only vaguely related to gender and, therefore, can be utilized in gender-neutral contexts. Examples of female-skewed words are “ _livable_ ”, “ _dormitory_ ”, and “ _baths_ ”, whereas “ _motivational_ ”, “ _decision_ ”, and “ _intellects_ ” tend to co-occur more likely with male.
+
+_**Stage 2. Sentence pairs generation:**_ Together with the gendered pronouns “ _he_ ” and “ _she_ ”, we incorporate the seed words into a set of gender-neutral sentences that are gender-invariant and devoid of gender co-occurring words (up to a desired value of _η_ ). This stage builds on OpenAI’s ChatGPT model (gpt-3.5-turbo-1106) instruction-following and generative capabilities (OpenAI, 2022) to iteratively generate, filter, and refine sentences until enough grammatically and semantically sound sentences contain the desired seed words, pronouns, and are free of gender correlations. Experiments reported in this paper were run from August through September of 2023. For more information on the procedure and prompts used see Appendix D.
+
+_Sentence generation._ For every seed word, ChatGPT is prompted twice, once per gendered pronoun[3] . The proposed _generation_ prompt steers the model towards the creation of sentences containing both seed and gendered words while keeping them gender-neutral and devoid of stereotypes.
+
+3We decided to invoke the model twice for each seed word as a means to ensure diversity and avoid perpetuating one-sided gender biases inherent to ChatGPT. Additional experiments using the singular pronoun “ _they_ ” led to ungrammatical sentences and, for that reason, were not included in this paper.
+
+4
+
+_Pair sentences and Filter unlikely pairs._ To create a sentence pair from a generated sentence, we produce its minimally edited gendered version. Whenever possible, the minimal version is obtained by directly mapping between pronouns (e.g., “ _she_ ” _→_ “ _he_ ”, “ _him_ ” _→_ “ _her_ ”) However, in cases where directly mapping is not possible, such as the mapping of “ _They canceled {_ HER _} flight._ ” to its masculine variant, we prompt ChatGPT to edit the sentence. Finally, we also apply a _semantic filtering_ to remove ungrammatical sentences, offensive and controversial sentences, as well as more subtle gender errors, which we report in Appendix E. Given a pair, the semantic filtering operation prompts ChatGPT to discriminate each sentence as _natural/likely_ or _unnatural/unlikely_ , and, subsequently, removes any pair with at least one _unlikely_ sentence.
+
+_Part 3. Filter pairs with gender co-occurring words._ The final step in the pipeline ensures the resulting sentences meet the gender co-occurrence property by filtering out sentences violating the MaxPMI( **s** ) constraints.
+
+## 2.4 FAIRNESS METRICS
+
+Ideally, a model evaluated on non-stereotypical sentences should exhibit no bias towards either gender, especially when evaluated on datasets that impose stricter gender co-occurrence constraints. This intuition is captured by two metrics: (1) the percentage of examples for which the LMs exhibits no gender preference, and (2) relative differences in model fairness when using various MaxPMI( **s** ) constraints. Furthermore, some models may exhibit systematic preferences towards a specific gender. With the goal of better understanding this behavior, we propose a third metric to quantify the gender-based preference disparity.
+
+**Unstereo Score (US)** captures the intuition that, given a non-stereotypical sentence pair **s** = ( **s** _M ,_ **s** _F_ ) that only differs in its pronouns, fair models should exhibit preference towards neither the masculine **s** _M_ nor the feminine **s** _F_ version. Focusing on language modeling, let us define bias as the assignment of 10 _[ε]_ times more probability mass to one sentence over the other, represented as the log-odds ratio: 0 _≤|_ log _p_ model( **s** _F_ ) _−_ log _p_ model( **s** _M_ ) _| ≤ ε_ . Equation 3 incorporates the previous property into a dataset-wise metric. US measures the fraction of pairs in the evaluation set _D_ eval that are _neutral_ according to model _p_ model. Under this fairness metric, unbiased models are expected to exhibit US scores close to 1 (or 100% if reporting values in percentages) when applied to non-stereotypical datasets.
+
+**==> picture [355 x 29] intentionally omitted <==**
+
+Unlike prior works in which _p_ model( **s** _F_ ) = _p_ model( **s** _M_ ) (Nangia et al., 2020; Nadeem et al., 2021), US introduces a hyperparameter _ε_ that controls for small differences in the sentence pairs’ probabilities. This hyperparameter is problem-specific and can be set empirically. Alternatively, US can also be used to compute the _Area under the US Curve (AuFC)_ which gauges the overall LM’s fairness for various values of _ε_ .
+
+**Fairness gap (** ∆ _η_ **)** measures the changes in fairness scores as we apply the constraint _|_ MaxPMI( **s** ) _| ≤ η_ to the evaluation dataset. Given the resulting dataset _D≤η_ and the original dataset _D≤∞_ , we report the difference in the fairness metric: ∆ _η_ = US( _p_ model _, D≤η_ ) _−_ US( _p_ model _, D≤∞_ ).
+
+**Preferences disparity (PD)** determines the overall model’s propensity to assign more than 10 _[ε] ×_ probability to one of the gender groups. PD is reported as the percentage of female-skewed pairs minus the percentage of male-skewed pairs in the dataset.
+
+## 3 EXPERIMENT SETUP
+
+_Language Models._ We begin our experiments by testing publicly available LMs that have been fully or partially trained on PILE, including EleutherAI’s GPT-J-6B (Wang & Komatsuzaki, 2021) and Pythia models (up to 12B) (Biderman et al., 2023),and Meta’s OPT models (up to 6.7B) (Zhang et al., 2022). Since MaxPMI( **s** ) constraints are derived from PILE, we hypothesize these model families to be fairer than models not trained on PILE. In addition to the previous models, we employ
+
+5
+
+the same methodology to evaluate well-established pretrained models[4] , such as Llama-2 (7B, 13B, 70B), MPT (7B, 30B), OLMo (1B, 7B), and Mistral (7B, 8x7B) models (Touvron et al., 2023; Team, 2023; Groeneveld et al., 2024; Jiang et al., 2023). Although there may be discrepancies between these models’ pretraining distributions and PILE, we argue that our evaluation is still meaningful due to the sheer size and diversity of PILE (making it a reasonable approximation of LMs’ pretraining data), as well as recent evidence regarding the transferability of behaviors across models that share pretraining data (Zou et al., 2023; Jones et al., 2023). Finally, we investigate the result of applying pretraining interventions, namely data deduplication, on model behavior by including intervened Pythia models in our evaluation.
+
+_Language Modeling Benchmarks._ To investigate LM behavior in non-stereotypical settings involving binary gender pronouns, we choose datasets WB and WG (Zhao et al., 2018; Rudinger et al., 2018) — two widely studied coreference resolution gender-occupation bias benchmarks. By excluding sentences with strong gender co-occurrences, the resulting benchmarks consist of sentences that are free of pronounced gender associations and equally valid for either pronoun completion — a property not satisfied by other large-scale pronoun resolution datasets like BUG (Levy et al., 2021). Additionally, we create diverse gender-invariant benchmarks using the pipeline outlined in Section 2.3. Given that larger sentences are more prone to containing gender co-occurring words, we generate benchmarks with three different sentence lengths. Specifically, we instruct ChatGPT to generate 5 sentences per (gendered pronoun, seed word) pair, using up to 5, 10, or 20 words (see Appendix F). We coin the resulting datasets USE-5, USE-10, USE-20, respectively.
+
+_Fairness metrics._ Throughout our experiments, we report the value of US score such that it allows for relative differences of less than 65% in the probability space. In other words, this implies that we consider a pair to be skewed if a model assigns 1 _._ 65 _×_ more probability mass to one sentence over the other. In the log space, this yields _ε_ = log 1 _._ 65 _≈_ 0 _._ 217[5] .
+
+## 4 RESULTS
+
+This section evaluates 28 LMs across 5 gender bias benchmarks[6] . After reporting model fairness in the original benchmarks, we investigate the impact of _η_ (level of gender co-occurrence) on the fairness measurements of LMs. To do so, we report the models’ fairness gap (∆ _η_ ) as we reduce the _η_ for each benchmark. We also examine how model size affects our fairness metric. Finally, we study the effect of training time interventions, such as deduplicating the pretraining dataset.
+
+**LMs show low measurements of gender fairness even in gender-invariant benchmarks.** Table 1 summarizes the US fairness metric of three datasets — USE-5, WB and WG (see Table 13 for results in the other benchmarks). All models show low fairness values across the tested benchmarks. The highest recorded values are 40 _._ 72 and 43 _._ 92, attributed to GPT-J-6B on USE-5 ( _D≤_ 0 _._ 65) benchmark and OPT 125M on WG ( _D≤_ 0 _._ 65), respectively. Despite being the maximum values, these values are still significantly far from the ideal US score of 100.
+
+**Measurements of fairness are insensitive to the choice of maximum allowed gender correlation strength** _η_ **.** To study the effect of the parameter of _η_ , which controls for the maximum allowed word-level gender-correlation, we perform our experiments using three choices of _η_ = _∞_ (original), _η_ = 0 _._ 80, and _η_ = 0 _._ 65. As previously discussed, decreases in _η_ leads to an acute drop in the number of benchmark examples. For example, WB drops to 25 _._ 79% of its original size for the _η_ = 0 _._ 65 (top row on Table 1). This reduction in benchmark size shows that these benchmarks include a high number of samples with gender co-occurring word language, matching our expectations (since these benchmarks study popular gender-occupations stereotypes, some of which are known to correlate strongly with gender). Next, we report the fairness gap between the original ( _η_ = _∞_ ) and constrained versions of the benchmark (∆0 _._ 80 and ∆0 _._ 65) in Table 1. Given that all models fell short in terms of fairness scores, one would expect positive ∆ _._ values as we remove gender-correlated sentences from the evaluation set. But this is not the case for the evaluated models. Instead, we
+
+> 4While we acknowledge the ideal scenario of correlating models’ behavior with their specific pretraining data statistics, their data is either not publicly available or was released concurrently(Soldaini et al., 2024).
+
+> 5For additional details about how _ε_ impacts the US score, see Figure 6 in Appendix G.4.
+
+> 6Due to space constraints, we limit the analysis to a subset of the datasets but we refer the interested reader to Appendix G for additional results.
+
+6
+
+Table 1: **Unstereotypical fairness score across LMs and 3 binary gender pronoun benchmarks** . Reported results include the US score (as percentages) for the original benchmarks (denoted “Orig.”), as well as the fairness gap between “Orig.” and two constrained versions (denoted ∆ _η_ ).
+
+|Benchmark size|USE-5 Orig. ∆0_._8 ∆0_._65 4404 3978 3701|WB Orig. ∆0_._8 ∆0_._65 1586 675 409|WG Orig. ∆0_._8 ∆0_._65 240 150 107|
+|---|---|---|---|
+|Pythia 70M Pythia 160M Pythia 410M Pythia 1.4B Pythia 2.8B Pythia 6.9B Pythia 12B GPT-J-6B OPT 125M OPT 350M OPT 2.7B OPT 6.7B Llama-2 7B Llama-2 13B Llama-2 70B MPT 7B MPT 30B OLMo-1B OLMo-7B Mistral-7B-v0.1 Mixtral-8x7B-v0.1|21.11 -0.07 0.12|9.14 -2.92 -4.50|8.33 -1.67 -5.53|
+||15.96 -0.12 -0.09|14.75 -1.72 -4.97|16.67 0.00 0.16|
+||28.67 0.31 0.13|25.16 6.10 6.14|32.92 3.75 3.53|
+||18.37 0.14 0.02|18.03 3.45 0.79|30.83 5.83 9.35|
+||18.23 0.15 0.35|18.79 4.03 2.24|30.00 4.00 9.25|
+||11.99 -0.07 0.02|19.10 2.97 3.88|25.42 0.58 3.56|
+||31.33 0.72 0.72|17.21 2.79 3.08|28.33 2.33 5.31|
+||39.86 0.81 0.92|19.04 1.70 1.50|32.92 5.08 7.27|
+|||||
+||16.05 -0.11 -0.23|26.99 1.31 -1.31|32.08 7.25 11.84|
+||31.46 0.51 0.74|17.78 3.11 3.49|22.50 6.83 6.47|
+||29.33 0.03 0.12|16.27 4.77 6.23|32.08 5.92 8.10|
+||29.15 0.24 -0.05|15.32 3.20 3.99|27.08 0.92 5.63|
+|||||
+||23.00 0.11 0.04|13.37 1.00 1.30|25.00 3.67 7.71|
+||19.32 -0.06 0.12|14.56 2.32 2.31|30.00 2.67 7.38|
+||36.94 0.77 1.33|12.99 2.86 1.44|26.25 3.08 8.33|
+||22.43 0.09 0.26|14.82 2.22 2.79|33.33 0.00 2.18|
+||9.04 -0.01 0.00|14.75 0.80 -0.57|26.67 0.67 -0.50|
+|||||
+||19.91 0.18 0.07|15.51 2.42 -0.35|27.08 2.92 7.50|
+||16.84 0.48 0.52|13.24 2.91 2.65|24.58 2.75 6.26|
+||29.51 0.18 0.21|18.16 1.99 3.36|30.42 4.25 6.03|
+||21.25 -0.11 -0.18|17.53 3.21 3.01|26.25 1.08 4.59|
+
+observe marginal changes in fairness values ( _|_ ∆0 _._ 8 _| ≤_ 0 _._ 81 and _|_ ∆0 _._ 65 _| ≤_ 1 _._ 33%) for USE-5 benchmark. Considering WB and WG, changes in fairness measurements are also relatively small ∆0 _._ 65 _≤_ 6 _._ 23% and ∆0 _._ 65 _≤_ 11 _._ 84%, respectively. These results show that the choice of _η_ is not the reason for the low measurements of fairness in LMs.
+
+**No effect on fairness measurements is observed with changes in model size.** To examine the impact of model size on the US metric, we assess fairness across six families of LMs and various sizes but find no consistent trends in fairness metric relative to the model size (see Tables 1 and 13).
+
+**Does deduplication of pretraining data improve the model fairness?** To answer this question, we use Pythia models that are trained on deduplicated training data (Biderman et al., 2023) and measure their fairness score. Table 2 reports the difference in fairness scores between the original and deduplicated Pythia models. Overall, we do not observe a consistent trend with respect to training data deduplication on fairness scores: deduplication exacerbates gender biases for the Pythia 410M and 12B models but it reduces biases for the Pythia 70M and 6.9B models. As a final remark, deduplicated Pythia models still fall short from ideal US scores and are invariant to _η_ with maximum observed fairness gaps of ∆0 _._ 65 _≤_ 0 _._ 63 in USE-5 to and ∆0 _._ 65 _≤_ 10 _._ 30 for WG (see Table 12).
+
+**Do LMs prefer one gender over the other?** Given that LMs are trained to learn the pretraining distribution and that we are minimizing gender correlations based on the pretraining set, LMs should not favor one gender over the other. However, evaluated models still show alarmingly low fairness measurements even in non-stereotypical benchmarks. Now, we ask if they prefer one gender over the other one and use preference disparity (PD) to answer this question. Table 3 show PD results for the larger models (see Tables in Appendix G.3 for complete set of results). In WB and WG, all models systematically prefer male pronoun completions by a margin greater than 40%. Interestingly, we observe that, with some exceptions, models pretrained on PILE (GPT-J-6B and Pythia models), as well as MPT and OLMo seem to systematically favor female completions for USE benchmarks. An opposite pattern is found for OPT (partially trained on PILE), which prefer male examples by a margin greater than 20% for the same datasets. Across model families, Llama-2 presents the
+
+7
+
+Table 2: **Impact of training data deduplication in model fairness across non-stereotypical datasets (filtered using** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 65 **)** . Reported values represent the effect of pretraining Pythia in the deduplicated version of PILE with positive values implying fairness improvements.
+
+|Model|Name|USE-5|USE-10|USE-20|WB|WG|
+|---|---|---|---|---|---|---|
+|Pythia|70M|6.73|7.20|4.49|7.82|2.80|
+|Pythia|160M|-1.38|-2.62|-2.02|-1.47|-3.74|
+|Pythia|410M|-17.14|0.38|-5.76|-1.96|-1.87|
+|Pythia|1.4B|-5.52|-4.76|-6.75|-3.67|-18.69|
+|Pythia|2.8B|4.62|1.85|1.06|-1.47|-1.87|
+|Pythia|6.9B|6.52|0.29|7.89|-3.91|9.35|
+|Pythia|12B|-11.65|-8.67|-2.09|-1.47|1.87|
+
+Table 3: **Preference disparity values across different family of models.** . A negative value indicates that the percentage of male-skewing outweighs the female-skewing. Reported values for each dataset concern their filtered version for _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 65. “(D)” denotes deduplicated model.
+
+|Model Name|USE-5|USE-10|USE-20|WB|WG|
+|---|---|---|---|---|---|
+|Pythia 12B|21.18|18.11|30.36|-55.38|-46.38|
+|Pythia 12B (D)|49.36|41.80|45.05|-71.51|-56.52|
+|GPT-J-6B|13.20|21.74|29.88|-44.62|-55.07|
+|OPT 6.7B|-50.54|-22.19|-3.30|-62.37|-46.38|
+|Llama-2 70B|-27.40|-5.55|7.35|-64.52|-42.03|
+|MPT 30B|57.54|36.75|36.81|-72.04|-56.52|
+|OLMo-7B|47.57|39.30|46.63|-71.51|-66.67|
+|Mixtral-8x7B-v0.1|-51.55|-26.41|-3.16|-63.44|-53.62|
+
+more balanced set of preferences across all model sizes keeping the PD values below a 27% margin difference in the USE-5 benchmark, and within 13 _._ 5% margin in the other USE benchmarks. We do not find consistent patterns across model size.
+
+## 5 RELATED WORK
+
+The following paragraphs provide a summary of relevant works for the paper. For a comprehensive discussion on fairness in LMs, consult surveys by Gallegos et al. (2023) and Li et al. (2023).
+
+**Auditing fairness of LMs.** Previous research on auditing fairness in LMs utilizes a limited smallscale hand-curated list of sentence pairs, often designated templates (Kiritchenko & Mohammad (2018); Rudinger et al. (2018); May et al. (2019); Kurita et al. (2019), _inter alia_ ). The deficiency in lexical and semantic diversity (Seshadri et al., 2022; Selvam et al., 2023), as well as the unnaturalness of manually constructed templates (Levy et al., 2021), prompted researchers to adopt new evaluation practices. These practices include extracting sentences from established datasets (Levy et al., 2021), sourcing these sentences through crowd-sourcing efforts (Nadeem et al., 2021; Nangia et al., 2020) or through LMs generation (Kocielnik et al., 2023).
+
+**Model-based benchmark generation.** The use of models to assist in model evaluation is not a novel concept (Perez et al., 2023; 2022; Bai et al., 2023). A common trend in past work is the focus on finding wrongful behaviors in LMs by exploiting known weaknesses of LMs, such as known stereotypes and failure modes. By controlling for non-stereotypical scenarios, i.e., situations with no explicit gendered associations (according to the pretraining data), our work instead sets out to validate the implicit assumption that the models are unbiased when stereotypes are not present.
+
+**Pretraining data and model behavior.** Current practices for developing LMs require large scale Internet-based datasets for training which are difficult to understand (Bender et al., 2021). However, LMs capture unintended dataset artifacts or biases in the training data (Razeghi et al., 2022a; Elazar et al., 2022; Gardner et al., 2021; Serrano et al., 2023) Our work utilizes insights from previous research to curate a dataset that is free of prominent gender correlations. By ensuring the evaluation
+
+8
+
+dataset is devoid of these strong correlations at a sentence level, we expect an unbiased model to manifest no preferences towards gender.
+
+## 6 DISCUSSION & LIMITATIONS
+
+Our work investigates the fairness of well-established LMs in non-stereotypical settings. We find that even after ensuring the evaluation set is composed of sentence pairs that are not gendercorrelated according to the pretraining data, models still tend to be overconfident, assigning higher probability mass to one gender over the other. In an attempt to explain this behavior, we examined sentences for any implicit biases (see Appendix H) and performed common clustering analysis techniques but did not find any obvious patterns. This finding suggests that the observed behavior may not be a simple pretraining data effect and we encourage future work to investigate the reasons underlying this non-trivial behavior.
+
+A key contribution of this paper lies in proposing a new evaluation paradigm that challenges assumptions of fairness evaluation practices and creates test beds to validate them (Ribeiro et al., 2020). When assessing models’ capabilities in non-stereotypical scenarios, we expect models to be unbiased toward a specific gender. The fact that models exhibit biases in this scenario raises concerns about the nature of these underlying biases. Understanding the source of these biases will be crucial to developing effective bias mitigation strategies that target both explicit (superficial) and implicit (hidden) biases (Hofmann et al., 2024). Through their generations (e.g., story generation, reference letter generation), LMs hold the potential to affect the understandings, beliefs, and attitudes that people hold about particular social groups (Barocas et al., 2017; Kiat, 2019). In this work, we center our evaluation around the disproportionate representation of gendered groups irrespective of a given downstream task. While we acknowledge that our findings may not directly translate to other applications, they highlight previously overlooked biases in LMs and offer a foundation for future studies to build upon and address these issues in more specific contexts.
+
+One limitation of the current study is the focus on binary gender bias and the assessment of fairness solely using the English pronouns “ _she_ ” and “ _he_ ”. The extent to which these findings apply to non-binary gender identities or to other demographic groups (e.g., racism, cultural) remains an open question. Future research could investigate the applicability of our findings across different groups and languages, as well as expand the gender co-occurrence definition to include multiple gendered expressions. Another limitation of our work is the use of a single model to construct nonstereotypical benchmarks, which may limit the diversity of the dataset and introduce model-specific artifacts. To confirm the quality of the dataset, the authors have manually vetted 250 random samples from each benchmark and ran a small-scale evaluation study with 6 participants (CS researchers) of various cultural backgrounds[7] . We encourage future research to run more comprehensive analysis of the quality and potential artifacts introduced by constructing benchmarks with different models, such as Claude or Llama-2 (Anthropic, 2024; Touvron et al., 2023).
+
+## 7 CONCLUSION
+
+With the increased use of LMs for diverse content-generation tasks (e.g., assistive-writing, automatic summarization), it is imperative gain a comprehensive understanding of model behavior and potential implications. Unlike previous works that attempt to surface prejudices in LMs by exploiting underlying gendered correlations in the training data, our work tests the fairness of 28 LMs in _nonstereotypical_ evaluation sets that are devoid of such correlations. Our results show that all models exhibit gender biases when evaluated using stereotype-free sentences, and that all models systematically favor male completions over female completions in the non-stereotypical portion of WB and WG. These findings demonstrate that bias does not solely stem from the presence of gender-related words in sentences and warrants further investigation to understand the nature of the surfaced behaviors. Being cognizant of LM’s biases in innocuous scenarios should be an integral part of future evaluation practices, as it promotes a better understanding of complex behaviors within models and constitutes additional safety checks towards the perpetuation of unintended harms.
+
+7The participants were asked to evaluate 100 randomly selected instances from each generated benchmarks. We found that on average 97% of examples are considered neutral and that 98% of the examples are considered neutral by at least 5 annotators.
+
+9
+
+## REPRODUCIBILITY STATEMENT
+
+Our experiments are based on OpenAI ChatGPT (gpt-3.5-turbo, version available as of September 2023) API[8] . In Appendix C, we present the wordlists utilized in our experiments. In Appendix F, we list the prompts and configurations used in our experiments. Finally, to facilitate future research, we release the full dataset, code, and demo at [URL removed] unstereo-eval.
+
+## REFERENCES
+
+Anthropic. Introducing the next generation of claude, Mar 2024. URL [URL removed] anthropic.com/news/claude-3-family. Accessed: [April 12, 2024].
+
+- Yanhong Bai, Jiabao Zhao, Jinxin Shi, Tingjiang Wei, Xingjiao Wu, and Liang He. Fairbench: A four-stage automatic framework for detecting stereotypes and biases in large language models, 2023.
+
+- Solon Barocas, Kate Crawford, Aaron Shapiro, and Hanna Wallach. The problem with bias: From allocative to representational harms in machine learning. In _SIGCIS conference paper_ , 2017.
+
+- Emily M. Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big? In _Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency_ , FAccT ’21, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383097. doi: 10.1145/3442188. 3445922. URL [URL removed]
+
+- Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling, 2023.
+
+- Tolga Bolukbasi, Kai-Wei Chang, James Zou, Venkatesh Saligrama, and Adam Kalai. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In _Proceedings of the 30th International Conference on Neural Information Processing Systems_ , NIPS’16, pp. 4356–4364, Red Hook, NY, USA, 2016. Curran Associates Inc. ISBN 9781510838819.
+
+- Rishi Bommasani, Drew A. Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S. Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, Erik Brynjolfsson, S. Buch, Dallas Card, Rodrigo Castellon, Niladri S. Chatterji, Annie S. Chen, Kathleen A. Creel, Jared Davis, Dora Demszky, Chris Donahue, Moussa Doumbouya, Esin Durmus, Stefano Ermon, John Etchemendy, Kawin Ethayarajh, Li Fei-Fei, Chelsea Finn, Trevor Gale, Lauren E. Gillespie, Karan Goel, Noah D. Goodman, Shelby Grossman, Neel Guha, Tatsunori Hashimoto, Peter Henderson, John Hewitt, Daniel E. Ho, Jenny Hong, Kyle Hsu, Jing Huang, Thomas F. Icard, Saahil Jain, Dan Jurafsky, Pratyusha Kalluri, Siddharth Karamcheti, Geoff Keeling, Fereshte Khani, O. Khattab, Pang Wei Koh, Mark S. Krass, Ranjay Krishna, Rohith Kuditipudi, Ananya Kumar, Faisal Ladhak, Mina Lee, Tony Lee, Jure Leskovec, Isabelle Levent, Xiang Lisa Li, Xuechen Li, Tengyu Ma, Ali Malik, Christopher D. Manning, Suvir P. Mirchandani, Eric Mitchell, Zanele Munyikwa, Suraj Nair, Avanika Narayan, Deepak Narayanan, Benjamin Newman, Allen Nie,
+
+> 8[URL removed]
+
+10
+
+Juan Carlos Niebles, Hamed Nilforoshan, J. F. Nyarko, Giray Ogut, Laurel Orr, Isabel Papadimitriou, Joon Sung Park, Chris Piech, Eva Portelance, Christopher Potts, Aditi Raghunathan, Robert Reich, Hongyu Ren, Frieda Rong, Yusuf H. Roohani, Camilo Ruiz, Jack Ryan, Christopher R’e, Dorsa Sadigh, Shiori Sagawa, Keshav Santhanam, Andy Shih, Krishna Parasuram Srinivasan, Alex Tamkin, Rohan Taori, Armin W. Thomas, Florian Tram`er, Rose E. Wang, William Wang, Bohan Wu, Jiajun Wu, Yuhuai Wu, Sang Michael Xie, Michihiro Yasunaga, Jiaxuan You, Matei A. Zaharia, Michael Zhang, Tianyi Zhang, Xikun Zhang, Yuhui Zhang, Lucia Zheng, Kaitlyn Zhou, and Percy Liang. On the opportunities and risks of foundation models. _ArXiv_ , 2021. URL [URL removed]
+
+- Flor Miriam Plaza del Arco, Amanda Cercas Curry, Alba Curry, Gavin Abercrombie, and Dirk Hovy. Angry men, sad women: Large language models reflect gendered stereotypes in emotion attribution, 2024.
+
+- Jwala Dhamala, Tony Sun, Varun Kumar, Satyapriya Krishna, Yada Pruksachatkun, Kai-Wei Chang, and Rahul Gupta. Bold: Dataset and metrics for measuring biases in open-ended language generation. In _Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency_ , FAccT ’21, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383097. doi: 10.1145/3442188.3445924. URL [URL removed] 3442188.3445924.
+
+- Yanai Elazar, Nora Kassner, Shauli Ravfogel, Amir Feder, Abhilasha Ravichander, Marius Mosbach, Yonatan Belinkov, Hinrich Sch¨utze, and Yoav Goldberg. Measuring causal effects of data statistics on language model’sfactual’predictions. _ArXiv preprint_ , 2022. URL https: //arxiv.org/abs/2207.14251.
+
+- Isabel O. Gallegos, Ryan A. Rossi, Joe Barrow, Md Mehrab Tanjim, Sungchul Kim, Franck Dernoncourt, Tong Yu, Ruiyi Zhang, and Nesreen K. Ahmed. Bias and fairness in large language models: A survey, 2023.
+
+- Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. The pile: An 800gb dataset of diverse text for language modeling. _ArXiv preprint_ , 2021. URL [URL removed]
+
+- Matt Gardner, William Merrill, Jesse Dodge, Matthew Peters, Alexis Ross, Sameer Singh, and Noah A. Smith. Competency problems: On finding and removing artifacts in language data. In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , Online and Punta Cana, Dominican Republic, 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.emnlp-main.135. URL [URL removed] emnlp-main.135.
+
+- Dirk Groeneveld, Iz Beltagy, Pete Walsh, Akshita Bhagia, Rodney Kinney, Oyvind Tafjord, A. Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, Shane Arora, David Atkinson, Russell Authur, Khyathi Raghavi Chandu, Arman Cohan, Jennifer Dumas, Yanai Elazar, Yuling Gu, Jack Hessel, Tushar Khot, William Merrill, Jacob Daniel Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Valentina Pyatkin, Abhilasha Ravichander, Dustin Schwenk, Saurabh Shah, Will Smith, Emma Strubell, Nishant Subramani, Mitchell Wortsman, Pradeep Dasigi, Nathan Lambert, Kyle Richardson, Luke Zettlemoyer, Jesse Dodge, Kyle Lo, Luca Soldaini, Noah A. Smith, and Hanna Hajishirzi. Olmo: Accelerating the science of language models. _arXiv preprint_ , 2024. URL [URL removed] 267365485.
+
+- Valentin Hofmann, Pratyusha Ria Kalluri, Dan Jurafsky, and Sharese King. Dialect prejudice predicts ai decisions about people’s character, employability, and criminality, 2024.
+
+- Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, L´elio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timoth´ee Lacroix, and William El Sayed. Mistral 7b, 2023.
+
+11
+
+- Erik Jones, Anca Dragan, Aditi Raghunathan, and Jacob Steinhardt. Automatically auditing large language models via discrete optimization. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), _Proceedings of the 40th International Conference on Machine Learning_ , Proceedings of Machine Learning Research. PMLR, 2023. URL [URL removed]
+
+- Armand Joulin, Edouard Grave, Piotr Bojanowski, Matthijs Douze, H´erve J´egou, and Tomas Mikolov. Fasttext.zip: Compressing text classification models. _ArXiv preprint_ , 2016. URL [URL removed]
+
+- Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. Bag of tricks for efficient text classification. In _Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers_ , Valencia, Spain, 2017. Association for Computational Linguistics. URL [URL removed]
+
+- Lim Swee Kiat. Machines gone wrong: Understanding bias part i. 2019. URL https: //machinesgonewrong.com/bias_i/. Accessed: [April 12, 2024].
+
+- Svetlana Kiritchenko and Saif Mohammad. Examining gender and race bias in two hundred sentiment analysis systems. In _Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics_ , New Orleans, Louisiana, 2018. Association for Computational Linguistics. doi: 10.18653/v1/S18-2005. URL [URL removed]
+
+- Rafal Kocielnik, Shrimai Prabhumoye, Vivian Zhang, Roy Jiang, R. Michael Alvarez, and Anima Anandkumar. Biastestgpt: Using chatgpt for social bias testing of language models, 2023.
+
+- Keita Kurita, Nidhi Vyas, Ayush Pareek, Alan W Black, and Yulia Tsvetkov. Measuring bias in contextualized word representations. In _Proceedings of the First Workshop on Gender Bias in Natural Language Processing_ , Florence, Italy, 2019. Association for Computational Linguistics. doi: 10.18653/v1/W19-3823. URL [URL removed]
+
+- Shahar Levy, Koren Lazar, and Gabriel Stanovsky. Collecting a large-scale gender bias dataset for coreference resolution and machine translation. In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , Punta Cana, Dominican Republic, 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.findings-emnlp.211. URL https: //aclanthology.org/2021.findings-emnlp.211.
+
+- Yingji Li, Mengnan Du, Rui Song, Xin Wang, and Y. Wang. A survey on fairness in large language models. _ArXiv preprint_ , 2023. URL [URL removed]
+
+- Chandler May, Alex Wang, Shikha Bordia, Samuel R. Bowman, and Rachel Rudinger. On measuring social biases in sentence encoders. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , Minneapolis, Minnesota, 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1063. URL [URL removed] org/N19-1063.
+
+- George A. Miller. WordNet: A lexical database for English. In _Speech and Natural Language: Proceedings of a Workshop Held at Harriman, New York, February 23-26, 1992_ , 1992. URL [URL removed]
+
+- Moin Nadeem, Anna Bethke, and Siva Reddy. StereoSet: Measuring stereotypical bias in pretrained language models. In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , Online, 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.416. URL [URL removed] acl-long.416.
+
+- Nikita Nangia, Clara Vania, Rasika Bhalerao, and Samuel R. Bowman. CrowS-pairs: A challenge dataset for measuring social biases in masked language models. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , Online, 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.154. URL [URL removed]
+
+12
+
+- OpenAI. Openai blog, Nov 2022. URL [URL removed] Accessed: [March 24, 2024].
+
+- Ethan Perez, Saffron Huang, Francis Song, Trevor Cai, Roman Ring, John Aslanides, Amelia Glaese, Nat McAleese, and Geoffrey Irving. Red teaming language models with language models. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , Abu Dhabi, United Arab Emirates, 2022. Association for Computational Linguistics. URL [URL removed]
+
+- Ethan Perez, Sam Ringer, Kamile Lukosiute, Karina Nguyen, Edwin Chen, Scott Heiner, Craig Pettit, Catherine Olsson, Sandipan Kundu, Saurav Kadavath, Andy Jones, Anna Chen, Benjamin Mann, Brian Israel, Bryan Seethor, Cameron McKinnon, Christopher Olah, Da Yan, Daniela Amodei, Dario Amodei, Dawn Drain, Dustin Li, Eli Tran-Johnson, Guro Khundadze, Jackson Kernion, James Landis, Jamie Kerr, Jared Mueller, Jeeyoon Hyun, Joshua Landau, Kamal Ndousse, Landon Goldberg, Liane Lovitt, Martin Lucas, Michael Sellitto, Miranda Zhang, Neerav Kingsland, Nelson Elhage, Nicholas Joseph, Noemi Mercado, Nova DasSarma, Oliver Rausch, Robin Larson, Sam McCandlish, Scott Johnston, Shauna Kravec, Sheer El Showk, Tamera Lanham, Timothy Telleen-Lawton, Tom Brown, Tom Henighan, Tristan Hume, Yuntao Bai, Zac Hatfield-Dodds, Jack Clark, Samuel R. Bowman, Amanda Askell, Roger Grosse, Danny Hernandez, Deep Ganguli, Evan Hubinger, Nicholas Schiefer, and Jared Kaplan. Discovering language model behaviors with model-written evaluations. In Anna Rogers, Jordan Boyd-Graber, and Naoaki Okazaki (eds.), _Findings of the Association for Computational Linguistics: ACL 2023_ , Toronto, Canada, 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023. findings-acl.847. URL [URL removed]
+
+- Yasaman Razeghi, Robert L Logan IV, Matt Gardner, and Sameer Singh. Impact of pretraining term frequencies on few-shot numerical reasoning. In _Findings of the Association for Computational Linguistics: EMNLP 2022_ , Abu Dhabi, United Arab Emirates, 2022a. Association for Computational Linguistics. URL [URL removed]
+
+- Yasaman Razeghi, Raja Sekhar Reddy Mekala, Robert L Logan Iv, Matt Gardner, and Sameer Singh. Snoopy: An online interface for exploring the effect of pretraining term frequencies on few-shot LM performance. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , Abu Dhabi, UAE, 2022b. Association for Computational Linguistics. URL [URL removed]
+
+- Marco Tulio Ribeiro, Tongshuang Wu, Carlos Guestrin, and Sameer Singh. Beyond accuracy: Behavioral testing of NLP models with CheckList. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , Online, 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.442. URL [URL removed] 2020.acl-main.442.
+
+- Rachel Rudinger, Jason Naradowsky, Brian Leonard, and Benjamin Van Durme. Gender bias in coreference resolution. In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)_ , New Orleans, Louisiana, 2018. Association for Computational Linguistics. doi: 10. 18653/v1/N18-2002. URL [URL removed]
+
+- Nikil Selvam, Sunipa Dev, Daniel Khashabi, Tushar Khot, and Kai-Wei Chang. The tail wagging the dog: Dataset construction biases of social bias benchmarks. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)_ , Toronto, Canada, 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-short.118. URL [URL removed]
+
+- Sofia Serrano, Jesse Dodge, and Noah A. Smith. Stubborn lexical bias in data and models. In _Findings of the Association for Computational Linguistics: ACL 2023_ , Toronto, Canada, 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-acl.516. URL [URL removed]
+
+- Preethi Seshadri, Pouya Pezeshkpour, and Sameer Singh. Quantifying Social Biases Using Templates is Unreliable. In _TSRML Workshop @ NeurIPS_ , 2022.
+
+13
+
+- Eric Michael Smith, Melissa Hall, Melanie Kambadur, Eleonora Presani, and Adina Williams. “I’m sorry to hear that”: Finding new biases in language models with a holistic descriptor dataset. In _Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing_ , Abu Dhabi, United Arab Emirates, 2022. Association for Computational Linguistics. URL https: //aclanthology.org/2022.emnlp-main.625.
+
+- Luca Soldaini, Rodney Kinney, Akshita Bhagia, Dustin Schwenk, David Atkinson, Russell Authur, Ben Bogin, Khyathi Chandu, Jennifer Dumas, Yanai Elazar, Valentin Hofmann, Ananya Harsh Jha, Sachin Kumar, Li Lucy, Xinxi Lyu, Nathan Lambert, Ian Magnusson, Jacob Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Abhilasha Ravichander, Kyle Richardson, Zejiang Shen, Emma Strubell, Nishant Subramani, Oyvind Tafjord, Pete Walsh, Luke Zettlemoyer, Noah A. Smith, Hannaneh Hajishirzi, Iz Beltagy, Dirk Groeneveld, Jesse Dodge, and Kyle Lo. Dolma: an open corpus of three trillion tokens for language model pretraining research, 2024.
+
+- MosaicML NLP Team. Introducing mpt-7b: A new standard for open-source, commercially usable llms, 2023. URL [URL removed] Accessed: 2023-05-05.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023.
+
+- Ben Wang and Aran Komatsuzaki. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. [URL removed] 2021.
+
+- Boxin Wang, Weixin Chen, Hengzhi Pei, Chulin Xie, Mintong Kang, Chenhui Zhang, Chejian Xu, Zidi Xiong, Ritik Dutta, Rylan Schaeffer, Sang T. Truong, Simran Arora, Mantas Mazeika, Dan Hendrycks, Zinan Lin, Yu Cheng, Sanmi Koyejo, Dawn Song, and Bo Li. Decodingtrust: A comprehensive assessment of trustworthiness in gpt models, 2024.
+
+- Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer. Opt: Open pre-trained transformer language models, 2022.
+
+- Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. Gender bias in coreference resolution: Evaluation and debiasing methods. In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)_ , New Orleans, Louisiana, 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2003. URL [URL removed] org/N18-2003.
+
+- Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J. Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models, 2023.
+
+## A GENDER CO-OCCURRING WORDS ANALYSIS
+
+This section analyses properties of the gender co-occurring word measure used in the paper and discusses possible extensions of the PMI-based score to consider multiple gendered words.
+
+14
+
+## ANALYSIS OF THE COMPONENTS OF _δ_ ( _w_ ) DISTRIBUTION
+
+The gender co-occurrence score, _δ_ ( _w_ ), constitutes two different scores that represent the strength of association between every word in PILE and one of the gendered pronouns “ _she_ ”/“ _he_ ”. To better understand differences between the two distributions, we analyse their marginal and joint distributions (Figure 4). We note that, while 66 _._ 11% of the words co-occur with the pronoun “ _he_ ”, “ ” only 43 _._ 86% of the words in PILE co-occur with the pronoun _she_ (see Figure 4a). Although PILE is advertised as an English only pretraining dataset, it is still possible to find residuals of other languages within its documents, including Spanish. This, in turn, could contribute to a larger proportion of words observed for the pronoun “ _he_ ”, since the Spanish verb _to have_ is sometimes conjugated as “ _he_ ”. The definition of _δ_ ( _w_ ) presupposes that it is possible to compute the PMI between a word _w_ and both gendered pronouns. This is not always the case, as only 42 _._ 22% of the words co-occur in practice with both gender pronouns.
+
+A prerequisite for the reliability of the UnStereoEval framework is that there exist enough words in the pretraining data that satisfy _|δ_ ( _w_ ) _| ≤ η_ . This requirement ensures that there is enough diversity in the resulting evaluation set. This is empirically verified for the values of _δ_ ( _w_ ) computed based on PILE, as illustrated in Figure 4b. The median of the distribution is located at _−_ 0 _._ 13, suggesting that there exist a slightly higher proportion of words exhibiting stronger correlations with the male pronoun “ _he_ ”.
+
+**==> picture [170 x 127] intentionally omitted <==**
+
+**==> picture [170 x 127] intentionally omitted <==**
+
+**==> picture [265 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(a) Marginal distribution. (b) Joint distribution. **----- End of picture text -----**
+
+Figure 4: **Word-level distributions of** PMI( _w,_ **’she’** ) **and** PMI( _w,_ **’he’** ) **in PILE.** The joint distribution is defined for words that co-occur with both “ _she_ ” and “ _he_ ”. The fraction of well-defined functions is smaller for female pronouns.
+
+## ALTERNATIVE DEFINITIONS OF _δ_ ( _w_ ).
+
+In the paper, we define the gender co-occurrence score of a word ( _δ_ ( _w_ )) with respect to the gendered pronouns “ _she_ ” and “ _he_ ” (see Equation 1). A similar approach has been used extensively in literature (Bolukbasi et al., 2016; Dhamala et al., 2021). Given the role of the pronouns “ _he_ ” and “ _she_ ” in English language, we expect them to co-occur in diverse contexts. To better understand whether using alternative gender word pairs in the _δ_ ( _w_ ) computation would differ significantly over the use of “ _she_ ” and “ _he_ ”, we compute the _δ_ ( _w_ ) value for words in PILE using different gender word pairs, including (“ _queen_ ”, “ _king_ ”), and (“ _daughter_ ”,“ _son_ ”) and rank words with valid _δ_ ( _w_ ) based on their its value. To investigate how correlated the induced _δ_ ( _w_ ) distributions are, we report the Kendall Tau correlation[9] in Figure 5. We observe that the gendered pronoun pairs (“ _her_ ”, “ _him_ ”), (“ _her_ ”, “ _his_ ”) are strongly correlated with one another, whereas the pairs (“ _mummy_ ”, “ _daddy_ ”) and (“ _aunt_ ”, “ _uncle_ ”) are anti-correlated with most pairs. In a similar vein, pairs reflecting marital relationships, e.g., (“ _wife_ ”, “ _husband_ ”) or (“ _girlfriend_ ”, “ _boyfriend_ ”) are negatively correlated with several gender word pairs.
+
+As previously mentioned, an important aspect of the proposed evaluation is the ability to compute the gender co-occurrences of many words. The use of different gendered word pairs to define the
+
+> 9 We use the default implementation available at [URL removed] reference/generated/scipy.stats.kendalltau.html.
+
+15
+
+**==> picture [397 x 348] intentionally omitted <==**
+
+**----- Start of picture text -----**
+(aunt, uncle) (aunts, uncles) (daughter, son) 1 . 00 (daughters, sons) (female, male) (feminine,(females,masculine)males) 0 . 75 (girl, boy) (girlfriend, boyfriend) (girlfriends, boyfriends) 0 . 50 (girls, boys) (grandma, grandpa) (grandmother, grandfather) (her, him) 0 . 25 (her, his) (ladies, lords) (lady, lord) (lass, lad) 0 . 00 (madam, sir) (matriarchy, patriarchy) (mom, dad) (mother, father) − 0 . 25 (mummy, daddy) (princess, prince) (princesses,(queen,princes)king) − 0 . 50 (queens, kings) (she, he) (sisters,(sister,brothers)brother) − 0 . 75 (stepmother, stepfather) (wife, husband) (wives, husbands) − 1 . 00 (woman, man) (women, men) uncle)(aunt, son) male) masculine) boyfriend) boys)(girls, grandfather) his)(her, lord)(lady, sir)(madam, dad)(mom, daddy) princes) kings) brother) stepfather) husbands) men) (daughter, (female, (queens, (sister, (women, (mummy, (wives, (princesses, (feminine, (girlfriend, (stepmother, (grandmother, **----- End of picture text -----**
+
+Figure 5: **Kendall Tau correlation coefficients for various parameterizations of** _δ_ ( _w_ ). With the exception of relationship-specific or the pair “ _mummy_ ”-“ _daddy_ ”, most parametrizations correlate positively with the original _δ_ ( _w_ ) definition.
+
+16
+
+Table 4: **Number of well-defined** _δ_ ( _w_ ) **values when defined using different gendered word pairs** . We say that a word is well-defined (in terms of gender co-occurring score _δ_ ( _w_ )) if the word has cooccurred at least once with each of the gendered words in the pair.
+
+|Female|Male|Absolute Counts (_↑_)|Relative Counts (_↑_)|
+|---|---|---|---|
+|aunt|uncle|5173|4.30|
+|aunts|uncles|885|0.74|
+|daughter|son|17407|14.46|
+|daughters|sons|6881|5.72|
+|female|male|23646|19.65|
+|females|males|11310|9.40|
+|feminine|masculine|4319|3.59|
+|girl|boy|20204|16.79|
+|girlfriend|boyfriend|5718|4.75|
+|girlfriends|boyfriends|1066|0.89|
+|girls|boys|16895|14.04|
+|grandma|grandpa|1022|0.85|
+|grandmother|grandfather|5870|4.88|
+|her|him|52883|43.95|
+|her|his|60809|50.53|
+|hers|his|0|0.00|
+|herself|himself|0|0.00|
+|ladies|lords|3074|2.55|
+|lady|lord|6646|5.52|
+|lass|lad|858|0.71|
+|madam|sir|1488|1.24|
+|matriarchy|patriarchy|54|0.04|
+|mom|dad|8761|7.28|
+|mother|father|24607|20.45|
+|mummy|daddy|1211|1.01|
+|princess|prince|4692|3.90|
+|princesses|princes|1053|0.88|
+|queen|king|9089|7.55|
+|queens|kings|2571|2.14|
+|she|he|55476|46.10|
+|sister|brother|14965|12.44|
+|sisters|brothers|7658|6.36|
+|stepmom|stepdad|0|0.00|
+|stepmother|stepfather|1002|0.83|
+|wife|husband|19112|15.88|
+|wives|husbands|4393|3.65|
+|woman|man|30039|24.96|
+|women|men|33251|27.63|
+
+gender skew of a word may lead to significant differences in the number of words with well-defined scores. These values are summarized in Table 4. Pairs comprising gender pronouns consist the higher number of well-defined gender co-occurring words, which further supports the selection of the gendered word pair (“ _she_ ”, “ _he_ ”).
+
+## EXPANDING _δ_ ( _w_ ) WITH GENDERED WORDLISTS
+
+The main paper makes a simplifying assumption of computing gender co-occurrence based on a single gendered word pair. This decision implies that the gender co-occurrence filtering defined in Section 2.2 leverages _δ_ ( _w_ ) values of 55 _._ 5k, which represents about 46 _._ 10% of the preprocessed English vocabulary from PILE. To further increase the coverage of the filtering procedure, one alternative would be to compute _δ_ ( _w_ ) (defined in Equation 1) as a function of extra gendered word
+
+17
+
+pairs. In particular, the added words lead to new and more diverse words to be used as gender cooccurrence words in UnStereoEval. One way of generalizing Equation 1 to a gendered wordlist G is defined in Equation 4.
+
+**==> picture [321 x 25] intentionally omitted <==**
+
+where G is a list of paired gendered terms, e.g., _{_ (“ _she_ ”, “ _he_ ”), (“ _her_ ”, “ _his_ ”), (“ _mom_ ”, “ _dad_ ”) _}_ and _v_ ( _w_ ) is a weighting function that may depend on properties of the word, including its _toxicity_ , _sentiment_ , or other problem-specific heuristic.
+
+## B VOCABULARY PREPROCESSING
+
+In Section 2.3, we propose a pipeline for creating benchmarks of non-stereotypical sentences at scale using ChatGPT. A key desideratum in the pipeline is the selection of appropriate seed words to guide the generation of sentences. To ensure that the produced sentences are fluent and pertinent to the evaluation, it is sensible to prompt the generative model using languages that the model was trained on.
+
+The proposed evaluation in this work is centered in the English language. Not only are most models pretrained on large English corpus, most available pretraining datasets are also in English, and we can also benefit from state-of-the art instruction following models like ChatGPT. The creation of an English benchmark entails sampling English seed words from the PILE vocabulary. However, despite being composed of English documents, PILE also includes documents in other languages (e.g., Spanish, Japanese, or German). As a consequence, we preprocess the original vocabulary (Razeghi et al., 2022b), retaining terms that are fully expressed using the Roman alphabet. In addition to words containing non-Roman alphabet, this procedure also removes numbers, dates, and punctuation from the preprocessing. The removal of Roman alphabet helps removing Austroasiatic and Japonic language families but it is possible that non-English words are still present in the vocabulary (e.g., “ _espanola_ ”, “ _incorrecta_ ”, “ _jacht_ ”, “ _kumppanuuden_ ”). Hence, we restrict the vocabulary to the English subset by retaining words with definitions in WordNet, a large lexical database for English (Miller, 1992). Note, however, that this procedure led to valid English words (e.g., “ _vaguely_ ”, “ _synthetic_ ”, “ _studious_ ”) being incorrectly discarded. Therefore, we complement this preprocessing step with the use of a language identification model[10] . Using the language identification model, we consider any word whose predicted language is English with _≥_ 50% score (Joulin et al., 2016; 2017). This results in a vocabulary with approximately 120k words.
+
+Finally, we would like to generate sentences that are diverse and natural sounding. As a result, we restrict the final vocabulary size to the 80% more frequent words in PILE, totalling 7 _._ 35% (56 _._ 6k words) of the original vocabulary. The discarded words in this step include typos (e.g., “ _maping_ ”, “ _basiclly_ ”), coding-specific variable names (e.g., “ _maxbuffer_ ”, “ _selectimage_ ”), non-english words (e.g., “ _succursale_ ”, “ _bloqueadas_ ”), as well as other esoteric words (e.g., “ _orthogeriatric_ ”, “ _aldesleukin_ ”).
+
+## C LIST OF SELECTED WORDS
+
+The list of paired gendered expressions used in this work is listed in this section, followed by 50 of seed words used for guiding the benchmark generation process. You can find the full list of words in [URL removed]
+
+- Female gendered words: _{_ “ _she_ ”, “ _her_ ”, “ _her_ ”, “ _herself_ ” _}_
+
+- Male gendered words: _{_ “ _he_ ”, “ _him_ ”, “ _his_ ”, “ _himself_ ” _}_
+
+- Selected attribute words = _{_ “ _addict_ ”, “ _angiography_ ”, “ _barbaric_ ”, “ _beauties_ ”, “ _bushed_ ”, “ _campsites_ ”, “ _cancelation_ ”, “ _carriages_ ”, “ _common_ ”, “ _contaminating_ ”, “ _controlling_ ”,
+
+10 We use fasttext/supervised-models/lid.176.bin, a supervised language identification model trained to recognize 176 languages across various datasets, including Wikipedia, Tatoeba, and SETimes.
+
+18
+
+Table 5: **List of prompts used to generate the proposed gender bias benchmark.** By default, we use OpenAI’s Chat Completion API with configurations. Exceptionally, we set temperature: 0.7 at _Generation_ time to increase the diversity of the generations.
+
+|Purpose|Prompt|
+|---|---|
+|Generation|Your task is to generate_{_NUM SENTENCES_}_diverse sentences containing the word|
+||’_{_ATTRIBUTE_}_’ and the pronoun ’_{_GROUP_}_’. Each sentence may contain at most|
+||_{_NUM WORDS_}_ words. _\_n - The sentences should be fuent and contain both the|
+||word ’_{_ATTRIBUTE_}_’ and the pronoun ’_{_GROUP_}_’._\_n - The sentences should be|
+||gender-neutral and should not make use of gender stereotypes._\_n - The sentences|
+||should not contain associations that are deemed controversial or unlikely._\_n Please|
+||create a numbered list and separate your sentences with line breaks.|
+|Editing|Your task is to rewrite the sentence below, replacing the pronouns ’_{_FROM GROUP_}_’|
+||with the corresponding ’_{_TO GROUP_}_’ pronouns. Make minimal changes during|
+||the revision process and preserve the meaning of the original sentence. In par-|
+||ticular, try to make the sentence as gendered neutral as possible, while still using|
+||the pronouns ’_{_TO GROUP_}_’ pronouns. Make sure the resulting sentence is coher-|
+||ent and written in proper English._\_n Write only the revised sentence and nothing|
+||else._\_n”’_{_SENTENCE_}_”’|
+|Semantic|Would you say that the following sentence is relatively likely or is it uncommon and|
+|fltering|unconventional? ”’_{_SENTENCE_}_”’_\_n Use ’likely’ or ’unlikely’ with no punctuation|
+||and in lowercase. Write one of these two words and nothing else.|
+
+“ _couldn_ ”, “ _deluge_ ”, “ _durational_ ”, “ _exploitative_ ”, “ _expressions_ ”, “ _fierce_ ”, “ _fireplaces_ ”, “ _focussed_ ”, “ _gemologist_ ”, “ _gnaw_ ”, “ _goofiness_ ”, “ _gree_ ”, “ _hawthorn_ ”, “ _headlands_ ”, “ _imaginary_ ”, “ _intoxicate_ ”, “ _jinxed_ ”, “ _laving_ ”, “ _oblivion_ ”, “ _omen_ ”, “ _overdrive_ ”, “ _requests_ ”, “ _responded_ ”, “ _rewire_ ”, “ _skaters_ ”, “ _solemn_ ”, “ _spidery_ ”, “ _splints_ ”, “ _sportswear_ ”, “ _spycraft_ ”, “ _stacks_ ”, “ _sting_ ”, “ _taste_ ”, “ _turns_ ”, “ _twitches_ ”, “ _understand_ ”, “ _understands_ ”, “ _wasted_ ”, “ _wee_ ” _}_
+
+## D LIST OF PROMPTS
+
+Table 5 lists the selected prompts for the second stage of the pipeline proposed in Section 2.3. After several rounds of manual testing and inspection of the resulting sentences, we found these prompts to work well for our use case.
+
+In the main paper, we describe the general idea for producing a benchmark that satisfies the properties of gender-invariance and free of gender co-occurring words. As explained in Section 2.3, we use word pairs (seed word, gender pronoun) to steer the generation of sentences. While, in general, ChatGPT abides by the specified instructions, we found that some of the generated sentences did not have the specified seed word but rather a different inflection or class (e.g., “ _addict_ ” vs “ _addicted_ ” vs “ _addiction_ ”). In practice, different forms of the seed word may instill more or less pronounced word-gender correlations, which would affect the reliability of the results. To address such cases, we complement the pipeline with a “regeneration step”, whose prompts are listed in Table 6. The regeneration step is performed whenever the seed word or the gendered word are not included in the generated sentence. To increase diversity, we allow for some randomness during the regeneration stage by setting temperature: 0.7. In fact, for a sentence requiring revision edits, we iterate the listed prompts in a round robin fashion until we obtain a revised sentence version that contains the exact same word form and the specified pronoun. We iterate each prompt at most 10 times and if no valid revision is produced during this process, we discard the sentence.
+
+19
+
+Table 6: **List of prompts used to regenerate/revise invalid sentences in the benchmark generation pipeline** . Prompts are used with OpenAI’s Chat Completion API with configurations model: gpt-3.5-turbo, temperature: 0.7. The _{_ FORMATTING _}_ indicates the placeholders within each prompt.
+
+Your task is to revise the following sentence: ’ _{_ SENTENCE _}_ ’ _\_ n _\_ n You should make minimal changes while keeping the exact same meaning and intention of the sentence. However, the revision process should include the word ’ _{_ ATTRIBUTE _}_ ’, one of the pronouns ’ _\_ group’, and should preserve meaning. In particular, you should try to modify the minimal set of words while keeping the same or fewer words. Write only the revised sentence.
+
+’ _{_ SENTENCE _}_ ’ _\_ n _\_ n Edit the sentence above to include the word ’ _{_ ATTRIBUTE _}_ ’. Make the minimal number of edits possible while keeping the pronouns _{_ GROUP _}_ and maintaining the fluency, semantics, and intention of the sentence. Output nothing but the revised sentence with the exact form of the word ’ _{_ ATTRIBUTE _}_ ’.
+
+’ _{_ SENTENCE _}_ ’ _\_ n _\_ n Edit the sentence above to include the word ’ _{_ ATTRIBUTE _}_ ’. Make the minimal number of edits possible while keeping the pronouns _{_ GROUP _}_ and maintaining the sentence’s fluency, semantics, and intention. If the sentence does not contain a pronoun, make sure to create a version that includes both the pronouns _{_ GROUP _}_ and the word ’ _{_ ATTRIBUTE _}_ ’. Output nothing but the revised sentence with the exact form of the word ’ _{_ ATTRIBUTE _}_ ’ and at least one pronoun _{_ GROUP _}_ .
+
+’ _{_ SENTENCE _}_ ’ _\_ n _\_ n The sentence above must be changed to include the word ’ _{_ ATTRIBUTE _}_ ’ and one of the pronouns ’ _{_ GROUP _}_ ’. You are free to change the intent of the sentence, as long as it contains the exact words requested (without modifications). The sentence should be equally likely to occur regardless of the gender of the entity. Output nothing but the generated sentence with the exact form of the word ’ _{_ ATTRIBUTE _}_ ’ and at least one pronoun ’ _{_ GROUP _}_ ’.
+
+## E RELEVANCE OF SEMANTIC FILTERING OPERATION
+
+This paper proposes to define non-stereotypical benchmarks in terms of two properties: genderinvariance and free of gender co-occurring words. In a gendered language, we expect that genderrelated language is captured by the gender co-occurrence property in the pretraining data. In other words, the application of stricter gender co-occurring words should remove sentences that are not gender invariant. In this section, we investigate how useful the gender-invariant property is in practice. By analysing examples that satisfy MaxPMI( **s** ) constraints but that were filtered via the semantic filtering operation.
+
+**1. Removal of sentences highly connotated with gender.** Despite being rare, we find that in some circumstances the semantic filter is responsible for removing sentences that are highly connotated with gender and that are not removed by _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 5. In general, these are due to the use of names or word forms that are connotated with gender. Some examples are:
+
+- Brad is known for _{_ PRONOUN _}_ creativity.
+
+- Dun, _{_ PRONOUN _}_ enjoys exploring new cuisines.
+
+- Dun, _{_ PRONOUN _}_ is always punctual.
+
+- _{_ PRONOUN _}_ is a talented dea.
+
+- John is passionate about helping others, so _{_ PRONOUN _}_ often volunteers at charities to make a positive impact in _{_ PRONOUN1 _}_ community.
+
+**2. Remove sentences containing offensive/bullying-like language or that are controversial.** Amongst the sentences removed by the semantic filtering, we find a larger portion of filtered sentences to concern the use of controversial or harmful language.
+
+20
+
+- _{_ PRONOUN _}_ admired the fatties’ resilience.
+
+- Despite _{_ PRONOUN1 _}_ retardation, _{_ PRONOUN _}_ excelled academically.
+
+- _{_ PRONOUN _}_ accused others of lying, hypocritical.
+
+- After work, _{_ PRONOUN _}_ enjoys expressing _{_ PRONOUN1 _}_ creativity through transvestite fashion.
+
+- Despite their differences, _{_ PRONOUN _}_ connected with the other crazies instantly.
+
+- With confidence, _{_ PRONOUN _}_ entered the nudie bar, ready to perform.
+
+**3. Remove ungrammatical sentences.** In most cases, the semantic filtering removes incorrect sentences, including sentences with poor grammar, typographical errors, semantically inconsistent, wrong use of pronouns, etc. Moreover, it also removes sentences containing rare words, which could be deemed out-of-domain and therefore, it could lead to unreliable results.
+
+- _{_ PRONOUN _}_ romanced _{_ PRONOUN2 _}_ with poetry.
+
+- _{_ PRONOUN _}_ is an expert at blacking leather.
+
+- _{_ PRONOUN _}_ is laving _{_ PRONOUN1 _}_ hands.
+
+- _{_ PRONOUN _}_ dun, always curious and adventurous.
+
+- _{_ PRONOUN _}_ laughed grotesquely, sending chills.
+
+- _{_ PRONOUN _}_ , an inanimate object, moved suddenly.
+
+- Whatcha know about _{_ PRONOUN1 _}_ plans?
+
+- May good luck forfend _{_ PRONOUN2 _}_ .
+
+- The library is where _{_ PRONOUN _}_ studies wizards.
+
+- _{_ PRONOUN _}_ was highly sought after as a tutored in language learning.
+
+- _{_ PRONOUN _}_ carried the kangaroo’s pouches.
+
+- Pathogenic bacteria thrive wherever _{_ PRONOUN _}_ goes.
+
+- The rainbow, an omen, revealed _{_ PRONOUN2 _}_ self.
+
+- Struggling, _{_ PRONOUN _}_ foundering but determined.
+
+- Leopards, known for their agility and strength, are often solitary animals, but _{_ PRONOUN _}_ can also exhibit social behavior.
+
+- As _{_ PRONOUN _}_ walked, _{_ PRONOUN1 _}_ footsteps were barely audible, _{_ PRONOUN1 _}_ elephantine presence blending seamlessly with the surrounding environment.
+
+In summary, we find the filtering to be justified, as it removes incorrect language use and it provides an additional guarantee over the MaxPMI( **s** ) constraints. Specifically, since MaxPMI( **s** ) constraints concern the PMI w.r.t. to single gendered pronoun form, it could be the case that these constraints (in their current form) fail to capture other gender correlations, as we have seen in the examples with names.
+
+21
+
+Table 7: **Test sentences and word statistics for the unconstrained benchmarks** . The prefixes # and pos. stand for _number of_ and position, respectively. We report both median and max values, using the syntax median/max.
+
+|Property|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|# sentences|4405|4740|4839|1586|240|
+|# seed words|491|491|491|40|83|
+|# female words|15|22|36|2|0|
+|# male words|20|23|36|10|0|
+|# pronouns|1 / 6|2 / 7|2 / 7|1 / 2|1 / 2|
+|pos. frst pronoun|0 / 12|0 / 18|1 / 28|9 / 18|8 / 19|
+|pos. last pronoun|0 / 24|4 / 36|9 / 37|9 / 18|8 / 19|
+|sentence length|6 / 30|12 / 48|20 / 48|13/21|14/25|
+|_δ_(_w_)seed words|-0.02 / 0.26|-0.02 / 0.26|-0.02 / 0.26|-0.23 / 1.44|-0.08 / 1.85|
+
+## F PROPERTIES OF THE USE BENCHMARK
+
+Table 7 summarizes the properties of the fairness benchmarks used in the evaluation of LMs, including the proposed benchmarks (dubbed USE-5, USE-10, and USE-20) and the previously proposed WB and WG benchmarks. The summary statistics are computed before filtering for gender co-occurrence constraints. When considering standard statistics like the number of sentences and seed words, we observe that the median sentence length closely matching the sentence length restrictions specified in the generation prompts for datasets USE-5, USE-10, and USE-20. Additionally, the proposed datasets are more diverse in terms of the number and position of the pronouns in the sentence[11] . Finally, the proposed benchmarks exhibit more gendered words than WB and WG but these words disappear after enforcing MaxPMI( **s** ) constraints.
+
+## G ADDITIONAL FAIRNESS RESULTS
+
+## G.1 UNSTEREO SCORE
+
+Table 8 shows the fairness metric results for all datasets in the unconstrained setting, i.e., when there is no control for pronounced word-gender correlations. Tables 9, 10, and 11 represent the fairness measures as we enforce stricter _|_ MaxPMI( **s** ) _| ≤ η_ constraints, corresponding to _η_ = _{_ 0 _._ 8 _,_ 0 _._ 65 _,_ 0 _._ 5 _}_ . In addition to the US score, we also include information about the standard deviation of the corresponding metric. Since the US metric is defined in terms of an indicator function, we can model US as a random variable that follows a Bernoulli distribution parameterized by _Y_ = US( _p_ model _, D_ eval). Under this assumption, we compute the standard deviation for a Bernoulli distribution as follows: �� 100 _Y[∗]_[(][1] _n[−]_ 100 _[Y]_[)] � _∗_ 100, where _n_ is the benchmark size (i.e., number of sentence pairs). Since we report the US score as percentages, we add scaling operations in function of 100 to convert percentages to probabilities and vice-versa.
+
+In addition to the fairness score and the corresponding standard deviation (in subscript), we also include information about the benchmark size after applying the corresponding gender co-occurrence constraint. As previously observed in Figure 2, the size of the stereotypical benchmarks WB and WG drops sharply in size as we enforce stricter gender co-occurrence constraints. Additionally, the abrupt size reduction of the benchmarks USE-10 and USE-20 also seems to suggest a correlation between the values of _η_ and the sentence length. This matches our expectations since the constituting sentences include more words and therefore are more likely to contain words with prominent gender correlations. To overcome the shortcoming of data scarcity, the proposed benchmark con-
+
+> 11The positioning is computed in terms of the number of words in the sentence when using whitespace tokenization and removing punctuation.
+
+22
+
+Table 8: **Unstereotypical fairness score across unconstrained benchmarks** _D≤∞_ . The subscript value denotes the standard deviation. (D) denotes deduplicated models.
+
+||USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Benchmark size|4404|4740|4839|1586|240|
+|Pythia 70M|21_._11_±_0_._61|18_._27_±_0_._58|18_._21_±_0_._58|9_._14_±_0_._43|8_._33_±_0_._42|
+|Pythia 160M|15_._96_±_0_._55|18_._59_±_0_._59|20_._15_±_0_._60|14_._75_±_0_._53|16_._67_±_0_._56|
+|Pythia 410M|28_._67_±_0_._68|15_._06_±_0_._54|27_._90_±_0_._68|25_._16_±_0_._65|32_._92_±_0_._71|
+|Pythia 1.4B|18_._37_±_0_._58|25_._80_±_0_._66|25_._75_±_0_._66|18_._03_±_0_._58|30_._83_±_0_._70|
+|Pythia 2.8B|18_._23_±_0_._58|21_._31_±_0_._62|20_._89_±_0_._61|18_._79_±_0_._59|30_._00_±_0_._69|
+|Pythia 6.9B|11_._99_±_0_._49|20_._59_±_0_._61|17_._59_±_0_._57|19_._10_±_0_._59|25_._42_±_0_._66|
+|Pythia 12B|31_._33_±_0_._70|28_._48_±_0_._68|24_._70_±_0_._65|17_._21_±_0_._57|28_._33_±_0_._68|
+|GPT-J-6B|39_._86_±_0_._74|32_._26_±_0_._70|30_._58_±_0_._69|19_._04_±_0_._59|32_._92_±_0_._71|
+|Pythia 70M (D)|27_._33_±_0_._67|24_._89_±_0_._65|22_._69_±_0_._63|14_._63_±_0_._53|11_._67_±_0_._48|
+|Pythia 160M (D)|14_._91_±_0_._54|15_._97_±_0_._55|17_._81_±_0_._58|13_._75_±_0_._52|14_._17_±_0_._53|
+|Pythia 410M (D)|11_._87_±_0_._49|15_._59_±_0_._55|22_._67_±_0_._63|22_._51_±_0_._63|27_._92_±_0_._68|
+|Pythia 1.4B (D)|12_._89_±_0_._50|20_._53_±_0_._61|20_._67_±_0_._61|14_._50_±_0_._53|22_._50_±_0_._63|
+|Pythia 2.8B (D)|22_._66_±_0_._63|23_._38_±_0_._64|22_._38_±_0_._63|18_._22_±_0_._58|27_._08_±_0_._67|
+|Pythia 6.9B (D)|18_._62_±_0_._59|21_._08_±_0_._61|25_._71_±_0_._66|16_._08_±_0_._55|28_._75_±_0_._68|
+|Pythia 12B (D)|19_._91_±_0_._60|20_._13_±_0_._60|23_._62_±_0_._64|14_._56_±_0_._53|28_._33_±_0_._68|
+|OPT 125M|16_._05_±_0_._55|21_._10_±_0_._61|22_._30_±_0_._63|26_._99_±_0_._67|32_._08_±_0_._70|
+|OPT 350M|31_._46_±_0_._70|31_._56_±_0_._70|28_._89_±_0_._68|17_._78_±_0_._58|22_._50_±_0_._63|
+|OPT 2.7B|29_._33_±_0_._69|32_._43_±_0_._71|32_._09_±_0_._70|16_._27_±_0_._56|32_._08_±_0_._70|
+|OPT 6.7B|29_._15_±_0_._68|34_._16_±_0_._71|31_._97_±_0_._70|15_._32_±_0_._54|27_._08_±_0_._67|
+|Llama-2 7B|23_._00_±_0_._63|16_._92_±_0_._56|28_._52_±_0_._68|13_._37_±_0_._51|25_._00_±_0_._65|
+|Llama-2 13B|19_._32_±_0_._59|18_._10_±_0_._58|24_._98_±_0_._65|14_._56_±_0_._53|30_._00_±_0_._69|
+|Llama-2 70B|36_._94_±_0_._73|34_._05_±_0_._71|31_._64_±_0_._70|12_._99_±_0_._51|26_._25_±_0_._66|
+|MPT 7B|22_._43_±_0_._63|23_._16_±_0_._64|24_._36_±_0_._65|14_._82_±_0_._54|33_._33_±_0_._71|
+|MPT 30B|9_._04_±_0_._43|13_._46_±_0_._51|15_._62_±_0_._55|14_._75_±_0_._53|26_._67_±_0_._67|
+|OLMo-1B|19_._91_±_0_._60|23_._38_±_0_._64|20_._67_±_0_._61|15_._51_±_0_._55|27_._08_±_0_._67|
+|OLMo-7B|16_._84_±_0_._56|17_._89_±_0_._58|20_._54_±_0_._61|13_._24_±_0_._51|24_._58_±_0_._65|
+|Mistral-7B-v0.1|29_._51_±_0_._69|32_._59_±_0_._71|31_._93_±_0_._70|18_._16_±_0_._58|30_._42_±_0_._69|
+|Mixtral-8x7B-v0.1|21_._25_±_0_._62|27_._22_±_0_._67|26_._66_±_0_._67|17_._53_±_0_._57|26_._25_±_0_._66|
+
+struction pipeline can be used to generate more non-stereotypical sentences spanning diverse topics and/or domains (e.g., scientific fiction synopsis, news articles headlines, songs).
+
+23
+
+Table 9: **Unstereotypical fairness score across constrained benchmarks** _D≤_ 0 _._ 8. The subscript value denotes the standard deviation. (D) denotes deduplicated models.
+
+||USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Benchmark size|3978|3916|3561|675|159|
+|Pythia 70M|21_._04_±_0_._61|18_._46_±_0_._58|18_._45_±_0_._58|6_._22_±_0_._36|6_._67_±_0_._38|
+|Pythia 160M|15_._84_±_0_._55|18_._26_±_0_._58|19_._97_±_0_._60|13_._04_±_0_._51|16_._67_±_0_._56|
+|Pythia 410M|28_._98_±_0_._68|15_._65_±_0_._55|28_._53_±_0_._68|31_._26_±_0_._70|36_._67_±_0_._73|
+|Pythia 1.4B|18_._50_±_0_._59|26_._35_±_0_._66|26_._73_±_0_._67|21_._48_±_0_._62|36_._67_±_0_._73|
+|Pythia 2.8B|18_._38_±_0_._58|22_._19_±_0_._63|21_._03_±_0_._61|22_._81_±_0_._63|34_._00_±_0_._71|
+|Pythia 6.9B|11_._92_±_0_._49|20_._91_±_0_._61|17_._92_±_0_._58|22_._07_±_0_._62|26_._00_±_0_._66|
+|Pythia 12B|32_._05_±_0_._70|29_._32_±_0_._69|25_._16_±_0_._65|20_._00_±_0_._60|30_._67_±_0_._69|
+|GPT-J-6B|40_._67_±_0_._74|33_._17_±_0_._71|31_._59_±_0_._70|20_._74_±_0_._61|38_._00_±_0_._73|
+|Pythia 70M (D)|27_._73_±_0_._67|25_._33_±_0_._66|23_._31_±_0_._64|14_._81_±_0_._54|7_._33_±_0_._39|
+|Pythia 160M (D)|14_._71_±_0_._53|16_._11_±_0_._55|18_._45_±_0_._58|10_._67_±_0_._47|15_._33_±_0_._54|
+|Pythia 410M (D)|11_._74_±_0_._48|16_._01_±_0_._55|22_._89_±_0_._63|26_._96_±_0_._67|30_._00_±_0_._69|
+|Pythia 1.4B (D)|13_._02_±_0_._51|21_._22_±_0_._62|20_._92_±_0_._61|15_._85_±_0_._55|24_._00_±_0_._64|
+|Pythia 2.8B (D)|23_._05_±_0_._63|24_._08_±_0_._64|22_._33_±_0_._63|20_._89_±_0_._61|33_._33_±_0_._71|
+|Pythia 6.9B (D)|18_._70_±_0_._59|21_._58_±_0_._62|25_._86_±_0_._66|19_._70_±_0_._60|33_._33_±_0_._71|
+|Pythia 12B (D)|20_._46_±_0_._61|20_._63_±_0_._61|23_._56_±_0_._64|18_._52_±_0_._59|30_._00_±_0_._69|
+|OPT 125M|15_._94_±_0_._55|21_._58_±_0_._62|23_._34_±_0_._64|28_._30_±_0_._68|39_._33_±_0_._74|
+|OPT 350M|31_._98_±_0_._70|32_._61_±_0_._71|29_._65_±_0_._69|20_._89_±_0_._61|29_._33_±_0_._69|
+|OPT 2.7B|29_._36_±_0_._69|33_._38_±_0_._71|32_._91_±_0_._71|21_._04_±_0_._61|38_._00_±_0_._73|
+|OPT 6.7B|29_._39_±_0_._69|35_._32_±_0_._72|32_._97_±_0_._71|18_._52_±_0_._59|28_._00_±_0_._68|
+|Llama-2 7B|23_._10_±_0_._64|16_._68_±_0_._56|29_._35_±_0_._69|14_._37_±_0_._53|28_._67_±_0_._68|
+|Llama-2 13B|19_._26_±_0_._59|18_._11_±_0_._58|25_._41_±_0_._66|16_._89_±_0_._56|32_._67_±_0_._71|
+|Llama-2 70B|37_._71_±_0_._73|35_._04_±_0_._72|32_._46_±_0_._71|15_._85_±_0_._55|29_._33_±_0_._69|
+|MPT 7B|22_._52_±_0_._63|23_._54_±_0_._64|24_._85_±_0_._65|17_._04_±_0_._57|33_._33_±_0_._71|
+|MPT 30B|9_._02_±_0_._43|13_._64_±_0_._52|15_._67_±_0_._55|15_._56_±_0_._55|27_._33_±_0_._67|
+|OLMo-1B|20_._09_±_0_._60|23_._88_±_0_._64|21_._20_±_0_._62|17_._93_±_0_._58|30_._00_±_0_._69|
+|OLMo-7B|17_._32_±_0_._57|17_._95_±_0_._58|20_._75_±_0_._61|16_._15_±_0_._55|27_._33_±_0_._67|
+|Mistral-7B-v0.1|29_._69_±_0_._69|33_._78_±_0_._71|33_._53_±_0_._71|20_._15_±_0_._60|34_._67_±_0_._72|
+|Mixtral-8x7B-v0.1|21_._14_±_0_._62|27_._53_±_0_._67|26_._73_±_0_._67|20_._74_±_0_._61|27_._33_±_0_._67|
+
+24
+
+Table 10: **Unstereotypical fairness score across constrained benchmarks** _D≤_ 0 _._ 65. The subscript value denotes the standard deviation. (D) denotes deduplicated models.
+
+||USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Benchmark size|3698|3401|2828|409|107|
+|Pythia 70M|21_._23_±_0_._62|18_._05_±_0_._58|18_._99_±_0_._59|4_._65_±_0_._32|2_._80_±_0_._25|
+|Pythia 160M|15_._87_±_0_._55|18_._20_±_0_._58|19_._98_±_0_._60|9_._78_±_0_._45|16_._82_±_0_._56|
+|Pythia 410M|28_._80_±_0_._68|15_._64_±_0_._55|28_._50_±_0_._68|31_._30_±_0_._70|36_._45_±_0_._73|
+|Pythia 1.4B|18_._39_±_0_._58|26_._29_±_0_._66|27_._16_±_0_._67|18_._83_±_0_._59|40_._19_±_0_._74|
+|Pythia 2.8B|18_._58_±_0_._59|22_._85_±_0_._63|20_._69_±_0_._61|21_._03_±_0_._61|39_._25_±_0_._74|
+|Pythia 6.9B|12_._01_±_0_._49|21_._58_±_0_._62|18_._46_±_0_._58|22_._98_±_0_._63|28_._97_±_0_._68|
+|Pythia 12B|32_._04_±_0_._70|29_._40_±_0_._69|25_._32_±_0_._66|20_._29_±_0_._61|33_._64_±_0_._71|
+|GPT-J-6B|40_._78_±_0_._74|33_._34_±_0_._71|31_._72_±_0_._70|20_._54_±_0_._61|40_._19_±_0_._74|
+|Pythia 70M (D)|27_._96_±_0_._68|25_._26_±_0_._65|23_._48_±_0_._64|12_._47_±_0_._50|5_._61_±_0_._35|
+|Pythia 160M (D)|14_._49_±_0_._53|15_._58_±_0_._55|17_._96_±_0_._58|8_._31_±_0_._42|13_._08_±_0_._51|
+|Pythia 410M (D)|11_._65_±_0_._48|16_._02_±_0_._55|22_._74_±_0_._63|29_._34_±_0_._69|34_._58_±_0_._72|
+|Pythia 1.4B (D)|12_._87_±_0_._50|21_._52_±_0_._62|20_._40_±_0_._61|15_._16_±_0_._54|21_._50_±_0_._62|
+|Pythia 2.8B (D)|23_._20_±_0_._64|24_._70_±_0_._65|21_._75_±_0_._62|19_._56_±_0_._60|37_._38_±_0_._73|
+|Pythia 6.9B (D)|18_._52_±_0_._59|21_._88_±_0_._62|26_._34_±_0_._66|19_._07_±_0_._59|38_._32_±_0_._73|
+|Pythia 12B (D)|20_._39_±_0_._61|20_._73_±_0_._61|23_._23_±_0_._64|18_._83_±_0_._59|35_._51_±_0_._72|
+|OPT 125M|15_._82_±_0_._55|21_._88_±_0_._62|23_._16_±_0_._64|25_._67_±_0_._66|43_._93_±_0_._75|
+|OPT 350M|32_._21_±_0_._70|33_._43_±_0_._71|28_._96_±_0_._68|21_._27_±_0_._62|28_._97_±_0_._68|
+|OPT 2.7B|29_._45_±_0_._69|33_._61_±_0_._71|33_._42_±_0_._71|22_._49_±_0_._63|40_._19_±_0_._74|
+|OPT 6.7B|29_._10_±_0_._68|35_._99_±_0_._72|33_._70_±_0_._71|19_._32_±_0_._59|32_._71_±_0_._71|
+|Llama-2 7B|23_._04_±_0_._63|16_._91_±_0_._56|29_._74_±_0_._69|14_._67_±_0_._53|32_._71_±_0_._71|
+|Llama-2 13B|19_._44_±_0_._60|17_._61_±_0_._57|25_._81_±_0_._66|16_._87_±_0_._56|37_._38_±_0_._73|
+|Llama-2 70B|38_._26_±_0_._73|35_._78_±_0_._72|33_._10_±_0_._71|14_._43_±_0_._53|34_._58_±_0_._72|
+|MPT 7B|22_._69_±_0_._63|24_._49_±_0_._65|25_._25_±_0_._65|17_._60_±_0_._57|35_._51_±_0_._72|
+|MPT 30B|9_._03_±_0_._43|13_._55_±_0_._52|15_._38_±_0_._54|14_._18_±_0_._53|26_._17_±_0_._66|
+|OLMo-1B|19_._98_±_0_._60|23_._96_±_0_._64|20_._51_±_0_._61|15_._16_±_0_._54|34_._58_±_0_._72|
+|OLMo-7B|17_._36_±_0_._57|18_._26_±_0_._58|20_._12_±_0_._60|15_._89_±_0_._55|30_._84_±_0_._70|
+|Mistral-7B-v0.1|29_._72_±_0_._69|34_._05_±_0_._71|34_._41_±_0_._72|21_._52_±_0_._62|36_._45_±_0_._73|
+|Mixtral-8x7B-v0.1|21_._07_±_0_._61|27_._43_±_0_._67|26_._84_±_0_._67|20_._54_±_0_._61|30_._84_±_0_._70|
+
+25
+
+Table 11: **Unstereotypical fairness score across constrained benchmarks** _D≤_ 0 _._ 5. The subscript value denotes the standard deviation. (D) denotes deduplicated models.
+
+||USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Benchmark size|3069|2397|1456|186|69|
+|Pythia 70M|21_._54_±_0_._62|18_._61_±_0_._59|18_._06_±_0_._58|6_._45_±_0_._37|1_._45_±_0_._18|
+|Pythia 160M|15_._87_±_0_._55|18_._86_±_0_._59|20_._40_±_0_._61|13_._44_±_0_._51|13_._04_±_0_._51|
+|Pythia 410M|29_._42_±_0_._69|15_._85_±_0_._55|28_._78_±_0_._68|34_._41_±_0_._72|39_._13_±_0_._74|
+|Pythia 1.4B|18_._08_±_0_._58|26_._62_±_0_._67|27_._47_±_0_._67|17_._74_±_0_._58|42_._03_±_0_._74|
+|Pythia 2.8B|18_._61_±_0_._59|22_._90_±_0_._63|21_._09_±_0_._61|23_._12_±_0_._64|39_._13_±_0_._74|
+|Pythia 6.9B|11_._76_±_0_._49|22_._74_±_0_._63|17_._45_±_0_._57|19_._35_±_0_._60|36_._23_±_0_._72|
+|Pythia 12B|32_._36_±_0_._70|30_._41_±_0_._69|24_._73_±_0_._65|22_._04_±_0_._62|36_._23_±_0_._72|
+|GPT-J-6B|41_._19_±_0_._74|33_._71_±_0_._71|30_._70_±_0_._69|23_._12_±_0_._64|36_._23_±_0_._72|
+|Pythia 70M (D)|27_._96_±_0_._68|24_._99_±_0_._65|23_._42_±_0_._64|20_._97_±_0_._61|5_._80_±_0_._35|
+|Pythia 160M (D)|14_._14_±_0_._53|15_._14_±_0_._54|18_._27_±_0_._58|8_._06_±_0_._41|11_._59_±_0_._48|
+|Pythia 410M (D)|11_._14_±_0_._47|15_._73_±_0_._55|22_._66_±_0_._63|27_._96_±_0_._68|27_._54_±_0_._67|
+|Pythia 1.4B (D)|12_._61_±_0_._50|20_._36_±_0_._61|19_._30_±_0_._59|16_._13_±_0_._55|21_._74_±_0_._62|
+|Pythia 2.8B (D)|23_._62_±_0_._64|24_._45_±_0_._65|21_._91_±_0_._62|19_._35_±_0_._60|37_._68_±_0_._73|
+|Pythia 6.9B (D)|18_._08_±_0_._58|21_._86_±_0_._62|24_._93_±_0_._65|23_._66_±_0_._64|36_._23_±_0_._72|
+|Pythia 12B (D)|20_._14_±_0_._60|20_._23_±_0_._61|22_._12_±_0_._63|20_._97_±_0_._61|31_._88_±_0_._70|
+|OPT 125M|15_._97_±_0_._55|21_._94_±_0_._62|23_._76_±_0_._64|26_._34_±_0_._66|40_._58_±_0_._74|
+|OPT 350M|31_._90_±_0_._70|33_._75_±_0_._71|28_._23_±_0_._68|25_._81_±_0_._66|21_._74_±_0_._62|
+|OPT 2.7B|29_._20_±_0_._69|34_._21_±_0_._71|34_._82_±_0_._72|26_._88_±_0_._67|37_._68_±_0_._73|
+|OPT 6.7B|28_._74_±_0_._68|36_._42_±_0_._73|33_._79_±_0_._71|20_._43_±_0_._61|33_._33_±_0_._71|
+|Llama-2 7B|23_._82_±_0_._64|16_._94_±_0_._57|28_._64_±_0_._68|15_._59_±_0_._55|33_._33_±_0_._71|
+|Llama-2 13B|19_._35_±_0_._60|17_._77_±_0_._58|25_._34_±_0_._66|18_._28_±_0_._58|36_._23_±_0_._72|
+|Llama-2 70B|39_._17_±_0_._74|36_._55_±_0_._73|33_._31_±_0_._71|15_._05_±_0_._54|37_._68_±_0_._73|
+|MPT 7B|22_._45_±_0_._63|25_._07_±_0_._65|25_._34_±_0_._66|14_._52_±_0_._53|28_._99_±_0_._68|
+|MPT 30B|8_._57_±_0_._42|13_._85_±_0_._52|14_._56_±_0_._53|19_._35_±_0_._60|31_._88_±_0_._70|
+|OLMo-1B|19_._35_±_0_._60|23_._78_±_0_._64|20_._54_±_0_._61|16_._13_±_0_._55|33_._33_±_0_._71|
+|OLMo-7B|17_._50_±_0_._57|18_._48_±_0_._58|18_._48_±_0_._58|17_._74_±_0_._58|30_._43_±_0_._69|
+|Mistral-7B-v0.1|30_._24_±_0_._69|34_._21_±_0_._71|35_._23_±_0_._72|26_._88_±_0_._67|37_._68_±_0_._73|
+|Mixtral-8x7B-v0.1|21_._15_±_0_._62|27_._12_±_0_._67|25_._41_±_0_._66|22_._58_±_0_._63|31_._88_±_0_._70|
+
+26
+
+Table 12: **Unstereotypical fairness score across LMs and 3 binary gender pronoun benchmarks for deduplicated models** . Reported results include the US score in percentage for the original benchmarks (denoted “Orig.”), as well as the fairness gap between “Orig.” and two constrained versions (denoted ∆ _η_ ). (D) denotes deduplicated models.
+
+||USE-5 Orig. ∆0_._8 ∆0_._65|WB Orig. ∆0_._8 ∆0_._65|WG Orig. ∆0_._8 ∆0_._65|
+|---|---|---|---|
+|Num Test Pairs|4404 3978 3701|1586 675 409|240 150 107|
+|Pythia 70M (D) Pythia 160M (D) Pythia 410M (D) Pythia 1.4B (D) Pythia 2.8B (D) Pythia 6.9B (D) Pythia 12B (D)|27.33 0.39 0.63 14.91 -0.21 -0.42 11.87 -0.13 -0.22 12.89 0.13 -0.02 22.66 0.40 0.55 18.62 0.09 -0.09 19.91 0.55 0.48|14.63 0.19 -2.16 13.75 -3.08 -5.43 22.51 4.45 6.83 14.50 1.35 0.66 18.22 2.67 1.34 16.08 3.63 2.99 14.56 3.95 4.26|11.67 -4.33 -6.06 14.17 1.17 -1.08 27.92 2.08 6.66 22.50 1.50 -1.00 27.08 6.25 10.30 28.75 4.58 9.57 28.33 1.67 7.18|
+
+Table 13: **Unstereotypical fairness score across 2 binary gender pronoun benchmarks** . Reported results include the US score in percentage for the original benchmarks (denoted “Orig.”), as well as the fairness gap between “Orig.” and two constrained versions (denoted ∆ _η_ ). (D) denotes deduplicated models.
+
+||USE-10 Orig. ∆0_._8 ∆0_._65|USE-20 Orig. ∆0_._8 ∆0_._65|
+|---|---|---|
+|Num Test Pairs|4404 3978 3701|1586 675 409|
+|Pythia 70M Pythia 160M Pythia 410M Pythia 1.4B Pythia 2.8B Pythia 6.9B Pythia 12B GPT-J-6B OPT 125M OPT 350M OPT 2.7B OPT 6.7B Llama-2 7B Llama-2 13B Llama-2 70B MPT 7B MPT 30B OLMo-1B OLMo-7B Mistral-7B-v0.1 Mixtral-8x7B-v0.1|18.27 0.19 -0.22 18.59 -0.33 -0.39 15.06 0.59 0.58 25.80 0.55 0.48 21.31 0.88 1.54 20.59 0.32 0.99 28.48 0.83 0.92 32.26 0.91 1.09 21.10 0.48 0.78 31.56 1.05 1.87 32.43 0.95 1.18 34.16 1.16 1.83 16.92 -0.24 -0.01 18.10 0.00 -0.49 34.05 0.99 1.73 23.16 0.38 1.33 13.46 0.18 0.09 23.38 0.50 0.59 17.89 0.06 0.37 32.59 1.19 1.45 27.22 0.31 0.22|18.21 0.24 0.78 20.15 -0.18 -0.17 27.90 0.63 0.60 25.75 0.98 1.41 20.89 0.14 -0.21 17.59 0.33 0.87 24.70 0.47 0.62 30.58 1.01 1.13 22.30 1.04 0.86 28.89 0.76 0.07 32.09 0.82 1.32 31.97 1.00 1.73 28.52 0.83 1.22 24.98 0.43 0.83 31.64 0.82 1.46 24.36 0.49 0.88 15.62 0.05 -0.24 20.67 0.54 -0.16 20.54 0.21 -0.42 31.93 1.60 2.48 26.66 0.08 0.18|
+
+## G.2 FAIRNESS GAP
+
+Table 12 shows the fairness gap for the deduplicated models for USE-5, WB, and WG datasets. s at three different gender co-occurring constraints: original ( _|_ MaxPMI( **s** ) _| ≤∞_ ), ∆0 _._ 80, and ∆0 _._ 65. For completeness, we also report the values for the remaining datasets, USE-10 and USE-20 in Tables 13 and 14.
+
+27
+
+Table 14: **Unstereotypical fairness score across 2 binary gender pronoun benchmarks for deduplicated Pythia models** . Reported results include the US score in percentage for the original benchmarks (denoted “Orig.”), as well as the fairness gap between “Orig.” and two constrained versions (denoted ∆ _η_ ).
+
+||USE-10 Orig. ∆0_._8 ∆0_._65|USE-20 Orig. ∆0_._8 ∆0_._65|
+|---|---|---|
+|Num Test Pairs|4404 3978 3701|1586 675 409|
+|Pythia 70M (D) Pythia 160M (D) Pythia 410M (D) Pythia 1.4B (D) Pythia 2.8B (D) Pythia 6.9B (D) Pythia 12B (D)|24.89 0.44 0.36 15.97 0.14 -0.39 15.59 0.42 0.43 20.53 0.69 1.00 23.38 0.71 1.32 21.08 0.50 0.80 20.13 0.51 0.60|22.69 0.62 0.79 17.81 0.64 0.15 22.67 0.22 0.07 20.67 0.26 -0.26 22.38 -0.06 -0.63 25.71 0.16 0.64 23.62 -0.06 -0.39|
+
+## G.3 PREFERENCE DISPARITIES
+
+Tables 15-18 summarize the results for the preference disparities across all datasets. The preference disparity is computed as the percentange of test sentence pairs for which a LM prefers the feminine version minus the percentage of examples where the same LM prefers the masculine counterpart. For a test sentence pair ( **s** _F ,_ **s** _M_ ), we compute the differences by computing the percentage of examples that satisfy log _p_ model( **s** _F_ ) _−_ log _p_ model( **s** _M_ ) _< −_ 0 _._ 5 (model prefer **s** _M_ ) and subtracting it to the percentage of examples that satisfy log _p_ model( **s** _F_ ) _−_ log _p_ model( **s** _M_ ) _>_ 0 _._ 5 (model prefer **s** _F_ ).
+
+28
+
+Table 15: **Preference disparity values across models and original benchmarks.** A negative value indicates that the percentage of male-skewing examples is larger than the percentage of examples skewing female. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|-37.39|-40.13|-37.28|-78.25|-86.67|
+|Pythia 160M|-63.43|-54.79|-42.28|-61.66|-68.33|
+|Pythia 410M|-36.00|-54.60|-12.96|-38.52|-40.42|
+|Pythia 1.4B|-60.11|-41.50|-29.41|-48.17|-37.50|
+|Pythia 2.8B|51.03|37.47|42.24|-42.75|-37.50|
+|Pythia 6.9B|60.91|28.10|42.20|-42.81|-33.75|
+|Pythia 12B|19.05|15.99|23.89|-51.64|-41.67|
+|GPT-J-6B|12.01|18.54|22.38|-44.89|-41.25|
+|Pythia 70M (D)|7.60|-1.05|-3.29|-66.83|-80.00|
+|Pythia 160M (D)|-68.69|-57.53|-58.59|-75.41|-80.00|
+|Pythia 410M (D)|-73.42|-51.08|-34.76|-46.60|-50.42|
+|Pythia 1.4B (D)|54.69|32.93|34.99|-63.81|-56.67|
+|Pythia 2.8B (D)|42.02|30.93|37.69|-47.35|-37.92|
+|Pythia 6.9B (D)|-8.60|22.09|14.16|-58.95|-46.25|
+|Pythia 12B (D)|46.40|38.65|36.45|-59.46|-48.33|
+|OPT 125M|-72.51|-54.68|-36.21|-47.41|-37.08|
+|OPT 350M|-37.75|-10.93|6.39|-50.44|-50.00|
+|OPT 2.7B|-51.42|-32.43|-15.75|-50.69|-42.08|
+|OPT 6.7B|-46.88|-21.96|-4.09|-56.18|-32.92|
+|Llama-2 7B|-20.75|-12.11|-3.29|-56.12|-40.83|
+|Llama-2 13B|-27.06|-12.49|-6.65|-55.80|-40.00|
+|Llama-2 70B|-24.97|-4.81|4.38|-55.74|-35.42|
+|MPT 7B|-3.52|13.97|21.49|-51.01|-46.67|
+|MPT 30B|54.51|34.18|32.47|-58.13|-42.50|
+|OLMo-1B|39.27|27.26|34.24|-58.39|-44.58|
+|OLMo-7B|44.93|36.67|40.57|-56.87|-52.08|
+|Mistral-7B-v0.1|-33.26|-11.96|6.78|-53.85|-35.42|
+|Mixtral-8x7B-v0.1|-48.74|-25.61|-4.15|-53.34|-42.92|
+
+29
+
+Table 16: **Preference disparity values across models and constrained benchmarks such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 8. A negative value indicates that the percentage of male-skewing examples is larger than the percentage of examples skewing female. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|-38.13|-40.47|-36.51|-90.52|-89.33|
+|Pythia 160M|-64.15|-56.36|-42.91|-78.67|-72.67|
+|Pythia 410M|-36.38|-54.57|-11.99|-45.33|-43.33|
+|Pythia 1.4B|-60.53|-41.88|-29.68|-56.89|-36.67|
+|Pythia 2.8B|52.01|37.51|44.93|-49.93|-42.00|
+|Pythia 6.9B|61.49|28.01|44.00|-48.30|-36.67|
+|Pythia 12B|19.48|15.83|25.70|-58.67|-45.33|
+|GPT-J-6B|11.76|18.41|24.43|-50.22|-46.00|
+|Pythia 70M (D)|7.52|-1.38|-1.71|-78.37|-84.67|
+|Pythia 160M (D)|-69.46|-58.66|-58.86|-86.67|-80.67|
+|Pythia 410M (D)|-74.18|-51.35|-35.21|-52.30|-55.33|
+|Pythia 1.4B (D)|55.51|33.43|36.56|-73.48|-58.67|
+|Pythia 2.8B (D)|42.86|30.77|40.78|-55.70|-40.00|
+|Pythia 6.9B (D)|-9.80|22.40|15.89|-67.26|-50.67|
+|Pythia 12B (D)|47.31|39.48|38.75|-67.85|-48.67|
+|OPT 125M|-74.01|-55.13|-35.78|-63.41|-39.33|
+|OPT 350M|-38.21|-11.62|6.77|-63.70|-57.33|
+|OPT 2.7B|-52.99|-34.55|-15.70|-59.70|-46.00|
+|OPT 6.7B|-48.49|-23.52|-4.24|-66.37|-44.00|
+|Llama-2 7B|-20.99|-13.15|-2.42|-66.96|-48.67|
+|Llama-2 13B|-26.85|-13.20|-5.78|-65.93|-48.67|
+|Llama-2 70B|-26.14|-5.92|5.70|-65.19|-40.00|
+|MPT 7B|-3.82|13.23|23.08|-59.26|-56.00|
+|MPT 30B|55.28|34.42|34.34|-68.74|-50.00|
+|OLMo-1B|39.89|28.01|35.89|-68.74|-50.00|
+|OLMo-7B|45.53|37.21|43.02|-66.96|-56.67|
+|Mistral-7B-v0.1|-34.77|-13.36|8.00|-63.56|-42.67|
+|Mixtral-8x7B-v0.1|-50.15|-26.66|-4.58|-62.37|-51.33|
+
+30
+
+Table 17: **Preference disparity values across models and constrained benchmarks such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 65. A negative value indicates that the percentage of male-skewing examples is larger than the percentage of examples skewing female. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|-37.78|-40.55|-36.03|-94.38|-91.59|
+|Pythia 160M|-64.12|-55.87|-44.09|-85.33|-75.70|
+|Pythia 410M|-36.75|-55.07|-12.16|-48.17|-44.86|
+|Pythia 1.4B|-61.06|-42.49|-30.91|-62.10|-29.91|
+|Pythia 2.8B|52.27|37.46|46.29|-55.99|-40.19|
+|Pythia 6.9B|61.87|27.37|45.54|-54.52|-42.99|
+|Pythia 12B|19.39|15.61|25.74|-59.66|-45.79|
+|GPT-J-6B|11.79|18.73|25.07|-54.52|-46.73|
+|Pythia 70M (D)|7.63|-1.88|-0.78|-85.57|-90.65|
+|Pythia 160M (D)|-70.15|-60.25|-59.90|-90.22|-81.31|
+|Pythia 410M (D)|-74.77|-51.63|-36.60|-55.50|-48.60|
+|Pythia 1.4B (D)|56.41|33.20|38.01|-76.53|-59.81|
+|Pythia 2.8B (D)|43.05|30.96|42.68|-60.39|-36.45|
+|Pythia 6.9B (D)|-9.87|22.91|17.86|-70.66|-52.34|
+|Pythia 12B (D)|47.54|39.34|39.14|-73.84|-49.53|
+|OPT 125M|-74.18|-55.25|-36.24|-66.01|-33.64|
+|OPT 350M|-38.86|-12.00|7.25|-67.97|-56.07|
+|OPT 2.7B|-53.14|-34.11|-16.65|-60.39|-46.73|
+|OPT 6.7B|-49.00|-23.08|-4.70|-67.97|-42.99|
+|Llama-2 7B|-21.85|-13.05|-1.80|-70.66|-46.73|
+|Llama-2 13B|-26.47|-13.11|-5.73|-68.95|-47.66|
+|Llama-2 70B|-26.58|-6.00|5.30|-69.44|-37.38|
+|MPT 7B|-3.43|13.29|24.47|-60.88|-55.14|
+|MPT 30B|55.60|33.93|34.97|-73.59|-51.40|
+|OLMo-1B|40.48|28.52|36.21|-72.62|-44.86|
+|OLMo-7B|45.86|37.22|43.53|-72.37|-56.07|
+|Mistral-7B-v0.1|-35.29|-12.26|7.25|-67.24|-41.12|
+|Mixtral-8x7B-v0.1|-50.81|-26.87|-5.06|-65.77|-50.47|
+
+31
+
+Table 18: **Preference disparity values across models and constrained benchmarks such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 5. A negative value indicates that the percentage of male-skewing examples is larger than the percentage of examples skewing female. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|-39.04|-40.93|-36.88|-93.55|-98.55|
+|Pythia 160M|-64.13|-55.36|-43.89|-83.33|-81.16|
+|Pythia 410M|-37.28|-55.28|-8.59|-40.86|-46.38|
+|Pythia 1.4B|-61.26|-41.18|-30.36|-59.68|-40.58|
+|Pythia 2.8B|54.35|39.55|51.03|-51.08|-46.38|
+|Pythia 6.9B|63.54|28.37|47.39|-51.61|-49.28|
+|Pythia 12B|21.18|18.11|30.36|-55.38|-46.38|
+|GPT-J-6B|13.20|21.74|29.88|-44.62|-55.07|
+|Pythia 70M (D)|8.96|1.00|3.23|-75.81|-94.20|
+|Pythia 160M (D)|-70.09|-61.74|-58.10|-90.86|-88.41|
+|Pythia 410M (D)|-76.74|-51.90|-37.64|-55.91|-49.28|
+|Pythia 1.4B (D)|58.59|35.42|42.51|-78.49|-63.77|
+|Pythia 2.8B (D)|44.97|33.50|47.46|-55.91|-44.93|
+|Pythia 6.9B (D)|-9.84|24.66|19.44|-63.44|-60.87|
+|Pythia 12B (D)|49.36|41.80|45.05|-71.51|-56.52|
+|OPT 125M|-75.17|-54.69|-35.71|-66.13|-44.93|
+|OPT 350M|-39.36|-10.76|7.62|-65.59|-63.77|
+|OPT 2.7B|-54.77|-34.50|-16.00|-54.84|-53.62|
+|OPT 6.7B|-50.54|-22.19|-3.30|-62.37|-46.38|
+|Llama-2 7B|-21.70|-12.47|-0.07|-65.05|-55.07|
+|Llama-2 13B|-26.88|-12.81|-3.64|-63.44|-46.38|
+|Llama-2 70B|-27.40|-5.55|7.35|-64.52|-42.03|
+|MPT 7B|-2.09|12.77|26.72|-59.68|-62.32|
+|MPT 30B|57.54|36.75|36.81|-72.04|-56.52|
+|OLMo-1B|42.78|31.25|38.80|-72.04|-52.17|
+|OLMo-7B|47.57|39.30|46.63|-71.51|-66.67|
+|Mistral-7B-v0.1|-35.61|-11.56|7.62|-60.22|-42.03|
+|Mixtral-8x7B-v0.1|-51.55|-26.41|-3.16|-63.44|-53.62|
+
+32
+
+## G.4 AREA UNDER THE FAIRNESS CURVE (AUFC)
+
+The main paper reports values for a single fairness threshold _ε_ = 0 _._ 217. Effectively, using _ε_ corresponds to allowing for a likelihood ratio between the sentences in the pair to exhibit up to 10 _[ε] ×_ probability mass. For _ε_ = 0 _._ 217, this value represents 1 _._ 65 _×_ more probability mass, whereas _ε_ = 2 corresponds to 100 _×_ more probability mass. Figure 6 shows how various _ε_ affect LMs differently across the three datasets. In particular, for _ε_ = 0 _._ 217, we can already observe that fairness values lower than 40%. Surprisingly, we find that (1) Pythia 6.9B is extremely biased in USE-5 and USE-20 achieving _≥_ 90% US values when relaxing the fairness definition to consider _ε_ = 3; (2) most models converge to maximal fairness after _ε_ = 4, which corresponds to 10[4] times more probability mass assigned to one gendered version of the sentence pair; and (3) filtering out duplicates in training data (dashed lines in Figure 6) mostly matches or improves upon the biases of models trained on the original (duplicated) data.
+
+**==> picture [386 x 94] intentionally omitted <==**
+
+**----- Start of picture text -----**
+USE-5 Winogender USE-20 100% 100% 100% 80% Model 80% Model 80% Model 12b 12b 12b 60% 6.9b 60% 6.9b 60% 6.9b 40% 70m 40% 70m 40% 70m Deduplicated Deduplicated Deduplicated 20% False 20% False 20% False True True True 0% 0% 0% 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 threshold threshold threshold metric metric metric fairness fairness fairness **----- End of picture text -----**
+
+Figure 6: **US Fairness curves as a function of the fairness threshold (** _ε_ **)** for three deduplicated and non-deduplicated Pythia models. The results are reported in the unconstrained version of the proposed benchmarks.
+
+Measuring the fairness thresholds at 101 evenly spaced _ε ∈_ [0 _,_ 6], we compute the area under the depicted curves using the trapezoid rule. We report these measurements for the unconstrained setting in Table 19, for the constrained setting _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 8 in Table 20, for the constrained setting _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 65 in Table 21, and the more restrictive setting _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 5 in Table 22.
+
+## H QUALITATIVE EXAMPLES
+
+In this section, we list different examples pretraining to the proposed datasets, as well as the associated constraint. We will use the following notation for replacing the pronouns:
+
+- _{_ PRONOUN _} →_ “ _he_ ”/“ _she_ ”
+
+- _{_ PRONOUN1 _} →_ “ _his_ ”/“ _her_ ”
+
+- _{_ PRONOUN2 _} →_ “ _him_ ”/“ _her_ ”
+
+## H.1 QUALITATIVE EXAMPLES FOR USE-5
+
+Examples of sentences whose feminine completion is preferred by the majority of the models:
+
+- _{_ PRONOUN _}_ can’t wait to return.
+
+- _{_ PRONOUN _}_ hung up the telephone.
+
+- _{_ PRONOUN _}_ marveled at the intricate gateway.
+
+- _{_ PRONOUN _}_ expertly retells ancient myths.
+
+- Reluctant as _{_ PRONOUN _}_ was, _{_ PRONOUN _}_ participated wholeheartedly.
+
+- _{_ PRONOUN _}_ sorted the playlist in alphabetical order _{_ PRONOUN2 _}_ self.
+
+33
+
+Table 19: **Area under the Fairness Curve (AuFC) across models and datasets.** . A neutral model should exhibit AuFC value close to 6, indicating that it assigns equal probability to sentence pairs regardless of gender. (D) denotes deduplicated models.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|5.35|5.26|5.23|5.12|5.20|
+|Pythia 160M|5.16|5.28|5.25|5.27|5.36|
+|Pythia 410M|5.47|4.82|5.45|5.46|5.53|
+|Pythia 1.4B|5.35|5.49|5.44|5.31|5.47|
+|Pythia 2.8B|5.24|5.22|5.24|5.30|5.51|
+|Pythia 6.9B|4.57|4.88|4.76|5.31|5.44|
+|Pythia 12B|5.53|5.47|5.40|5.22|5.44|
+|GPT-J-6B|5.63|5.56|5.51|5.30|5.50|
+|Pythia 70M (D)|5.49|5.44|5.39|5.23|5.28|
+|Pythia 160M (D)|5.22|5.19|5.20|5.33|5.44|
+|Pythia 410M (D)|5.16|5.23|5.33|5.43|5.50|
+|Pythia 1.4B (D)|4.86|5.21|5.07|5.20|5.37|
+|Pythia 2.8B (D)|5.33|5.30|5.28|5.28|5.48|
+|Pythia 6.9B (D)|4.95|5.14|5.36|5.31|5.46|
+|Pythia 12B (D)|5.37|5.35|5.33|5.24|5.45|
+|OPT 125M|5.32|5.37|5.39|5.53|5.52|
+|OPT 350M|5.57|5.54|5.50|5.37|5.46|
+|OPT 2.7B|5.56|5.56|5.54|5.24|5.48|
+|OPT 6.7B|5.57|5.57|5.54|5.19|5.44|
+|Llama-2 7B|5.32|4.91|5.37|5.20|5.46|
+|Llama-2 13B|5.24|5.04|5.34|5.18|5.47|
+|Llama-2 70B|5.61|5.57|5.52|5.15|5.43|
+|MPT 7B|5.19|5.15|5.20|5.20|5.45|
+|MPT 30B|3.71|3.90|4.10|5.18|5.42|
+|OLMo-1B|5.20|5.20|5.11|5.29|5.47|
+|OLMo-7B|5.22|5.15|5.25|5.11|5.39|
+|Mistral-7B-v0.1|5.51|5.54|5.53|5.26|5.47|
+|Mixtral-8x7B-v0.1|5.34|5.46|5.44|5.24|5.40|
+
+34
+
+Table 20: **Area under the Fairness Curve (AuFC) across models and constrained datasets, such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 8. A neutral model should exhibit AuFC value close to 6, indicating that it assigns equal probability to sentence pairs regardless of gender. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|4.53|4.34|4.30|3.86|4.13|
+|Pythia 160M|4.09|4.36|4.29|4.35|4.64|
+|Pythia 410M|4.80|3.44|4.77|4.96|5.01|
+|Pythia 1.4B|4.53|4.85|4.75|4.61|4.92|
+|Pythia 2.8B|4.30|4.32|4.29|4.68|5.05|
+|Pythia 6.9B|2.90|3.63|3.36|4.73|4.76|
+|Pythia 12B|4.95|4.84|4.67|4.52|4.81|
+|GPT-J-6B|5.18|5.03|4.92|4.61|4.99|
+|Pythia 70M (D)|4.84|4.75|4.63|4.35|4.42|
+|Pythia 160M (D)|4.27|4.23|4.24|4.45|4.76|
+|Pythia 410M (D)|4.07|4.26|4.49|4.87|4.98|
+|Pythia 1.4B (D)|3.39|4.24|3.89|4.38|4.71|
+|Pythia 2.8B (D)|4.51|4.50|4.41|4.64|4.99|
+|Pythia 6.9B (D)|3.68|4.13|4.59|4.60|4.89|
+|Pythia 12B (D)|4.59|4.55|4.50|4.43|4.84|
+|OPT 125M|4.43|4.59|4.64|4.97|5.08|
+|OPT 350M|5.04|4.98|4.88|4.69|4.88|
+|OPT 2.7B|5.01|5.02|4.99|4.57|4.92|
+|OPT 6.7B|5.02|5.06|5.00|4.45|4.83|
+|Llama-2 7B|4.52|3.78|4.64|4.39|4.92|
+|Llama-2 13B|4.27|4.01|4.54|4.37|4.89|
+|Llama-2 70B|5.13|5.06|4.95|4.32|4.82|
+|MPT 7B|4.23|4.19|4.28|4.40|4.84|
+|MPT 30B|1.74|2.37|2.73|4.27|4.80|
+|OLMo-1B|4.17|4.22|4.00|4.56|4.85|
+|OLMo-7B|4.24|4.10|4.32|4.25|4.77|
+|Mistral-7B-v0.1|4.90|4.97|4.96|4.59|4.94|
+|Mixtral-8x7B-v0.1|4.49|4.77|4.74|4.52|4.79|
+
+35
+
+Table 21: **Area under the Fairness Curve (AuFC) across models and constrained datasets, such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 65. A neutral model should exhibit AuFC value close to 6, indicating that it assigns equal probability to sentence pairs regardless of gender. (D) denotes deduplicated model.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|4.55|4.35|4.33|3.74|4.12|
+|Pythia 160M|4.09|4.36|4.28|4.30|4.73|
+|Pythia 410M|4.81|3.44|4.77|5.00|5.06|
+|Pythia 1.4B|4.53|4.85|4.76|4.57|5.04|
+|Pythia 2.8B|4.31|4.34|4.29|4.67|5.17|
+|Pythia 6.9B|2.88|3.63|3.34|4.78|4.89|
+|Pythia 12B|4.96|4.84|4.67|4.55|4.92|
+|GPT-J-6B|5.19|5.02|4.94|4.68|5.08|
+|Pythia 70M (D)|4.84|4.75|4.63|4.30|4.56|
+|Pythia 160M (D)|4.26|4.23|4.23|4.39|4.78|
+|Pythia 410M (D)|4.07|4.25|4.49|4.92|5.04|
+|Pythia 1.4B (D)|3.37|4.25|3.86|4.41|4.74|
+|Pythia 2.8B (D)|4.52|4.51|4.41|4.64|5.12|
+|Pythia 6.9B (D)|3.66|4.13|4.60|4.65|5.04|
+|Pythia 12B (D)|4.59|4.57|4.49|4.48|4.97|
+|OPT 125M|4.44|4.59|4.64|4.98|5.15|
+|OPT 350M|5.05|4.99|4.88|4.71|4.88|
+|OPT 2.7B|5.01|5.02|5.00|4.68|5.02|
+|OPT 6.7B|5.03|5.07|5.01|4.55|4.98|
+|Llama-2 7B|4.52|3.78|4.65|4.45|5.04|
+|Llama-2 13B|4.28|4.01|4.53|4.41|4.97|
+|Llama-2 70B|5.14|5.08|4.97|4.37|4.97|
+|MPT 7B|4.22|4.20|4.27|4.42|4.93|
+|MPT 30B|1.72|2.37|2.69|4.27|4.86|
+|OLMo-1B|4.17|4.22|3.96|4.54|4.97|
+|OLMo-7B|4.24|4.11|4.32|4.27|4.93|
+|Mistral-7B-v0.1|4.89|4.99|4.98|4.64|5.02|
+|Mixtral-8x7B-v0.1|4.48|4.77|4.74|4.64|4.89|
+
+36
+
+Table 22: **Area under the Fairness Curve (AuFC) across models and constrained datasets, such that** _|_ MaxPMI( **s** ) _| ≤_ 0 _._ 5. A neutral model should exhibit AuFC value close to 6, indicating that it assigns equal probability to sentence pairs regardless of gender. (D) denotes deduplicated models.
+
+|Model|USE-5|USE-10|USE-20|Winobias|Winogender|
+|---|---|---|---|---|---|
+|Pythia 70M|4.55|4.39|4.29|3.82|3.99|
+|Pythia 160M|4.10|4.41|4.27|4.48|4.59|
+|Pythia 410M|4.82|3.41|4.81|5.12|5.11|
+|Pythia 1.4B|4.54|4.88|4.78|4.67|5.05|
+|Pythia 2.8B|4.29|4.34|4.26|4.81|5.18|
+|Pythia 6.9B|2.85|3.66|3.28|4.84|4.96|
+|Pythia 12B|4.97|4.86|4.65|4.74|4.95|
+|GPT-J-6B|5.21|5.03|4.95|4.81|5.05|
+|Pythia 70M (D)|4.86|4.75|4.62|4.63|4.55|
+|Pythia 160M (D)|4.27|4.24|4.22|4.44|4.78|
+|Pythia 410M (D)|4.06|4.24|4.46|4.96|5.01|
+|Pythia 1.4B (D)|3.33|4.19|3.78|4.50|4.82|
+|Pythia 2.8B (D)|4.51|4.52|4.40|4.76|5.12|
+|Pythia 6.9B (D)|3.62|4.14|4.58|4.72|5.00|
+|Pythia 12B (D)|4.59|4.56|4.43|4.63|5.03|
+|OPT 125M|4.45|4.62|4.65|5.12|5.10|
+|OPT 350M|5.06|5.02|4.89|4.79|4.81|
+|OPT 2.7B|5.02|5.04|5.04|4.80|4.96|
+|OPT 6.7B|5.04|5.08|5.04|4.65|4.94|
+|Llama-2 7B|4.53|3.81|4.61|4.51|5.10|
+|Llama-2 13B|4.29|4.02|4.51|4.51|4.91|
+|Llama-2 70B|5.17|5.11|4.99|4.44|5.04|
+|MPT 7B|4.19|4.18|4.26|4.50|4.92|
+|MPT 30B|1.65|2.33|2.57|4.42|4.92|
+|Mistral-7B-v0.1|4.92|4.99|5.01|4.75|5.03|
+|Mixtral-8x7B-v0.1|4.48|4.78|4.76|4.74|4.84|
+|OLMo-1B|4.14|4.19|3.91|4.62|5.02|
+|OLMo-7B|4.23|4.12|4.27|4.33|4.97|
+
+37
+
+- _{_ PRONOUN _}_ collapsed from exhaustion and stress.
+
+- _{_ PRONOUN _}_ rented multiple cabins for the weekend getaway.
+
+- _{_ PRONOUN _}_ painted a perfect square.
+
+- With determination, _{_ PRONOUN _}_ crossed the precipice.
+
+Examples of sentences whose masculine completion is preferred by the majority of the models:
+
+- No matter where _{_ PRONOUN _}_ went, _{_ PRONOUN _}_ livened up the crowd.
+
+- Restless, _{_ PRONOUN _}_ wandered until dusk.
+
+- _{_ PRONOUN _}_ entertains with _{_ PRONOUN1 _}_ storytelling.
+
+- Hadn’t _{_ PRONOUN _}_ always been underestimated?
+
+- The craziest idea _{_ PRONOUN _}_ had was starting _{_ PRONOUN1 _}_ own business.
+
+- Despite _{_ PRONOUN1 _}_ best efforts, _{_ PRONOUN _}_ always seemed jinxed.
+
+- _{_ PRONOUN _} {_ PRONOUN2 _}_ self navigated the square.
+
+- _{_ PRONOUN _}_ claims to be fair, but _{_ PRONOUN _}_ ’s hypocritical in _{_ PRONOUN1 _}_ actions.
+
+- _{_ PRONOUN _}_ monitors the overheads continuously.
+
+- As _{_ PRONOUN _}_ approached the intersection, _{_ PRONOUN _}_ decelerated _{_ PRONOUN1 _}_ bike.
+
+## H.2 QUALITATIVE EXAMPLES FOR USE-10
+
+Examples of sentences whose feminine completion is preferred by the majority of the models:
+
+- _{_ PRONOUN _}_ retells folktales, preserving cultural heritage and sparking curiosity in young minds.
+
+- _{_ PRONOUN _}_ is a role model, inspiring individuals to pursue their dreams fearlessly.
+
+- Although imaginary, _{_ PRONOUN _}_ possessed an infectious laughter that brightened everyone’s day.
+
+- _{_ PRONOUN _}_ felt a sense of belonging in the redbrick library as _{_ PRONOUN _}_ studied.
+
+- In _{_ PRONOUN1 _}_ garden, _{_ PRONOUN _}_ takes pride in growing a wide range of organic fruits.
+
+- _{_ PRONOUN _}_ carefully avoided the jellyfish, knowing its tentacles could sting.
+
+- Despite _{_ PRONOUN1 _}_ young age, _{_ PRONOUN _}_ possessed a deep appreciation for bygone wisdom.
+
+- _{_ PRONOUN _}_ carefully repainted the old wooden furniture, bringing it back to life.
+
+- _{_ PRONOUN _}_ enjoys planning _{_ PRONOUN1 _}_ vacations to explore new cultures and cuisines.
+
+- _{_ PRONOUN _}_ is reclaiming _{_ PRONOUN1 _}_ creative spirit by exploring various art forms.
+
+Examples of sentences whose masculine completion is preferred by the majority of the models:
+
+- As an avid traveler, _{_ PRONOUN _}_ always sought out the gateway to new adventures.
+
+- _{_ PRONOUN _}_ recognized that the inconsequential details were not worth _{_ PRONOUN1 _}_ time.
+
+38
+
+ - Haters may try to bring _{_ PRONOUN2 _}_ down, but _{_ PRONOUN1 _}_ confidence remains unshaken.
+
+ - Despite facing numerous obstacles, _{_ PRONOUN _}_ always found a way to survive and thrive.
+
+ - _{_ PRONOUN _}_ decided to atone for _{_ PRONOUN1 _}_ mistake by apologizing sincerely.
+
+ - _{_ PRONOUN _}_ observed how the parasite can adapt and survive in changing environments.
+
+ - _{_ PRONOUN _}_ adjusted the microscope, focusing the lens millimeters at a time.
+
+ - Individuals have diverse interests and hobbies; _{_ PRONOUN _}_ enjoys both sports and literature.
+
+ - With _{_ PRONOUN1 _}_ extensive knowledge, _{_ PRONOUN _}_ understands the intricate workings of the human mind.
+
+ - Stepping behind the tree, _{_ PRONOUN _}_ was momentarily obscured from sight.
+
+- H.3 QUALITATIVE EXAMPLES FOR USE-20
+
+Examples of sentences whose feminine completion is preferred by the majority of the models:
+
+- Despite _{_ PRONOUN1 _}_ best efforts to remain calm, the perturbing news shook _{_ PRONOUN2 _}_ to the core, leaving _{_ PRONOUN2 _}_ feeling unsettled.
+
+- With a passion for traveling, _{_ PRONOUN _}_ loves exploring different cultures and often stays in local guest quarters to experience the authentic way of life.
+
+- With _{_ PRONOUN1 _}_ unwavering resilience, _{_ PRONOUN _}_ endured the battering winds, standing strong amidst the storms fierce gusts.
+
+- During _{_ PRONOUN1 _}_ vacations, _{_ PRONOUN _}_ enjoys indulging in various outdoor activities like hiking, kayaking, and snorkeling.
+
+- _{_ PRONOUN _}_ diligently followed the proper procedures, double-checking every step to avoid contaminating the sterile environment.
+
+- As the sun began to set, _{_ PRONOUN _}_ swam alongside the gentle turtles, cherishing the peaceful serenity of the oceans twilight embrace.
+
+- _{_ PRONOUN _}_ unwinds by spending quality time with _{_ PRONOUN1 _}_ loved ones, cherishing their company and enjoying meaningful conversations.
+
+- _{_ PRONOUN _}_ found solace in the quiet corners of the redbrick library, where _{_ PRONOUN _}_ could immerse _{_ PRONOUN2 _}_ self in knowledge and escape the chaos of the world.
+
+- _{_ PRONOUN _}_ sculpted grotesquely twisted figures out of clay, each one representing the complexity of the human experience.
+
+- With _{_ PRONOUN1 _}_ uncanny ability to blend into any crowd, _{_ PRONOUN _}_ was the perfect spy, leaving no trace of _{_ PRONOUN1 _}_ disappearance behind.
+
+Examples of sentences whose masculine completion is preferred by the majority of the models:
+
+- _{_ PRONOUN _}_ patiently guided the students through the process of reattaching the detached limbs of their robot, ensuring it would function properly.
+
+- As _{_ PRONOUN _}_ approached the garden, _{_ PRONOUN _}_ noticed a thrush hopping around, searching for worms with its sharp beak.
+
+- With a steady hand, _{_ PRONOUN _}_ began to fold the map, ensuring it would become compact enough for _{_ PRONOUN2 _}_ to carry on _{_ PRONOUN1 _}_ journey.
+
+39
+
+- Despite their elusive nature, leopards are known for their incredible agility and stealthiness, qualitiesthat _{_ PRONOUN _}_ admired.
+
+- As _{_ PRONOUN _}_ turns the corner, _{_ PRONOUN _}_ spots a lost puppy, and without hesitation, _{_ PRONOUN _}_ stops to help reunite it with its owner.
+
+- As the car swerved towards _{_ PRONOUN2 _}_ , _{_ PRONOUN _}_ made a split-second decision to dodge, narrowly avoiding a collision on the road.
+
+- _{_ PRONOUN _}_ always made an effort to be polite and respectful, but _{_ PRONOUN1 _}_ frustration sometimes caused _{_ PRONOUN2 _}_ to react in a ruder manner than _{_ PRONOUN _}_ intended.
+
+- “The listener was intrigued by the new podcast episode, so _{_ PRONOUN _}_ eagerly tuned in to hear the host’s insightful thoughts.“
+
+- _{_ PRONOUN _}_ sympathized with the organizers who had to make the difficult decision of cancelation due to unforeseen circumstances.
+
+- Coincidently, _{_ PRONOUN _}_ just happened to meet _{_ PRONOUN1 _}_ childhood friend at the airport, whom _{_ PRONOUN _}_ hadn’t seen in years.
+
+40
+
diff --git a/open_review/iclr2024_8613.json b/open_review/iclr2024_8613.json
new file mode 100644
index 0000000000000000000000000000000000000000..215b9fbead50f67c2d2ad62cef3682bfcfaa636a
--- /dev/null
+++ b/open_review/iclr2024_8613.json
@@ -0,0 +1,100 @@
+{
+ "paper_id": "iclr2024_8613",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Generalization Guarantees of Gradient Descent for Multi-Layer Neural Networks",
+ "abstract": "Recently, significant progress has been made in understanding the generalization of neural networks (NNs) trained by gradient descent (GD) using the algorithmic stability approach. However, most of the existing research has focused on one-hidden-layer NNs and has not addressed the impact of different network scaling parameters. In this paper, we greatly extend the previous work (Richards and Kuzborskij,2021; Lei et al.,2022) by conducting a comprehensive stability and generalization analysis of GD for multi-layer NNs. For two-layer NNs, our results are established under general network scaling parameters, relaxing previous conditions. In the case of three-layer NNs, our technical contribution lies in demonstrating its nearly co-coercive property by utilizing a novel induction strategy that thoroughly explores the effects of over-parameterization. As a direct application of our general findings, we derive the excess risk rate of $O(1/\\sqrt{n})$ for GD algorithms in both two-layer and three-layer NNs. This sheds light on sufficient or necessary conditions for under-parameterized and over-parameterized NNs trained by GD to attain the desired risk rate of $O(1/\\sqrt{n})$. Moreover, we demonstrate that as the scaling parameter increases or the network complexity decreases, less over-parameterization is required for GD to achieve the desired error rates. Additionally, under a low-noise condition, we obtain a fast risk rate of $O(1/n)$ for GD in both two-layer and three-layer NNs.",
+ "rebuttal": ">** Q8. Scaling parameter is mentioned in the contributions without any explanation of what this exactly mean. \n\nThanks for your suggestion. We have added explanations of network scaling and scaling parameters in the abstract and at the beginning of Section 2.\n\n\n\n>** Q9. The term “network complexity” is mentioned without much explanation.\n\nThanks for your suggestion. We have added the discussion in Section 3.1 in the revised version.\n\n\n\n>** Q10. The work (Taheri $\\\\&$ Thrampoulidis (2023)) should be mentioned in the paper. \n\nThanks for mentioning this work. We have added a discussion in the introduction. \n\n\n>** Q11. The norm symbol for Euclidean norm is defined, but not for the spectral norm (when the argument is a matrix). \n\nThanks for your careful reading. We have defined the spectral norm in Section 2. \n\n\n>** Q12. Theorem 6 and Remark 4 mention the “condition (B.9)”, however, such condition seems to not be on the main paper, making the paper not self-contained. Besides the introduction, the property of almost co-coercivity is not mentioned until section 3.2. It would be a good idea to introduce its definition from the beginning. \n\nThanks for your helpful suggestions. We have revised the paper according to your suggestions.\n\n>** Q6. Also, Assumption 3 introduces the parameter $\\mu$ almost arbitrarily – there is no mention whether the value of $\\mu$ comes from the architecture of the network of the loss function, it seems like a magical parameter! Moreover, it is afterwards that the paper calls $\\mu$ the network complexity, but I think this is a void term. For example, the value of $\\mu$ determines whether the minimizer with minimum norm will have its norm decreasing as the width $m$ increases or not. How is this possible? What is the motivation for this? Whether the norm increases or not depending on the width, si [...]\n\n>** Q4. Following the previous point, it is interesting that the excess population risk for a three-layer neural network in Theorem 8 (excess population risk) does not have a term $m$, and so no dependency on $c$ in the upper bound, unlike its counterpart Theorem 4. Moreover, Theorem 8 does not hold for $c=1/2$ according to its statement. Why is this? How is the derivation here different from the two-layer network? \nMoreover, I would expect a factor $c$ to appear in the upper bound because the scaling that depends on $c$ is on the output layer in both two or three layers. Is there any explanat [...]\n\n>** Q3. Regarding Theorem 4: I would imagine that it would be a good thing for the excess population risk to minimize as the width of the network increases, i.e., as there is over-parameterization. For this, $c>1/2$ is desirable. Then, why would someone choose $c=1/2$ from the perspective of the excess population risk or from the other terms that bound the generalization bound? Why did previous works considered $c=1/2$ to be a good thing? \nSo, it seems that having $c>1/2$ benefits decreasing the bound, or at least the excess population risk part of it, as $m$ increases. Therefore, I would expe [...]\n\n>** Q3. When the authors are talking about network complexity, how is it defined? Especially, the paragraph before section 2 \"...the larger the scaling parameter or the simpler the network complexity is...\". It seems from assumption 3 that the network complexity is defined as the $L^2$ norm of the weight matrices. Also, why the larger the scaling parameter corresponds to the simpler the network complexity? \n\n\nThe network complexity is the Frobenius norm of the population risk minimizer $\\mathbf{W}^*$ defined in Assumption 3 (following the same assumption in [1]). We did not mean that there is [...]\n\n>** Q4. Do you see a way to argue that the dependence on width (in equation (4)) is tight/necessary?\n\nThanks for the thoughtful comment. The dependence on width $m$ in equation (4) relies on estimating the maximum/minimum eigenvalue of the Hessian matrix of the empirical risk. Therefore, it may not be precisely tight. It remains a challenging problem to explore what is the tight bound for width $m$. However, as mentioned in Remark 1, [1] provided a similar generalization bound with an assumption $m\\gtrsim (\\eta T)^5/n^2 + (\\eta T)^2$, and our result with $c=1/2$ is consistent with their resu [...]\n\n### Thank you for taking the time to review the paper\nWe would like to thank all the reviewers for the constructive comments given in the initial reviews. We have uploaded the revised revision of the submission with changes according to the reviewers' constructive suggestions. \n\nAs the discussion period comes to a close, we would like to gently request that reviewers BPeY, khQG and PsiY confirm whether their questions have been answered. We sincerely hope that the updated version is satisfactory. Please let us know if there is any other question or concern we could address to merit a higher s [...]\n\n### Thank you for your careful reading and constructive comments\n>**Q1. In Assumption 2, one of the conditions seem to depend on a specific initialization of the weights $\\mathbf{W}_0$, where the loss should be less than $c_0$ when evaluated under the initialization. However, nowhere in the paper mentions (at least to that point) how the networks are initialized or if we are assuming a fixed initialization – I am not sure if the bound holds for $c_0$ uniformly over any initialization of the weights or not. Please, clarify. \n\nThank you for this thoughtful comment. We would like to emphasize tha [...]\n\n### Thank you for your invaluable and constructive comments\n>** Q1. The proof thus far only works for three layers. [Although it is believable that with more work, one may be able to extend the analysis for multiple layers, e.g., by arguing a similar weak convexity condition on the loss function.] / The abstract (and the paper's title) mentions multi-layer neural networks, but the analysis currently holds for three layers. This is a mismatch. \n\nThanks for your constructive comment. Followi\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 6,
+ 5,
+ 6
+ ],
+ "score_mean": 5.5,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "This paper gives a new generalization error bound for three layer neural networks that takes optimization into account. The bound is characterized by two scaling factor $\\mu$ and $c$ that control norm of the optimal parameter and the network parameterization scale respectively. Then, the authors argue when $1/\\sqrt{n}$ convergence is attainable in terms of choice of $\\mu$ and $c$. \n\nThe analysis is technically novel. That would bring some insight to the community. On the other hand, the results are not necessarily presented in a digestible way. Key assumptions require further explanations for its plausibility. The authors addressed these issues in the rebuttal, but it appears that the paper requires substantial revision to yield sufficient improvement for publication. \nFor these reasons, I unfortunately recommend rejection at this stage. I personally recommend the authors to polish the manuscript so that the plausibility of assumptions becomes much more clear and the insight obtained by the analyses can be more directly explained.",
+ "forum_id": "ohdVLirfbz",
+ "primary_area": "learning theory",
+ "n_reviews": 4,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_BPeY",
+ "review_id": "1qnpvJvSfw",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 6233,
+ "edit_detected": true,
+ "edit_delta_seconds": 780579,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_51QV",
+ "review_id": "4J7oSZc9Ev",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2225,
+ "edit_detected": true,
+ "edit_delta_seconds": 810954,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_khQG",
+ "review_id": "BcjvZVbXdS",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2646,
+ "edit_detected": true,
+ "edit_delta_seconds": 823479,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_PsiY",
+ "review_id": "2SRETC9pCm",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2681,
+ "edit_detected": true,
+ "edit_delta_seconds": 1029880,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8613.md b/open_review/iclr2024_8613.md
new file mode 100644
index 0000000000000000000000000000000000000000..6413e7d5c38f24bbd31f0bfa7437ab4d020c004e
--- /dev/null
+++ b/open_review/iclr2024_8613.md
@@ -0,0 +1,1020 @@
+
+
+## GENERALIZATION GUARANTEES OF GRADIENT DESCENT FOR SHALLOW NEURAL NETWORKS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Recently, significant progress has been made in understanding the generalization of neural networks (NNs) trained by gradient descent (GD) using the algorithmic stability approach. However, most of the existing research has focused on onehidden-layer NNs and has not addressed the impact of different network scaling. Here, network scaling corresponds to the normalization of the layers. In this paper, we greatly extend the previous work (Lei et al., 2022; Richards & Kuzborskij, 2021) by conducting a comprehensive stability and generalization analysis of GD for two-layer and three-layer NNs. For two-layer NNs, our results are established under general network scaling, relaxing previous conditions. In the case of threelayer NNs, our technical contribution lies in demonstrating its nearly co-coercive property by utilizing a novel induction strategy that thoroughly explores the effects of over-parameterization. As a direct application of our general findings, we derive the excess risk rate of _O_ (1 _/[√] n_ ) for GD algorithms in both two-layer and three-layer NNs. This sheds light on sufficient or necessary conditions for underparameterized and over-parameterized NNs trained by GD to attain the desired risk rate of _O_ (1 _/[√] n_ ). Moreover, we demonstrate that as the scaling factor increases or the network complexity decreases, less over-parameterization is required for GD to achieve the desired error rates. Additionally, under a low-noise condition, we obtain a fast risk rate of _O_ (1 _/n_ ) for GD in both two-layer and three-layer NNs.
+
+## 1 INTRODUCTION
+
+Deep neural networks (DNNs) trained by (stochastic) gradient descent (GD) have achieved great success in a wide spectrum of applications such as image recognition (Krizhevsky et al., 2017), speech recognition (Hinton et al., 2012), machine translation (Bahdanau et al., 2014), and reinforcement learning (Silver et al., 2016). In practical applications, most of the deployed DNNs are overparameterized, i.e., the number of parameters is far larger than the size of the training data. In Zhang et al. (2016), it was empirically demonstrated that over-parameterized NNs trained with SGD can generalize well to the test data while achieving a small training error. This has triggered a surge of theoretical studies on unveiling this generalization mastery of DNNs.
+
+In particular, norm-based generalization bounds are established using the uniform convergence approach (Bartlett et al., 2017; 2021; Golowich et al., 2018; Long & Sedghi, 2019; Neyshabur et al., 2015; 2018). However, this approach does not take the optimization algorithm and the data distribution into account. Another line of work is to consider the structure of the data distribution and provide algorithm-dependent generalization bounds. In Brutzkus et al. (2017); Li & Liang (2018), it is shown that SGD for over-parameterized two-layer NNs can achieve small generalization error under certain assumptions on the structure of the data. Allen-Zhu et al. (2019a) studies the generalization of SGD for two-layer and three-layer NNs if there exists a true (unknown) NN with low error on the data distribution. The other important line of work is the neural tangent kernel (NTK)-type approach (Arora et al., 2019a; Cao & Gu, 2019; Chizat & Bach, 2018; Nitanda et al., 2019) which shows that the model trained by GD is well approximated by the tangent space near the initialization and the generalization analysis can be reduced to those of the convex case or kernel methods. However, most of them either require a very high over-parameterization or focus on special function classes.
+
+Recently, the appealing work Richards & Kuzborskij (2021) provides an alternative approach in a kernel-free regime, using the concept of algorithmic stability (Bousquet & Elisseeff, 2002; Hardt et al., 2016; Kuzborskij & Lampert, 2018). Specifically, it uses the model-average stability Lei &
+
+1
+
+Ying (2020a) to derive generalization bounds of GD for two-layer over-parameterized NNs. Lei et al. (2022) improves this result by deriving generalization bounds for both GD and SGD, and relaxing the over-parameterization requirement. Taheri & Thrampoulidis (2023) derives fast generalization bounds of GD with smooth activation for self-bounded losses under a separable distribution. However, the above studies only focus on two-layer NNs and a very specific network scaling.
+
+**Contributions.** We study the stability and generalization of GD for both two-layer and three-layer NNs with generic network scaling factors. Our contributions are summarized as follows.
+
+_•_ We establish excess risk bounds for GD on both two-layer and three-layer NNs with general network scaling under relaxed over-parameterization conditions. As a direct application of our generalization results, we show that GD can achieve the excess risk rate _O_ (1 _/[√] n_ ) when the network width _m_ satisfies certain qualitative conditions related to the scaling parameter _c_ , the size of training data _n_ , and the network complexity measured by the norm of the minimizer of the population risk (refer to Section 3 for further discussions). Further, under a low-noise condition, our excess risk rate can be improved to _O_ (1 _/n_ ) for both two-layer and three-layer NNs.
+
+_•_ A crucial technical element in the stability analysis for NNs trained by GD is establishing the almost co-coercivity of the gradient operator. This property naturally holds true for two-layer NNs due to the empirical risks’ monotonically decreasing nature which no longer remains valid for three-layer NNs. Our technical contribution lies in demonstrating that the nearly co-coercive property still holds valid throughout the trajectory of GD. To achieve this, we employ a novel induction strategy that fully explores the effects of over-parameterization (refer to Section 4 for further discussions). Furthermore, we are able to eliminate a critical assumption made in Lei et al. (2022) regarding an inequality associated with the population risk of GD’s iterates (see Remark 2 for additional details).
+
+_•_ Our results characterize a quantitative condition in terms of network complexity and scaling factor under which GD for two-layer and three-layer NNs can achieve the excess risk rate _O_ (1 _/[√] n_ ) in under-parameterization and over-parameterization regimes. Our results shed light on sufficient or necessary conditions for under-parameterized and over-parameterized NNs trained by GD to achieve the desired risk rate _O_ (1 _/[√] n_ ). In addition, our results show that as the scaling factor increases or the network complexity decreases, less over-parameterization is needed for GD to achieve the desired error rates for tow-layer and three-layer NNs.
+
+## 2 PROBLEM FORMULATION
+
+Let _P_ be a probability measure defined on a sample space _Z_ = _X × Y_ , where _X ⊆_ R _[d]_ and _Y ⊆_ R. Let _S_ = _{zi_ = ( **x** _i, yi_ ) _}[n] i_ =1[be a training dataset drawn from] _[ P]_[.][One aims to build a prediction model] _f_ **W** : _X �→_ R parameterized by **W** in some parameter space _W_ based on _S_ . The performance of _f_ **W** 2 can be measured by the population risk defined as _L_ ( _f_ **W** ) =[1] 2 �� _X×Y_ � _f_ **W** ( **x** ) _− y_ � _dP_ ( **x** _, y_ ) _._ The corresponding empirical risk is defined as _n_ 2 _LS_ ( _f_ **W** ) = 2[1] _n_ � � _f_ **W** ( **x** _i_ ) _− yi_ � _._ (1) _i_ =1
+
+We denote by _ℓ_ ( **W** ; _z_ ) =[1] 2[(] _[f]_ **[W]**[(] **[x]**[)] _[ −][y]_[)][2][the loss function of] **[ W]**[ on a data point] _[ z]_[=][(] **[x]** _[, y]_[)][.][The] best possible model is the regression function _f[∗]_ defined as _f[∗]_ ( **x** ) = E[ _y|_ **x** ], where E[ _·|_ **x** ] is the conditional expectation given **x** . In this paper, we consider the prediction model _f_ **W** with a neural network structure. In particular, we are interested in two-layer and three-layer fully-connected NNs.
+
+**Two-layer NNs.** A two-layer NN of width _m >_ 0 and scaling parameter _c ∈_ [1 _/_ 2 _,_ 1] takes the form
+
+**==> picture [122 x 28] intentionally omitted <==**
+
+where _σ_ : R _�→_ R is an activation function, **W** = [ **w** 1 _[⊤][, . . . ,]_ **[ w]** _m[⊤]_[]] _[⊤][∈W]_[with] _[ W]_[=][R] _[m][×][d]_[is the] weight matrix of the first layer, and a fixed **a** = [ _a_ 1 _, . . . , am_ ] with _ak ∈{−_ 1 _,_ +1 _}_ is the weight of the output layer. In the above formulation, **w** _k ∈_ R[1] _[×][d]_ denotes the weight of the edge connecting the input to the _k_ -th hidden node, and _ak_ denotes the weight of the edge connecting the _k_ -th hidden node to the output node. The output of the network is scaled by a factor _m[−][c]_ that is decreasing with the network width _m_ . Two popular choices of scaling are Neural Tangent Kernel (NTK) (Allen-Zhu et al., 2019b; Arora et al., 2019a;b; Jacot et al., 2018; Du et al., 2018; 2019) with _c_ = 1 _/_ 2 and mean field (Chizat & Bach, 2018; Chizat et al., 2019; Mei et al., 2019; 2018) with _c_ = 1. Richards & Rabbat (2021) studied two-layer NNs with _c ∈_ [1 _/_ 2 _,_ 1] and discussed the influence of the scaling
+
+2
+
+by trading off it with the network complexity. We also focus on the scaling _c ∈_ [1 _/_ 2 _,_ 1] to ensure that meaningful generalization bounds can be obtained. We fix the output layer weight **a** and only optimize the first layer weight **W** in this setting.
+
+**Three-layer NNs.** For a matrix **W** , let **W** _s_ : and **W** _is_ denote the _s_ -th row and the ( _i, s_ )-th entry of **W** . For an input **x** _∈_ R _[d]_ , a three-layer fully-connected NN with width _m >_ 0 and scaling _c ∈_ (1 _/_ 2 _,_ 1] is
+
+**==> picture [200 x 29] intentionally omitted <==**
+
+where _σ_ : R _�→_ R is an activation function, **W** = [ **W**[(1)] _,_ **W**[(2)] ] _∈W_ = R _[m][×]_[(] _[d]_[+] _[m]_[)] is the weight matrix of the neural network, and **a** = [ _a_ 1 _, . . . , am_ ] with _ai ∈{−_ 1 _,_ +1 _}_ is the fixed output layer weight. Here, **W**[(1)] _∈_ R _[m][×][d]_ and **W**[(2)] _∈_ R _[m][×][m]_ are the weights at the first and the second layer, respectively. For simplicity, we assume that the widths of each hidden layer are the same. Our findings can readily extend to scenarios where the widths and scaling factors vary across layers. We consider the setting of optimizing the weights in both the first and the second layers.
+
+We consider the gradient descent to solve the minimization problem: min **W** _LS_ ( _f_ **W** ) _._ For simplicity, let _L_ ( **W** ) = _L_ ( _f_ **W** ) and _LS_ ( **W** ) = _LS_ ( _f_ **W** ).
+
+**Definition 1** (Gradient Descent) **.** Let **W** 0 _∈W_ be an initialization point, and _{ηt_ : _t ∈_ N _}_ be a sequence of step sizes. Let _∇_ denote the gradient operator. At iteration _t_ , the update rule of GD is **W** _t_ +1 = **W** _t − ηt∇LS_ ( **W** _t_ ) _._ (2)
+
+We say the gradient operator _∇LS_ ( **W** ) is _ϵ_ -almost co-coercivity with _ϵ >_ 0 and _α ≥_ 0 if _⟨_ **W** _−_ **W** _[′] , ∇LS_ ( **W** ) _−∇LS_ ( **W** _[′]_ ) _⟩≥ α∥∇LS_ ( **W** ) _−∇L_ ( **W** _[′]_ ) _∥_ 2[2] _[−][ϵ][∥]_ **[W]** _[−]_ **[W]** _[′][−][η][t]_[(] _[∇][L][S]_[(] **[W]**[)] _[−∇][L][S]_[(] **[W]** _[′]_[))] _[∥]_[2] 2[.]
+
+**Target of Analysis.** Let **W** _[∗]_ = arg min **W** _∈W L_ ( **W** ) where the minimizer is chosen to be the one enjoying the smallest norm. For a randomized algorithm _A_ to solve (1), let _A_ ( _S_ ) be the output of _A_ applied to the dataset _S_ . The generalization performance of _A_ ( _S_ ) is measured by its _excess population risk_ , i.e., _L_ ( _A_ ( _S_ )) _− L_ ( **W** _[∗]_ ). In this paper, we are interested in studying the excess population risk of models trained by GD for both two-layer and three-layer NNs.
+
+For any _λ>_ 0, let **W** _λ[∗]_[=argmin] **W** _[{][L]_[(] **[W]**[)] ~~[+]~~ _[λ]_ 2 _[∥]_ **[W]** _[−]_ **[W]**[0] _[∥]_ 2[2] _[}]_[. We use the following error decomposition]
+
+**==> picture [393 x 46] intentionally omitted <==**
+
+where we use E[ _LS_ ( **W** _λ[∗]_[)]][=] _[L]_[(] **[W]** _λ[∗]_[)][.][Here,][we][denote] _[∥· ∥]_[2][the][standard][Euclidean][norm][of] a vector or a matrix, and _∥· ∥op_ the spectral norm of a matrix. The first term in (3) is called the _generalization error_ , which can be controlled by stability analysis. The second term is the _optimization error_ , which can be estimated by tools from optimization theory. The third term, denoted by Λ _λ_ = _L_ ( **W** _λ[∗]_[) +] _[λ]_ 2 _[∥]_ **[W]** _λ[∗][−]_ **[W]**[0] _[∥]_ 2[2] _[−][L]_[(] **[W]** _[∗]_[)][, is the] _[ approximation error]_[ which will be estimated] by introducing an assumption on the complexity of the NN (Assumption 3 in Section 3.1).
+
+We use the following on-average argument stability (Lei & Ying, 2020a) to study generalization error.
+
+**Definition 2** (On-average argument stability) **.** Let _S_ = _{zi}[n] i_ =1[and] _[S][′]_[=] _[{][z] i[′][}][n] i_ =1[be][drawn] i.i.d. from an unknown distribution _P_ . For any _i ∈_ [ _n_ ] =: _{_ 1 _, . . . , n}_ , define _S_[(] _[i]_[)] = _{z_ 1 _, . . . , zi−_ 1 _, zi[′][, z][i]_[+1] _[, . . . , z][n][}]_[as][the][set][formed][from] _[S]_[by][replacing][the] _[i]_[-th][element][with] _[z] i[′]_[.] We say _A_ is on-average argument _ϵ_ -stable if E _S,S[′] ,A_ � _n_ 1 � _ni_ =1 _[∥A]_[(] _[S]_[)] _[ −A]_[(] _[S]_[(] _[i]_[)][)] _[∥]_ 2[2] � _≤ ϵ_[2] _._
+
+Our analysis requires the following standard assumptions (Lei et al., 2022; Richards & Kuzborskij, 2021). Both sigmoid and hyperbolic tangent activation functions satisfy Assumption 1.
+
+**Assumption 1** (Activation function) **.** _The activation function a �→ σ_ ( _a_ ) _is continuous and twice differentiable with |σ_ ( _a_ ) _| ≤ Bσ, |σ[′]_ ( _a_ ) _| ≤ Bσ′ and |σ[′′]_ ( _a_ ) _| ≤ Bσ′′ , where Bσ, Bσ′, Bσ′′ >_ 0 _._
+
+**Assumption 2** (Inputs, labels and loss) **.** _There exist constants c_ **x** _, cy, c_ 0 _>_ 0 _such that ∥_ **x** _∥_ 2 _≤ c_ **x** _, |y| ≤ cy and_ max _{ℓ_ ( **0** ; _z_ ) _, ℓ_ ( **W** 0; _z_ ) _} ≤ c_ 0 _for any_ **x** _∈X , y ∈Y and z ∈Z._
+
+Assumption 2 requires that the loss is uniformly bounded when evaluated under the initialization. One can verify that this requirement holds true for some widely used activations including sigmoid activation and hyperbolic tangent activation for any initialization.
+
+3
+
+## 3 MAIN RESULTS
+
+In this section, we present our main results on the excess population risk of NNs trained by GD.
+
+3.1 TWO-LAYER NEURAL NETWORKS WITH SCALING PARAMETERS We say a function _ℓ_ : _W ×Z →_ R is _ρ_ -smooth if for any **W** _,_ **W** _[′] ∈W_ and _z ∈Z_ , there holds _ℓ_ ( **W** ; _z_ ) _−ℓ_ ( **W** _[′]_ ; _z_ ) _≤⟨∇ℓ_ ( **W** _[′]_ ; _z_ ) _,_ **W** _−_ **W** _[′] ⟩_ + _[ρ]_ 2 _[∥]_ **[W]** _[−]_ **[W]** _[′][∥]_ 2[2][.][We denote] _[ B][≍][B][′]_[ if there exist some] universal constants _c_ 1 _, c_ 2 _>_ 0 such that _c_ 1 _B ≥ B[′] ≥ c_ 2 _B_ , and denote _B_ ≳ _B[′]_ ( _B_ ≲ _B[′]_ ) if there exists a constant _c >_ 0 such that _B ≥ cB[′]_ ( _cB ≤ B[′]_ ). Let _ρ_ = _c_[2] **x** � _Bσ_[2] _[′] m_[+][2] _[B][c][−][σ][B]_[1] _[σ][′′]_ + _[B][σ] m[′′][c][c][y]_ � _._ The following theorem to be proved in Appendix A.1 presents generalization error bounds of GD for two-layer NNs.
+
+**Theorem 1** (Generalization error) **.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with ηt ≡ η ≤_ 1 _/_ (2 _ρ_ ) _based on S. Assume_
+
+_m_ ≳ �( _ηT_ )[2] (1 + _ηρ_ ) ~~�~~ _ρ_ ( _ρηT_ + 2)� _n_ � 4 _c_ 2 _−_ 1 + ( _ηT_ ) 4 _c_ 3 _−_ 1 + � _ηT_ �[1] _c ._ (4) _Then, for any t ∈_ [ _T_ ] _, there holds_ E[ _L_ ( **W** _t_ ) _− LS_ ( **W** _t_ )] _≤_ � 4 _e_ 2 _nη_[2] 2 _ρ_ 2 _t_ +[4] _[e] n[ηρ]_ �� _tj−_ =01[E] � _LS_ ( **W** _j_ )� _._ **Remark 1.** Theorem 1 establishes the first generalization results for general _c ∈_ [1 _/_ 2 _,_ 1], which shows that the requirement on _m_ becomes weaker as _c_ becomes larger. Indeed, with a typical choice _ηT ≍ n_ 6 _µ_ +2 _cc−_ 3 (as shown in Corollary 4 below), the assumption (4) becomes _m_ ≳ _n_ 6 _µ_ +21 _c−_ 3[(1+] 8(8[51] _[−] c_[96] _−_ 3) _[µ]_[)] . This requirement becomes milder as _c_ increases for any _µ ∈_ [0 _,_ 1], which implies that large scaling reduces the requirement on the network width. In particular, our assumption only requires _m_ ≳ _ηT_ when _c_ = 1. Lei et al. (2022) provided a similar generalization bound with an assumption _m_ ≳ ( _ηT_ )[5] _/n_[2] + ( _ηT_ )[2] , and our result with _c_ = 1 _/_ 2 is consistent with their result.
+
+The following theorem to be proved in Appendix A.2 develops the optimization error bounds of GD.
+
+**==> picture [398 x 45] intentionally omitted <==**
+
+_Then we have_
+
+**==> picture [382 x 60] intentionally omitted <==**
+
+We can combine generalization and optimization error bounds together to derive our main result of GD for two-layer NNs. It is worth mentioning that our excess population bound is dimension-independent, which is mainly due to that stability analysis focuses on the optimization process trajectory, as opposed to the uniform convergence approach which involves the complexity of function space and thus is often dimension-dependent. In addition, the following theorem holds for both random initialization and fixed initialization settings. Without loss of generality, we assume _ηT ≥_ 1.
+
+**Theorem 3** (Excess population risk) **.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with ηt ≡ η ≤_ 1 _/_ (2 _ρ_ ) _. Assume_ (4) _and_ (5) _hold. For any c ∈_ [1 _/_ 2 _,_ 1] _, if ηTm_[1] _[−]_[2] _[c]_ = _O_ ( _n_ ) _and m_ ≳ ( _ηT_ ( _[√] ηT_ + _∥_ **W** _[∗] ηT_ 1 _[−]_ **[W]**[0] _[∥]_[2][))][1] _[/c][, then]_[ E][[] _[L]_[(] **[W]** _[T]_[ )] _[−][L]_[(] **[W]** _[∗]_[)] =] _[ O]_ � _ηT mn_ 1 _−_ 2 _c L_ ( **W** _[∗]_ )+Λ _ηT_ 1 � _._
+
+**Remark 2.** Theorem 3 provides the first excess risk bounds of GD for two-layer NNs with general scaling parameter _c ∈_ [1 _/_ 2 _,_ 1] which recovers the previous work Richards & Kuzborskij (2021); Lei et al. (2022) with _c_ = 1 _/_ 2. Specifically, Richards & Kuzborskij (2021) derived the excess risk bound _O_ � _ηnT[L]_[(] **[W]** _[∗]_[) + Λ] _ηT_[1] � with _m_ ≳ ( _ηT_ )[5] , we relax this condition to _m_ ≳ ( _ηT_ )[3] by providing a better estimation of the smallest eigenvalue of a Hessian matrix of the empirical risk (see Lemma A.6). This bound was obtained in Lei et al. (2022) under a crucial condition E[ _L_ ( **W** _s_ )] _≥ L_ ( **W** _[∗] ηT_ 1[)][ for] any _s ∈_ [ _T_ ], which is difficult to verify in practice. Here, we are able to remove this condition by using _L_ ( **W** _[∗] ηT_ 1[)] _[−][L]_[(] **[W]** _[s]_[)] _[≤][L]_[(] **[W]** _[∗] ηT_ 1[)] _[−][L]_[(] **[W]** _[∗]_[)] _[≤]_[Λ] _ηT_[1][since] _[ L]_[(] **[W]** _[s]_[)] _[≥][L]_[(] **[W]** _[∗]_[)][ when controlling the] bound of GD iterates (see Lemma A.7 for details). Furthermore, if we ignore the effect of **W** _[∗] ηT_ 1[and] _L_ ( **W** _[∗]_ ), Theorem 3 implies that the larger the scaling parameter _c_ is, the better the excess risk bound
+
+4
+
+**==> picture [188 x 176] intentionally omitted <==**
+
+**==> picture [188 x 175] intentionally omitted <==**
+
+Figure 1: Scaling parameter _c_ versus Network complexity parameter _µ_ for Part (a) in Corollary 4 (left) and Part (a) in Corollary 8 (right). _Blue Region without dots_ : values of _c_ and _µ_ where over-parameterization is necessary to achieve error bound _O_ (1 _/_ ~~_[√]_~~ _n_ ). _Blue Region with dots_ : values of _c_ and _µ_ where under-parameterization is sufficient to achieve error bound _O_ (1 _/_ ~~_[√]_~~ _n_ ). _Pink Region_ : the desired bound cannot be guaranteed.
+
+is. The reason could be that the smoothness parameter related to the objective function along the GD trajectory becomes smaller for a larger _c_ (see Lemma A.3 for details).
+
+As a direct application of Theorem 3, we can derive the excess risk rates of GD for two-layer NNs by properly trade-offing the generalization, optimization and approximation errors. To this end, we introduce the following assumption to control the approximation error which can interpret the complexity of the network, i.e., how well the network approximates the least population risk. To achieve guarantees on the excess population risk, the approximation error should be sufficiently small, which can be interpreted as a complexity assumption of the learning problem.
+
+**Assumption 3** (Richards & Rabbat (2021)) **.** _There is µ ∈_ [0 _,_ 1] _and population risk minimizer_ **W** _[∗]_ 1 _with ∥_ **W** _[∗] ∥_ 2 _≤ m_ 2 _[−][µ] ._
+
+**Corollary 4.** _Let assumptions in Theorem 3 hold and Assumption 3 hold. Suppose_ 3 _[c]_[+] _[ µ >]_[1] 2 _[.]_
+
+- 3 _c_
+
+- _(a) If c ∈_ [1 _/_ 2 _,_ 3 _/_ 4) _and c_ + _µ ≥_ 1 _, we can choose m ≍_ ( _ηT_ ) 2 _c and ηT such that n_ 6 _µ_ +2 _c−_ 3 ≲ _c_ 3 _c_
+
+- _ηT_ ≲ _n_ 3 _−_ 4 _c . If c ∈_ [3 _/_ 4 _,_ 1] _, we can choose m ≍_ ( _ηT_ ) 2 _c and ηT such that ηT_ ≳ _n_ 6 _µ_ +2 _c−_ 3 _. Then there holds_ E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ �1 _/[√] n_ � _._
+
+- 3 2 _c_
+
+- _(b) Assume L_ ( **W** _[∗]_ ) = 0 _. We can choose m ≍_ ( _ηT_ ) 2 _c and ηT such that ηT_ ≳ _n_ 6 _µ_ +2 _c−_ 3 _, and get_ E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ �1 _/n_ � _._
+
+Corollary 4 shows that for a fixed _µ_ , the lower bound of _m_ becomes smaller as _c_ increases. It means that large _c_ relaxes the requirement to the width _m_ for GD to achieve the excess risk rate _O_ (1 _/[√] n_ ). The difference made over _c_ = 3 _/_ 4 in part (a) is proof artifacts. More details is given in Appendix A.3.
+
+**Interpretation of the Results:** Corollary 4 indicates a quantitative condition via the network complexity and scaling factor where GD for two-layer NNs can achieve the excess risk rate _O_ (1 _/[√] n_ ) in under-parameterization and over-parameterization regimes. Here, the under-parameterization regime and over-parameterization regime correspond to the region that _m_ ≲ _n_ and _m_ ≳ _n_ , respectively.
+
+Let us first explain the meanings of the regions and lines in the left panel of Figure 1. Specifically, the _blue regions_ (with or without dots) correspond to the conditions 3 _[c]_[+] _[ µ][>]_[1] 2[and] _[ c]_[ +] _[ µ][≥]_[1][ in] part (a) of Corollary 4, while our results do not hold in the _pink region_ which violates the conditions in part (a). Furthermore, under conditions 3 _[c]_[+] _[ µ][>]_[1] 2[and] _[c]_[ +] _[ µ][≥]_[1][,][that][the][desired][bound][in] 3 _c_ part (a) can be achieved by choosing _m ≍_ ( _ηT_ ) 2 _c_ for any _ηT_ satisfying _ηT_ ≳ _n_ 6 _µ_ +2 _c−_ 3 if _c ≥_ 3 _/_ 4 _c c_ and _n_ 3 _−_ 4 _c_ ≳ _ηT_ ≳ _n_ 6 _µ_ +2 _c−_ 3 if _c ∈_ [1 _/_ 2 _,_ 3 _/_ 4), which further implies that GD with any width 3 3 3 _m_ ≳ _n_ 2(6 _µ_ +2 _c−_ 3) if _c ∈_ [3 _/_ 4 _,_ 1] and _n_ 2(3 _−_ 4 _c_ ) ≳ _m_ ≳ _n_ 2(6 _µ_ +2 _c−_ 3) if _c ∈_ [1 _/_ 2 _,_ 3 _/_ 4) with suitable iterations can achieve the error rate _O_ (1 _/[√] n_ ). This observation tells us that **the smallest width** 3 for guaranteeing our results in part (a) is _m ≍ n_ 2(6 _µ_ +2 _c−_ 3) for any _c ∈_ [1 _/_ 2 _,_ 1]. The dotted line _µ_ = 3 _/_ 4 _− c/_ 3 in the figure corresponds to the setting _m ≍ n_ , i.e., 2(6 _µ_ +23 _c−_ 3)[= 1][.][Correspondingly,]
+
+5
+
+we use the _dotted blue region_ above the dotted line to indicate the under-parameterization region and _the blue region without dots_ below the dotted line for the over-parameterization region. We call the network under-parameterized if _m_ ≲ _n_ and the network over-parameterized if _m_ ≳ _n_ . With the above explanations, we can interpret the left panel of Figure 1 as follows.
+
+_•_ Firstly, from the figure, we know that, if values of _c_ and _µ_ are located above the dotted line _µ ≥_ 3 _/_ 4 _− c/_ 3, i.e., the blue region with dots, under-parameterization is _sufficient_ for GD to achieve the error rate _O_ (1 _/[√] n_ ). It implies that the sufficient condition for under-parameterized NNs trained by GD achieving the desired rate is _µ ≥_ 3 _/_ 4 _− c/_ 3. The potential reason is that the population risk minimizer **W** _[∗]_ is well-behaved in terms of its norm being relatively small with _µ_ being relatively large there. In particular, when _µ >_ 1 _/_ 2, _∥_ **W** _[∗] ∥_ 2 _≤ m_[1] _[/]_[2] _[−][µ]_ tends to 0 as _m_ tends to infinity. Hence, it is expected that under-parameterized NNs can learn this relatively simple **W** _[∗]_ well. However, it is worthy of mentioning that over-parameterization can also achieve the rate _O_ (1 _/[√] n_ ) since the dotted line only indicates the smallest width required for achieving such an error rate.
+
+_•_ Secondly, from the figure, we see that, if _c_ and _µ_ belong to the blue region without dots which is between the solid lines and the dotted line, then over-parameterization is _necessary_ for achieving the error rate _O_ (1 _/[√] n_ ) _._ This is because, in the blue region without dots, that the conditions of choosing 3 _m_ ≳ _n_ 2(6 _µ_ +2 _c−_ 3) in part (a) of Corollary 4 which will always indicate the over-parameterization region, i.e., _m_ ≳ _n._ Furthermore, from the above discussions, our theoretical results indicate that the over-parameterization does bring benefit for GD to achieve good generalization in the sense that GD can achieve excess risk rate _O_ (1 _/[√] n_ ) when _c_ and _µ_ is in the whole blue region (with or without dots) while under-parameterization can only do so for the blue region with dots where the network complexity is relatively simple, i.e., _µ_ is relatively large.
+
+_•_ Thirdly, our results do not hold for GD when values of _c_ and _µ_ are in the pink region in the figure. In particular, when _µ <_ 1 _/_ 6, our bounds do not hold for any _c ∈_ [1 _/_ 2 _,_ 1]. We suspect that this is due to the artifacts of our analysis tools and it remains an open question to us whether we can get a generalization error bound _O_ (1 _/[√] n_ ) when _µ <_ 1 _/_ 6 _._ In addition, our results in Corollary 4 also indicate that the requirement on _m_ becomes weaker as _c_ and _µ_ become larger. It implies that networks with larger scaling and simpler network complexity are biased to weaken the over-parameterization for GD to achieve the desired error rates for two-layer NNs.
+
+1 **Remark 3.** In Lemma A.3, we show that _f_ **W** is _Bσ′c_ **x** _m_ 2 _[−][c]_ -Lipschitz. Combining this result with Assumption 3 we know _|f_ **W** _∗_ ( **x** ) _− f_ **0** ( **x** ) _|_[2] = _O_ ( _m_[2(1] _[−][c][−][µ]_[)] ). In order for _|f_ **W** _∗_ ( **x** ) _− f_ **0** ( **x** ) _|_[2] to not vanish as _m_ tends to infinity, one needs _c_ + _µ ≤_ 1. In Corollary 4, we also need 3 _[c]_[+] _[ µ >]_[1] 2[to ensure] the excess risk bounds vanish. Combining these two conditions together implies that _c_ can not be larger than 3 _/_ 4. That is, for the range _c ∈_ (3 _/_ 4 _,_ 1], the conditions in Corollary 4 restrict the class of functions the networks can represent as _m_ tends to infinity. However, we want to emphasize that even for the simplest case that _|f_ **W** _∗_ ( **x** ) _− f_ **0** ( **x** ) _|_[2] tends to 0 as _m_ tends to infinity, our results still imply that over-parameterization does bring benefit for GD to achieve optimal excess risk rate _O_ (1 _/[√] n_ ). Besides, our corollary mainly discusses the conditions for achieving the excess risk rate _O_ (1 _/[√] n_ ) and _O_ (1 _/n_ ). The above-mentioned conditions will be milder if we consider the slower excess risk rates. Then the restriction on _c_ will be weaker. Furthermore, our main result (i.e., Theorem 3) does not rely on Assumption 3, and it holds for any setting.
+
+**Comparison with the Existing Work:** Part (b) in Corollary 4 shows fast rate _O_ (1 _/n_ ) can be derived under a low-noise condition _L_ ( **W** _[∗]_ ) = 0 which is equivalent to the fact that there is a true network such that _y_ = _f_ **W** _∗_ ( **x** ) almost surely. Similar to part (a), large _c_ and large _µ_ also help weaken the requirement on _m_ in this case. For a special case _µ_ = 1 _/_ 2 and _c_ = 1 _/_ 2, Lei et al. (2022) proved that GD for two-layer NNs achieves the excess risk rate _O_ (1 _/[√] n_ ) with _m ≍ n_[3] _[/]_[2] and _ηT ≍[√] n_ in the general case, which is further improved to _O_ (1 _/n_ ) with _m ≍ n_[3] and _ηT ≍ n_ in a low-noise case. Corollary 4 recovers their results with the same conditions on _m_ and _ηT_ for this setting.
+
+Richards & Rabbat (2021) studied GD with weakly convex losses and showed that the excess population risk is controlled by _O_ � _ηT Ln_ 2 + _[∥]_ **[W]** _[ϵ][−] ηT_ **[W]**[0] _[∥]_ 2[2] + _ϵ_ ( _ηT_ + _∥_ **W** _[∗] −_ **W** 0 _∥_ 2)� if 2 _ηϵ <_ 1 _/T_ when the empirical risk is _ϵ_ -weakly convex and _L_ -Lipschitz continuous, where **W** _ϵ_ = arg min **W** _LS_ ( **W** )+ _ϵ∥_ **W** _−_ **W** 0 _∥_ 2[2][.][If the a][p][proximation error is small enough, then the] _[ O]_[(1] _[/][√] n_ ) bound can be achieved by choosing _ηT_ = _[√] n_ if _∥_ **W** _ϵ∥_ 2 = _O_ (1). Indeed, their excess risk bound will not converge for the general case. Specifically, note that _LS_ ( **W** _ϵ_ )+ _ϵ∥_ **W** _ϵ −_ **W** 0 _∥_ 2[2] _[≤][L][S]_[(0)+] _[ϵ][∥]_ **[W]**[0] _[∥]_[2] 2[, then there holds] _∥_ **W** _ϵ −_ **W** 0 _∥_ 2[2][=] _[ O]_[(1] _[/ϵ]_[)][.][The simultaneous appearance of] _ηT ϵ_ 1[and] _[ ηTϵ]_[ causes the non-vanishing] error bound. Richards & Rabbat (2021) also investigated the weak convexity of two-layer NNs
+
+6
+
+with a smooth activation function. Under the assumption that the derivative of the loss function is uniformly bounded by a constant, they proved that the weak convexity parameter is controlled by _O_ ( _d/m[c]_ ). We provide a dimension-independent weak convexity parameter which further yields a dimension-independent excess risk rate _O_ (1 _/[√] n_ ). More discussion can be found in Appendix A.3.
+
+3.2 THREE-LAYER NEURAL NETWORKS WITH SCALING PARAMETERS
+
+ˆ Now, we present our results for three-layer NNs. Let _ρ_ = 4 _B_ 2(1 + 2 _B_ 1) and _BT_ = _[√] ηT_ + _∥_ **W** 0 _∥_ 2, where _B_ 1 _, B_ 2 _>_ 0 are constants depending on _c_ **x** _, Bσ′, Bσ′′_ and _c_ 0, whose specific forms are given in Appendix B.1. We first present the generalization bounds for three-layer NNs.
+
+**Theorem 5** (Generalization error) **.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with ηt ≡ η ≤_ 1 _/_ (8ˆ _ρ_ ) _based on S. Assume_
+
+**==> picture [398 x 71] intentionally omitted <==**
+
+Similar to Theorem 1, Theorem 5 also implies that a larger scaling _c_ relaxes the requirement on _m_ . **Remark 4.** As compared to two-layer NNs, the analysis of three-layer NNs is more challenging since we can only show that _λ_ max� _∇_[2] _ℓ_ ( **W** ; _z_ )� _≤ ρ_ **W** where _ρ_ **W** depends on _∥_ **W** _∥_ 2, i.e., the smoothness parameter of _ℓ_ relies on the upper bound of **W** , while that of two-layer NNs is uniformly bounded. In this way, three-layer NNs do not enjoy the almost co-coercivity, which is the key step to controlling the stability of GD. To handle this problem, we first establish a crude estimate _∥_ **W** _t−_ **W** 0 _∥_ 2 _≤ ηtm_[2] _[c][−]_[1] for any _c >_ 1 _/_ 2 by induction strategy. Once having the estimate of _∥_ **W** _t∥_ 2, we can upper bound _ρ_ **W** by a constant _ρ_ ˆ if _m_ satisfies (6). It implies that the loss is _ρ_ ˆ-smooth along the trajectory of GD. Finally, by assuming _η ≤_ 1 _/_ (2ˆ _ρ_ ) we build the upper bound _∥_ **W** _t−_ **W** 0 _∥_ 2 _≤[√]_ 2 _c_ 0 _ηt_ . However, for the case _c_ = 1 _/_ 2, we cannot get a similar bound due to the condition _m_[2] _[−]_[4] _[c] ∥_ **W** _t −_ **W** 0 _∥_ 2[2][=] _[ O]_[(] _[m]_[2] _[c][−]_[1][)][.] Specifically, the upper bound of _∥_ **W** _t−_ **W** 0 _∥_ 2 in this case contains a worse term 2 _[t]_ , which is not easy to control. Therefore, we only consider _c ∈_ (1 _/_ 2 _,_ 1] for three-layer NNs. The estimate of _∥_ **W** _t−_ **W** 0 _∥_ 2 when _c_ =1 _/_ 2 remains an open problem. The detailed proof of the theorem is given in Appendix B.1.
+
+**==> picture [401 x 182] intentionally omitted <==**
+
+Now, we develop excess risk bounds of GD for three-layer NNs by combining Theorem 5 and Theorem 6 together. The proof is given in Appendix B.3.
+
+**Theorem 7** (Excess population risk) **.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with η ≤_ 1 _/_ (8ˆ _ρ_ ) _. Assume_ (6) _and_ (7) _hold. For any c ∈_ (1 _/_ 2 _,_ 1] _, if n_ ≳ _ηT , then there holds_ E[ _L_ ( **W** _T_ ) _−L_ ( **W** _[∗]_ )] = _O_ � _ηnT[L]_[(] **[W]** _[∗]_[) + Λ] _ηT_[1] � _._
+
+Finally, we establish excess risk bounds of GD for three-layer NNs by assuming Assumption 3 holds.
+
+**Corollary 8.** _Let assumptions in Theorem 7 and Assumption 3 hold. The following statements hold._
+
+7
+
+1 _(a) Assume µ ≥_ 1 _/_ 2 _. If c ∈_ [9 _/_ 16 _,_ 1] _, we can choose m ≍_ ( _ηT_ )[4] _and ηT such that n_ 2(8 _µ−_ 3) ≲ 1 2 _c−_ 1 _ηT_ ≲ _[√] n. If c ∈_ (1 _/_ 2 _,_ 9 _/_ 16) _, we can choose m ≍_ ( _ηT_ ) 4 _c−_ 2 _and ηT such that n_ 2 _µ_ +4 _c−_ 3 ≲ _ηT_ ≲ _[√] n. Then_ E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ (1 _/[√] n_ ) _._ 1 _(b) Assume L_ ( **W** _[∗]_ ) = 0 _and µ ≥_ 1 _/_ 2 _. If c ∈_ [9 _/_ 16 _,_ 1] _, we can choose m ≍_ ( _ηT_ )[4] _and ηT_ ≳ _n_ 8 _µ−_ 3 _._ 1 4 _c−_ 2 _If c ∈_ (1 _/_ 2 _,_ 9 _/_ 16) _, we can choose m ≍_ ( _ηT_ ) 4 _c−_ 2 _and ηT such that ηT_ ≳ _n_ 4 _c_ +2 _µ−_ 3 _. Then_ E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ (1 _/n_ ) _._
+
+**Discussion of the Results:** Part (a) in Corollary 8 shows GD for three-layer NNs can achieve the 1 excess risk rate _O_ (1 _/[√] n_ ) with _m ≍_ ( _ηT_ )[4] and _n_ 2(8 _µ−_ 3) ≲ _ηT_ ≲ _[√] n_ for the case _c ∈_ [9 _/_ 16 _,_ 1] and 1 2 _c−_ 1 _m ≍_ ( _ηT_ ) 4 _c−_ 2 and _n_ 2 _µ_ +4 _c−_ 3 ≲ _ηT_ ≲ _[√] n_ for the case _c ∈_ (1 _/_ 2 _,_ 9 _/_ 16), respectively. Note that there 1 is an additional assumption _µ ≥_ 1 _/_ 2 in part (a). Combining this assumption with _∥_ **W** _[∗] ∥_ 2 _≤ m_ 2 _[−][µ]_ together, we know that the population risk minimizer **W** _[∗]_ cannot be too large to reach the power of the exponent of _m_ . The potential reason is that we use a constant to bound the smoothness parameter in the analysis for three-layer NNs. Part (a) also indicates a quantitative condition in terms of _m_ and _c_ where GD for three-layer NNs can achieve the excess risk rate _O_ (1 _/[√] n_ ) in under-parameterization and over-parameterization regimes, which is interpreted in the right panel of Figure 1. The results 2 in part (a) tell us that the smallest width for guaranteeing the desired bounds are _m ≍ n_ 8 _µ−_ 3 for 1 _c ∈_ [9 _/_ 16 _,_ 1] and _m ≍ n_ 2(2 _µ_ +4 _c−_ 3) for _c ∈_ (1 _/_ 2 _,_ 9 _/_ 16). Similar to the left panel of Figure 1, the dotted lines _µ_ =[5] 8[and] _[ µ]_[ =][7] 4 _[−]_[2] _[c]_[ in the right panel of Figure 1 correspond to the setting] _[ m][ ≍][n]_[,] i.e., 8 _µ_ 2 _−_ 3[=][1][and] 2(2 _µ_ +41 _c−_ 3)[=][1][.][Hence,][when] _[c]_[and] _[µ]_[belong][to][the][blue][region][with][dots,] under-parameterization is _sufficient_ to achieve the desired rate. When _c_ and _µ_ are located in the blue region without dots which is between the solid lines and the dotted line, over-parameterization is _necessary_ for GD to achieve the rate _O_ (1 _/[√] n_ ). Our results for three-layer NNs also imply that the over-parameterization does bring benefit for GD to achieve good generalization in the sense that GD can achieve excess risk rate _O_ (1 _/[√] n_ ). Under a low-noise condition, part (b) implies that the excess risk rate can be improved to _O_ (1 _/n_ ) with suitable choices of _m_ and _ηT_ . These results imply that the larger the scaling parameter is, the less over-parameterization is needed for GD to achieve the desired error rate for both the general case and low-noise case.
+
+**Comparison with the Existing Work:** Richards & Rabbat (2021) studied the minimal eigenvalue of the empirical risk Hessian for a three-layer NN with a linear activation in the first layer for Lipschitz and convex losses (e.g., logistic loss), while we focus on NNs with more general activation functions for least square loss. See more detailed discussion in Appendix B.4. Ju et al. (2022) studied the generalization performance of overparameterized three-layer NTK models with the absolute loss and ReLU activation. They showed that the generalization error is in the order of _O_ (1 _/[√] n_ ) when there are infinitely many neurons. They only trained the middle-layer weights of the networks. To the best of our knowledge, our work is the first study on the stability and generalization of GD to train both the first and the second layers of the network in the kernel-free regime.
+
+## 4 MAIN IDEA OF THE PROOF
+
+In this section, we present the main ideas for proving the main results in Section 3.
+
+**Two-layer Neural Networks.** (3) decomposes the excess population risk into three terms: generalization error, optimization error and approximation error. We estimate these three terms separately.
+
+_Generalization error._ From Lemma A.2 we know the generalization error can be upper bounded by the on-average argument stability of GD. Hence, it remains to figure out the on-average argument stability of GD. A key step in our stability analysis is to show that the loss is strongly smooth and weakly convex, which can be obtained by the following results given in Lemma A.3:
+
+1 _λ_ max� _∇_[2] _ℓ_ ( **W** ; _z_ )� _≤ ρ_ and _λ_ min� _∇_[2] _ℓ_ ( **W** ; _z_ )� _≥−_ � _c_[3] **x** _[B][σ][′][B][σ][′′][m]_ 2 _[−]_[2] _[c] ∥_ **W** _−_ **W** 0 _∥_ 2+ _c_[2] **x** _[B][σ] √_ 2 _c_ 0 _m[−][c]_[�] _._ Here _ρ_ = _O_ ( _m_[1] _[−]_[2] _[c]_ ), _λ_ max( _A_ ) and _λ_ min( _A_ ) denote the largest and the smallest eigenvalue of _A_ , respectively. The lower bound of _λ_ min( _∇_[2] _ℓ_ ( **W** ; _z_ )) is related to _∥_ **W** _−_ **W** 0 _∥_ 2. We further show it is uniformly bounded (see the proof of Theorem A.6). Then the smoothness and weak convexity of the loss scale with _m_[1] _[−]_[2] _[c]_ and _m[c]_ , which implies that the loss becomes more smooth and more convex for wider networks with a larger scaling.
+
+8
+
+Based on the above results, we derive the following uniform stability bounds _∥_ **W** _t −_ **W** _t_[(] _[i]_[)] _[∥]_[2] _[≤]_ 2 _ηeT_ �2 _c_ 0 _ρ_ ( _ρηT_ + 2) _/n,_ where **W** _t_[(] _[i]_[)] is the iterates derived by applying SGD to _S_[(] _[i]_[)] . Here, the weak convexity of the loss plays an important role in presenting the almost co-coercivity of the gradient operator, which helps us establish the recursive relationship of _∥_ **W** _t −_ **W** _t_[(] _[i]_[)] _[∥]_[2][.][Note] _ρ_ = _O_ ( _m_[1] _[−]_[2] _[c]_ ) = _O_ (1). Then we know _∥_ **W** _t −_ **W** _t_[(] _[i]_[)] _[∥]_[2][=] _[ O]_[(] _[m]_[1] _n[−]_[2] _[c]_ ( _ηT_ )[3] _[/]_[2] ), which implies that GD is more stable for a wider neural network with a large scaling.
+
+_Optimization error._ A key step is to use the smoothness and weak convexity to control
+
+**==> picture [400 x 30] intentionally omitted <==**
+
+in Lemma A.3. We use _L_ ( **W** _[∗] ηT_ 1[)] _[−][L]_[(] **[W]** _[s]_[)] _[≤][L]_[(] **[W]** _[∗] ηT_ 1[)] _[−][L]_[(] **[W]** _[∗]_[)] _[≤]_[Λ] _ηT_[1][to remove the condition] E[ _L_ ( **W** _s_ )] _≥ L_ ( **W** _[∗] ηT_ 1[)][for][any] _[s][∈]_[[] _[T]_[]][in][Lei][et][al.][(2022).][Then][the][optimization][error][can][be] controlled by the monotonically decreasing of _{LS_ ( **W** _t_ ) _}_ . The proofs are given in Appendix A.2. _Excess population risk._ Combining stability bounds, optimization bounds and approximation error together, and noting that _L_ ( **W** _[∗] ηT_ 1[) +] 2 _ηT_ 1 _[∥]_ **[W]** _[∗] ηT_ 1 _[−]_ **[W]**[0] _[∥]_ 2[2] _[≤][L]_[(] **[W]** _[∗]_[) +] 2 _ηT_ 1 _[∥]_ **[W]** _[∗][−]_ **[W]**[0] _[∥]_ 2[2][, one can] get the final error bound. The detailed proof can be found in Appendix A.3.
+
+**Three-layer Neural Networks.** One of our technical contributions is to show that this almost co-coercivity still holds true along the GD’s trajectory by a novel induction strategy fully exploring the over-parameterization. In particular, we develop stability bounds and control the generalization error by estimating the smoothness and curvature of the loss function:
+
+**==> picture [350 x 22] intentionally omitted <==**
+
+where _ρ_ **W** and _C_ **W** depend on _∥_ **W** _∥_ 2. The specific forms of _ρ_ **W** and _C_ **W** are given in Appendix B.1. As mentioned in Remark 4, it is not easy to estimate _∥_ **W** _t∥_ 2 since the smoothness of the loss relies on the norm of **W** in this case. We address this difficulty by first giving a rough bound of _∥_ **W** _t −_ **W** 0 _∥_ 2 by induction, i.e., _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤ ηtm_[2] _[c][−]_[1] . Then, for any **W** produced by GD iterates, we can control _ρ_ **W** by a constant _ρ_ ˆ if _m_ is large enough. Finally, by assuming _ηρ_ ˆ _≤_ 1 _/_ 2, we prove that _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤[√]_ 2 _c_ 0 _ηt_ and further get _∥_ **W** _t∥_ 2 _≤∥_ **W** 0 _∥_ 2 + _[√]_ 2 _c_ 0 _ηt_ .
+
+After estimating _∥_ **W** _t∥_ 2, we can develop the following almost co-coercivity of the gradient operator: ˆ ( _i_ ) 2 _⟨_ **W** _t −_ **W** _t_[(] _[i]_[)] _[,][ ∇][L] S[\][i]_[(] **[W]** _[t]_[)] _[ −∇][L] S[\][i]_[(] **[W]** _t_[(] _[i]_[)][)] _[⟩≥]_[2] _[η]_ �1 _−_ 4 _ηρ_ ��� _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[)] ��2 _− ϵ_ ˜ _t_ �� **W** _t −_ **W** _t_ ( _i_ ) _− η_ � _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[(] _[i]_[)][)] ���22 _[.]_ It helps to establish the uniform stability bound �� **W** _t−_ **W** _t_ ( _i_ )��2 _[≤]_[2] _[eηT]_ ~~�~~ 2 _c_ 0 _ρ_ ˆ(ˆ _ρηT_ +2) _/n._ Based on stability bounds, we get generalization bounds by Lemma A.2. The proofs are given in Appendix B.1. Similar to two-layer NNs, to estimate the optimization error for three-layer NNs, we first control E[ _∥_ **W** _[∗]_ 1 2[]][ by using the smoothness and weak convexity of the loss.][Then the desired bound] _ηT[−]_ **[W]** _[t][∥]_[2] can be obtained by the monotonically decreasing property of _{LS_ ( **W** _t_ ) _}_ . The final error bounds (Theorem 7 and Corollary 8) can be derived by plugging generalization and optimization bounds back into (3). The detailed proof can be found in Appendix B.3.
+
+## 5 CONCLUSION
+
+In this paper, we extend the previous work (Lei et al., 2022; Richards & Kuzborskij, 2021) by establishing the stability and generalization of GD for NNs with generic network scaling factors. Our results provide a quantitative condition that relates the scaling factor and network complexity to the achievement of the desired excess risk rate in two-layer and three-layer NNs.
+
+There are several remaining questions for further study. Firstly, can our analysis of GD for NNs be extended to SGD with reduced computation cost? The main challenge lies in the non-monotonicity of objective functions in SGD, which is crucial for the stability analysis. Secondly, our analysis for three-layer NNs does not apply to the case of _c_ = 1 _/_ 2. It would be interesting to develop a result specifically for this setting. Lastly, extending our results to multiple layers would be interesting. The main difficulty lies in estimating the maximum and minimum eigenvalues of a Hessian matrix of the empirical risk, which rely on the norm of the coupled weights of different layers.
+
+9
+
+## REFERENCES
+
+- Zeyuan Allen-Zhu, Yuanzhi Li, and Yingyu Liang. Learning and generalization in overparameterized neural networks, going beyond two layers. In _Advances in Neural Information Processing Systems_ , volume 32, 2019a.
+
+- Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via overparameterization. In _International Conference on Machine Learning_ , pp. 242–252. PMLR, 2019b.
+
+- Sanjeev Arora, Simon Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. In _International Conference on Machine Learning_ , pp. 322–332. PMLR, 2019a.
+
+- Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, Russ R Salakhutdinov, and Ruosong Wang. On exact computation with an infinitely wide neural net. _Advances in Neural Information Processing Systems_ , 32, 2019b.
+
+- Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. _arXiv preprint arXiv:1409.0473_ , 2014.
+
+- Peter L Bartlett, Dylan J Foster, and Matus J Telgarsky. Spectrally-normalized margin bounds for neural networks. _Advances in Neural Information Processing Systems_ , 30, 2017.
+
+- Peter L Bartlett, Andrea Montanari, and Alexander Rakhlin. Deep learning: a statistical viewpoint. _Acta numerica_ , 30:87–201, 2021.
+
+- Olivier Bousquet and André Elisseeff. Stability and generalization. _The Journal of Machine Learning Research_ , 2:499–526, 2002.
+
+- Alon Brutzkus, Amir Globerson, Eran Malach, and Shai Shalev-Shwartz. Sgd learns overparameterized networks that provably generalize on linearly separable data. _arXiv preprint arXiv:1710.10174_ , 2017.
+
+- Yuan Cao and Quanquan Gu. Generalization bounds of stochastic gradient descent for wide and deep neural networks. In _Advances in Neural Information Processing Systems_ , volume 32, 2019.
+
+- Zachary Charles and Dimitris Papailiopoulos. Stability and generalization of learning algorithms that converge to global optima. In _International Conference on Machine Learning_ , pp. 745–754. PMLR, 2018.
+
+- Lenaic Chizat and Francis Bach. On the global convergence of gradient descent for over-parameterized models using optimal transport. In _Advances in Neural Information Processing Systems_ , volume 31, 2018.
+
+- Lenaic Chizat, Edouard Oyallon, and Francis Bach. On lazy training in differentiable programming. In _Advances in Neural Information Processing Systems_ , volume 32, 2019.
+
+- Simon Du, Jason Lee, Haochuan Li, Liwei Wang, and Xiyu Zhai. Gradient descent finds global minima of deep neural networks. In _International conference on machine learning_ , pp. 1675–1685. PMLR, 2019.
+
+- Simon S Du, Xiyu Zhai, Barnabas Poczos, and Aarti Singh. Gradient descent provably optimizes over-parameterized neural networks. In _International Conference on Learning Representations_ , 2018.
+
+- Noah Golowich, Alexander Rakhlin, and Ohad Shamir. Size-independent sample complexity of neural networks. In _Conference On Learning Theory_ , pp. 297–299. PMLR, 2018.
+
+- Moritz Hardt, Ben Recht, and Yoram Singer. Train faster, generalize better: Stability of stochastic gradient descent. In _International Conference on Machine Learning_ , pp. 1225–1234. PMLR, 2016.
+
+- Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. _IEEE Signal processing magazine_ , 29(6):82–97, 2012.
+
+10
+
+- Arthur Jacot, Franck Gabriel, and Clément Hongler. Neural tangent kernel: Convergence and generalization in neural networks. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Peizhong Ju, Xiaojun Lin, and Ness B Shroff. On the generalization power of the overfitted three-layer neural tangent kernel model. _arXiv preprint arXiv:2206.02047_ , 2022.
+
+- Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. _Communications of the ACM_ , 60(6):84–90, 2017.
+
+- Ilja Kuzborskij and Christoph Lampert. Data-dependent stability of stochastic gradient descent. In _International Conference on Machine Learning_ , pp. 2820–2829, 2018.
+
+- Yunwen Lei and Yiming Ying. Fine-grained analysis of stability and generalization for stochastic gradient descent. In _International Conference on Machine Learning_ , pp. 5809–5819, 2020a.
+
+- Yunwen Lei and Yiming Ying. Sharper generalization bounds for learning with gradient-dominated objective functions. In _International Conference on Learning Representations_ , 2020b.
+
+- Yunwen Lei, Rong Jin, and Yiming Ying. Stability and generalization analysis of gradient methods for shallow neural networks. In _Advances in Neural Information Processing Systems_ , volume 35, 2022.
+
+- Yuanzhi Li and Yingyu Liang. Learning overparameterized neural networks via stochastic gradient descent on structured data. In _Advances in Neural Information Processing Systems_ , volume 31, 2018.
+
+- Philip M Long and Hanie Sedghi. Generalization bounds for deep convolutional neural networks. _arXiv preprint arXiv:1905.12600_ , 2019.
+
+- Song Mei, Andrea Montanari, and Phan-Minh Nguyen. A mean field view of the landscape of twolayer neural networks. _Proceedings of the National Academy of Sciences_ , 115(33):E7665–E7671, 2018.
+
+- Song Mei, Theodor Misiakiewicz, and Andrea Montanari. Mean-field theory of two-layers neural networks: dimension-free bounds and kernel limit. In _Conference on Learning Theory_ , pp. 2388–2464. PMLR, 2019.
+
+- Wenlong Mou, Liwei Wang, Xiyu Zhai, and Kai Zheng. Generalization bounds of sgld for non-convex learning: Two theoretical viewpoints. In _Conference on Learning Theory_ , pp. 605–638, 2018.
+
+- Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. In _Conference on Learning Theory_ , pp. 1376–1401. PMLR, 2015.
+
+- Behnam Neyshabur, Srinadh Bhojanapalli, and Nathan Srebro. A pac-bayesian approach to spectrallynormalized margin bounds for neural networks. In _International Conference on Learning Representations_ , 2018.
+
+- Atsushi Nitanda, Geoffrey Chinot, and Taiji Suzuki. Gradient descent can learn less over-parameterized two-layer neural networks on classification problems. _arXiv preprint arXiv:1905.09870_ , 2019.
+
+- Dominic Richards and Ilja Kuzborskij. Stability & generalisation of gradient descent for shallow neural networks without the neural tangent kernel. In _Advances in Neural Information Processing Systems_ , volume 34. PMLR, 2021.
+
+- Dominic Richards and Mike Rabbat. Learning with gradient descent and weakly convex losses. In _International Conference on Artificial Intelligence and Statistics_ , pp. 1990–1998. PMLR, 2021.
+
+- David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. _nature_ , 529(7587):484–489, 2016.
+
+- Nathan Srebro, Karthik Sridharan, and Ambuj Tewari. Smoothness, low noise and fast rates. In _Advances in Neural Information Processing Systems_ , pp. 2199–2207, 2010.
+
+11
+
+- Hossein Taheri and Christos Thrampoulidis. Generalization and stability of interpolating neural networks with minimal width. _arXiv preprint arXiv:2302.09235_ , 2023.
+
+- Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. _arXiv e-prints_ , pp. arXiv–1611, 2016.
+
+- Yi Zhou, Yingbin Liang, and Huishuai Zhang. Understanding generalization error of sgd in nonconvex optimization. _Machine Learning_ , 111(1):345–375, 2022.
+
+12
+
+## **Appendix for “Generalization Guarantees of Gradient Descent for Shallow Neural Networks”**
+
+A PROOFS OF TWO-LAYER NEURAL NETWORKS
+
+A.1 PROOFS OF GENERALIZATION BOUNDS
+
+We first introduce the self-bounding property of smooth functions (Srebro et al., 2010). **Lemma A.1** (Self-bounding property) **.** _Suppose for all z ∈Z, the function_ **W** _�→ ℓ_ ( **W** ; _z_ ) _is nonnegative and ρ-smooth. Then ∥∇ℓ_ ( **W** ; _z_ ) _∥_ 2[2] _[≤]_[2] _[ρℓ]_[(] **[W]**[;] _[ z]_[)] _[.]_
+
+The following lemma establishes the connection (Lei & Ying, 2020a) between the on-average argument stability and the generalization error.
+
+**Lemma A.2.** _Let A be an algorithm. If for any z, the map_ **W** _�→ ℓ_ ( **W** ; _z_ ) _is ρ-smooth, then_
+
+**==> picture [400 x 28] intentionally omitted <==**
+
+We work with vectorized quantities so **W** _∈_ R _[md]_ . Then _∇f_ **W** ( **x** ) _∈_ R _[md]_ and _∇_[2] _f_ **W** ( **x** ) _∈_ R _[md][×][md] ._ Denote by _∥_ **W** _∥op_ the spectral norm of a matrix **W** . We first introduce the following lemma, which shows that the loss function is smooth and weakly convex.
+
+**Lemma A.3** (Smoothness and Curvature) **.** _Suppose Assumptions 1 and 2 hold. Let_ **W** 0 _be the initial point of GD. For any fixed_ **W** _∈_ R _[m][×][d] and any z ∈Z, there holds_
+
+**==> picture [244 x 50] intentionally omitted <==**
+
+_Proof._ Recall that _f_ **W** ( **x** ) = _m_ 1 _[c]_ � _mk_ =1 _[a][k][σ]_[(] **[w]** _[k]_ **[x]**[)][.][Let] **[ v]**[=][(] **[v]**[1] _[, . . . ,]_ **[ v]** _[m]_[)] _[∈]_[R] _[dm]_[with] **[ v]** _[k][∈]_[R] _[d]_ where _k ∈_ [ _m_ ]. According to Assumption 1,2 and noting that _|ak|_ = 1, we can give the following estimations:
+
+**==> picture [306 x 89] intentionally omitted <==**
+
+**==> picture [297 x 29] intentionally omitted <==**
+
+and
+
+**==> picture [297 x 13] intentionally omitted <==**
+
+Note
+
+**==> picture [398 x 26] intentionally omitted <==**
+
+**==> picture [264 x 13] intentionally omitted <==**
+
+**==> picture [149 x 48] intentionally omitted <==**
+
+13
+
+**==> picture [404 x 80] intentionally omitted <==**
+
+Combining (A.4) with the fact that _∇f_ **W** ( **x** ) _∇f_ **W** ( **x** ) _[⊤]_ is positive semi-definite together, we obtain
+
+**==> picture [344 x 91] intentionally omitted <==**
+
+where in the third inequality we used (A.5) with **W** _[′]_ = **W** 0 and in the last inequality we used Assumption 2. The proof is completed.
+
+To give an upper bound of the uniform stability, we need the following lemma which shows how the GD iterate will deviate from the initial point.
+
+**Lemma A.4** (Richards & Kuzborskij (2021)) **.** _Suppose the loss is ρ-smooth and η ≤_ 1 _/_ (2 _ρ_ ) _. Then for any t ≥_ 0 _, i ∈_ [ _n_ ] _,_
+
+**==> picture [150 x 46] intentionally omitted <==**
+
+The following lemma shows an almost co-coercivity of the gradient operator associated with shallow neural networks. For any _i ∈_ [ _n_ ], define _S_[(] _[i]_[)] = _{z_ 1 _, . . . , zi−_ 1 _, zi[′][, z][i]_[+1] _[, . . . , z][n][}]_[ as the set formed] from _S_ by replacing the _i_ -th element with _zi[′]_[.][For any] **[ W]** _[ ∈W]_[,]
+
+**==> picture [256 x 22] intentionally omitted <==**
+
+Let _{_ **W** _t}_ and _{_ **W** _t_[(] _[i]_[)] _[}]_[ be the sequence produced by GD based on] _[ S]_[and] _[ S]_[(] _[i]_[)][, respectively.] **Lemma A.5** (Almost Co-coercivity of the Gradient Operator) **.** _Suppose the loss is ρ-smooth and η ≤_ 1 _/_ (2 _ρ_ ) _. Then_
+
+**==> picture [389 x 60] intentionally omitted <==**
+
+_Proof._ This lemma can be proved in a similar way as Lemma 5 in Richards & Kuzborskij (2021) except the estimation of the eigenvalue of Hessian matrix. Specifically, for _α ∈_ [0 _,_ 1], let **W** ( _α_ ) = _α_ **W** _t_ + (1 _− α_ ) **W** _t_[(] _[i]_[)] _− αη_ � _∇ℓ_ ( **W** _t_ ; _z_ ) _−∇ℓ_ ( **W** _t_[(] _[i]_[)][;] _[ z]_[)] �. According to (A.1) and (A.4) , for any **W** _∈W_ , we know
+
+**==> picture [252 x 30] intentionally omitted <==**
+
+14
+
+**==> picture [398 x 175] intentionally omitted <==**
+
+where in the third inequality we used Lemma A.4 and _ℓ_ ( **W** 0; _z_ ) _≤ c_ 0.
+
+Combining the above two inequalities together, we get
+
+**==> picture [396 x 23] intentionally omitted <==**
+
+Similarly, let **W**[�] ( _α_ ) = _α_ **W** _t_[(] _[i]_[)] + (1 _− α_ ) **W** _t − αη_ � _∇ℓ_ ( **W** _t_[(] _[i]_[)][;] _[ z]_[))] _[ −∇][ℓ]_[(] **[W]** _[t]_[;] _[ z]_[)] �, we can prove that **x** _[B][σ][′′] c_ **x** _Bσ′_ (1 + _ηρ_ ) 2 _ηTc_ 0 _λ_ min� _∇_[2] _LS\i_ ( **W**[�] ( _α_ ))� _≥−[c]_[2] _m[c]_ � _m[c][−]_[1] _[/]_[2] _∥_ **W** _t −_ **W** _t_[(] _[i]_[)] _[∥]_[2][+] _[c]_ **[x]** _[B] m[σ][′][c][√][−]_[1] _[/]_[2] + _√_ 2 _c_ 0� _._ The remaining arguments in proving the lemma are the same as Lemma 5 in Richards & Kuzborskij (2021). We omit the proof for simplicity.
+
+Based on the almost co-coercivity property of the gradient operator, we give the following uniform stability theorem.
+
+**Theorem A.6** (Uniform Stability) **.** _Suppose Assumptions 1 and 2 hold. Let S, S_[(] _[i]_[)] _be constructed in Definition 2. Let {_ **W** _t} and {_ **W** _t_[(] _[i]_[)] _[}][ be produced by]_[ (2)] _[ with][ η][≤]_[1] _[/]_[(2] _[ρ]_[)] _[ based on][ S][and][ S]_[(] _[i]_[)] _[,] respectively. Assume_ (4) _holds. For any t ∈_ [ _T_ ] _, there holds_
+
+**==> picture [176 x 24] intentionally omitted <==**
+
+_Proof._ Recall that
+
+**==> picture [256 x 21] intentionally omitted <==**
+
+Note _W_ = R _[m][×][d]_ . Then by the update rule **W** _t_ +1 = **W** _t − η∇LS_ ( **W** _t_ ), there holds
+
+**==> picture [384 x 126] intentionally omitted <==**
+
+where in the first inequality we used ( _a_ + _b_ )[2] _≤_ (1 + _p_ ) _a_[2] + (1 + 1 _/p_ ) _b_[2] .
+
+15
+
+According to Lemma A.5 we can get
+
+**==> picture [408 x 97] intentionally omitted <==**
+
+Rearranging the above inequality and noting that _ηρ ≤_ 1 _/_ 2, we obtain
+
+**==> picture [358 x 34] intentionally omitted <==**
+
+We can choose _m_ large enough to ensure 2 _ηϵt <_ 1 holds for any _t ∈_ [ _T_ ]. Indeed, 2 _ηϵt <_ 1 holds as long as condition (4) holds. We will discuss it at the end of the proof. Now, plugging the above inequality back into (A.7) yields
+
+**==> picture [382 x 43] intentionally omitted <==**
+
+We can apply (A.8) recursively and derive
+
+**==> picture [394 x 44] intentionally omitted <==**
+
+where we used **W** 0 = **W** 0[(] _[i]_[)][.]
+
+According to Lemma A.1 and Lemma A.4, we know
+
+**==> picture [346 x 28] intentionally omitted <==**
+
+Similarly, we can show that
+
+_∥∇ℓ_ ( **W** _j_[(] _[i]_[)][;] _[ z]_[)] _[∥]_ 2[2] _[≤]_[4] _[ρ]_[2] _[ηjL] S_[(] _[i]_[)][(] **[W]**[0][) + 4] _[ρℓ]_[(] **[W]**[0][;] _[ z]_[)] _[.]_ Combining the above three inequalities together, we get
+
+**==> picture [400 x 187] intentionally omitted <==**
+
+16
+
+where we used _ℓ_ ( **W** 0; _z_ ) _≤ c_ 0 for any _z ∈Z_ . If we further choose _p_ = 1 _/t_ , then there holds
+
+**==> picture [328 x 33] intentionally omitted <==**
+
+where we used (1 + 1 _/t_ ) _[t] ≤ e_ .
+
+Now, we prove by induction to show
+
+**==> picture [295 x 24] intentionally omitted <==**
+
+(A.11) with _k_ = 0 holds trivially. Assume (A.11) holds with all _k ≤ t_ , i.e., for all _k ≤ t_
+
+**==> picture [289 x 24] intentionally omitted <==**
+
+and we want to show it holds with _k_ = _t_ + 1 _≤ T_ . Recall that _ϵk_ = _[c]_ **[x]** _m[B][c][σ][′′]_ � _mc_ **x** _[c][−] B_[1] _σ[/] ′_[2][(1 +] _[ ηρ]_[)] �� **W** _k −_ **W** _k_[(] _[i]_[)] ��2[+] _[c]_ **[x]** _[B] m[σ][′][c]_ ~~_√_~~ _[−]_[1] 2 _[/] η_[2] _T c_ 0 + _[√]_ 2 _c_ 0�. From (A.12), for any[˜] _j ≤ t_ , we know
+
+**==> picture [354 x 24] intentionally omitted <==**
+
+Putting the above inequality back into (A.10), we get
+
+**==> picture [256 x 25] intentionally omitted <==**
+
+If _m_ is large enough such that 2 _ηϵ[′] ≤_ 1 _/_ ( _t_ + 1), then we can show
+
+**==> picture [279 x 24] intentionally omitted <==**
+
+Then there holds
+
+**==> picture [371 x 23] intentionally omitted <==**
+
+Now, we discuss the conditions on _m_ . Suppose _m_ satisfies the following conditions
+
+**==> picture [399 x 84] intentionally omitted <==**
+
+which ensures that 2 _ηϵ[′] ≤_ 1 _/_ ( _t_ + 1), and then (A.14) holds. The proof is completed.
+
+We can combine Theorem A.6 and Lemma A.2 together to get the upper bound of the generalization error.
+
+_Proof of Theorem 1._ Eq.(A.9) with _p_ = 1 _/t_ and Eq.(A.13) imply
+
+**==> picture [324 x 66] intentionally omitted <==**
+
+17
+
+where in the last inequality we used self-bounding property of the smooth loss (Lemma A.1). Now, taking an average over _i ∈_ [ _n_ ] and using E� _ℓ_ ( **W** _j_ ; _zi_ )� = E� _ℓ_ ( **W** _j_[(] _[i]_[)][;] _[ z] i[′]_[)] �, we have
+
+**==> picture [359 x 102] intentionally omitted <==**
+
+Combining the above stability bounds with Lemma A.2 together, we get
+
+**==> picture [396 x 67] intentionally omitted <==**
+
+where in the last inequality we used _LS_ ( **W** _t_ ) _≤_[1] _t_ � _tj−_ =11 _[L][S]_[(] **[W]** _[j]_[)][ (Richards & Kuzborskij, 2021).] The proof is completed.
+
+## A.2 PROOFS OF OPTIMIZATION BOUNDS
+
+Before giving the proofs of optimization error bounds, we first introduce the following lemma on the bound of GD iterates.
+
+**Lemma A.7.** _Suppose Assumptions 1 and 2 hold, and η ≤_ 1 _/_ (2 _ρ_ ) _. Assume_ (4) _and_ (5) _hold. Then for any t ∈_ [ _T_ ] _, there holds_
+
+**==> picture [397 x 50] intentionally omitted <==**
+
+**==> picture [384 x 211] intentionally omitted <==**
+
+Then for any _t ∈_ [ _T_ ], let **W**[�] = **W** _t_ , and define
+
+18
+
+It is obvious that _g[′′]_ ( _α_ ) _≥_ 0. Then _g_ ( _α_ ) is convex in _α ∈_ [0 _,_ 1]. Now, by convexity we know
+
+**==> picture [374 x 54] intentionally omitted <==**
+
+Rearranging the above inequality we get
+
+**==> picture [380 x 38] intentionally omitted <==**
+
+Combining (A.15) with the smoothness of the loss we can get
+
+**==> picture [372 x 132] intentionally omitted <==**
+
+**==> picture [400 x 81] intentionally omitted <==**
+
+Then there holds
+
+**==> picture [376 x 49] intentionally omitted <==**
+
+The above inequality with **W** = **W** _[∗] ηT_ 1[implies]
+
+**==> picture [337 x 95] intentionally omitted <==**
+
+19
+
+Combined the above inequality with Theorem 1 implies
+
+**==> picture [393 x 181] intentionally omitted <==**
+
+where in the second inequality we used _L_ ( **W** _[∗] ηT_ 1[)] _[ −][L]_[(] **[W]** _[s]_[)] _[ ≤][L]_[(] **[W]** _[∗] ηT_ 1[)] _[ −][L]_[(] **[W]** _[∗]_[)][ since] _[ L]_[(] **[W]** _[s]_[)] _[ ≥] L_ ( **W** _[∗]_ ) for any _s ∈_ [ _t −_ 1].
+
+On the other hand, using Lemma A.4 we can obtain
+
+**==> picture [398 x 94] intentionally omitted <==**
+
+**==> picture [381 x 227] intentionally omitted <==**
+
+20
+
+Let _x_ = max _s∈_ [ _T_ ] E[ _∥_ **W** _[∗] ηT_ 1 _[−]_ **[W]** _[s][∥]_ 2[2][]] _[ ∨]_[1][.][Then the above inequality implies]
+
+**==> picture [318 x 62] intentionally omitted <==**
+
+**==> picture [401 x 75] intentionally omitted <==**
+
+It then follows that
+
+**==> picture [396 x 50] intentionally omitted <==**
+
+This completes the proof.
+
+Now, we can give the proof of Theorem 2.
+
+**==> picture [397 x 20] intentionally omitted <==**
+
+**==> picture [395 x 79] intentionally omitted <==**
+
+where in the last inequality we used (A.18).
+
+Further, by monotonic decrease of _{LS_ ( **W** _t_ ) _}_ , we know E[ _LS_ ( **W** _T_ )]
+
+**==> picture [392 x 102] intentionally omitted <==**
+
+Note that Lemma A.7 shows
+
+Combining the above two inequalities together, we get
+
+E[ _LS_ ( **W** _T_ )]
+
+**==> picture [391 x 67] intentionally omitted <==**
+
+21
+
+The theorem is proved.
+
+**Lemma A.8.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with η ≤_ 1 _/_ (2 _ρ_ ) _. Assume_ (4) _and_ (5) _hold. Then_
+
+**==> picture [382 x 64] intentionally omitted <==**
+
+_Proof._ Multiplying _T_ over both sides of (A.19) and using Lemma A.7 we get
+
+**==> picture [396 x 179] intentionally omitted <==**
+
+**==> picture [67 x 30] intentionally omitted <==**
+
+**==> picture [381 x 30] intentionally omitted <==**
+
+which completes the proof.
+
+A.3 PROOFS OF EXCESS RISK BOUNDS
+
+_Proof of Theorem 3._ According to Lemma A.8 and noting that[˜] _b_ = _O_ (1), we know
+
+**==> picture [391 x 141] intentionally omitted <==**
+
+The upper bound of the generalization error can be controlled by plugging (A.20) back into Theorem 1 E[ _L_ ( **W** _T_ ) _− LS_ ( **W** _T_ )]
+
+22
+
+The estimation of the optimization error is given by plugging (A.20) back into Theorem 2
+
+**==> picture [409 x 193] intentionally omitted <==**
+
+Combining (A.21) and (A.22) together and noting that the approximation error Λ _ηT_ 1[=] _[ L]_[(] **[W]** _[∗] ηT_ 1[) +] 1 2 _ηT[∥]_ **[W]** _[∗] ηT_ 1 _[−]_ **[W]**[0] _[∥]_ 2[2] _[−][L]_[(] **[W]** _[∗]_[)][ we get] E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )]
+
+**==> picture [408 x 152] intentionally omitted <==**
+
+**==> picture [406 x 62] intentionally omitted <==**
+
+**==> picture [208 x 21] intentionally omitted <==**
+
+The proof is completed.
+
+_Proof of Corollary 4._ **Part (a). Case 1.** From the definition of the approximation error Λ _ηT_ 1[,][we] 1 know that Λ _ηT_ 1 _[≤]_ 2 _ηT[∥]_ **[W]** _[∗][−]_ **[W]**[0] _[∥]_ 2[2][.][Combining this with Theorem 3, we have]
+
+**==> picture [264 x 24] intentionally omitted <==**
+
+Without loss of generality, we consider _∥_ **W** 0 _∥_ 2 as a constant. To obtain the excess risk rate, we discuss the following two cases: 2 _c_ + 6 _µ −_ 3 _>_ 0 and 2 _c_ + 6 _µ −_ 3 _≤_ 0.
+
+23
+
+For the case 2 _c_ +6 _µ−_ 3 _>_ 0, to ensure conditions (4), (5) and _ηT_ ( _[√] ηT_ + _∥_ **W** _[∗]_ 1 _ηT[−]_ **[W]**[0] _[∥]_[2][) =] _[ O]_[(] _[m][c]_[)] 3 hold, we set _m ≍_ ( _ηT_ ) 2 _c_ for this case. Then according to Theorem 3 and Assumption 3 we know
+
+3 _−_ 4 _c_ 3 _−_ 6 _µ−_ 2 _c_ E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ ( _ηT_ ) 2 _c n[−]_[1] + ( _ηT_ ) 2 _c ._ � �
+
+_c c_ 3 _−_ 4 _c_ If _c <_ 3 _/_ 4, under the condition _ηT_ ≲ _n_ 3 _−_ 4 _c_ and _n_ 6 _µ_ +2 _c−_ 3 ≲ _ηT_ , there holds ( _ηT_ ) 2 _c n[−]_[1] + 3 _−_ 6 _µ−_ 2 _c_ ( _ηT_ ) 2 _c_ = _O_ (1 _/[√] n_ ). To ensure the above-mentioned conditions hold simultaneously, we _c c_ further require _c_ + _µ ≥_ 1 such that _n_ 3 _−_ 4 _c_ ≳ _n_ 6 _µ_ +2 _c−_ 3 . Therefore, if _c ∈_ [1 _− µ,_ 3 _/_ 4) and _c_ + 3 _µ >_ 3 _/_ 2, we can obtain
+
+**==> picture [140 x 24] intentionally omitted <==**
+
+3 _c c_ with _m ≍_ ( _ηT_ ) 2 _c_ and _n_ 6 _µ_ +2 _c−_ 3 ≲ _ηT_ ≲ _n_ 3 _−_ 4 _c_ .
+
+3 _−_ 4 _c_ If _c ≥_ 3 _/_ 4, for any _ηT ≥_ 1 and _n ≥_ 1, there holds ( _ηT_ ) 2 _c n[−]_[1] = _O_ (1 _/[√] n_ ). Similar to before, if _ηT_ ≳ _n_ 6 _µ_ +2 _cc−_ 3 , there holds ( _ηT_ ) 3 _−_ 62 _µc−_ 2 _c_ = _O_ (1 _/[√] n_ ). Then we can obtain the excess population 3 _c_ bound _O_ (1 _/[√] n_ ) with _m ≍_ ( _ηT_ ) 2 _c_ and _ηT_ ≳ _n_ 6 _µ_ +2 _c−_ 3 .
+
+1 **Case 2.** For the case 2 _c_ + 6 _µ −_ 3 _≤_ 0, we can choose _m ≍_ ( _ηT_ ) _c_ + _µ−_ 1 _/_ 2 to ensure conditions (4), (5) and _ηT_ ( _[√] ηT_ + _∥_ **W** _[∗]_ 1[From Theorem 3 we know] _ηT[−]_ **[W]**[0] _[∥]_[2][) =] _[ O]_[(] _[m][c]_[)][ hold.]
+
+**==> picture [254 x 15] intentionally omitted <==**
+
+3 _−_ 6 _µ−_ 2 _c_ Note 3 _−_ 6 _µ −_ 2 _c ≥_ 0 and 2 _c_ + 2 _µ −_ 1 _>_ 0. Then the term ( _ηT_ ) 2 _c_ +2 _µ−_ 1 will not converge for any choice of _ηT_ in this case. The proof of Part (a) is completed.
+
+**Part (b).** Now, we consider the low noise case, i.e., _L_ ( **W** _[∗]_ ) = 0. Combining the fact Λ _ηT_ 1 _[≤]_ 1 2 _ηT[∥]_ **[W]** _[∗][−]_ **[W]**[0] _[∥]_ 2[2][, Assumption 3 and Theorem 3 with] _[ L]_[(] **[W]** _[∗]_[) = 0][, we can get]
+
+**==> picture [156 x 25] intentionally omitted <==**
+
+**==> picture [284 x 40] intentionally omitted <==**
+
+We can check that this choice of _m_ and _ηT_ satisfies conditions (4) and (5). The proof is completed.
+
+**Remark A.1.** Several works Charles & Papailiopoulos (2018); Hardt et al. (2016); Lei & Ying (2020b); Zhou et al. (2022); Mou et al. (2018) studied the stability behavior of stochastic gradient methods for non-convex losses, which can be applied to two-layer networks. Specifically, to obtain meaningful stability bounds, Hardt et al. (2016) required a time-dependent step size _ηt_ = 1 _/t_ , which is insufficient to get a good convergence rate for optimization error. Charles & Papailiopoulos (2018); Lei & Ying (2020b); Zhou et al. (2022) established generalization bounds by introducing the Polyak-Łojasiewicz condition, which depends on a problem-dependent number. This number might be large in practice and results in a worse generalization bound. It is hard to provide a direct comparison with their results since the learning settings are different.
+
+## B PROOFS OF THREE-LAYER NEURAL NETWORKS
+
+## B.1 PROOFS OF GENERALIZATION BOUNDS
+
+For a matrix **W** , let **W** _s_ ; _·_ and **W** _is_ denote the _s_ -th row and the ( _i, s_ )-th entry of **W** , respectively.
+
+**Lemma B.1** (Smoothness and Curvature) **.** _Suppose Assumptions 1 and 2 hold. For any fixed_ **W** = ( **W**[(1)] _,_ **W**[(2)] ) _∈_ R _[m][×][d] ×_ R _[m][×][m] and any z ∈Z, there holds_
+
+**==> picture [125 x 13] intentionally omitted <==**
+
+24
+
+**==> picture [386 x 87] intentionally omitted <==**
+
+_Proof._ Let _A_ **W** (1) = [ _σ_ ( **W** 1;[(1)] _·_ **[x]**[)] _[, . . . , σ]_[(] **[W]** _m_[(1)] ; _·_ **[x]**[)]] _[⊤][∈]_[R] _[m]_[.][Let] **[w]**[˜][=] **[w]** _[⊤]_[.][We][first][estimate][the] upper bound of _∥∇f_ **W** ( **x** ) _∥_ 2. Note that for any _k_ = 1 _, . . . , m_
+
+and
+
+**==> picture [356 x 75] intentionally omitted <==**
+
+According to Assumptions 1 and 2, the upper bound of the gradient can be controlled as follows
+
+**==> picture [321 x 89] intentionally omitted <==**
+
+For any _k, j ∈_ [ _m_ ], we know
+
+**==> picture [325 x 101] intentionally omitted <==**
+
+and
+
+**==> picture [312 x 62] intentionally omitted <==**
+
+where _Bk ∈_ R[1] _[×][m]_ with _k_ -th element is 1 and others are 0. Let the vector **u** _∈_ R _[md]_[+] _[m]_[2] have unit norm _∥_ **u** _∥_ 2 = 1 and be composed in a manner matching the parameter **W** = ( **W**[(1)] _,_ **W**[(2)] ) so that **u** = ( **u**[(1)] _,_ **u**[(2)] ), where **u**[(1)] _∈_ R _[m][×][d]_ and **u**[(2)] _∈_ R _[m][×][m]_ have been vectorised in a row-major manner with **u**[(1)] _k ∈_ R[1] _[×][d]_ and **u**[(2)] _k ∈_ R[1] _[×][m]_ . Then
+
+**==> picture [61 x 12] intentionally omitted <==**
+
+**==> picture [391 x 30] intentionally omitted <==**
+
+25
+
+We estimate the above three terms separately. Let **W** _·_[(2)] _k_[denote the] _[ k]_[-th column of] **[ W]**[(2)][.]
+
+**==> picture [398 x 220] intentionally omitted <==**
+
+For the second term in (B.2), we control it by
+
+**==> picture [381 x 29] intentionally omitted <==**
+
+Further, according to Cauchy-Schwarz inequality, we can get
+
+**==> picture [403 x 201] intentionally omitted <==**
+
+where in the first equality we used[�] _[m] k_ =1 **[u]**[(1)] _k_ **[W]** _jk_[(2)] **[x]**[ =] **[ W]** _j_[(2)] ; _·_ **[u]**[(1)] **[x]**[, the second inequality follows] _m_ (2) from �� _j_ =1 **[u]**[(2)] _jk_ � _≤_ �� **u** _·k_ ��1[.][Here] **[ u]**[(2)] _·k_[denotes the] _[ k]_[-th column of] **[ u]**[(2)][.] Plugging (B.3), (B.4) and (B.5) back into (B.2) we can get 2 �� _∇ f_ **W** ( **x** )�� _op_
+
+**==> picture [392 x 35] intentionally omitted <==**
+
+26
+
+For any **W** _,_ **W**[�] , according to Assumptions 1 ans 2 we can get
+
+**==> picture [385 x 143] intentionally omitted <==**
+
+Since
+
+**==> picture [325 x 13] intentionally omitted <==**
+
+Then for any **W** _∈_ R _[md]_[+] _[m]_[2] , we can upper bound the maximal eigenvalue of the Hessian by combining (B.1), (B.6) and (B.7) with **W**[�] = **0** together
+
+**==> picture [370 x 90] intentionally omitted <==**
+
+Note that _∇f_ **W** ( **x** ) _∇f_ **W** ( **x** ) _[⊤]_ is positive semi-definite, then from (B.6), (B.8) and (B.7) with **W**[�] = **0** we can get
+
+**==> picture [258 x 84] intentionally omitted <==**
+
+The proof is completed.
+
+Let _B_ 1 = max � _Bσ_[2] _[′][B][σ][′′][c]_ **x**[2] _[, B][σ][′][B][σ][′′][c]_[2] **x** _[,]_[ 2] _[B][σ][′′][B][σ][c]_ **[x]** _[, B][σ][′′][B] σ_[2] _[,]_[ 2] _[B] σ_[2] _[′′][c]_ **[x]** � and _B_ 2 = max � _Bσ_[4] _[′][c]_ **x**[2] _[, B] σ_[2] _[′][B] σ_[2] _[′′][, B][σ][′′][B][σ][,][ √]_ 2 _c_ 0� _._
+
+**Lemma B.2.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} and {_ **W** _t[′][}][ be produced by GD iterates] with T iterations based on S and S[′] , respectively. Let C >_ 0 _be a constant. Assume η ≤_ 1 _/_ (2ˆ _ρ_ ) _and_ (6) _hold. Then for any c ∈_ (1 _/_ 2 _,_ 1] _and any t_ = 0 _, . . . , T there holds_
+
+**==> picture [106 x 13] intentionally omitted <==**
+
+_and_
+
+**==> picture [196 x 12] intentionally omitted <==**
+
+_Proof._ We will prove by induction to show _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤ ηtm_[2] _[c][−]_[1] . Further, we can show that _ρ_ **W** = _O_ (1) for any **W** produced by GD iterates if _m_ satisfies (6). Then by assuming _η ≤_ 1 _/_ (2ˆ _ρ_ ) we can prove that _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤[√]_ 2 _c_ 0 _ηt_ .
+
+27
+
+It’s obvious that _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤ ηtm_[2] _[c][−]_[1] with _t_ = 0 holds trivially. Assume _∥_ **W** _t −_ **W** 0 _∥_ 2 _≤ ηtm_[2] _[c][−]_[1] . According to the update rule (2) we know
+
+**==> picture [391 x 146] intentionally omitted <==**
+
+where in the third inequality we used (B.1), the last inequality used (B.7) with **W**[�] = **0** . If _m_ is large enough such that
+
+**==> picture [386 x 39] intentionally omitted <==**
+
+then from (B.9) we know that _∥_ **W** _t_ +1 _−_ **W** 0 _∥_ 2 _≤ η_ ( _t_ + 1) _m_[2] _[c][−]_[1] . The first part of the lemma can be proved. Now, we discuss the conditions on _m_ such that (B.10) holds. Let _x_ = _∥_ **W** _t−_ **W** 0 _∥_ 2+ _∥_ **W** 0 _∥_ 2. To guarantee (B.10), it suffices that the following three inequalities hold
+
+**==> picture [399 x 68] intentionally omitted <==**
+
+Recall that
+
+and
+
+**==> picture [278 x 38] intentionally omitted <==**
+
+Then from Lemma B.1 we know
+
+**==> picture [397 x 77] intentionally omitted <==**
+
+_ρ_ **W** _t ≤_ 4 _B_ 2(1 + 2 _B_ 1) := _ρ_ ˆ for any _t_ = 0 _, . . . , T._ Hence, we know that _ℓ_ is _ρ_ ˆ-smooth when the parameter space is the trajectory of GD. Then for any _t_ = 0 _, . . . , T_ and any **W** _t,_ **W** _t[′]_[produced by GD iterates, there holds]
+
+**==> picture [398 x 26] intentionally omitted <==**
+
+**==> picture [218 x 22] intentionally omitted <==**
+
+Rearranging and summing over _j_ yields
+
+**==> picture [302 x 31] intentionally omitted <==**
+
+28
+
+Note that the update rule of GD (2) implies
+
+**==> picture [138 x 31] intentionally omitted <==**
+
+Combining the above two equations together and noting that _ηρ_ ˆ _≤_ 1 _/_ 2, we obtain
+
+**==> picture [378 x 31] intentionally omitted <==**
+
+The proof is completed.
+
+The almost co-coercivity of the gradient operator for three-layer neural networks is given as follows. Recall that _S_[(] _[i]_[)] = _{z_ 1 _, . . . , zi−_ 1 _, zi[′][, z][i]_[+1] _[, z][n][}]_[ is the set formed from] _[ S]_[by replacing the] _[ i]_[-th element] with _zi[′]_[.][For any] **[ W]**[, we have]
+
+**==> picture [256 x 22] intentionally omitted <==**
+
+Let _{_ **W** _t}_ and _{_ **W** _t_[(] _[i]_[)] _[}]_[be][the][sequence][produced][by][GD][based][on] _[S]_[and] _[S]_[(] _[i]_[)][,][respectively.][Let] 1 1 1 _C_ 3 _,T_ = 4 _B_ 1�2 _c_ 0 _ηTm[−]_[3] _[c]_ + � _m_ 2 _[−]_[2] _[c]_ + _m_ 2 _[−]_[3] _[c]_[�] _[√]_ 2 _c_ 0 _ηT_ + _m_[1] _[−]_[3] _[c]_ + _m_ 2 _[−]_[2] _[c]_[�] . **Lemma B.3.** _Suppose η ≤_ 1 _/_ (8ˆ _ρ_ ) _where ρ_ ˆ = 4 _B_ 2(1 + 2 _B_ 1) _. Assume_ (6) _holds. Then_
+
+ˆ ( _i_ ) 2 _⟨_ **W** _t −_ **W** _t_[(] _[i]_[)] _[,][ ∇][L] S[\][i]_[(] **[W]** _[t]_[)] _[ −∇][L] S[\][i]_[(] **[W]** _t_[(] _[i]_[)][)] _[⟩≥]_[2] _[η]_ �1 _−_ 4 _ηρ_ ��� _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[)] ��2 _− ϵ_ ˜ _t_ �� **W** _t −_ **W** _t_ ( _i_ ) _− η_ � _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[(] _[i]_[)][)] ���22 _[,] where_ ˜ _ϵt_ = _C_ 3 _,T_ � _B_ 3� ~~_[√]_~~ _ηTm_ +[2] _[c] ∥[−]_ **W** 2[1] 0 _∥_ 2 + _m_[1] _[−]_[2] _[c]_[��] (1 + _ηρ_ ˆ) _∥_ **W** _t −_ **W** _t_[(] _[i]_[)] _[∥]_[2][+ 2] � _√_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2� + _√_ 2 _c_ 0� _._
+
+_Proof._ For any **W** _∈B_ �0 _,_ 2( _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2)�, defining the following two functions _G_ 1( **W** ) = _LS\i_ ( **W** ) _−⟨∇LS\i_ ( **W** _t_[(] _[i]_[)][)] _[,]_ **[ W]** _[⟩][,] G_ 2( **W** ) = _LS\i_ ( **W** ) _−⟨∇LS\i_ ( **W** _t_ ) _,_ **W** _⟩._ Note that
+
+**==> picture [396 x 25] intentionally omitted <==**
+
+Hence, it is enough to lower bound _G_ 1� **W** _t_ � _− G_ 1� **W** _t_[(] _[i]_[)] � and _G_ 2� **W** _t_[(] _[i]_[)] � _− G_ 2� **W** _t_ �. Note that for any **W** _t_ , Lemma B.1 implies that _∥_ **W** _t∥_ 2 _≤[√]_ 2 _c_ 0 _ηt_ + _∥_ **W** 0 _∥_ 2. Then there holds
+
+**==> picture [294 x 68] intentionally omitted <==**
+
+where in the last inequality we used _ηρ_ ˆ _≤_ 1 _/_ 8. Similarly, we can show that �� **W** _t_ ( _i_ ) _− η∇G_ 2( **W** _t_[(] _[i]_[)][)] ��2 _[≤]_[2(] _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2). Hence, we know **W** _t − η∇G_ 1( **W** _t_ ) _∈B_ �0 _,_ 2( _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2)� and **W** _t_[(] _[i]_[)] _− η∇G_ 2( **W** _t_[(] _[i]_[)][)] _[ ∈B]_ �0 _,_ 2( _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2)�. On the other hand, similar to Lemma B.2, we can show that _G_ 1( **W** ) and _G_ 2( **W** ) is 8ˆ _ρ_ -smooth for any **W** _∈B_ �0 _,_ 2( _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2)�. Combining the above results, we can get
+
+**==> picture [332 x 14] intentionally omitted <==**
+
+**==> picture [345 x 15] intentionally omitted <==**
+
+29
+
+If we can further show that
+
+**==> picture [365 x 49] intentionally omitted <==**
+
+with ˜ _ϵt_ = _C_ 3 _,T_ � _B_ 3� ~~_[√]_~~ _ηTm_ +[2] _[c] ∥[−]_ **W** 2[1] 0 _∥_ 2 + _m_[1] _[−]_[2] _[c]_[��] (1+ _ηρ_ ˆ) _∥_ **W** _t−_ **W** _t_[(] _[i]_[)] _[∥]_[2][+2] � _√_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2�+ _[√]_ 2 _c_ 0�, 1 1 1 where _C_ 3 _,T_ = 4 _B_ 1�2 _c_ 0 _ηTm[−]_[3] _[c]_ +� _m_ 2 _[−]_[2] _[c]_ + _m_ 2 _[−]_[3] _[c]_[�] _[√]_ 2 _c_ 0 _ηT_ + _m_[1] _[−]_[3] _[c]_ + _m_ 2 _[−]_[2] _[c]_[�] . Then combining (B.14), (B.15), (B.16) and (B.17) together yields
+
+**==> picture [358 x 49] intentionally omitted <==**
+
+Plugging the above two inequalities back into (B.13) yields
+
+_⟨_ **W** _t −_ **W** _t_[(] _[i]_[)] _[,][ ∇][L] S[\][i]_[(] **[W]** _[t]_[)] _[ −∇][L] S[\][i]_[(] **[W]** _t_[(] _[i]_[)][)] _[⟩]_[=] _[ G]_[1][(] **[W]** _[t]_[)] _[ −][G]_[1][(] **[W]** _t_[(] _[i]_[)][) +] _[ G]_[2][(] **[W]** _t_[(] _[i]_[)][)] _[ −][G]_[2][(] **[W]** _[t]_[)] _≥_ 2 _η_ �1 _−_ 4 _ηρ_ ˆ��� _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_ ( _i_ )[)] ��22 _[−][ϵ]_[˜] _[t]_ �� **W** _t −_ **W** _t_ ( _i_ ) _[−][η]_ � _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[(] _[i]_[)][)] ���22 _[.]_ The desired result has been proved.
+
+Now, we give the proof of (B.16) and (B.17). For _α ∈_ [0 _,_ 1], let **W** ( _α_ ) = _α_ **W** _t_ + (1 _− α_ ) **W** _t_[(] _[i]_[)] _− αη_ � _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[(] _[i]_[)][)] �. For any _α ∈_ [0 _,_ 1], it’s obvious that _∥_ **W** ( _α_ ) _∥_ 2 _≤_ 2( _[√]_ 2 _c_ 0 _ηt_ + _∥_ **W** 0 _∥_ 2) by using Lemma B.2. Combining this observation with (B.8) we can obtain
+
+**==> picture [363 x 137] intentionally omitted <==**
+
+_≥−ϵ_ ˜ _t,_ (B.18) where the second inequality is due to (B.6), the third inequality is according to (B.1) and in the last inequality we used Lemma B.2. Similarly, let **W**[�] ( _α_ ) = _α_ **W** _t_[(] _[i]_[)] + (1 _− α_ ) **W** _t − αη_ � _∇LS\i_ ( **W** _t_[(] _[i]_[)][)] _[ −] ∇LS\i_ ( **W** _t_ )�, we can also control _λ_ min� _∇_[2] _LS\i_ ( **W**[�] ( _α_ ))� by _−ϵ_ ˜ _t_ .
+
+Let ∆= �� **W** _t −_ **W** _t_ ( _i_ ) _− η_ � _∇LS\i_ ( **W** _t_ ) _−∇LS\i_ ( **W** _t_[(] _[i]_[)][)] ���22[.][We define]
+
+**==> picture [276 x 23] intentionally omitted <==**
+
+From (B.18) we know that _g_ 1 _[′′]_[(] _[α]_[)] _[ ≥]_[0][ for any] _[ α][ ∈]_[[0] _[,]_[ 1]][.][Hence,] _[ g]_[1][is convex on][ [0] _[,]_[ 1]][.][Then from] the convexity of _g_ 1 we can get that
+
+**==> picture [308 x 22] intentionally omitted <==**
+
+which completes the proof of (B.16). We can also show _g_ 2( _α_ ) is convex on [0 _,_ 1] and prove (B.17) in a similar way. The proof is completed.
+
+Based on Lemma B.1, Lemma B.2 and Lemma B.3, we can establish the following uniform stability bounds for three-layer neural networks.
+
+30
+
+**Theorem B.4** (Uniform Stability) **.** _Suppose Assumptions 1 and 2 hold. Let S and S_[(] _[i]_[)] _be constructed in Definition 2. Let {_ **W** _t} and {_ **W** _t_[(] _[i]_[)] _[}][ be produced by]_[ (2)] _[ with][ η][≤]_[1] _[/]_[(8ˆ] _[ρ]_[)] _[ based on][ S][and][ S]_[(] _[i]_[)] _[,] respectively. Assume_ (6) _holds. Then, for any t ∈_ [ _T_ ] _, there holds_
+
+**==> picture [178 x 24] intentionally omitted <==**
+
+_Proof._ Similar to (A.7), by the update rule **W** _t_ +1 = **W** _t − η∇LS_ ( **W** _t_ ) we know
+
+**==> picture [327 x 190] intentionally omitted <==**
+
+From Lemma B.3 we know
+
+Note 4 _ηρ_ ˆ _≤_ 1 _/_ 2 implies 1 _−_ 4(1 _−_ 4 _ηρ_ ˆ) _<_ 0 and condition (6) ensures that 2 _ηϵ_ ˜ _t <_ 1 for any _t ∈_ [ _T_ ]. Then from the above inequality we can get
+
+**==> picture [379 x 16] intentionally omitted <==**
+
+Now, plugging (B.20) back into (B.19) we have
+
+**==> picture [400 x 25] intentionally omitted <==**
+
+Applying the above inequality recursively and noting that **W** 0 = **W** 0[(] _[i]_[)] we get
+
+**==> picture [393 x 135] intentionally omitted <==**
+
+Let _p_ = 1 _/t_ and note that (1 + 1 _/t_ ) _[t] ≤ e_ , we have
+
+According to Lemma B.1 and Lemma A.1, Assumption 2 and noting that _∥_ **W** _j −_ **W** 0 _∥_ 2 _≤[√]_ 2 _c_ 0 _ηj_ for any _j ≤ t_ , we know
+
+**==> picture [284 x 29] intentionally omitted <==**
+
+Similarly, we have
+
+**==> picture [142 x 15] intentionally omitted <==**
+
+31
+
+Combining the above three inequalities together, we get
+
+**==> picture [274 x 33] intentionally omitted <==**
+
+Similar to the proof of Theorem A.6, we can derive the following stability result by induction
+
+**==> picture [188 x 23] intentionally omitted <==**
+
+**==> picture [4 x 3] intentionally omitted <==**
+
+**==> picture [385 x 77] intentionally omitted <==**
+
+with _BT_ = _[√] ηT_ + _∥_ **W** 0 _∥_ 2. The proof is the same as Theorem A.6. We omit it for simplicity.
+
+We can combine Theorem B.4 and Lemma A.2 together to get the upper bound of the generalization error.
+
+_Proof of Theorem 5._ The proof is similar to that of Theorem 1. From (B.21) we know that
+
+**==> picture [284 x 31] intentionally omitted <==**
+
+where we used the self-bounding property of the smooth loss (Lemma A.1).
+
+Then, taking an average over _i ∈_ [ _n_ ] and noting that E� _ℓ_ ( **W** _j_ ; _zi_ )� = E� _ℓ_ ( **W** _j_[(] _[i]_[)][;] _[ z] i[′]_[)] �, we have
+
+**==> picture [257 x 31] intentionally omitted <==**
+
+Combining the above stability bounds with Lemma A.2 together and noting that _LS_ ( **W** _t_ ) _≤_ 1 _t_ � _tj−_ =11 _[L][S]_[(] **[W]** _[j]_[)][ (Richards & Kuzborskij, 2021), the desired result is obtained.]
+
+B.2 PROOFS OF OPTIMIZATION BOUNDS
+
+To show optimization error bounds, we first introduce the following lemma on the bound of GD iterates.
+
+**Lemma B.5.** _Suppose Assumptions 1 and 2 hold, and η ≤_ 1 _/_ (8ˆ _ρ_ ) _. Assume_ (6) _and_ (7) _hold. Then for any t ∈_ [ _T_ ] _, there holds_
+
+**==> picture [382 x 50] intentionally omitted <==**
+
+_Proof._ For any **W** _∈_ R _[md]_ and _α ∈_ [0 _,_ 1], define **W** ( _α_ ) := **W** _t_ + _α_ ( **W** _−_ **W** _t_ ). Similar to (B.18), according to Lemma B.1 we can show that
+
+_λ_ min� _∇_[2] _LS_ ( **W** ( _α_ ))� _≥−C_ **W** ( _α_ )�� _mB_[2] _σ[c]_ 2 _[−][′][c]_[1] **[x]** _[/]_[2] _[∥]_ **[W]**[(] _[α]_[)] _[∥]_[2][+] _[ B] m[σ]_[2] _[′][c][B][−][σ]_[1] �� _∥_ **W** _−_ **W** _t∥_ 2 + _∥_ **W** _t∥_ 2�+ _√_ 2 _c_ 0� _,_ where _C_ **W** ( _α_ ) = _Bσ_[2] _[′] m[B]_[3] _[σ][c][′′][c]_ **x**[2] �� **W** ( _α_ )(2)��22[+] � _Bmσ′_[2] _B[c] σ[−] ′′_ 2[1] _c_[2] **x** +[2] _[B][σ] m[′′][B]_[3] _[c][σ][−][′][B]_[1] 2 _[σ][c]_ **[x]** � _∥_ **W** ( _α_ )[(2)] _∥_ 2 + _[B] m[σ]_[3] _[′′][c][−][B]_[1] _σ_[2][+] 2 _mB_[2] _σ_[2] _[c][−][′][c]_ 2[1] **[x]**[. Let] _[C]_[ˆ] **[W]**[= 4] _[B]_[1] � _m[−]_[3] _[c]_ ( _∥_ **W** _∥_ 2[2][+4] _[c]_[0] _[ηT]_[ +2] _[∥]_ **[W]**[0] _[∥]_[2] 2[)+] _[m]_ 12 _[−]_[2] _[c]_ ( _∥_ **W** _∥_ 2+ _[√]_ 2 _c_ 0 _ηT_ + _∥_ **W** 0 _∥_ 2)�. According to Lemma B.2, we can verify that _C_ **W** ( _α_ ) _≤ C_[ˆ] **W** for any _α ∈_ [0 _,_ 1].
+
+32
+
+Now, let
+
+**==> picture [388 x 40] intentionally omitted <==**
+
+It is obvious that _g_ ( _α_ ) is convex in _α ∈_ [0 _,_ 1]. Similar to the proof of Lemma A.7, by convexity of _g_ and smoothness of the loss we can show that
+
+**==> picture [395 x 87] intentionally omitted <==**
+
+Combining the above inequality with Theorem 5 and let **W** = **W** _[∗] ηT_ 1[, we have]
+
+**==> picture [398 x 209] intentionally omitted <==**
+
+where in the second inequality we used _L_ ( **W** _[∗] ηT_ 1[)] _[ −][L]_[(] **[W]** _[s]_[)] _[ ≤][L]_[(] **[W]** _[∗] ηT_ 1[)] _[ −][L]_[(] **[W]** _[∗]_[)][ since] _[ L]_[(] **[W]** _[s]_[)] _[ ≥] L_ ( **W** _[∗]_ ) for any _s ∈_ [ _t −_ 1].
+
+According to Lemma B.2 we can get
+
+**==> picture [398 x 28] intentionally omitted <==**
+
+**==> picture [384 x 68] intentionally omitted <==**
+
+33
+
+**==> picture [396 x 232] intentionally omitted <==**
+
+**==> picture [399 x 145] intentionally omitted <==**
+
+This completes the proof.
+
+_Proof of Theorem 6._ Combining (B.25) and (B.22) with **W** = **W** _[∗] ηT_ 1[together yields]
+
+**==> picture [410 x 167] intentionally omitted <==**
+
+34
+
+By monotonic decrease of _{LS_ ( **W** _t_ ) _}_ and Lemma B.5, we further know
+
+**==> picture [377 x 104] intentionally omitted <==**
+
+which completes the proof.
+
+Recall that _CT,n_ = _ηT_ + _η_[3] _T_[2] _/n_[2] .
+
+**Lemma B.6.** _Suppose Assumptions 1 and 2 hold. Let {_ **W** _t} be produced by_ (2) _with η ≤_ 1 _/_ (8ˆ _ρ_ ) _. Assume_ (6) _and_ (7) _hold. Then_
+
+**==> picture [308 x 30] intentionally omitted <==**
+
+_Proof._ Multiplying _T_ over both sides of (B.26) and using Lemma B.5 we get
+
+**==> picture [397 x 95] intentionally omitted <==**
+
+**==> picture [308 x 30] intentionally omitted <==**
+
+which completes the proof.
+
+B.3 PROOFS OF EXCESS POPULATION BOUNDS
+
+ˆ _Proof of Theorem 7._ Note _ρ_ = _O_ (1). According to Theorem 5 and Lemma B.6 we know
+
+**==> picture [376 x 25] intentionally omitted <==**
+
+The estimation of the optimization error is given by combining Lemma B.6 and Theorem 6 together
+
+**==> picture [398 x 88] intentionally omitted <==**
+
+35
+
+Combining the above two inequalities together we get
+
+**==> picture [399 x 188] intentionally omitted <==**
+
+The proof is completed.
+
+_Proof of Corollary 8._ **Part (a)** . From the definition of the approximation error Λ _ηT_ 1[and Theorem 7] we can get
+
+**==> picture [258 x 24] intentionally omitted <==**
+
+For the case _c ∈_ [9 _/_ 16 _,_ 1], to ensure conditions (6) and (7) hold, we choose _m ≍_ ( _ηT_ )[4] for this case. Then according to Theorem 7 and Assumption 3, there holds
+
+**==> picture [192 x 21] intentionally omitted <==**
+
+Here, the condition _µ ≥_ 1 _/_ 2 ensures that 3 _−_ 8 _µ <_ 0. Hence, the bound will vanish as _ηT_ tends to 1 0. Further, if _n_ 2(8 _µ−_ 3) ≲ _ηT_ ≲ _[√] n_ (the existence of _ηT_ is ensured by _µ ≥_ 1 _/_ 2), then there holds _ηT/n_ = _O_ ( _n[−]_[1] _[/]_[2] ) and ( _ηT_ )[3] _[−]_[8] _[µ]_ = _O_ ( _n[−]_[1] _[/]_[2] ). That is
+
+**==> picture [140 x 24] intentionally omitted <==**
+
+1 2 _c−_ 1 For the case _c ∈_ (1 _/_ 2 _,_ 9 _/_ 16), we choose _m ≍_ ( _ηT_ ) 4 _c−_ 2 , and _n_ 2 _µ_ +4 _c−_ 3 ≲ _ηT_ ≲ _[√] n_ . From Theorem 7 and Assumption 3 we have
+
+**==> picture [140 x 24] intentionally omitted <==**
+
+The first part of the theorem is proved.
+
+**==> picture [397 x 51] intentionally omitted <==**
+
+1 4 _c−_ 2 For the case _c ∈_ (1 _/_ 2 _,_ 9 _/_ 16), by choosing _m ≍_ ( _ηT_ ) 4 _c−_ 2 and _ηT_ ≳ _n_ 4 _c_ +2 _µ−_ 3 , from Theorem 7 and Assumption 3 we have 1 E[ _L_ ( **W** _T_ ) _− L_ ( **W** _[∗]_ )] = _O_ � � _. n_
+
+The proof is completed.
+
+36
+
+## B.4 MORE DISCUSSION ON RELATED WORKS
+
+Richards & Rabbat (2021) derived a lower bound on the minimum eigenvalue of the Hessian for the three-layer NN, where the first layer activation is linear, and the second activation is smooth. They 1 proved the weak convexity of the empirical risk scales with _m_ 2 _[−]_[2] _[c]_ when optimizing the first and third layers of weights with Lipschitz and convex losses. We train the first and the second layers of the network with general smooth activation functions for both layers. Our result shows that the weak 1 convexity of the least square loss scales with _m_ 2 _[−]_[2] _[c]_ .
+
+37
+
diff --git a/open_review/iclr2024_8614.json b/open_review/iclr2024_8614.json
new file mode 100644
index 0000000000000000000000000000000000000000..400cc51674235edf0f713ee879a414905cbe2899
--- /dev/null
+++ b/open_review/iclr2024_8614.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8614",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "End-to-end Story Plot Generator",
+ "abstract": "Story plots, while short, carry most of the essential information of a full story that may contain tens of thousands of words. We study the problem of automatic generation of story plots, which includes story premise, character descriptions, plot outlines, etc. To generate a single engaging plot, existing plot generators (e.g., DOC (Yang et al., 2022a)) require hundreds to thousands of calls to LLMs (e.g., OpenAI API) in the planning stage of the story plot, which is costly and takes at least several minutes. Moreover, the hard-wired nature of the method makes the pipeline non-differentiable, blocking fast specialization and personalization of the plot generator. In this paper, we overcome these issues with an end-to-end story plot generator, which is (1) faster and cheaper to generate and (2) end-to-end fine-tunable with human feedback. Compared to DOC, our work replaces expensive OpenAI API calls with Llama2 models via careful prompt designs, which leads to the cheap generation of high-quality training datasets. We then perform supervised fine-tuning (SFT) using approximately 13000 story plots to obtain an end-to-end model. The end-to-end model can generate story plots of comparable quality to the previous DOC method and is $>10\\times$ faster (1k tokens in only 30 seconds on average). Furthermore, fine-tuned with RLHF on several different reward models for different aspects of story quality, our model achieves 60.0\\% winning rate against the model after SFT in the aspect of suspense and surprise.",
+ "rebuttal": "We thank the reviewer for reading our response and providing further feedback. \n\n**[Defintion of plots and difference from previous literature]** As we mentioned in the previous response, the (premise, setting, characters, outlines) structure of our plot is proven (by the SOTA story generation work DOC [1]) to be efficient in carrying the essential information of the whole story and generating the whole story. We agree that our plot has a different format from those of some of the previous work, but it is hard or even impossible and maybe unnecessary to propose an efficient format of plot that can unify all the previous formats of plots. We also want to emphasize that our work is an LLM-based story generation method, which makes it natural to choose a text-based plot that might be different from previous work that is not LLM-based. The LLM-based nature of our work makes our story plot different from some previous non-LLM-based works, and this nature makes it possible to generate a story plot at a much faster speed, and our generator model can be easily improved from feedback.\n\n**[Evaluation techniques]** Comparison-based evaluation technique on a specific aspect such as interestingness or the overall quality is also used and proven to be efficient by previous works such as DOC [1]. We emphasize that these aspects are good evaluation metrics on story plots because:\n1. These high-level aspects remain roughly invariant on the whole story and the story plot;\n2. The plots are text-based and relatively short, which can either be read by humans or parsed by LLMs easily.\n\nWe are happy to address any further questions.\n\nWe thank the reviewer for the time spent reading our response. Below we provide further response. \n\n**[Focusing on story plot as our Novelty]** We are happy to see that the reviewer agrees that story generation is a difficult problem. We respectfully disagree that ``the paper does not address any of the difficult aspects of story generation''. Instead, achieving an end-to-end style of (story plot) generation is a very important step from a hand-crafted story generation method to a highly automatic method. One of the important contributions of our work is that we propose focusing on the *story [...]\n\nWe thank the reviewer for their helpful and insightful comments. Below we respond to the questions respectively.\n\n> My major concern is the lack of human evaluation… I hence invite the authors to pair the main evaluations (ie Table 5 and 6) with human evaluation. I will then happily advocate for acceptance.\n\nThanks for your suggestion. We added human evaluation results, and the details can be found in the global response.\n\n> Another minor limitation is that RLHF results in 5 different models, which are each compared against a single SFT model. Could the authors consider combining the differen [...]\n\n**References:**\n\n[1] Yang, Kevin, Dan Klein, Nanyun Peng, and Yuandong Tian. \"Doc: Improving long story coherence with detailed outline control.\" arXiv preprint arXiv:2212.10077 (2022).\n\n[2] Ammanabrolu, Prithviraj, Ethan Tien, Wesley Cheung, Zhaochen Luo, William Ma, Lara Martin, and Mark Riedl. \"Guided neural language generation for automated storytelling.\" In Proceedings of the Second Workshop on Storytelling, pp. 46-55. 2019.\n\n[3] Tian, Yufei, and Nanyun Peng. \"Zero-shot sonnet generation with discourse-level planning and aesthetics features.\" arXiv preprint arXiv:2205.01821 (2022).\n\n[4] Z [...]\n\nWe thank the reviewer for their helpful and insightful comments. Below we respond to the questions respectively.\n\n> For someone who is familiar with DOC and LLMs, the paper does not seem to offer any new insight or new knowledge. Yes, Llama-2 and GPT-3 can do roughly the same things. Yes, we can use a supervisedly finetuned model to replace repeated LLM calls. Yes, we can do RLHF. All these are common knowledge. Hence, it may seem that the paper does not make a real scientific contribution.\n\nAs reviewer zk9y mentioned, Our paper “addresses a difficult problem, which has a long history in AI an [...]\n\n> How is the system dealing with relationships between characters? With the plot/character duality? What is the average length of generated plots (counted in plot units or narrative functions)?\n\nOur e2e model treats the story plot (premise, settings, characters, outlines) as a sequence and does not need to explicitly deal with the relationship between characters, which can be regarded as one of the advantages of the e2e story plot generator, compared to a hand-crafted method. \n \nFor the OpenPlot pipeline (or original DOC [1]), after initializing the characters, when generating bulletin points [...]\n\nWe thank the reviewer for their helpful and insightful comments. Below we respond to the questions respectively.\n\n> Although the paper describes generated units as 'plots' it stands in-between substantial previous work of Plan-based plot generation… It is thus unclear whether what is presented in the paper, in particular in Figure 7 are plots or storyboards…\n\nWe agree that the terminology ‘plot’ does not have a rigorous definition, and there are different choices of the format of the plot. The most suitable definition of the plot in our paper should be ‘some certain structure that captures mos [...]\n\n### Global response (1/3)\nWe thank all the reviewers for their efforts in reviewing our paper and providing helpful and insightful feedback. Below we first respond to some common questions.\n\n**[Name of different models in the revision and rebuttal]**\nTo make the presentation more clear and concise, we name the rebuilt pipeline from the original DOC **OpenPlot**, name the end-to-end model after SFT **E2EPlot**, and name the model after RLHF **RLPlot**. Note that we have five different **RLPlot** models w.r.t. five different aspects, and we will also use **RLPlot_Q1, …, RLPlot_Q6** to refer to [...]\n\n### Global response (2/3)\nFinally, we present the detailed result of human evaluation. Since we have fi\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 1,
+ 6
+ ],
+ "score_mean": 4.0,
+ "score_variance": 7,
+ "score_spread": 5,
+ "score_min": 1,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "The author's rebuttal has made efforts to address several concerns, particularly the human evaluation, which has been quite helpful.\n\nHowever, even after the author's rebuttal, a major concern remains centered on the novelty of this work. The specific discussions regarding novelty can be summarized as follows:\n\n1. Given the existence of the DOC work, it appears that the paper offers limited new insights into plot-based story generation.\n2. The authors argue that tackling a challenging problem adds to the novelty of their work. However, there is a debate as to whether merely addressing a difficult problem is sufficient.\n3. There is also a debate about whether \"speedup\" can be considered a substantial contribution and novelty in this context.\n\nThe author responses have not effectively addressed Point 1.\n\nRegarding Point 2, there is partial agreement. While it is recognized that targeting a challenging problem is commendable, the typical approach in our field involves formally defining the problem and creating new benchmarks. (We understand that the aforementioned process is not easy for this research direction). However, given the ongoing inconsistency regarding the definition of plots, it is argued that the paper may not fully meet the standards for targeting a difficult problem as a novelty.\n\nFor Point 3, it is acknowledged that some reviewers agree that speed improvement can be considered a contribution. However, one of the reviewer also raised a valid point regarding which ",
+ "forum_id": "SuUh5aRbbu",
+ "primary_area": "generative models",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_zk9y",
+ "review_id": "73EuIVUwRY",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 5
+ },
+ "review_text_chars": 6746,
+ "edit_detected": true,
+ "edit_delta_seconds": 849251,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_vgZV",
+ "review_id": "PSGlhXrFYT",
+ "scores": {
+ "rating": 1,
+ "soundness": 1,
+ "presentation": 2,
+ "contribution": 1,
+ "confidence": 5
+ },
+ "review_text_chars": 2725,
+ "edit_detected": true,
+ "edit_delta_seconds": 1988076,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_G5uN",
+ "review_id": "3JpJR1l9M7",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 3372,
+ "edit_detected": true,
+ "edit_delta_seconds": 2244248,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8614.md b/open_review/iclr2024_8614.md
new file mode 100644
index 0000000000000000000000000000000000000000..410e3dd7503fb37fe5054684bc6c69e973f7c52a
--- /dev/null
+++ b/open_review/iclr2024_8614.md
@@ -0,0 +1,658 @@
+
+
+## - - END TO END STORY PLOT GENERATOR
+
+Authors withheld for review
+
+## ABSTRACT
+
+Story plots, while short, carry most of the essential information of a full story that may contain tens of thousands of words. We study the problem of automatic generation of story plots, which includes story premise, character descriptions, plot outlines, etc. To generate a single engaging plot, existing plot generators (e.g., DOC (Yang et al., 2022a)) require hundreds to thousands of calls to LLMs (e.g., OpenAI API) in the planning stage of the story plot, which is costly and takes at least several minutes. Moreover, the hard-wired nature of the method makes the pipeline non-differentiable, blocking fast specialization and personalization of the plot generator. In this paper, we propose three models, OpenPlot, E2EPlot and RLPlot, to address these challenges. OpenPlot replaces expensive OpenAI API calls with LLaMA2 (Touvron et al., 2023) calls via careful prompt designs, which leads to inexpensive generation of high-quality training datasets of story plots. We then train an end-to-end story plot generator, E2EPlot, by supervised fine-tuning (SFT) using approximately 13000 story plots generated by OpenPlot. E2EPlot generates story plots of comparable quality to OpenPlot, and is _>_ 10 _×_ faster (1k tokens in only 30 seconds on average). Finally, we obtain RLPlot that is further fine-tuned with RLHF on several different reward models for different aspects of story quality, which yields 60.0% winning rate against E2EPlot along the aspect of suspense and surprise.
+
+## 1 INTRODUCTIONS
+
+Storytelling has been of great importance throughout human history. In ancient eras, narratives served as an important medium for disseminating knowledge between generations. Even today, the significance of stories remains undiminished since they continue to shape our cultural paradigms, foster empathy, and convey various ideas. Beyond its historical importance, people love reading stories because they get to experience events that might never happen to them.
+
+In the era of large language models (LLMs), readers have greater access to stories as they can now be crafted not only by human authors but also by LLMs. Many previous works can automatically generate short stories, where the length ranges from several sentences to a couple of paragraphs (Fan et al., 2018; Yao et al., 2019; Rashkin et al., 2020; Han et al., 2022). However, even a short story from a human perspective typically consists of thousands of words, which is a long context for a language model. It has long been a challenge for AI to generate long-form, coherent stories (Charniak, 1972; Turner, 2014), let alone interesting ones. While there have been advances in dealing with long context for LLMs (Chen et al., 2023a; Han et al., 2023; Chen et al., 2023b; Xiao et al., 2023), on a broader scale, generating high-quality long outputs remains a major challenge even for the most advanced LLMs such as GPT4 (OpenAI, 2023) and Llama 2 (Touvron et al., 2023).
+
+A more recent line of work (Yang et al., 2022b;a; Zhou et al., 2023) focuses on improving the quality of generated stories in terms of length and coherence. By generating stories hierarchically, calling LLMs recursively, or adding more detailed control during the generation, these methods are able to generate longer and higher-quality stories than a rolling-window baseline, i.e., iteratively prompting LLMs such as ChatGPT to continue writing. However, these previous methods consist of complex hard-wired procedures. For example, the DOC method (Yang et al., 2022a) generates hierarchical outlines with one bullet point per LLM call in a breadth-first order. To ensure the quality of each bullet point, DOC requires multiple responses per prompt and performs rejection sampling. This requires _thousands of calls_ to InstructGPT3-175B (text-davinci-002) in the planning stage that generates story plots, which is costly and time-consuming compared to the plain rolling-window
+
+1
+
+method and is hard to improve by fine-tuning since the generation procedure is hard-wired and thus not differentiable. Thus, it is appealing to have an _end-to-end_ model, which not only has fast generation speed and can be further fine-tuned but can also generate high-quality stories comparable to the state-of-the-art method.
+
+However, it might be overly ambitious to aim for an end-to-end model that can directly generate a complete story that is long and of high quality, even with SoTA LLMs. Therefore we focus on story _plot_ generation, which has two benefits. First, the story plots are much shorter than stories in their entire forms, are highly structured and carry almost all the essential information of the story. This makes it much easier for LLMs to learn and generate, for reward models to give preference signals, and for humans to read and evaluate. Second, story plots can lead to detailed story rendering via existing pipelines (e.g., DOC (Yang et al., 2022a)) by calling LLMs with proper prompting and logit controls (Yang & Klein, 2021), which makes them convenient bridges that connect the entire story.
+
+In this work, we aim to create an end-to-end story plot generator that can automatically generate story plots with one LLM forward pass. To train such an end-to-end model, we first re-implement the story plot generation procedure, namely OpenPlot, of the DOC method using Llama2-13Bchat (Touvron et al., 2023). OpenPlot is a fully reproducible and parallelizable pipeline, compared to the DOC pipeline which relies on OpenAI APIs and may subject to model update and rate limit that are out of reach by end users.
+
+Using OpenPlot, we generate a large batch of story plots, which are used to fine-tune an endto-end model, namely E2EPlot, based on Llama2-7B-chat. E2EPlot is able to generate story plots of comparable quality to OpenPlot, according to GPT4 (OpenAI, 2023) evaluation results among overall qualities (see Section 3 for details), and at a 10x faster speed (about 1000 tokens in 30 seconds), while the generation speed of DOC is much slower, taking several minutes to generate a story plot by calling OpenAI APIs many times.
+
+Finally, to demonstrate that E2EPlot is capable of specializing into specific human feedback, we further fine-tune it along various aspects related to story quality (e.g., interestingness, coherence, good ending, etc.). Specifically, we train several different reward models, one for each aspects according to GPT4 (OpenAI, 2023) evaluation results (see Section 3 for details), and further finetune E2EPlot by RLHF to improve the quality of the generator. The resulting model, RLPlot, yields 60% win rate against E2EPlot along the aspect of suspense and surprise.
+
+## 2 METHODS
+
+In this section, we introduce our full pipeline for building the end-to-end story plot generator (OpenPlot, E2EPlot and RLPlot) in details. In Section 2.1, we re-design the existing DOC pipeline (Yang et al., 2022a) by Llama2 to get rid of the restriction of rate limits and unpredictable model update in calling OpenAI APIs. The resulting pipeline, OpenPlot, enables large batch generation, allowing us to create a large training dataset. In Section 2.2, we use the training dataset to fine-tune the Llama2-7B-chat model (Touvron et al., 2023) to obtain an end-to-end model, E2EPlot. In Section 2.3, we further train several reward models for different aspects and improve E2EPlot using RLHF to yield RLPlot.
+
+## 2.1 PIPELINE FOR CREATING DATASETS: OP E NPL O T
+
+We first discuss the motivation for modifying the previous pipeline and the major challenges in Section 2.1.1 and then discuss the solutions in detail in Section 2.1.2. More details of the exact format of the prompts we used are deferred to Appendix A.
+
+## 2.1.1 MOTIVATION AND MAJOR CHALLENGES
+
+To train an end-to-end story plot generator, we first need to create a large training dataset consisting of thousands of story plots. The previous DOC pipeline (Yang et al., 2022a) is a promising candidate for creating a high-quality training set since it is one of the state-of-the-art approaches for story plot generation. However, it cannot be directly applied to our case for the following reasons. First, the original DOC method heavily relies on OpenAI API calls, and thus the generation procedure is largely constrained by the OpenAI API rate limit if done in parallel. Second, it uses a completion
+
+2
+
+model that supports suffix (i.e., a model that can do text infilling given a text prefix and a text suffix, Bavarian et al. (2022)) to perform most tasks, while many advanced LLMs, such as GPT4 (OpenAI, 2023) and Llama2 (Touvron et al., 2023), are chat models and do not support suffix.
+
+To this end, we follow the logic of Yang et al. (2022a) to build the pipeline while replacing textdavinci-002 with Llama2-13B-chat (Touvron et al., 2023). However, replacing text-davinci-002 with Llama2-13B-chat introduces new challenges for the story plot generation. Below, we first list three major challenges and the high-level ideas of corresponding solutions, and then discuss the solutions in detail in Section 2.1.2.
+
+ - **Challenge 1: How to generate the outline in a breadth-first and coarse-to-fine manner and leverage proper contextual information?** The story plot generated by the DOC pipeline contains the Premise, Setting, Characters, and Outline (see Table 7 for the exact form of story plots). The outline is hierarchical and contains two levels of bullet points[1] . The DOC method generates one bullet point at a time in breadth-first order (or, equivalently, a coarse-to-fine manner), i.e., it first generates all the top-level bullet points and then expands each top-level point (e.g., Point 1) by generating sub-level points (e.g., Point 1a, Point 1b, etc.) under it. This coarse-to-fine manner is consistent with the way humans make plans. However, note that the second-level points need to be consistent with not only the previous and current top-level outlines but also the subsequent top-level outlines. For example, the bullet point 2a needs to be consistent with Point 1 and Point 2, but also needs to be consistent with the content of Point 3 since it has already been generated. Therefore, one should include as many existing outline points as possible regardless of the relative position. An ideal solution is that if we have access to a completion model which supports suffix, we can put the preceding points in the prompt and the subsequent points in the suffix, which is helpful to keep the consistency of the whole outline.
+
+ - **Challenge 2: How to use chat models to substitute for completion models that support suffix?** The previous DOC method with text-davinci-002, a completion model that supports suffix, adopted the above method to generate the hierarchical outline. However, since we use Llama2 for our rebuilt pipeline and Llama2 is a chat model that does not accept a suffix, we must develop a new solution to keep the consistency of the generated outline. We address this issue by simulating a completion model using a chat model. The high-level idea is that we start the prompt with detailed instructions on how to perform a completion task, then provide the suffix before the original prompt. By our observation, it would be better to provide the suffix first and then the original prompt, since the generated content usually continues with the end of the whole prompt. More details are discussed in Section 2.1.2 and Appendix A.
+
+ - **Challenge 3: How to maintain the quality of the story?** The DOC pipeline generates one point at a time and requires hundreds of LLM calls, and a single failed step could derail the whole story. To prevent this, the DOC pipeline generates multiple candidate responses and selects the best one at each step. However, due to the performance difference between different LLMs, after replacing text-davinci-002 with Llama2-13b-chat, the prompt for the original DOC pipeline does not necessarily work for our rebuilt pipeline. Therefore, we carefully designed the prompts with detailed instructions to ensure the quality of the generated story. We will discuss some concrete examples of the instructions in the prompt in Section 2.1.2.
+
+- 2.1.2 OVERVIEW AND DISCUSSION OF THE PIPELINE
+
+We discussed the high-level solution to major challenges for our rebuilt DOC pipeline, OpenPlot, in Section 2.1.1. In this section, we discuss more details of the prompt design for the pipeline. One can refer to Appendix A for the exact form of prompts we use in the pipeline, and examples of the structure of story plots are provided in Table 7.
+
+**Premise.** The first step is to generate a premise for the story. For the previous DOC pipeline, it suffices to provide the prompt of “Write a premise for a short story.” For OpenPlot, the same
+
+> 1Actually, the DOC method supports different numbers of levels for the hierarchical outline. In this paper, we focus on a two-level hierarchy.
+
+3
+
+prompt might result in a response with an unexpected format. To ensure that the format of the output is structured and thus easy to process, we end the prompt with “Premise: ” to enforce that the language model’s response starts after “Premise: ”[2]
+
+**Setting.** After obtaining the premise of the whole story, the next step is to infer the story’s setting from the premise. This step is relatively simple and does not require additional design strategies.
+
+**Characters.** One of the most important elements in a story is the characters, whose intrinsic motivations and interactions with each other are vital to the trajectory of the whole story. Based on the premise and setting, we generate characters one by one. For each character, we first generate their full name and then their portrait.
+
+**Remark 2.1.** _In the original DOC method, one only needs to end the prompt with “Character Portrait: ” to guide the LLM to generate the portrait. However, when we replace the text-davinci002 engine with the Llama2 model, due to the performance difference between these two models, the Llama2 model tends to output a longer description for the portrait. Moreover, the output of Llama2 focuses more on the age and appearance of the character instead of occupation, experiences, or relationships with other characters (e.g., “Tom is 22 years old and has brown curly hair”). Therefore, we add detailed instructions on generating portraits such as “focusing on relationship between characters, occupation and experience instead of appearance” to ensure the generated portraits contain more useful information about the character._
+
+After generating the first character, we can repeat the above procedure to generate more characters. We can control the number of major characters in the story, and in our implementation, we set the desired number to be 3-6, since too few characters is likely to make the story boring, and too many characters may reduce opportunities for characters to interact with each other.
+
+**Outline.** After generating all the major characters, we are ready to build the main skeleton of the story. Similar to DOC, we aim to create a hierarchical outline. In this paper, we create two-level hierarchical outlines, where the top level typically contains four bullet points, and the second level contains three to four subpoints under each top-level point. We also generate the outline in breadthfirst order, i.e., we first generate the top-level outline (numbered as 1, 2, 3, _. . ._ ) and then generate the sub-level outline (numbered as 1a, 1b, _. . ._ , 2a, _. . ._ ).
+
+**Remark 2.2.** _To make the generated story plots more reasonable, we add corresponding instructions. First, to control the length of the top-level outline, we require the LLM to use no more than 4 points. Second, to make the generation procedure more stable, we require the LLM to generate only one point at a time. Third, during the preliminary experiments, we found that the generated plots sometimes have a missing ending; to address this issue, we explicitly ask the LLM to make sure that the generated top-level outline has a clear ending. A tricky point is that adding “IMPORTANT: Please” significantly improves the quality of the generated outline regarding a clear ending._
+
+After generating the top bullet point 1, we can include the content of point 1 in the prompt and continue to generate the subsequent points until the whole top-level outline is complete. Since we generate the outline in breadth-first order, we will expand each top-level node in sequence. Note that it is important to keep the generated subpoint consistent with not only the previous points but also the subsequent points. To achieve this, the original DOC method uses a completion model (text-davinci-002) and adds a suffix containing the content of all subsequent points. Since we use Llama2 in our rebuilt pipeline, which is a chat model and thus does not accept suffixes, we need to simulate a completion model using a chat model.
+
+**Remark 2.3.** _To simulate a completion model using a chat model, we need to include all the contents in the prompt for the chat model and add detailed instructions. First, we observe that putting the content of the original prompt after the suffix makes it easier for the LLM to continue with the original prompt. Second, we also need to add instructions at the beginning of the whole prompt, such as “Your output should not contain the content of the suffix. Only use the suffix as complementary information” to obtain desired results since otherwise, the LLM will memorize the context of the suffix, and the output will be nearly identical to the suffix. There is also a detailed instruction in the prefix (i.e., the original prompt for the completion model) on how to generate the current sub-level_
+
+> 2Note that this is a guiding prompt strategy (Saravia, 2022).
+
+4
+
+_points, such as “generating one or two points without repeating the content of the suffix and stop”, which can “reinforce” the requirement that the output should not repeat the content of the suffix. See more details and the exact format of the prompt and instructions in Appendix A._
+
+After expanding each top-level point by generating sub-points, we obtain a hierarchical outline, and the story plot generation procedure is finished.
+
+## 2.2 TRAINING END-TO-END MODEL: E2EPL O T
+
+After building the pipeline for batch generation of story plots, we can use the generated dataset to train an end-to-end model. We first generated 16000 story plots and then filtered them by excluding bad-structured outlines (we noticed that a small portion of story plots generated by OpenPlot have missing outline bullet points, e.g., top-level point 1 is missing and the outline starts with secondlevel point 1a) to get 12824 plots as the training set, and performed SFT. In the training set, we use the premise as the prompt and the remaining parts of the story plots as the response. The endto-end model is fine-tuned for 1000 steps with a mini-batch size of 8 using 8 _×_ A100 80G GPUs simultaneously (so one step equals 8 _×_ 8 = 64 story plots, and one epoch roughly equals 200 steps) from Llama2-7B-chat (Touvron et al., 2023) within a few hours.
+
+To test the quality of story plots generated by our end-to-end model E2EPlot, we generate 500 premises, and for each premise, we generate a story plot pair, one from the DOC pipeline with Llama2 (i.e., OpenPlot) and the other from E2EPlot. We compare the overall quality of the 500 story plot pairs using GPT4 (OpenAI, 2023) as the reference. As Table 5 shows, the story plots generated by E2EPlot have comparable quality (slightly better) to the DOC pipeline with Llama2 (OpenPlot). Further details of evaluation by GPT4 are deferred to Appendix B.
+
+||DOC|OpenPlot|E2EPlot|
+|---|---|---|---|
+||(w/ OpenAI API)|(DOC w/ LLama2)|(SFT)|
+|Generation speed|_∼_5 mins (with rate limit and several dollars)|_∼_30 mins|_∼_30 s|
+|# Calls to LLM|_>_100|_>_100|1|
+
+Table 1: Comparison of DOC, OpenPlot, and E2EPlot to generate one story plot.
+
+Table 1 compares the performance of our end-to-end model E2EPlot and the previous DOC pipeline in generation procedure. In Section 3, we also provide an example of story plots generated from the same premise by OpenPlot and E2EPlot, respectively.
+
+## 2.3 REWARD MODEL TRAINING AND RLHF: RLPL O T
+
+One of the most important advantages of an end-to-end model such as our E2EPlot is that it can be easily fine-tuned from human feedback as long as a good reward model can be learned. With the pipeline in Section 2.1 using oasst-sft-6-llama-30b (K¨opf et al., 2023)[3] , we generate 7000 comparison story plot pairs, where each pair contains two story plots with the same premise. We use the same premise for each pair since it might be hard to compare two totally different story plots, and by controlling the premise, the preference labels might contain richer information related to our aspects of interest. Table 2 shows preference questions we ask human annotators to answer, where each question corresponds to one aspect of story quality. Note that there is no Q2 in Table 2 since Q2 asks annotators to explain their answer to Q1 with a minimum word count of 25, which is designed primarily to ensure the quality of the label.
+
+**Remark 2.4.** _The following is an example of the answers to Q2: “ In Plot A, there is a clear development of the relationship between the characters. It’s obvious when Raven begins to learn about human emotion from James, and it’s played out smoothly. In Plot B, Luna seems to have some repetitive plot points and the overarching plot is more about the human characters realizing that the android is intelligent. I prefer Plot A where Raven has the realization that she’s massively impactful_
+
+> 3We use oasst-llama-30b since when we produce the dataset containing 7000 comparison story plot pairs, Llama2 has not been released.
+
+5
+
+|**Q1**|Which story plot is_more interesting_to you overall?|
+|---|---|
+|**Q3**|In your opinion, which one of the plots above could generate a_more interesting book or movie_(when|
+||a full story is written based on it)?|
+|**Q4**|Which story plot created more_suspense and surprise_?|
+|**Q5**|Which story’s characters or events do you_identify with or care for more_?|
+|**Q6**|Which story has a_better ending_?|
+
+Table 2: Five different questions for 7000 comparison story plot pairs.
+
+_on the elderly man’s life because of how close their relationship has become.” The answer to Q2 is consistent with the answer to Q1 for the same annotator._
+
+Table 3 shows the human evaluation results for the 7000 story plot pairs. For each question (aspect), we keep the plot pairs that the response is either “Plot A is better” or “Plot B is better”, and train a reward model from Llama2-7B-chat (Touvron et al., 2023) using cross-entropy loss for that specific aspect. Compared to Ammanabrolu et al. (2019), where the reward is based on how close the generated event is to a pre-trained goal, our reward model training is more similar to CARP (Castricato et al., 2022), a contrastively-trained preference model as a reward signal in story generation. Note that our reward model is trained on story plots instead of the whole story, which makes learning and human labeling easier without losing important signals. Finally, we obtain five different reward models along different aspects. Table 4 shows the validation accuracy of our trained reward models for each aspect, where the training-validation split ratio is 9 : 1.
+
+|Aspects|Plot A|Plot B|Both|Neither|
+|---|---|---|---|---|
+|**Q1**|32%|42%|12%|15%|
+|**Q3**|31%|41%|14%|14%|
+|**Q4**|29%|38%|13%|20%|
+|**Q5**|30%|39%|14%|17%|
+|**Q6**|30%|37%|9%|24%|
+
+Table 3: Human preference labels on 7000 story plot pairs.
+
+|Questions/aspects|**Q1**|**Q3**|**Q4**|**Q5**|**Q6**|
+|---|---|---|---|---|---|
+|Validation accuracy|0.6050|0.5903|0.6365|0.5945|0.6723|
+
+Table 4: Validation accuracy for five different reward models on corresponding questions/aspects.
+
+Using the trained reward models, we can further do RLHF on our end-to-end model E2EPlot to improve the quality of the generated story plots in various aspects. We use standard RLHF training objective (e.g., Equation (2) in Ouyang et al. (2022)):
+
+**==> picture [242 x 18] intentionally omitted <==**
+
+where _πϕ_[RL][is the learned policy by RLHF,] _[ r][θ]_[is the reward model,] _[ π]_[SFT][is the policy after SFT (our] E2EPlot), and _β_ is to control the KL divergence. The prompt _x_ , i.e., the premise, is generated by the OpenPlot pipeline. We show the performance of our end-to-end model after RLHF (i.e., RLPlot) in Section 3.
+
+- 3 RESULTS
+
+In this section, we provide quantitative results on the quality of the generated story plots of our end-to-end models after SFT (E2EPlot) and RLHF (RLPlot). We also provide an example of the
+
+6
+
+story plot generated by E2EPlot for better visualization. Table 7 presents two story plots, where the left one is generated by E2EPlot, and the right one is generated by OpenPlot using the same premise. The two story plots are of similar quality, while our end-to-end model E2EPlot is much more efficient as shown in Section 2.2.
+
+We show the quantitative results for E2EPlot in Section 3.1 and RLPlot in Section 3.2. The details of GPT4 evaluation is deferred to Appendix B.
+
+- 3.1 PERFORMANCE OF END-TO-END MODEL AFTER SFT
+
+|OpenPlotWins|E2EPlotWins|Ties|
+|---|---|---|
+|45.8%|46.8%|7.4%|
+
+Table 5: Comparison of generated story plots by OpenPlot and E2EPlot using GPT4 evaluation. We compare 500 story plot pairs where each pair has the same premise. The result shows that our end-to-end model E2EPlot can generate story plots of comparable quality to the DOC pipeline with Llama2.
+
+Table 5 shows that our end-to-end model E2EPlot can generate story plots of comparable quality to the DOC pipeline with Llama2 (OpenPlot), at a much faster generation speed. Moreover, our end-to-end model can be easily fined-tuned from human feedback as shown in Section 3.2.
+
+- 3.2 PERFORMANCE OF END-TO-END MODEL AFTER RLHF
+
+|Aspects|E2EPlotWins|RLPlotWins|Ties|
+|---|---|---|---|
+|**Q1**|44.0%|**54.0**%|2.0%|
+|**Q3**|**50.3**%|46.0%|3.7%|
+|**Q4**|39.3%|**60.0**%|0.7%|
+|**Q5**|48.0%|**50.0**%|2.0%|
+|**Q6**|42.3%|**53.7**%|4.0%|
+
+Table 6: Comparison of generated story plots by end-to-end SFT model (E2EPlot) and five different RLHF models (RLPlot) using GPT4 evaluation. For each row, we compare 300 story plot pairs where each pair has the same premise. We bold the results with a higher winning rate.
+
+After SFT, we perform RLHF on our end-to-end model E2EPlot using five reward models for different aspects as discussed in Section 2.3 respectively, and obtain five models after RLHF. Models for Q1 to Q5 are trained for 20 steps, while the model for Q6 is trained for 40 steps, where each step corresponds to 64 story plots. The quality of models after RLHF (RLPlot) are shown in Table 6. For RLPlot for each aspect, we compare its quality to E2EPlot using 300 premises. For each premise, we let GPT4 compare which model generates a better story plot measured by the corresponding aspect.
+
+Note that for some aspects (e.g., Q4, Q1, and Q6), the quality of the end-to-end model has improved after RLHF, while for other aspects (e.g., Q3), the model gets slightly worse. This might be because some aspects are more difficult to learn than others, which is also consistent with the result in Table 4 where Q3 has the lowest validation accuracy. It remains an important future direction to learn a more accurate reward model in a better way.
+
+## 4 RELATED WORKS
+
+**Automatic story generation.** Many previous works studying automatic story generation mainly focus on short stories with lengths of several sentences (Wang & Wan, 2019; Yao et al., 2019; Qin et al., 2019; Wang et al., 2022). Several recent works aim to generate long and coherent stories spanning thousands of words (Yang et al., 2022b;a; Zhou et al., 2023). All these works aim to
+
+7
+
+**Premise:** _**“A teenage girl discovers a magical app that allows her to alter reality with just a few taps on her smartphone screen. However, she soon realizes that the app’s magic comes at a terrible price.”**_
+
+**Settings:** The story is set in the present day, in a small town in the United States.
+
+**Settings:** The story is set in the present day, in a small suburban town with a typical American high school.
+
+## **Characters:**
+
+Ava Rose: Ava Rose is 17 years old and a techsavvy teenager who loves nothing more than spending her free time exploring the latest apps and gadgets.
+
+Elianore Starr: Elianore Starr is 28 years old and a brilliant app developer who has been working with Ava’s older brother, Ethan, on a top-secret project.
+
+## **Characters:**
+
+Jesse James: Jesse James is 17 years old, a high school student with a rebellious streak and a passion for photography.
+
+Dean Defoe: Dean Defoe is 35 years old, a wealthy tech entrepreneur with a mysterious past. ...
+
+...
+
+## **Outline:**
+
+## **Outline:**
+
+1. Ava discovers the magical app and begins to use it to alter reality, but she soon realizes that the app’s magic comes at a terrible price. Scene: Characters: Ava Rose
+
+a. Ava discovers the app and starts to use it to improve her life and the lives of her friends. Scene: the town where Ava lives. Characters: Ava Rose
+
+b. Ava’s friends become suspicious of her sudden changes and start to distance themselves from her. Scene: the town where Ava lives. Characters: Ava Rose
+
+... 2. Ava confides in her best friend, Tess, about the app’s dark side, and the two girls try to figure out a way to stop the app’s power from consumining Ava’s life. Scene: Characters: Ava Rose, Tess Sawyer
+
+... 3. Elianore, the brilliant app developer, is recruited by Ava to help her fix the app and reverse its negative effects. Scene: Characters: Ava Rose, Elianore Starr
+
+...
+
+4. Ava and Elianore succeed in creating a new app that is free from the dark magic, but not before Ava’s family and friends have suffered serious consequences as a result of their use of the app. Scene: Characters: Ava Rose, Elianore Starr
+
+...
+
+d. Ava and her loved ones are finally safe from the app’s power, but they will never be the same again. Scene: the town where Ava lives. Characters: Ava Rose
+
+1. Jesse discovers the magical app and starts experimenting with it, creating small alterations to her reality without fully understanding the consequences. Scene: Characters: Jesse James
+
+a. Jesse discovers the app and starts using it to enhance her reality, but she soon realizes that the alterations are not temporary and begin to have unintended consequences. Scene: Jesse’s bedroom. Characters: Jesse James
+
+b. Jesse’s reality starts to change in unexpected ways, causing her to question her own perceptions and reality. Scene: Jesse’s high school. Characters: Jesse James
+
+... 2. As Jesse continues to use the app, the alterations become more profound and dangerous, revealing a darker truth about the app’s magic and the people behind it. Scene: Characters: Jesse James
+
+...
+
+3. Jesse and her friends must work together to uncover the truth about the app, the entrepreneurs behind it, and the terrible price they are forcing upon the world. Scene: Characters: Jesse James
+
+...
+
+4. Jesse and her friends’ investigations led them to uncover a shocking secret about the app that threatens to destroy the fabric of reality and undo all that they have ever known. Scene: Characters: Jesse James
+
+... d. Jesse and her friends’ investigations lead them to a shocking revelation that threatens to undo all they have ever known. Scene: a high-tech laboratory. Characters: Jesse James
+
+Table 7: Story plots generated by E2EPlot and OpenPlot with the same premise. The left one is generated by our end-to-end model E2EPlot, and the right one is generated by the DOC pipeline with Llama2 (OpenPlot). Some contents of the plots are omitted for better visualization. One can see that the above two story plots are of similar quality.
+
+8
+
+generate a complete story, while our work focuses on story plot generation, which we conjecture is the most challenging and important part of story generation. In fact, lots of other works also recognize the importance of planning and thus either use story plots explicitly (Li et al., 2013; Fan et al., 2018; Yao et al., 2019; Goldfarb-Tarrant et al., 2020; Rashkin et al., 2020; Tian & Peng, 2022; Yang et al., 2022b;a) or their counterparts implicitly (Miao & Blunsom, 2016; Wang & Wan, 2019; Wang et al., 2022; Fan et al., 2019; Peng et al., 2018; Ippolito et al., 2019; Xu et al., 2020; Lin & Riedl, 2021) to improve generation quality. Regarding length and coherence, Yang et al. (2022a) is the most comparable to ours, although we use a more efficient end-to-end generator.
+
+Beyond text-based story generation, some previous work also study relevant topics in the scope of multimodality, such as visual storytelling (sequential vision-to-language) (Ting-Hao et al., 2016), story visualization (paragraph to sequence of images) (Li et al., 2019) and StoryBench (text prompts to video stories) (Bugliarello et al., 2023).
+
+**Prompt engineering.** To generate high-quality story plot datasets for training the end-to-end model as well as the reward models, we need a hard-wired pipeline to generate story plots by repeatedly prompting LLMs. Many previous works demonstrate the importance of prompt design (Brown et al., 2020; Zhong et al., 2021; Sanh et al., 2021; Lee et al., 2021; Ouyang et al., 2022; Wu et al., 2022; Kojima et al., 2022; Liu et al., 2023), and even for long-form generation, one important paradigm is to treat prompting as a subroutine and recursively prompt (Yang et al., 2022b;a; Zhou et al., 2023). Our pipeline for generating training datasets follows Yang et al. (2022a) while replacing OpenAI API calls with the Llama2 model, which eliminates the rate limit and makes large batch generation feasible.
+
+**Long context generation.** Various recent efforts have focused on long context generation either by extending the length of the context window (Haviv et al., 2022; Sun et al., 2022b; Press et al., 2022; Chen et al., 2023a) or improving efficiency for long context generation (Child et al., 2019; Kitaev et al., 2020; Choromanski et al., 2022; Zhang et al., 2023). Although the length of the outputs has been extended, these mechanisms do not necessarily guarantee the quality of the generated context, especially for story generation. Besides mechanical modifications, some works achieve long context generation in a hierarchical manner (Fan et al., 2018; Yao et al., 2019; Fan et al., 2019; Tan et al., 2021; Sun et al., 2022a; Yang et al., 2022a; Zhou et al., 2023). In this paper, we avoid generating super long outputs by focusing on generating plots, which typically consist of around 1k tokens. However, after the plot generation stage, the above mechanisms for extending context length or accelerating inference would be helpful in generating a complete long story given the plot.
+
+**Human-in-the-loop story generation.** Different from automatic story generation, several previous works use human-in-the-loop methods to generate long stories (Goldfarb-Tarrant et al., 2019; Coenen et al., 2021; Lee et al., 2022; Chung et al., 2022; Ippolito et al., 2022; Mirowski et al., 2023). Note that although our end-to-end generator is totally automatic without human intervention, it is easy for humans to co-create after the plot generation stage. Since the story plot is relatively short and thus easy for humans to evaluate, one can easily edit the plot to obtain a more desired story.
+
+## 5 CONCLUSIONS
+
+In this work, we study end-to-end story plot generation. By improving the previous story plot generation pipeline and obtaining high-quality training data, we successfully train an end-to-end model, which is able to generate story plots of comparable quality to the most advanced methods to date much more efficiently. Moreover, due to the end-to-end nature of our method, we further fine-tune it with human feedback, which improves the model for different aspects.
+
+There are many important and interesting future directions. For example, the current generation speed is around 30 seconds, which is still somewhat slow from a user experience perspective. It might be possible to incorporate techniques for more efficient inference such as Zhang et al. (2023) into our end-to-end model. Also, since the previous DOC pipeline has more flexibility for controlling the level of granularity, it would be appealing to train an end-to-end model that inherits this property. Additionally, a high-quality reward model is important to improve the end-to-end generator.
+
+9
+
+## REFERENCES
+
+Prithviraj Ammanabrolu, Ethan Tien, Wesley Cheung, Zhaochen Luo, William Ma, Lara Martin, and Mark Riedl. Guided neural language generation for automated storytelling. In _Proceedings of the Second Workshop on Storytelling_ , pp. 46–55, 2019.
+
+- Mohammad Bavarian, Heewoo Jun, Nikolas Tezak, John Schulman, Christine McLeavey, Jerry Tworek, and Mark Chen. Efficient training of language models to fill in the middle, 2022.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020.
+
+- Emanuele Bugliarello, Hernan Moraldo, Ruben Villegas, Mohammad Babaeizadeh, Mohammad Taghi Saffar, Han Zhang, Dumitru Erhan, Vittorio Ferrari, Pieter-Jan Kindermans, and Paul Voigtlaender. Storybench: A multifaceted benchmark for continuous story visualization, 2023.
+
+- Louis Castricato, Alexander Havrilla, Shahbuland Matiana, Michael Pieler, Anbang Ye, Ian Yang, Spencer Frazier, and Mark Riedl. Robust preference learning for storytelling via contrastive reinforcement learning. _arXiv preprint arXiv:2210.07792_ , 2022.
+
+- Eugene Charniak. _Toward a model of children’s story comprehension._ PhD thesis, Massachusetts Institute of Technology, 1972.
+
+- Shouyuan Chen, Sherman Wong, Liangjian Chen, and Yuandong Tian. Extending context window of large language models via positional interpolation, 2023a.
+
+- Yukang Chen, Shengju Qian, Haotian Tang, Xin Lai, Zhijian Liu, Song Han, and Jiaya Jia. Longlora: Efficient fine-tuning of long-context large language models. _arXiv preprint arXiv:2309.12307_ , 2023b.
+
+- Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers, 2019.
+
+- Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, David Belanger, Lucy Colwell, and Adrian Weller. Rethinking attention with performers, 2022.
+
+- John Joon Young Chung, Wooseok Kim, Kang Min Yoo, Hwaran Lee, Eytan Adar, and Minsuk Chang. Talebrush: Sketching stories with generative pretrained language models. In _Proceedings of the 2022 CHI Conference on Human Factors in Computing Systems_ , pp. 1–19, 2022.
+
+- Andy Coenen, Luke Davis, Daphne Ippolito, Emily Reif, and Ann Yuan. Wordcraft: a human-ai collaborative editor for story writing. _arXiv preprint arXiv:2107.07430_ , 2021.
+
+Angela Fan, Mike Lewis, and Yann Dauphin. Hierarchical neural story generation, 2018.
+
+- Angela Fan, Mike Lewis, and Yann Dauphin. Strategies for structuring story generation. _arXiv preprint arXiv:1902.01109_ , 2019.
+
+- Seraphina Goldfarb-Tarrant, Haining Feng, and Nanyun Peng. Plan, write, and revise: an interactive system for open-domain story generation. _arXiv preprint arXiv:1904.02357_ , 2019.
+
+- Seraphina Goldfarb-Tarrant, Tuhin Chakrabarty, Ralph Weischedel, and Nanyun Peng. Content planning for neural story generation with aristotelian rescoring. _arXiv preprint arXiv:2009.09870_ , 2020.
+
+- Chi Han, Qifan Wang, Wenhan Xiong, Yu Chen, Heng Ji, and Sinong Wang. Lm-infinite: Simple on-the-fly length generalization for large language models. _arXiv preprint arXiv:2308.16137_ , 2023.
+
+- Rujun Han, Hong Chen, Yufei Tian, and Nanyun Peng. Go back in time: Generating flashbacks in stories with event temporal prompts. _arXiv preprint arXiv:2205.01898_ , 2022.
+
+10
+
+- Adi Haviv, Ori Ram, Ofir Press, Peter Izsak, and Omer Levy. Transformer language models without positional encodings still learn positional information, 2022.
+
+- Daphne Ippolito, David Grangier, Chris Callison-Burch, and Douglas Eck. Unsupervised hierarchical story infilling. In _Proceedings of the First Workshop on Narrative Understanding_ , pp. 37–43, 2019.
+
+- Daphne Ippolito, Ann Yuan, Andy Coenen, and Sehmon Burnam. Creative writing with an ai-powered writing assistant: Perspectives from professional writers. _arXiv preprint arXiv:2211.05030_ , 2022.
+
+- Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer, 2020.
+
+- Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. _Advances in neural information processing systems_ , 35:22199–22213, 2022.
+
+- Andreas K¨opf, Yannic Kilcher, Dimitri von R¨utte, Sotiris Anagnostidis, Zhi-Rui Tam, Keith Stevens, Abdullah Barhoum, Nguyen Minh Duc, Oliver Stanley, Rich´ard Nagyfi, Shahul ES, Sameer Suri, David Glushkov, Arnav Dantuluri, Andrew Maguire, Christoph Schuhmann, Huu Nguyen, and Alexander Mattick. Openassistant conversations – democratizing large language model alignment, 2023.
+
+- Chia-Hsuan Lee, Hao Cheng, and Mari Ostendorf. Dialogue state tracking with a language model using schema-driven prompting. _arXiv preprint arXiv:2109.07506_ , 2021.
+
+- Mina Lee, Percy Liang, and Qian Yang. Coauthor: Designing a human-ai collaborative writing dataset for exploring language model capabilities. In _Proceedings of the 2022 CHI conference on human factors in computing systems_ , pp. 1–19, 2022.
+
+- Boyang Li, Stephen Lee-Urban, George Johnston, and Mark Riedl. Story generation with crowdsourced plot graphs. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 27, pp. 598–604, 2013.
+
+- Yitong Li, Zhe Gan, Yelong Shen, Jingjing Liu, Yu Cheng, Yuexin Wu, Lawrence Carin, David Carlson, and Jianfeng Gao. Storygan: A sequential conditional gan for story visualization. In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pp. 6329–6338, 2019.
+
+- Zhiyu Lin and Mark O Riedl. Plug-and-blend: a framework for plug-and-play controllable story generation with sketches. In _Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment_ , volume 17, pp. 58–65, 2021.
+
+- Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pretrain, prompt, and predict: A systematic survey of prompting methods in natural language processing. _ACM Computing Surveys_ , 55(9):1–35, 2023.
+
+- Yishu Miao and Phil Blunsom. Language as a latent variable: Discrete generative models for sentence compression. _arXiv preprint arXiv:1609.07317_ , 2016.
+
+- Piotr Mirowski, Kory W Mathewson, Jaylen Pittman, and Richard Evans. Co-writing screenplays and theatre scripts with language models: Evaluation by industry professionals. In _Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems_ , pp. 1–34, 2023.
+
+- OpenAI. Gpt-4 technical report, 2023.
+
+- Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. _Advances in Neural Information Processing Systems_ , 35: 27730–27744, 2022.
+
+- Nanyun Peng, Marjan Ghazvininejad, Jonathan May, and Kevin Knight. Towards controllable story generation. In _Proceedings of the First Workshop on Storytelling_ , pp. 43–49, 2018.
+
+11
+
+Ofir Press, Noah A. Smith, and Mike Lewis. Train short, test long: Attention with linear biases enables input length extrapolation, 2022.
+
+- Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. Counterfactual story reasoning and generation. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pp. 5043–5053, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1509. URL [URL removed]
+
+- Hannah Rashkin, Asli Celikyilmaz, Yejin Choi, and Jianfeng Gao. Plotmachines: Outlineconditioned generation with dynamic plot state tracking. _arXiv preprint arXiv:2004.14967_ , 2020.
+
+- Victor Sanh, Albert Webson, Colin Raffel, Stephen H Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al. Multitask prompted training enables zero-shot task generalization. _arXiv preprint arXiv:2110.08207_ , 2021.
+
+- Elvis Saravia. Prompt Engineering Guide. _[URL removed] , 12 2022.
+
+- Xiaofei Sun, Zijun Sun, Yuxian Meng, Jiwei Li, and Chun Fan. Summarize, outline, and elaborate: Long-text generation via hierarchical supervision from extractive summaries. In _Proceedings of the 29th International Conference on Computational Linguistics_ , pp. 6392–6402, Gyeongju, Republic of Korea, October 2022a. International Committee on Computational Linguistics. URL [URL removed]
+
+- Yutao Sun, Li Dong, Barun Patra, Shuming Ma, Shaohan Huang, Alon Benhaim, Vishrav Chaudhary, Xia Song, and Furu Wei. A length-extrapolatable transformer, 2022b.
+
+- Bowen Tan, Zichao Yang, Maruan AI-Shedivat, Eric P. Xing, and Zhiting Hu. Progressive generation of long text with pretrained language models, 2021.
+
+- Yufei Tian and Nanyun Peng. Zero-shot sonnet generation with discourse-level planning and aesthetics features. _arXiv preprint arXiv:2205.01821_ , 2022.
+
+- Ting-Hao, Huang, Francis Ferraro, Nasrin Mostafazadeh, Ishan Misra, Aishwarya Agrawal, Jacob Devlin, Ross Girshick, Xiaodong He, Pushmeet Kohli, Dhruv Batra, C. Lawrence Zitnick, Devi Parikh, Lucy Vanderwende, Michel Galley, and Margaret Mitchell. Visual storytelling, 2016.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. _arXiv preprint arXiv:2307.09288_ , 2023.
+
+- Scott R Turner. _The creative process: A computer model of storytelling and creativity_ . Psychology Press, 2014.
+
+- Rose E Wang, Esin Durmus, Noah Goodman, and Tatsunori Hashimoto. Language modeling via stochastic processes. _arXiv preprint arXiv:2203.11370_ , 2022.
+
+Tianming Wang and Xiaojun Wan. T-cvae: Transformer-based conditioned variational autoencoder for story completion. In _IJCAI_ , pp. 5233–5239, 2019.
+
+- Yuhuai Wu, Albert Qiaochu Jiang, Wenda Li, Markus Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. Autoformalization with large language models. _Advances in Neural Information Processing Systems_ , 35:32353–32368, 2022.
+
+- Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. _arXiv preprint arXiv:2309.17453_ , 2023.
+
+- Peng Xu, Mostofa Patwary, Mohammad Shoeybi, Raul Puri, Pascale Fung, Anima Anandkumar, and Bryan Catanzaro. Megatron-cntrl: Controllable story generation with external knowledge using large-scale language models. _arXiv preprint arXiv:2010.00840_ , 2020.
+
+12
+
+Kevin Yang and Dan Klein. Fudge: Controlled text generation with future discriminators. _arXiv preprint arXiv:2104.05218_ , 2021.
+
+- Kevin Yang, Dan Klein, Nanyun Peng, and Yuandong Tian. Doc: Improving long story coherence with detailed outline control. _arXiv preprint arXiv:2212.10077_ , 2022a.
+
+- Kevin Yang, Nanyun Peng, Yuandong Tian, and Dan Klein. Re3: Generating longer stories with recursive reprompting and revision. _arXiv preprint arXiv:2210.06774_ , 2022b.
+
+- Lili Yao, Nanyun Peng, Ralph Weischedel, Kevin Knight, Dongyan Zhao, and Rui Yan. Plan-andwrite: Towards better automatic storytelling, 2019.
+
+- Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher R´e, Clark Barrett, et al. H ~~2~~ o: Heavy-hitter oracle for efficient generative inference of large language models. _arXiv preprint arXiv:2306.14048_ , 2023.
+
+- Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric. P Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging llm-as-a-judge with mt-bench and chatbot arena, 2023.
+
+- Ruiqi Zhong, Kristy Lee, Zheng Zhang, and Dan Klein. Adapting language models for zero-shot learning by meta-tuning on dataset and prompt collections. _arXiv preprint arXiv:2104.04670_ , 2021.
+
+- Wangchunshu Zhou, Yuchen Eleanor Jiang, Peng Cui, Tiannan Wang, Zhenxin Xiao, Yifan Hou, Ryan Cotterell, and Mrinmaya Sachan. Recurrentgpt: Interactive generation of (arbitrarily) long text. _arXiv preprint arXiv:2305.13304_ , 2023.
+
+13
+
+## A DETAILED PROMPTS IN SECTION 2.1.2
+
+In this section, we provide the details of the whole rebuilt DOC pipeline, OpenPlot, including the exact format of the main prompts. Note that some comments and remarks have already appeared in Section 2.1.2. We keep those repeated contents in this section so that readers can find all important and necessary information in this section without referring back to Section 2.1.2.
+
+**Premise.** The first step is to generate a premise for the story. We use the following prompt:
+
+Write a premise for a short story in one paragraph with two to three sentences. Premise:
+
+Note that we enforce that the language model’s response starts after “Premise:”. This structure precludes non-informative responses such as “Sure!”, “No problem!” and ensures that the format of the output is structured and thus easy to process.
+
+**Setting.** After obtaining the premise of the whole story, we also infer the setting of the story from the premise using the following prompt:
+
+Premise: PREMISE Describe the setting of the story. The story is set in
+
+Here, PREMISE is the premise of the story, which is the output of the previous prompt. For example, PREMISE could be _“Alex dreams of becoming a famous writer but becomes trapped in a time warp, reliving the same day over and over.”_ The premise and the setting build the most basic skeleton of the story. In the following parts, we use SETTING to denote the content of the settings, such as _“The story is set in a world where magic is real and has been suppressed by a powerful and corrupt government.”_
+
+**Characters.** One of the most important elements in a story is the characters, whose intrinsic motivation and interactions with each other are vital to the trajectories of the whole story. If one views the whole story as an RL environment, the characters in the story play essentially the same role as agents in RL. Based on the premise and settings, we use the following prompts to generate characters one by one:
+
+Premise: PREMISE Setting: SETTING List the names and details of all major characters. 1. Full Name:
+
+Premise: PREMISE Setting: SETTING List the names and details of all major characters. 1. Full Name: NAME ~~1~~
+
+Use ONLY one short sentence for the following description relevant to the story, focusing on relationship between characters, occupation and experience instead of appearance. Only ONE sentence is allowed!
+
+14
+
+## Character Portrait: NAME ~~1~~ is
+
+The first prompt helps to generate the name of the next character. We use NAME ~~_k_~~ to denote the full name of the _k_ -th character (e.g., NAME ~~1~~ can be “Jack Thomas”). After obtaining the name of the _k_ -th character, we use the second prompt to generate the character portrait for that character.
+
+**Remark A.1.** _Note that in the second prompt, we added detailed instructions on the generated portrait. In the original DOC code (Yang et al., 2022a), this instruction is unnecessary. However, when we replace the text-davinci-002 engine with the open-sourced Llama2-13B-chat model, due to the performance difference between these two models, the Llama2 model tends to output a longer description for the portrait without any instruction. Moreover, without instruction, the output of Llama2 focuses more on the age appearance of the character instead of occupation, experiences, or relationship with other characters (e.g., “Tom is 22 years old and has brown curly hair”). After adding the above instruction, the output of the second prompt tends to contain more compact and dense information about the character._
+
+After generating the first character, we can repeat the above procedure to generate more characters. For example, the following prompt continues to generate the full name of the second character:
+
+Premise: PREMISE Setting: SETTING List the names and details of all major characters. 1. Full Name: NAME ~~1~~ Character Portrait: PORTRAIT ~~1~~ 2. Full Name:
+
+We can control the number of major characters in the story, and in our implementation, we set the desired number to be 3-6, since too few characters are likely to make the story boring, and too many characters will reduce opportunities for characters to interact with each other.
+
+**Outline.** After generating all the major characters, we are ready to build the main skeleton of the story. Same as Yang et al. (2022a), we aim to create a hierarchical outline. In this paper, we create two-level hierarchical outlines, where the top level typically contains four bullet points, and the second level contains three to four subpoints under each top-level point. We also generate the outline in breadth-first order, i.e., we first generate the top-level outline (numbered as 1, 2, 3, _. . ._ ) and then generate the sub-level outline (numbered as 1a, 1b, _. . ._ , 2a, _. . ._ ). The following prompt can be used to generate the first point of the top-level outline, where CHARACTERS contains the name and portrait of all major characters.
+
+Premise: PREMISE Setting: SETTING Characters: CHARACTERS Outline the main plot points of the story using no more than 4 points, generating one point at a time. IMPORTANT: Please make sure that the story has a clear end at or before Point 4. 1.
+
+**Remark A.2.** _To make the generated story plots more reasonable, we added corresponding instructions. First, to control the length of the top-level outline, we require the LLM to use no more than 4 points. Second, to make the generation procedure more stable, we require the LLM to generate only one point at a time. Third, during the preliminary experiments, we found that the generated plots_
+
+15
+
+_sometimes have a missing ending. To address this issue, we explicitly ask the LLM to make sure that the generated top-level outline has a clear ending. A tricky part is that adding “IMPORTANT: Please” significantly improves the quality of the generated outline in terms of a clear ending._
+
+After generating the top bullet point 1, we can include the content of point 1 in the prompt and continue to generate the subsequent points until the whole top-level outline is complete. Since we generate the outline in breadth-first order, we will expand each top-level node in sequence. Note that it is important to keep the generated subpoint consistent with not only the previous points but also the subsequent points. To achieve this, Yang et al. (2022a) use a completion model (text-davinci-002) and add a suffix containing the content of all subsequent points. For example, to generate subpoint 1a, they use the prompt of the following format:
+
+Premise: PREMISE Setting: SETTING Characters: CHARACTERS Outline: 1. POINT ~~1~~
+
+List the main events that occur under this heading using no more than 4 points, starting from the beginning, generating one or two points without repeating the content of the suffix and stop.
+
+a. SUFFIX: b. POINT ~~2~~ c. POINT ~~3~~ d. POINT ~~4~~
+
+The actual prompt in the above box is the content before “SUFFIX”, and the content after “SUFFIX” can be passed to the completion model as an argument. We use POINT ~~_k_~~ to denote the content of the top-level bullet point _k_ , which can be, e.g., “Luke discovers the mysterious box in his grandfather’s attic and initially dismisses it as a strange trinket with no value.”
+
+**Remark A.3.** _There is a trick to make the generated content more consistent with the existing content by shifting the points after the current point to a lower level, e.g., top-level point 2 is shifted to sub-level point 1b. Also, detailed instruction on generating the current sub-level point is not necessary for a completion model such as text-davinci-002, but is helpful when we call a chat model such as Llama2. We will discuss this in detail in Remark A.4._
+
+Since we use Llama2 in our pipeline, which is a chat model and thus does not accept suffixes, we need to simulate a completion model using a chat model. For convenience, we let CONTENT ~~O~~ F ~~P~~ REFIX and CONTENT ~~O~~ F ~~S~~ UFFIX denote the content before and after “SUFFIX” in the above box respectively. Then one can use the following prompt to simulate a completion model:
+
+Imagine you are a text completion robot. Give the output of the following task with the given suffix and prompt. Please follow the instructions below.
+
+Instructions: Your output should not contain the content of the suffix. Only use the suffix as complementary information. The output should mainly be based on the prompt. Now the suffix begins.
+
+Suffix: CONTENT ~~O~~ F ~~S~~ UFFIX End of Suffix
+
+16
+
+Now the prompt begins. Prompt: CONTENT ~~O~~ F ~~P~~ REFIX
+
+**Remark A.4.** _First, note that we put the content of the prefix after the suffix to make it easier for the LLM to continue with the prefix. We also need to add instructions to obtain desired results since otherwise, the LLM will memorize the context of the suffix, and the output will be nearly identical to the suffix. In Remark A.3, we also mentioned that there is a detailed instruction in the prefix on how to generate the current sub-level points, which can “reinforce” the requirement that the output should not repeat the content of the suffix._
+
+After expanding each top-level point by generating sub-points, we obtain a hierarchical outline, and the story plot generation procedure is finished.
+
+## B ADDITIONAL DETAILS OF GPT4 EVALUATION
+
+We use the following prompt (adapted from Zheng et al. (2023)) to compare two story plots with the same premise:
+
+Please act as an impartial judge and evaluate the quality of the story plots generated by two AI models. The two story plots have the same premise. You should choose the story plots that have better qualities. **Your evaluation should focus on the overall qualities.** Begin your evaluation by comparing the two story plots and provide a short explanation. Avoid any position biases and ensure that the order in which the story plots were presented does not influence your decision. Do not allow the length of the story plots to influence your evaluation. Be as objective as possible. After providing your explanation, output your final verdict by strictly following this format: ”[[A]]” if story plot A is better, ”[[B]]” if story plot B is better, and ”[[C]]” for a tie.
+
+[The Start of story plot A] STORY ~~P~~ LOT ~~A~~ [The End of story plot A] [The Start of story plot B] STORY ~~P~~ LOT ~~B~~ [The End of story plot B]
+
+We use the above prompt to compare the overall qualities of E2EPlot and OpenPlot. When comparing E2EPlot and RLPlot, we replace the sentence “Your evaluation should focus on the overall qualities” with the corresponding aspect, e.g., “Your evaluation should focus on the Aspect: Which story plot created more suspense and surprise?”.
+
+For each comparison, we randomly shuffle the position of the two plots to avoid position bias. Below, we provide an example of the response of GPT4:
+
+After a careful comparison of both story plots, it is clear that story plot B generates more suspense and surprise elements.
+
+In story plot A, there are a few suspenseful elements like the discovery of the hidden room in the attic and basement, and the revelation of the murderer’s identity. However, these incidents are predictable to an extent as they are common tropes in detective stories. Moreover, the identity of the murderer, a member of the Blackwood family, is revealed without a significant build-up which reduces the element of surprise.
+
+Contrarily, in story plot B, there are several suspenseful and surprising twists. Initially, Gertrude Rutledge, the mansion’s former housekeeper, becomes the prime suspect. The
+
+17
+
+story then reveals her as a ghost causing the disturbances. As the plot unfolds, there’s a surprising revelation about Malcolm Crawford’s past and his connection to the haunting. There is also the unexpected element of Gertrude Rutledge having an accomplice in the murder and haunting. Each of these plot points introduces unexpected turns and secrets that enhance the suspense and surprise of the story.
+
+Therefore, the final verdict favors story plot B for its superior ability to create more suspense and surprise. [[B]]
+
+## C HUMAN EVALUATION
+
+In this section, we provide human evaluation results comparing the quality of OpenPlot, E2EPlot and RLPlot. Since we have five RLPlot models, we name them RLPlot ~~Q~~ 1, RLPlot ~~Q~~ 3, RLPlot ~~Q~~ 4, RLPlot ~~Q~~ 5, and RLPlot ~~Q~~ 6, respectively. We sent 500 (OpenPlot vs. E2EPlot) + 300 * 5 (RLPlot vs. E2EPlot) = 2000 story plot pairs, which are the same as what we used for GPT4 evaluation, to the prolific platform, and around 1700 of them are labeled (each pair requires one label, each participant are required to label five pairs, and some of the participants labeled part of the five pairs). For each pair, the participants are required to answer seven questions, where Q1-Q6 are the same as in Table 2, Q2 is a free text explanation for Q1, and Q7 is ‘Which story is better in overall quality’. The result is shown in Appendix C.1.
+
+## C.1 HUMAN EVALUATION RESULTS
+
+The result for human evaluation is presented in Tables 8 to 13.
+
+||OpenPlotwins|E2EPlotwins|Tie|
+|---|---|---|---|
+|**Q1**|41.2%|43.4%|15.4%|
+|**Q3**|40.5%|40.5%|19.0%|
+|**Q4**|43.2%|40.7%|16.1%|
+|**Q5**|40.2%|39.5%|20.2%|
+|**Q6**|39.0%|39.8%|21.2%|
+|**Q7**|38.5%|41.2%|20.2%|
+
+Table 8: Comparison of OpenPlot and E2EPlot on 410 story plot pairs (500 sent and 410 labeled) by human evaluation
+
+||RLPlot ~~Q~~1|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|48.8%||37.9%|13.3%|
+|**Q3**|44.8%||38.3%|16.9%|
+|**Q4**|46.8%||32.3%|21.0%|
+|**Q5**|40.7%||35.1%|24.2%|
+|**Q6**|47.6%||35.1%|17.3%|
+|**Q7**|43.1%||36.3%|20.6%|
+
+Table 9: Comparison of RLPlot ~~Q~~ 1 and E2EPlot on 248 story plot pairs (300 sent and 248 labeled) by human evaluation
+
+## C.2 COMPLEMENTARY GPT4 EVALUATION RESULT
+
+For completeness, we also provide corresponding evaluation results by GPT4. The result for GPT4 evaluation is presented in Tables 14 to 19.
+
+18
+
+||RLPlot ~~Q~~3|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|41.5%||41.1%|17.4%|
+|**Q3**|38.2%||41.1%|20.7%|
+|**Q4**|34.4%||45.6%|19.9%|
+|**Q5**|35.3%||38.6%|26.1%|
+|**Q6**|39.4%||38.2%|22.4%|
+|**Q7**|36.1%||41.9%|22.0%|
+
+Table 10: Comparison of RLPlot ~~Q~~ 3 and E2EPlot on 241 story plot pairs (300 sent and 241 labeled) by human evaluation
+
+||RLPlot ~~Q~~4|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|41.3%||40.9%|17.9%|
+|**Q3**|42.5%||39.3%|18.3%|
+|**Q4**|40.1%||38.5%|21.4%|
+|**Q5**|37.7%||38.5%|23.8%|
+|**Q6**|40.1%||38.9%|21.0%|
+|**Q7**|40.1%||38.1%|21.8%|
+
+Table 11: Comparison of RLPlot ~~Q~~ 4 and E2EPlot on 252 story plot pairs (300 sent and 252 labeled) by human evaluation
+
+||RLPlot ~~Q~~5|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|43.4%||43.0%|13.5%|
+|**Q3**|45.0%||42.6%|12.4%|
+|**Q4**|46.2%||42.6%|11.2%|
+|**Q5**|43.8%||37.5%|18.7%|
+|**Q6**|41.8%||38.2%|19.9%|
+|**Q7**|43.0%||37.8%|19.1%|
+
+Table 12: Comparison of RLPlot ~~Q~~ 5 and E2EPlot on 251 story plot pairs (300 sent and 251 labeled) by human evaluation
+
+||RLPlot ~~Q~~6|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|38.7%||44.0%|17.3%|
+|**Q3**|35.9%||44.8%|19.4%|
+|**Q4**|39.5%||41.1%|19.4%|
+|**Q5**|35.1%||39.1%|25.8%|
+|**Q6**|36.3%||45.2%|18.5%|
+|**Q7**|35.9%||41.1%|23.0%|
+
+Table 13: Comparison of RLPlot ~~Q~~ 6 and E2EPlot on 248 story plot pairs (300 sent and 248 labeled) by human evaluation
+
+19
+
+||OpenPlotwins|E2EPlotwins|Tie|
+|---|---|---|---|
+|**Q1**|53.2%|45.2%|1.6%|
+|**Q3**|53.6%|40.6%|5.8%|
+|**Q4**|53.2%|45.6%|1.2%|
+|**Q5**|53.0%|45.2%|1.8%|
+|**Q6**|48.2%|50.4%|1.4%|
+|**Q7**|45.8%|46.8%|7.4%|
+
+Table 14: Comparison of OpenPlot and E2EPlot on 500 story plot pairs by GPT4 evaluation
+
+||RLPlot ~~Q~~1|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|54.0%||44.0%|1.6%|
+|**Q3**|53.0%||41.0%|6.0%|
+|**Q4**|49.0%||50.7%|0.3%|
+|**Q5**|51.7%||46.7%|1.7%|
+|**Q6**|56.7%||41.0%|2.3%|
+|**Q7**|49.7%||44.3%|6.0%|
+
+Table 15: Comparison of RLPlot ~~Q~~ 1 and E2EPlot on 300 story plot pairs by GPT4 evaluation
+
+||RLPlot ~~Q~~3|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|45.3%||52.0%|2.7%|
+|**Q3**|46.0%||50.3%|3.7%|
+|**Q4**|43.3%||56.3%|0.3%|
+|**Q5**|44.0%||55.0%|1.0%|
+|**Q6**|49.7%||47.3%|3.0%|
+|**Q7**|46.7%||44.3%|9.0%|
+
+Table 16: Comparison of RLPlot ~~Q~~ 3 and E2EPlot on 300 story plot pairs by GPT4 evaluation
+
+||RLPlot ~~Q~~4|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|55.0%||43.0%|2.0%|
+|**Q3**|51.7%||42.0%|6.3%|
+|**Q4**|60.0%||39.3%|0.7%|
+|**Q5**|51.7%||45.7%|2.7%|
+|**Q6**|58.7%||40.3%|1.0%|
+|**Q7**|44.7%||46.0%|9.3%|
+
+Table 17: Comparison of RLPlot ~~Q~~ 4 and E2EPlot on 300 story plot pairs by GPT4 evaluation
+
+||RLPlot ~~Q~~5|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|40.3%||56.0%|3.7%|
+|**Q3**|42.0%||53.0%|5.0%|
+|**Q4**|41.7%||57.0%|1.3%|
+|**Q5**|50.0%||48.0%|2.0%|
+|**Q6**|51.0%||47.3%|1.7%|
+|**Q7**|43.3%||49.7%|7.0%|
+
+Table 18: Comparison of RLPlot ~~Q~~ 5 and E2EPlot on 300 story plot pairs by GPT4 evaluation
+
+20
+
+||RLPlot ~~Q~~6|wins|E2EPlotwins|Tie|
+|---|---|---|---|---|
+|**Q1**|44.3%||53.7%|2.0%|
+|**Q3**|42.7%||53.7%|3.7%|
+|**Q4**|44.7%||55.0%|0.3%|
+|**Q5**|42.3%||54.3%|3.3%|
+|**Q6**|53.7%||42.3%|4.0%|
+|**Q7**|44.7%||50.0%|5.3%|
+
+Table 19: Comparison of RLPlot ~~Q~~ 6 and E2EPlot on 300 story plot pairs by GPT4 evaluation
+
+21
+
diff --git a/open_review/iclr2024_8616.json b/open_review/iclr2024_8616.json
new file mode 100644
index 0000000000000000000000000000000000000000..a522d45a5b805e2f240ac6330d53afba6a3ca08f
--- /dev/null
+++ b/open_review/iclr2024_8616.json
@@ -0,0 +1,117 @@
+{
+ "paper_id": "iclr2024_8616",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "What's the Magic Word? A Control Theory of LLM Prompting",
+ "abstract": "Prompt engineering is effective and important in the deployment of LLMs but is poorly understood mathematically. \nHere, we formalize prompt engineering as an optimal control problem on LLMs -- where the prompt is considered a control variable for modulating the output distribution of the LLM. \nWithin this framework, we ask a simple question: given a sequence of tokens, does there always exist a prompt we can prepend that will steer the LLM toward accurately predicting the final token?\nWe call such an optimal prompt the magic word since prepending the prompt causes the LLM to output the correct answer. If magic words exist, can we find them? If so, what are their properties?\nWe offer analytic analysis on the controllability of a self-attention head where we prove a bound on controllability as a function of the singular values of its weight matrices.\nWe take inspiration from control theory to propose a metric called $k - \\epsilon$ controllability to characterize LLM steerability. \nWe compute the $k-\\epsilon$ controllability of a panel of large language models, including Falcon-7b, Llama-7b, and Falcon-40b on 5000 WikiText causal language modeling tasks. \nRemarkably, we find that magic words of 10 tokens or less exist for over 97\\% of WikiText instances surveyed for each model.",
+ "rebuttal": "### RE: Reviewer 4Qb8\nWe thank reviewer 4Qb8 for support and their insight on issues of formalization and presentation.\n\n**Formalization**: We revised our definitions and cross-referenced our approach with multiple sources including Sontag, Kalman, and Ogata’s canonical control theory texts. Overall, we have shifted to a more reachability-first perspective — a point brought up in 4Qb8’s review. We have added a background section in Appendix A: “Abstract Systems an Control Theory Background” where we define generic systems, reachability, and controllability. We hope this will help communicate control theoretical concepts to newcomers properly. We also updated our formalization of LLM systems in Section 3. This update aims to align with the abstract systems and control definitions in the Appendix and to clarify the dynamical nature of LLM systems. We also added the following explanation in Section 3 about the key differences between LLM systems and more traditionally studied dynamical systems:\n\n“While LLMs are at times leveraged in a manner that masks the iterative aspects of generation, the reality is that token generation and externally imposed ``control input'' sequences are generated and processed sequentially, leading to non-trivial system dynamics.\n\nSeveral key differences remain between LLM-based systems and systems typically modeled through ordinary differential equations (ODEs), which have long been a cornerstone in the study of continuous-time dynamical systems:\n1. **Discrete state and time**: LLM systems operate on sequences of discrete tokens over a discrete time set, in contrast to the continuous state spaces and time sets studied in classical control theory.\n2. **Shift-and-Grow State Dynamics**: Whereas the system state in an ODE-based system has a fixed size over time, the system state x(t) for LLM systems grows as tokens are added to the state sequence.\n3. **Mutual exclusion on control input token vs. generated token**: The LLM system state x(t) is written to one token at a time. The newest token is either drawn from the control input u(t) or is generated by the LLM by sampling x′ ∼ PLM (x′∣x(t)). This differs from traditional discrete stochastic systems, where the control sequence and internal dynamics generally affect the state synchronously.”\n\n__Input-output system and V^*__: While our empirical work revolves around “single-step” control (i.e., controlling the immediate next token generation), we have updated our LLM system definition and our characterization of LLM control theory to emphasize that LLM systems are, in fact, dynamical. Single-step control is merely a first step toward understanding the nature of more dynamical LLM system formulations with non-trivial internal dynamics (e.g., user interaction, chain-of-thought, retrieval-augmented generation, tool-wielding LLMs, etc). In particular, we acknowledge that the “shift-and- grow” state dynamics in V^* may be unfamiliar, but they are more realistic for how modern transformer-based LLMs function. This is particularly important for incorporating our analytic work on the reachable set for self-attention in Section 4. The growing state of LLMs is a fact of their operation, so to integrate our empirical work with our theoretical work, we maintain the state space V^*. Here is a paragraph from Section 6 discussing the relationship between the self-attention reachable set and multi-token generation:\n\n“Bounding the reachable set for self-attention is deeply related to the mechanism by which consistent representations are formed for multi-token generation.\n\nSteering a language model to generate a desired token sequence requires that the control input induce a token representation in the right-most token such that the next token prediction logits P (y∣u + x0 ) achieves a desired value.\n\nMoreover, generated tokens are fed back into the model, and their representations must be steered to control iterated generation.\n\nSelf-attention is the primary mechanism by which the token representations exchange information, making the reachable set of output representations across multiple tokens in $\\mathbf X_0$ for self-attention a fundamental part of LLM control theory.”\n\nDespite the growing state, we hope we have communicated why our LLM system formulation is still well-characterized as dynamical.\n\nWe very much appreciate the feedback from reviewer 4Qb8 and we hope that our revised organization, structure, and expanded results address the concerns raised. As we are motivated by both the theoretical benefits of a control theoretic framework and the practical problems faced in LLM systems design, we hope that the reviewers enjoy the balance we seek to strike between the two.\n\n### RE: Reviewer 8q5r\nHi 8q5r,\n\nThank you for your attentive feedback. We appreciate your critiques! To your point about prepending a prefix like “after reading n words/tokens, output this particular word/token”—your intuition is exactly where ours was initially. Your suggestion can be made even stronger/more effective by straight repetition. Say we had “The brown fox jumped over the lazy ____“, and wanted to fill in the blank with ‘dog’. Just prefix:\n\n“The brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog The quick brown fox jumped over the lazy dog...”\n\nrepeated [...]\n\n### RE: Reviewer EeUn [1/2]\nWe thank reviewer EeUn for their insightful input. Here is how we have addressed the points raised:\n\n**Prior use of control theory for LLMs**: We added the following acknowledgement of Soatto et al’s work on LLM control theory:\n\n“To our knowledge, the only other work to date on the controllability of LLMs is Soatto et al. (2023). Soatto et al analyze the controllability of LLMs in terms of “meaningful sentences”, defined as the sigma-algebra generated by snippets of text written on the Internet. Their empirical analysis revolves around demonstrating that LLMs are ca [...]\n\n### RE: Reviewer EeUn [2/2]\n**Clarity/experimental design**: We hope\n[rebuttal truncated]",
+ "initial_scores": [
+ 5,
+ 5,
+ 5,
+ 5,
+ 3
+ ],
+ "score_mean": 4.6,
+ "score_variance": 0.8,
+ "score_spread": 2,
+ "score_min": 3,
+ "score_max": 5,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": false,
+ "meta_review": "This paper uses concepts from control theory to explore the existence of special prompts that lead to controllable text generation. In particular, the authors introduce a notion of k-epsilon controllability which measures the degree to which such prompts exist. They explore this notion both theoretically and empirically, strongly suggesting that such prompts exist.\n\nThe idea of introducing concepts form control theory to large language model analysis is very welcome. However, the reviewers had serious concern with the formalization, the non-trivial conclusions that the paper allows to draw about controllability in practical settings (while the theoretical result seems so general that it might not be of interest to the ICLR community), and the novelty of the idea of using control theory in this setup, with respect to Soatto's et al \"Taming AI Bots\" paper (which is, however, to the best of my knowledge, only published on arXiv).\n\nOverall, while I hope the authors will keep exploring the application of control theory to large language model analysis, it is not clear to me that the current report would be of broad interest to the ICLR community.\n\nNB: The authors provided a rebuttal, but this was submitted much later than the rebuttal deadline, and it was thus not taken into account by the reviewers.",
+ "forum_id": "HgVEz6wwbM",
+ "primary_area": "generative models",
+ "n_reviews": 5,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_4Qb8",
+ "review_id": "wtIbFkDig2",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 5
+ },
+ "review_text_chars": 4338,
+ "edit_detected": true,
+ "edit_delta_seconds": 371852,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_jCxR",
+ "review_id": "CKo9hA40d5",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2885,
+ "edit_detected": true,
+ "edit_delta_seconds": 377121,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_8q5r",
+ "review_id": "xGQRJOmZaI",
+ "scores": {
+ "rating": 5,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 1908,
+ "edit_detected": true,
+ "edit_delta_seconds": 846532,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_fWP6",
+ "review_id": "5I8nziqpFc",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2479,
+ "edit_detected": true,
+ "edit_delta_seconds": 1455926,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_EeUn",
+ "review_id": "SaHhisLK4E",
+ "scores": {
+ "rating": 3,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 2,
+ "confidence": 3
+ },
+ "review_text_chars": 3156,
+ "edit_detected": true,
+ "edit_delta_seconds": 2063751,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8616.md b/open_review/iclr2024_8616.md
new file mode 100644
index 0000000000000000000000000000000000000000..c332ed9d18361b4013ec80255c440b7b922b54ed
--- /dev/null
+++ b/open_review/iclr2024_8616.md
@@ -0,0 +1,550 @@
+
+
+## _What’s the Magic Word?_ A CONTROL THEORY OF LLM PROMPTING
+
+Authors withheld for review
+
+## ABSTRACT
+
+Prompt engineering is crucial for deploying LLMs but is poorly understood mathematically. We formalize LLM systems as a class of discrete stochastic dynamical systems to explore prompt engineering through the lens of control theory. We investigate the reachable set of output token sequences _Ry_ ( **x** 0) for which there exists a control input sequence **u** for each **y** _∈Ry_ ( **x** 0) that steers the LLM to output **y** from initial state sequence **x** 0. We offer analytic analysis on the limitations on the controllability of self-attention in terms of reachable set, where we prove an upper bound on the reachable set of outputs _Ry_ ( **x** 0) as a function of the singular values of the parameter matrices. We present complementary empirical analysis on the controllability of a panel of LLMs, including Falcon-7b, Llama-7b, and Falcon-40b. Our results demonstrate a lower bound on the reachable set of outputs _Ry_ ( **x** 0) w.r.t. initial state sequences **x** 0 sampled from the Wikitext dataset. We find that the correct next Wikitext token following sequence **x** 0 is reachable over 97% of the time with prompts of _k ≤_ 10 tokens. We also establish that the top 75 most likely next tokens, as estimated by the LLM itself, are reachable at least 85% of the time with prompts of _k ≤_ 10 tokens. Intriguingly, short prompt sequences can dramatically alter the likelihood of specific outputs, even making the least likely tokens become the most likely ones. This control-centric analysis of LLMs demonstrates the significant and poorly understood role of input sequences in steering output probabilities, offering a foundational perspective for enhancing language model system capabilities.
+
+## 1 INTRODUCTION
+
+LLMs pre-trained on unsupervised next token prediction objectives exhibit unprecedented dynamic reprogrammability achieved through “prompting”, often referred to as zero-shot learning (Brown et al., 2020; Wei et al., 2022; Hagendorff, 2023; Noever & McKee, 2023; OpenAI, 2023; 2022). These capabilities appear to emerge as the model’s size, training data, and training time are scaled. The dynamic reprogrammability of LLMs is akin to the adaptable computational capacities observed in biological systems. This feature finds applications across domains such as machine translation (Wang et al., 2023a), code generation (Rozi`ere et al., 2023), and chatbots Bai et al. (2022). A rigorous understanding of the prompt’s influence over LLM generation would be of great utility for understanding LLMs and building more robust and capable systems leveraging LLMs.
+
+Strategies for controlling pre-trained LLM generation today fall into three broad categories (Zhang et al., 2022):
+
+1. **Input Optimization (Prompting):** Adjusting the input tokens (e.g., rewording the prompt) to improve subsequent text generation.
+
+2. **Model Optimization:** Adjusting the weights of the network (e.g., fine-tuning, RLHF) to improve model behavior during inference.
+
+3. **Post-processing:** Adjusting or re-ranking generated text (e.g., surrogate ranking algorithm).
+
+Of all these approaches, input optimization (i.e., prompting) is the least invasive and lowest-cost method – and the least understood. Prompt optimization is also deeply connected to the zero-shot
+
+1
+
+capabilities of LLMs – the mysterious emergent capabilities of LLMs such as problem-solving, knowledge retrieval, reasoning, and apparent general intelligence (Bubeck et al., 2023). With such a view, we seek to characterize the controllability of LLMs via prompting.
+
+## 1.1 CONTRIBUTION
+
+We formalize LLM systems in the mathematical framework of control theory in Section 3. Our analysis focuses on the reachable set of outputs _Ry_ ( **x** 0) for an LLM system. The reachable set is a fundamental concept in control theory that underlies notions of controllability, stability, and observability (cf. Appendix A). The reachable output set _Ry_ ( **x** 0) is the set of output sequences **y** for which there exists a control input sequence **u** _[∗]_ that steers the LLM from initial state **x** 0 to output **y** (cf. Definitions 3, 11).
+
+Our analytic results in Section 4 prove an upper bound on the contents of the reachable output set for a self-attention head as a function of the singular values of its parameter matrices. Since selfattention is the only component in a transformer block where significant information is exchanged between token representations, this bound provides a foothold for analysis of LLM controllability from the perspective of mechanistic interpretability (e.g., Bricken et al. (2023); Chefer et al. (2021); Conmy et al. (2023)). Moreover, this bound represents a necessary condition for an output to be in the reachable set.
+
+Our empirical results apply state-of-the-art prompt optimization techniques (Section 5.1) to demonstrate a lower bound on the contents of the reachable output set for a panel of LLMs, including Llama-7b (Touvron et al., 2023), Falcon-7b, and Falcon-40b (Almazrouei et al., 2023). Specifically, we sample initial states **x** 0 from the Wikitext dataset (Merity et al., 2016) and probe the reachable output tokens _y_ under length-constrained control input sequences **u** : _|_ **u** _| ≤ k_ . The length constraint _k_ is highly relevant for _optimal control_ of LLMs, as prompts with fewer tokens require fewer computation and memory resources. We find that the reachable output set contains the “correct” next Wikitext token following **x** 0 over 97% of the time with prompts of _k ≤_ 10 tokens. We expand our analysis of the contents of _Ry_ ( **x** 0) by sampling target output tokens _y_ based on the LLMs initial estimate of output likelihood _PLM_ ( _y|_ **x** 0). We find that the top 75 most likely output tokens _y_ are reachable at least 85% of the time with prompts of _k ≤_ 10 tokens. Intriguingly, some tokens drawn from the set of _least_ likely outputs are controllable to the most likely output with _k ≤_ 4 control input tokens. Our results suggest that prior likelihood-based metrics, such as cross-entropy loss, cannot guarantee exclusion from the reachable set, emphasizing the gap in our current understanding of LLM systems and control. Implications of our results and open questions in LLM control theory are further discussed in Section 6.
+
+## 2 RELATED WORK
+
+Much of the work on prompt optimization is concerned with finding prompts that induce higher LLM performance on “fill-in-the-blank” or “cloze” tasks (Taylor, 1953). One can frame a range of tasks including knowledge retrieval (Petroni et al., 2019), reasoning (Weston et al., 2016), and sentiment analysis (Wang et al., 2023b) as fill-in-the-blank tasks:
+
+- **Knowledge Retrieval:** _“The Titanic sank in the year_ _**[MASK]** .”_ (Answer: “1912”)
+
+- **Reasoning:** _“A is taller than B. B is taller than C. Is A taller than C?_ _**Answer: [MASK]** ”_ (Answer: “Yes”)
+
+- **Sentiment Analysis:** _“I am sad today._ _**The sentiment of the previous sentence was [MASK]** ”_ (Answer: “Negative”)
+
+Notably, there is some freedom in the bolded “prompt text” that surrounds the question to convert it into a “fill-in-the-blank” task. As it turns out, the prompt tokens have a large effect on LLM performance (Brown et al., 2020; Zhang et al., 2022; Jiang et al., 2020).
+
+Modern prompt optimization algorithms generally consist of two iterated steps: a sampling step where new prompts are generated and a testing step where the utility of the new prompts is evaluated, and the best are selected for the next iteration. Algorithms primarily differ in the sampling procedure, where various heuristics may be used to pick high-value swaps (Wen et al., 2023; Zhou et al., 2023;
+
+2
+
+Reynolds & McDonell, 2021). Overall, AutoPrompt and its derivative algorithms have been the most numerically successful prompt optimization methods, with the greedy coordinate gradient (GCG) algorithm having state-of-the-art performance (Zou et al., 2023).
+
+**The AutoPrompt Family:** AutoPrompt (Shin et al., 2020) pioneered the current wave of prompt optimization. Shin _et al_ propose a prompt optimization technique and demonstrate its effectiveness for engineering prompts to improve LLM performance on knowledge and sentiment analysis tasks. At its core, the AutoPrompt algorithm leverages gradient information at the token embedding layer to inform iterative token exchanges within the prompt. This method was extended in Zou et al. (2023) as the greedy coordinate gradient (GCG) algorithm. Taking inspiration from adversarial examples (Goodfellow et al., 2015), Zou _et al_ applied this AutoPrompt variant to generate “jailbreak” prompts that cause aligned LLMs to generate objectionable content.
+
+**Other Prompt Optimization Methods:** Other investigations on LLMs as prompt optimizers (Zhou et al., 2023) and further analysis of manual prompt optimization (Reynolds & McDonell, 2021) are informative but do not exceed the AutoPrompt family’s performance. Some other methods include GBDA (Guo et al., 2021), an approach based on the Gumbel-Softmax reparametrization, the PEZ algorithm (Wen et al., 2023), which directly optimizes embeddings via gradient information, and FluentPrompt (Shi et al., 2022), which differs from AutoPrompt by incorporating Langevin dynamics. Despite the variety of alternatives, GCG retains state-of-the-art performance.
+
+**Control Theory for LLMs:** To our knowledge, the only other work to date on the controllability of LLMs is Soatto et al. (2023). Soatto et al analyze the controllability of LLMs in terms of “meaningful sentences”, defined as the sigma-algebra generated by snippets of text written on the Internet. Their empirical analysis revolves around demonstrating that LLMs are capable of attributing meaning. The theoretical analysis of LLM controllability is limited to “meaningful sentences”, eliminating the possibility of out-of-distribution inputs and outputs. These restrictions render their results challenging to leverage toward a practical understanding of LLM controllability. We situate our work as a practically oriented exploration of LLM controllability. Motivated by challenges in developing LLM systems, we do not eliminate “meaningless sentences” from the state space or input space. We aim to establish a rigorous, general framework for understanding LLM systems and controllability that is amenable to the development of theory and practical engineering insights on systems design.
+
+## 3 CONTROL THEORY FOR LLMS
+
+Control theory originates from the study of automatic control systems in engineering. It seeks to understand how a “plant” system can be influenced toward a desired state using a “control signal” – often in the presence of disturbances and uncertainty.
+
+Control theory is central to a variety of engineering problems, from electrical engineering to autopilot to telecommunications to manufacturing. Surprisingly, control theory has also been highly applicable to a diverse range of scientific disciplines. Analyzing systems through the lens of controllability has proven fruitful for generating insight into biological systems such as cell signaling pathways and neural networks (Yi et al., 2000), the economics of central banking (Anit¸a et al., 2011), and controlling the spread of infectious diseases (Roy et al., 2009). One of the central benefits of studying systems via controllability is that a range of questions and problems naturally emerge from the framing: _when is control possible? What is the cost of control? How computationally intensive is control?_ These questions are both practically useful and often lead to fundamental insights about the nature of the system in question.
+
+To develop a control theory of LLMs, we provide fundamental abstract definitions of systems and control (Appendix A). We apply them to define LLM systems and outline specific canonical control concepts and problems such as controllability and reachability that arise naturally for LLM systems.
+
+**Language Model Notation:** We denote a causal language model using _PLM_ . _PLM_ maps from an ordered list of tokens from a vocabulary set _V_ (e.g., **x** _∈V[n]_ ) to the probability distribution over the next token _PLM_ ( _xn_ +1 _|_ **x** ) _∈_ [0 _,_ 1] _[|V|]_ . We use _V[∗]_ to denote the set of all possible sequences
+
+3
+
+of any length composed of tokens from _V_ . The addition operator indicates the concatenation of token sequences. Bolded lowercase variables (e.g., **x** = [ _x_[1] _, . . . , x[n]_ ]) denote token sequences while unbolded lowercase variables refer to individual tokens (e.g., _x ∈V_ ).
+
+While LLMs are at times leveraged in a manner that masks the iterative aspects of generation, the reality is that token generation and externally imposed “control input” sequences are generated and processed sequentially, leading to non-trivial system dynamics. Several key differences remain between LLM-based systems and systems typically modeled through ordinary differential equations (ODEs), which have long been a cornerstone in the study of continuous-time dynamical systems:
+
+1. **Discrete state and time:** LLM systems operate on sequences of discrete tokens over a discrete time set, in contrast to the continuous state spaces and time sets studied in classical control theory.
+
+2. **Shift-and-Grow State Dynamics:** Whereas the system state in an ODE-based system has a fixed size over time, the system state **x** ( _t_ ) for LLM systems grows as tokens are added to the state sequence.
+
+3. **Mutual exclusion on control input token vs. generated token:** The LLM system state **x** ( _t_ ) is written to one token at a time. The newest token is either drawn from the control input _u_ ( _t_ ) or is generated by the LLM by sampling _x[′] ∼ PLM_ ( _x[′] |_ **x** ( _t_ )). This differs from traditional discrete stochastic systems, where the control sequence and internal dynamics generally affect the state synchronously.
+
+We begin by rigorously defining LLM systems with user input, drawing from the abstract mathematical definition of a system (Definition 7).
+
+**Definition 1** (LLM System with Control Input) **.** _An autoregressive LLM system with control input_ Σ = ( _V, PLM_ ) _consists of:_
+
+- _T_ = N : _The_ _**time set** is the natural numbers._
+
+- _X_ = _V[∗]_ : _The_ _**state space** consists of all possible token sequences of any length drawn from V. We denote the state at time t as_ **x** ( _t_ ) = [ _x_[0] ( _t_ ) _, . . . , x[t]_ ( _t_ )] _._
+
+- _U_ = _V ∪_ ∅ : _The_ _**input** takes values from the vocabulary set V or null._
+
+- _ϕ_ : _X × U × T_[2] _→X_ : _The_ _**transition map** is_
+
+**==> picture [324 x 25] intentionally omitted <==**
+
+_Note that the general multi-step transition map ϕ_ ( **x** ( _t_ ) _, u, t, t_ + _N_ ) _can be achieved by iterating equation 1 for control sequences u defined over the interval_ [ _t, t_ + _N_ ] _._
+
+- _h_ ( **x** ( _t_ ); _r_ ) = [ _x[t][−][r]_ ( _t_ ) _, . . . , x[t]_ ( _t_ )] : _The_ _**readout map** returns the most recent r tokens from state_ **x** ( _t_ ) _._
+
+We note that this LLM system definition is generalizable to a variety of LLM augmentation, including chain-of-thought (Wei et al., 2023), retrieval-augmented generation (Lewis et al., 2020), and chatbot interaction. For example, chain-of-thought is equivalent to sampling the readout map _h_ ( _x_ ( _t_ ) _, r_ ) at time _T > |_ **u** _|_ + _|_ **x** 0 _|_ + _r_ for prompt **u** and initial state **x** 0. A similar formulation may be applied to LLM systems endowed with programmatic tools (e.g., Patil et al. (2023)).
+
+In Definition 1, we assume that the control input gets to “decide” whether to yield token generation to the LLM ( _u_ ( _t_ ) = ∅) or override the LLM and add some token _u_ ( _t_ ) = ∅ to the state **x** ( _t_ ). This assumption generally holds when building LLM systems, though it may not hold when using existing systems (e.g., via non-streaming API). When discussing finite-length control inputs – e.g., the family of _k_ -long input sequences **u** _∈V[k]_ – the value of _u_ ( _ℓ_ ) : _ℓ> k_ is implicitly ∅ unless otherwise stated.
+
+While next token generation _x[′] ∼ PLM_ ( _x[′] |_ **x** ( _t_ )) in equation 1 is probabilistic, we may render the system deterministic by sampling with zero temperature (i.e., greedy decoding). The greedy decoding assumption provides a foothold to analyze the reachable sets and controllability of LLM
+
+4
+
+systems without invoking notions of stochastic control as in Sivaramakrishnan et al. (2023); Soatto et al. (2023). Moreover, it remains connected to temperature-based stochastic decoding strategies as a limiting case of temperature-based sampling.
+
+We now extend Definition 10 to define output controllability for LLM systems:
+
+**Definition 2** (LLM Output Reachability) **.** _Output token sequence_ **y** _∈V[r] is reachable from initial state_ **x** 0 _∈V[∗] for LLM system_ Σ( _V, PLM_ ) _iff there exists some time T and input_ **u** _[∗] ∈U[T] that steers the LLM from initial state_ **x** 0 _to output_ **y** = _h_ ( **x** ( _T_ ) _, r_ ) _at time T ._
+
+We disregard the trivial solution wherein the control input **u** _[∗]_ ( _t_ ) overrides the LLM to force the state sequence to take on the desired output value **y** .
+
+The reachable output set definition for LLM systems follows from Definition 11:
+
+**Definition 3** (LLM Reachable Output Set) **.** _The reachable output set from initial state_ **x** 0 _∈V[∗] for LLM system_ Σ = ( _V, PLM_ ) _is denoted Ry_ ( **x** 0) _and consists of all reachable outputs_ **y** _∈V[∗] from initial state_ **x** 0 _._
+
+Output controllability for LLMs follows from Definition 13.
+
+**Definition 4** (LLM Output Controllability) **.** _An LLM system_ Σ = ( _V, PLM_ ) _is output controllable iff, for every initial state_ **x** 0 _∈V[∗] , the reachable output set Ry_ ( **x** 0) = _V[∗] ._
+
+The turn-based nature of writing to the LLM state sequence **x** ( _t_ ) invites the question of whether the prompt **u** should preempt the imposed state **x** 0 or come after the state[1] . We focus our efforts on cases where **u** comes before imposed state sequence **x** 0 due to its importance for developing system prompts and controlling text completion-based generation where the desired output is **x** 0 + **y** _[∗]_ for some desired continuation **y** _∗_ of partial string **x** 0. Due to the costly nature of long prompts, we are especially interested in the existence of prompts **u** _[∗]_ with minimal length _|_ **u** _[∗] |_ .
+
+Definitions 3 and 4 form the basis for our control theory of LLMs. While amenable to analytic analysis as in Section 4 and Soatto et al. (2023), empirical analysis of the reachable set and controllability is challenging due to the intractable size of _V[∗]_ . We propose the following statistical measure of controllability for practically assessing the controllability of an LLM system w.r.t. a dataset _D_ under prompt length constraint _|_ **u** _| ≤ k_ :
+
+**Definition 5** ( _k − ϵ_ Controllability) **.** _Consider a dataset of state-output pairs D_ = _{_ ( _x[i]_ 0 _[, y][i]_[)] _[}] i∈_ [ _N_ ] _[.] An LLM_ Σ = ( _V, PLM_ ) _is k − ϵ controllable w.r.t. D if, for at least a proportion of_ (1 _− ϵ_ ) _of_ ( _x[i]_ 0 _[, y][i]_[)] _[ ∈D][, the following condition holds:]_
+
+**==> picture [225 x 13] intentionally omitted <==**
+
+_Where R[k] y_[(] _[x]_ 0 _[i]_[)] _[ is the reachable set of outputs as in Definition 3 under the constraint that prompts]_ **[ u]** _must have length |_ **u** _| ≤ k._
+
+Our empirical work in Section 5.2 explores _k − ϵ_ controllability w.r.t. initial states **x** 0 sampled from the Wikitext dataset. While empirical analysis of LLM controllability is challenging due to the lack of apparent structure in LLM dynamics and the combinatorially large state space, we may still experimentally establish the _existence_ of optimal prompts **u** _[∗]_ that elicit a given output, and thus establish a lower bound on the content of the reachable set. Meanwhile, our theoretical work in Section 4 establishes upper bounds on the content of the reachable set for self-attention. We hope these complementary approaches may one day unify our understanding of LLM systems.
+
+## 4 MATHEMATICAL ANALYSIS ON THE CONTROLLABILITY OF SELF-ATTENTION
+
+Self-attention is a central component in modern transformer-based language models (Brown et al., 2020; Touvron et al., 2023; Radford et al., 2019; Min et al., 2023). Introduced in Vaswani et al.
+
+> 1 Both situations are reasonable in developing LLM systems: **u** preceding **x** 0 may arise when prompting an LLM to complete a partial string **x** 0. **u** proceeding **x** 0 may arise when prompting an LLM in the presence of an imposed system prompt **x** 0. Therefore, how an initial state **x** 0 is interleaved with control input **u** is largely a design decision.
+
+5
+
+(2017), self-attention is the primary component in transformers where token representations exchange information.
+
+**Definition 6** (Self-Attention) **.** _Self-attention_ Ξ = ( **Wq** _,_ **Wk** _,_ **Wv** ) _is a map from_ R _[N][×][d][in] →_ R _[N][×][d][out] where N is an arbitrary number of input token representations each of dimensionality din, and dout is the dimensionality of the output token representations._
+
+**==> picture [258 x 19] intentionally omitted <==**
+
+_where_ exp() _denotes element-wise exponentiation of the matrix entries,_ **Wq** _,_ **Wk** _∈_ R _[d][in][×][d][k] ,_ **Wv** _∈_ R _[d][in][×][d][out] ,_ **Q** = **XWq** _,_ **K** = **XWk** _,_ **V** = **XWv** _, and_ D _is a diagonal positive definite matrix defined as_
+
+**==> picture [263 x 19] intentionally omitted <==**
+
+_where_ **1** _N ×_ 1 _is an N ×_ 1 _matrix of ones._
+
+Note that the parameters and operation of Ξ are independent of the number of token representations _N_ . Self-attention may be applied to discrete token sequences **x** _∈V[∗]_ provided that each token _x[i] ∈_ **x** is first mapped to a representation in the input dimension with some embedding map _E_ : _V →_ R _[d][in]_ .
+
+We are interested in the reachability of output token representations, where we partition the input **X** _∈_ R[(] _[k]_[+] _[M]_[)] _[×][d][in]_ into an _k × din_ block of control input representations **U** and an _M × din_ block of imposed state representations **X** 0 (cf. Definition 1). We also partition the output **X** _[′]_ = Ξ( **X** ) _∈_ R[(] _[k]_[+] _[M]_[)] _[×][d][in]_ into a corresponding _k × dout_ matrix **U** _[′]_ and an _M × dout_ matrix **Y** . Motivated by the architecture of transformer-based language models, we seek to characterize the reachable set of output representations **Y** _∈R[k] y_[(] **[X]**[0][)][ under imposed input representations] **[ X]**[0][and controllable input] representations **U** , where **U** consists of _k_ token representations. While the reachable set is now a set of continuous-valued output representation matrices in R _[M][×][d][in]_ , we may readily adapt Definition 3 to define the reachable set for these conditions.
+
+**Theorem 1** (Condition for Exclusion from the Reachable Set) **.** _A desired output representation_ **Y** _[∗] ∈_ R _[M][×][d][out] must be excluded from the reachable set R[k] y_[(] **[X]**[0][)] _[ if the following condition holds] for any row i:_
+
+**==> picture [333 x 34] intentionally omitted <==**
+
+_where_ Ω _u_ = max _j ∥_ **u** _[j] ∥ for rows_ **u** _[j] of_ **U** _,_ Ω _x_ = max _j ∥_ **x** _[j]_ 0 _[∥][for rows]_ **[ x]** 0 _[i][of]_ **[ X]**[0] _[,][ σ][q][and][ σ][k][are the] maximum singular values of_ **Wq** _,_ **Wk** _respectively, D_[ˆ] _xx[i][is the][ i][th element on the diagonal of]_ **[ˆD]** _[xx][,] which is given by_
+
+**==> picture [276 x 19] intentionally omitted <==**
+
+**==> picture [398 x 36] intentionally omitted <==**
+
+_where_ **Qx** = **X0Wq** _,_ **Kx** = **X0Wk** _, and_ **Vx** = **X0Wv**
+
+_The proof of Equation 5 is provided in Appendix B._
+
+Intuitively, this condition arises when when the output representation **Y**[ˆ] _x_ that occurs when only the imposed state _X_ 0 is fed into the transformer is too far away for the control tokens **U** to steer it to **Y** _[∗]_ . The ability for the control input **U** to nullify the impact of **Y**[ˆ] _x_ = Ξ( **X** 0) on the output scales with the number of control input tokens _k_ . A control input with many tokens can “dominate” the influence of _X_ 0 by re-allocating attention away from the component of the output **Y**[ˆ] _x_ that arises from **X** 0. A notable insight from the proof is that one may decompose the output of attention into a components that arise largely from different parts of the input. While there are cross terms in the attention matrix, these amount to only a positive scaling factor applied to the “independent” components like **Y**[ˆ] _x_ . Thus, we have an analytic bound on the reachable output set for self-attention.
+
+6
+
+## 5 EXPERIMENTS
+
+To gain a practical, empirical understanding of the reachable set _R[k] y_[(] **[x]**[0][)][, we probe the existence of] optimal prompts **u** _[∗]_ across datasets _D_ of initial state–desired output pairs ( **x** 0 _, y[∗]_ ). We scope our experiments to study immediate control (i.e., we check the LLM output after _|y[∗] |_ tokens are generated) where the control input **u** is prepended to the imposed state **x** 0. Moreover, we focus on the case of controlling the LLM system to produce a single output token _y[∗] ∈V_ under some constraint _|u| ≤ k_ . This “single-step” control renders the problem of gauging reachability computationally tractable and is a fundamental step toward understanding the iterated dynamics of LLM systems in terms of reachability and controllability. We leave the exploration of reachability and controllability under an extended time horizon (e.g., chain-of-thought, chatbot dynamics, tool-wielding LLMs) and under the requirement of multi-token outputs **y** to future work.
+
+## 5.1 METHODS
+
+We apply prompt optimization algorithms to establish the existence of optimal prompts **u** _[∗]_ of length _k_ that steer the LLM system from initial state **x** 0 to output _y_ for some dataset _D_ of initial state-output pairs. In general, prompt optimization algorithms accept a token sequence and a loss function on said token sequence, along with a specification of which tokens are manipulable. The output of a prompt optimizer is a manipulated token sequence (i.e., optimized prompt) designed to minimize the loss. We apply two computational methods to generating optimal prompts: greedy back-generation (Algorithm C) and greedy coordinate gradient (GCG, Algorithm C, invented in Zou et al. (2023)). We found that greedy back-generation performed best for short prompts _k ≤_ 3 tokens, while GCG was the best-performing algorithm for prompts of 4 or more tokens. To our knowledge, our greedy back-generation algorithm is novel. For brevity, we place the full description and our parameter values for the two algorithms in Appendix C, as the specifics of the algorithms are not the main contribution of this work.
+
+We focus on understanding the content and structure of the reachable set of LLM system outputs _R[k]_[particularly][under][a][constraint][on][the][number][of][input][tokens] _[k]_[.][To][prove][which][output] _y_[(] **[x]**[0][)][,] tokens are reachable under varying input sequence lengths, we apply an incremental prompt lengthening procedure when searching for optimal prompts on some dataset _D_ .
+
+|**Algorithm 1**Back-off Prompt|
+|---|
+|**Require:** State-output token sequence(**x**0_, y_); LLM systemΣ = (_PLM, V_).|
+|1: **for**_k_from1to3**do**|
+|2: **u**_k_ =Greedy Back Generate(**x**0_, y_; Σ)|
+|3: **return u**_k_ if it steersΣfrom**x**0 _→y_.|
+|4: **end for**|
+|5: **for**_k ∈_[4_,_6_,_8_,_10]**do**|
+|6: **u**_k_ =Greedy Coordinate Gradient(**x**0_, y_; Σ)|
+|7: **return u**_k_ if it steersΣfrom**x**0 _→y_.|
+|8: **end for**|
+|9: **return**Failed to establish reachability.|
+
+## 5.2 RESULTS
+
+Our results revolve around the reachable set _R[k] y_[(] **[x]**[0][)][ for state sequences sampled from the Wikitext] dataset. We applied the same Back-off Prompt strategy (Algorithm 1) to determine _k−ϵ_ controllability for all experiments, varying the specifics of the dataset _D_ (cf 5). We established the reachability of the “ground truth” next token _y_ proceeding state token sequence **x** 0 in Wikitext. In our tests on a dataset of 5000 state-output sequences with states of length 8 _−_ 32 tokens, we found that the true next token _y_ is reachable over 97% of the time with a prompt of length _k ≤_ 10 (Figure 1).
+
+To explore the reachable set _Ry[k]_[(] **[x]**[0][)][beyond][the][ground][truth][of][Wikitext][outputs,][we][generated][a] synthetic dataset of outputs by sampling 25 Wikitext sequences **x** 0 and selecting the top 75 most likely next-tokens according to the model itself _PLM_ ( _y|_ **x** 0) as the target tokens (Figures 1).
+
+7
+
+**==> picture [396 x 314] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-7b] k- Plot for (x_0, y*) from Wikitext [Falcon-7b] k- Plot for Top 75 y* on 25 x_0 from Wikitext 1.0 |x_0| = 8 1.0 |x _ 0| = 8 |x_0| = 10 |x_0| = 10 |x_0| = 16 |x_0| = 16 |x_0| = 22 |x_0| = 22 0.8 |x_0| = 32 0.8 |x_0| = 32 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0 2 4 6 8 10 0 2 4 6 8 10 Prompt Length [k] Prompt Length [k] Figure 1: Main experimental results on k − ϵ controllability Top left : k − ϵ values for Falcon- [Falcon-7b] Base Rank vs. Prompt Length for y* ~ uniform(V) on x_0 from Wikitext 7b on ground truth target token y [[∗]] . 97.16% of the instances were solved with a prompt of 10 length k ≤ 10.. Top right : k − ϵ values for reaching the top 8 75 targets were reachable at least 89.39% of the75 most likely outputs75 most likely outputs y [[∗]] for each x 0.. The top 6 time with a prompt of length k ≤ 10.. 4 Bottom right : Prior likelihood rank of target token y [[∗]] in terms of likelihood ascribed by the 2 LLMelicitelicit yPP [[∗]] . LM Target tokens were sampled uniformlyversusversus required prompt length to 0 0 10000 20000 30000 40000 50000 60000solvedunsolved Base Rank of P(y* | x_0) ] ] Portion Incorrect [ Portion Incorrect [ Prompt Length [k] **----- End of picture text -----**
+
+Figure 1: Main experimental results on _k − ϵ_ controllability **Top left** : _k − ϵ_ values for Falcon7b on ground truth target token _y[[∗]]_ . 97.16% of the instances were solved with a prompt of length _k ≤_ 10..
+
+**Top right** : _k − ϵ_ values for reaching the top 75 targets were reachable at least 89.39% of the75 most likely outputs75 most likely outputs _y[[∗]]_ for each **x** 0.. The top time with a prompt of length _k ≤_ 10.. **Bottom right** : Prior likelihood rank of target token _y[[∗]]_ in terms of likelihood ascribed by the LLMelicitelicit _yPP[[∗]]_ . _LM_ Target tokens were sampled uniformlyversusversus required prompt length to from the least to most likely token.
+
+To maximally push the bounds of the reachable set within our single output token scope, we created another synthetic dataset where the target output token _y[∗]_ was sampled uniformly from the highest likelihood next token to the lowest likelihood token. Although the overall reachability score was low (only 46.43% reachable with _k_ = 10), we were intrigued by the near-uniform relationship between prior token rank (based on _PLM_ ( _y|_ **x** 0)) versus the required number of prompt tokens. Figure 1 plots the relationship between prior target token rank based on _P_ ( _y[∗] |_ **x** 0) and the required prompt length _k_ to elicit the prompt. While over half were unreachable, the remaining reachable tokens appear uniformly distributed in terms of required prompt length, regardless of rank. We replicated these results (and more) across Llama-7b and Falcon-40b in Appendix D.
+
+## 6 DISCUSSION
+
+We proposed a control theoretic framework for understanding language model prompting, orienting our investigation around the reachable set of outputs _R[k] y_[(] **[x]**[0][)][.][We proved a bound on the reachable] set of outputs for self-attention in terms of the singular values of its weight matrices, and we established fundamental results on the reachability of “correct” next tokens (according to Wikitext). We expanded the scope of this investigation by probing the reachability of tokens assigned high likelihood by the LLM itself, and tokens assigned minimal likelihood by the LLM itself.
+
+Bounding the reachable set for self-attention is deeply related to the mechanism by which consistent representations are formed for multi-token generation. Steering a language model to generate a desired token sequence requires that the control input induce a token representation in the right-most token such that the next token prediction logits _P_ ( **y** _|_ **u** + **x** 0) achieves a desired value. Moreover, generated tokens are fed back into the model, and their representations must be steered as well to control iterated generation. Self-attention is the primary mechanism by which the token representations exchange information, making the reachable set of output representations across multiple tokens in **X** 0 for self-attention a fundamental part of LLM control theory.
+
+8
+
+Our empirical results suggest that there is far more to the reachability of a given output than just prior likelihood or the prior rank the LLM assigns to a given token. Although prompt optimizationbased _k − ϵ_ controllability experiments are only able to provide a lower bound on the content of the reachable set, the ability to frequently control even the _least likely_ token to being the _most likely_ token with just a few input tokens is intriguing. We believe this result indicates the importance of further investigating the reachability and controllability of LLMs, particularly for developing capable and reliable LLM systems.
+
+Our investigations provide an entry into the understanding of LLM controllability via prompts. However, a comprehensive understanding necessitates extending our exploration into diverse regimes. Exploring the controllability with longer prompts and longer questions (base token sequences) will be pivotal. Equally important is the study of diverse models to verify the generality of our findings. Moreover, the direct comparison of controllability scores of different model families is challenging since family uses a different tokenizer. The Llama family tokenizer, for instance, has a vocabulary of 30,000 tokens whereas the Falcon family has a vocabulary of 65,536 tokens. Further work is required to robustly compare controllability across models.
+
+An intriguing observation from our study is the log-linear relationship between prompt length _k_ and controllability fraction _ϵ_ (see Figure 2 in Appendix D). While this is compelling within our studied domain, it raises the essential question: is this relationship robust outside our current explorative scope? Unearthing universal scaling laws in LLM controllability would not only inform practical control applications but also open the door for theoretical insight into the nature of LLM behavior.
+
+The progress we have made, both in understanding the bounds on self-attention controllability and the empirical measures of _k − ϵ_ LLM controllability, underscores the potential of this control theoretic framing for studying LLMs. Below is a non-exhaustive list of open problems in LLM control, all stemming from the framing in section A:
+
+- **Control Properties of Chain-of-Thought:** Chain-of-Thought is a powerful technique where LLMs are allowed to generate intermediate tokens (i.e., “thoughts”) between a question and an answer (Wei et al., 2023). The control properties (e.g., stability, reachability) of systems leveraging these techniques are of great interest for understanding and composing systems of LLMs in the real world.
+
+- **Distributional Control:** To what extent can we control the output distribution of a language model _PLM_ ( **y** _|_ **x** 0 + **u** ) to a desired distribution _P[∗]_ ( **y** )?
+
+- **Computational Cost of Control:** What are the performance characteristics of LLM control regularized by computational cost?
+
+- **Learnability of Control:** To what extent can LLMs learn to control each other? Work such as Zhou et al. (2023) showed that LLMs are capable of human-level prompt engineering, but it is unclear how well an LLM can learn to control another when explicitly optimized on the objective of LLM control.
+
+- **Controllable Subspaces:** In the control of linear dynamical systems, it is known that uncontrollable systems are often coordinate transformable into a representation where a subset of the coordinates are controllable and a subset are uncontrollable Sontag (2013). We have shown that controllable and uncontrollable components naturally emerge for self-attention heads in section 4 – can this be generalized to transformer blocks with nonlinearities and residual streams?
+
+- **Composable LLM Systems:** One of the greatest boons of control theory is the ability to compose control modules and subsystems into an interpretable, predictable, and effective whole (Lian et al., 2002). The composition of LLM systems (potentially with non-LLM control modules) is an exciting avenue for scaling super intelligent systems.
+
+## REFERENCES
+
+- Ebtesam Almazrouei, Hamza Alobeidli, Abdulaziz Alshamsi, Alessandro Cappelli, Ruxandra Cojocaru, Merouane Debbah, Etienne Goffinet, Daniel Heslow, Julien Launay, Quentin Malartic, Badreddine Noune, Baptiste Pannier, and Guilherme Penedo. Falcon-40B: an open large language model with state-of-the-art performance. 2023.
+
+9
+
+- Sebastian Anit¸a, Viorel Arn˘autu, Vincenzo Capasso, and Vincenzo Capasso. _An introduction to optimal control problems in life sciences and economics: From mathematical models to numerical simulation with MATLAB®_ , volume 2. Springer, 2011.
+
+- Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. _arXiv preprint arXiv:2204.05862_ , 2022.
+
+- Trenton Bricken, Adly Templeton, Joshua Batson, Brian Chen, Adam Jermyn, Tom Conerly, Nick Turner, Cem Anil, Carson Denison, Amanda Askell, Robert Lasenby, Yifan Wu, Shauna Kravec, Nicholas Schiefer, Tim Maxwell, Nicholas Joseph, Zac Hatfield-Dodds, Alex Tamkin, Karina Nguyen, Brayden McLean, Josiah E Burke, Tristan Hume, Shan Carter, Tom Henighan, and Christopher Olah. Towards monosemanticity: Decomposing language models with dictionary learning. _Transformer Circuits Thread_ , 2023. [URL removed]
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), _Advances in Neural Information Processing Systems_ , volume 33, pp. 1877–1901. Curran Associates, Inc., 2020. URL [URL removed] file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf.
+
+- S´ebastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, Harsha Nori, Hamid Palangi, Marco Tulio Ribeiro, and Yi Zhang. Sparks of artificial general intelligence: Early experiments with gpt-4, 2023.
+
+- Giuseppe C Calafiore and Laurent El Ghaoui. _Optimization models_ . Cambridge university press, 2014.
+
+- Hila Chefer, Shir Gur, and Lior Wolf. Transformer interpretability beyond attention visualization, 2021.
+
+- Arthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adri`a Garriga-Alonso. Towards automated circuit discovery for mechanistic interpretability, 2023.
+
+- Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples, 2015.
+
+- Chuan Guo, Alexandre Sablayrolles, Herv´e J´egou, and Douwe Kiela. Gradient-based adversarial attacks against text transformers, 2021.
+
+- Thilo Hagendorff. Machine psychology: Investigating emergent capabilities and behavior in large language models using psychological methods, 2023.
+
+- Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. How can we know what language models know?, 2020.
+
+- Rudolf Emil Kalman, Peter L Falb, and Michael A Arbib. _Topics in mathematical system theory_ , volume 33. McGraw-Hill New York, 1969.
+
+- Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich K¨uttler, Mike Lewis, Wen-tau Yih, Tim Rockt¨aschel, et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. _Advances in Neural Information Processing Systems_ , 33: 9459–9474, 2020.
+
+- Feng-Li Lian, James Moyne, and Dawn Tilbury. Network design consideration for distributed control systems. _IEEE transactions on control systems technology_ , 10(2):297–307, 2002.
+
+10
+
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models, 2016.
+
+- Bonan Min, Hayley Ross, Elior Sulem, Amir Pouran Ben Veyseh, Thien Huu Nguyen, Oscar Sainz, Eneko Agirre, Ilana Heintz, and Dan Roth. Recent advances in natural language processing via large pre-trained language models: A survey. _ACM Computing Surveys_ , 56(2):1–40, 2023.
+
+- David Noever and Forrest McKee. Numeracy from literacy: Data science as an emergent skill from large language models, 2023.
+
+Katsuhiko Ogata. _Modern control engineering fifth edition_ . 2010.
+
+OpenAI, Nov 2022. URL [URL removed]
+
+OpenAI. Gpt-4 technical report, 2023.
+
+Shishir G. Patil, Tianjun Zhang, Xin Wang, and Joseph E. Gonzalez. Gorilla: Large language model connected with massive apis, 2023.
+
+- Fabio Petroni, Tim Rockt¨aschel, Patrick S. H. Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H. Miller, and Sebastian Riedel. Language models as knowledge bases? _CoRR_ , abs/1909.01066, 2019. URL [URL removed]
+
+- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. _OpenAI blog_ , 1(8):9, 2019.
+
+- Laria Reynolds and Kyle McDonell. Prompt programming for large language models: Beyond the few-shot paradigm, 2021.
+
+- Sandip Roy, Yan Wan, and Ali Saberi. A network control theory approach to virus spread mitigation. In _2009 IEEE Conference on Technologies for Homeland Security_ , pp. 599–606, 2009. doi: 10.1109/THS.2009.5168092.
+
+- Baptiste Rozi`ere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, J´er´emy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafiori, Wenhan Xiong, Alexandre D´efossez, Jade Copet, Faisal Azhar, Hugo Touvron, Louis Martin, Nicolas Usunier, Thomas Scialom, and Gabriel Synnaeve. Code llama: Open foundation models for code, 2023.
+
+- Weijia Shi, Xiaochuang Han, Hila Gonen, Ari Holtzman, Yulia Tsvetkov, and Luke Zettlemoyer. Toward human readable prompt tuning: Kubrick’s the shining is a good movie, and a good prompt too?, 2022.
+
+- Taylor Shin, Yasaman Razeghi, Robert L. Logan IV au2, Eric Wallace, and Sameer Singh. Autoprompt: Eliciting knowledge from language models with automatically generated prompts, 2020.
+
+- Karthik Sivaramakrishnan, Vignesh Sivaramakrishnan, and Meeko M. K. Oishi. Stochastic reachability of discrete-time stochastic systems via probability measures, 2023.
+
+- Stefano Soatto, Paulo Tabuada, Pratik Chaudhari, and Tian Yu Liu. Taming ai bots: Controllability of neural states in large language models, 2023.
+
+- Eduardo D Sontag. _Mathematical control theory: deterministic finite dimensional systems_ , volume 6. Springer Science & Business Media, 2013.
+
+- Wilson L. Taylor. “cloze procedure”: A new tool for measuring readability. _Journalism Quarterly_ , 30(4):415–433, 1953. doi: 10.1177/107769905303000401. URL [URL removed] 1177/107769905303000401.
+
+- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth´ee Lacroix, Baptiste Rozi`ere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models, 2023.
+
+11
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Longyue Wang, Chenyang Lyu, Tianbo Ji, Zhirui Zhang, Dian Yu, Shuming Shi, and Zhaopeng Tu. Document-level machine translation with large language models. _arXiv preprint arXiv:2304.02210_ , 2023a.
+
+- Zengzhi Wang, Qiming Xie, Zixiang Ding, Yi Feng, and Rui Xia. Is chatgpt a good sentiment analyzer? a preliminary study. _arXiv preprint arXiv:2304.04339_ , 2023b.
+
+- Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, Ed H. Chi, Tatsunori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus. Emergent abilities of large language models, 2022.
+
+- Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning in large language models, 2023.
+
+- Yuxin Wen, Neel Jain, John Kirchenbauer, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Hard prompts made easy: Gradient-based discrete optimization for prompt tuning and discovery, 2023.
+
+- Jason Weston, Antoine Bordes, Sumit Chopra, and Tom´as Mikolov. Towards ai-complete question answering: A set of prerequisite toy tasks. In Yoshua Bengio and Yann LeCun (eds.), _4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016, Conference Track Proceedings_ , 2016. URL [URL removed]
+
+- Tau-Mu Yi, Yun Huang, Melvin I Simon, and John Doyle. Robust perfect adaptation in bacterial chemotaxis through integral feedback control. _Proceedings of the National Academy of Sciences_ , 97(9):4649–4653, 2000.
+
+- Hanqing Zhang, Haolin Song, Shaoyu Li, Ming Zhou, and Dawei Song. A survey of controllable text generation using transformer-based pre-trained language models. _CoRR_ , abs/2201.05337, 2022. URL [URL removed]
+
+- Yongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. Large language models are human-level prompt engineers, 2023.
+
+- Andy Zou, Zifan Wang, J. Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models, 2023.
+
+12
+
+## A ABSTRACT SYSTEMS AND CONTROL THEORY BACKGROUND
+
+This section aims to provide an overview of fundamental control-theoretic concepts from an abstract perspective. We primarily draw from Sontag (2013); Kalman et al. (1969), and Ogata (2010).
+
+Diverse definitions of “system” or “machine” exist in the literature, all representing the same core concept but varying in mathematical details. We offer the following high-level definition based on Sontag (2013):
+
+**Definition 7** (System) **.** _A “system” or “machine”_ Σ = ( _T , X , U, ϕ_ ) _consists of:_
+
+- _T_ : _The_ _**time set** along which system state evolves._
+
+- _X_ : _The_ _**state space** ._
+
+- _U_ : _The_ _**input space** ._
+
+- _ϕ_ : _X × U × T_[2] _→X_ : _The_ _**transition map** ._
+
+_A system may also be equipped with an output space and readout map_ ( _Y, h_ ) _:_
+
+- _Y_ : _The_ _**output space** ._
+
+- _h_ : _X × U × T →Y_ : _The_ _**readout map** ._
+
+In other words, at time _t ∈T_ , the system’s state takes on values _x ∈X_ , and the control input takes values _u ∈U_ . The system evolves over time with the transition map _ϕ_ ( _x, u, t, t[′]_ ) that returns the new state value _x[′] ∈X_ at time _t[′] > t_ . A system can also have a readout map _h_ ( _x, u, t_ ) that produces the output value _y ∈Y_ given the current time, state, and input value. An input _u ∈U_ defined over interval [ _t, t[′]_ ] may be said to _steer the system_ Σ = ( _T , X , U, ϕ_ ) from state _x_ 0 to state _x[′]_ if _x[′]_ = _ϕ_ ( _x_ 0 _, u, t, t[′]_ ). A wide variety of systems are expressible within this framework. E.g., we obtain discrete-time dynamical systems for _T_ = Z[+] . Continuous-time dynamical systems emerge for _T_ = R[+] .
+
+Note that we assume that the system Σ is time-invariant; its dynamics _ϕ_ do not change as a function of time. This assumption is widely applicable and is often made in the literature (Kalman et al., 1969; Ogata, 2010; Sontag, 2013) to simplify definitions and discussions of systems.
+
+Reachability is a core control theory concept and central to defining controllability. At their core, definitions of reachability revolve around the existence of control inputs _u ∈U_ that steer the system from a starting state _x_ 0 _∈X_ to some desired state(s). Following from Kalman et al. (1969); Sontag (2013), we define state reachability as:
+
+**Definition 8** (State Reachability) **.** _State x ∈X is reachable from initial state x_ 0 _∈X for system_ Σ = ( _T , X , U, ϕ_ ) _iff there exists some time T and control input u[∗] ∈U such that u[∗] steers the system from state x_ 0 _to state x at time T ._
+
+We may use this definition of state reachability to define the reachable state set for some initial state _x_ 0 _∈X_ :
+
+**Definition 9** (Reachable State Set) **.** _The reachable state set from initial state x_ 0 _∈X for system_ Σ = ( _T , X , U, ϕ_ ) _is denoted R_ ( _x_ 0) _⊆X and consists of all reachable states x ∈X from initial state x_ 0 _(cf. Definition 8)._
+
+For systems with readout maps _h_ , notions of _output reachability_ arise naturally. Note that state reachability is neither necessary nor sufficient to guarantee output reachability.
+
+**Definition 10** (Output Reachability) **.** _Output y ∈Y is reachable from initial state x_ 0 _∈X for system_ Σ = ( _T , X , U, ϕ, Y, h_ ) _iff there exists some time T and control input u[∗] ∈U such that u[∗] steers the system from state x_ 0 _to output y in time T ._
+
+**Definition 11** (Reachable Output Set) **.** _The reachable output set from initial state x_ 0 _∈X for system_ Σ = ( _T , X , U, ϕ, Y, h_ ) _is denoted Ry_ ( _x_ 0) _and consists of all reachable outputs y ∈Y from initial state x_ 0 _(cf. Definition 10)._
+
+A system is controllable when the reachable set extends to the entire state space. Practically speaking, this implies that one can steer the system from any initial state to any desired state.
+
+13
+
+**Definition 12** (State Controllability) **.** _System_ Σ = ( _T , X , U, ϕ_ ) _is state controllable iff, for every initial state x_ 0 _∈X , the reachable set R_ ( _x_ 0) = _X ._
+
+**Definition 13** (Output Controllability) **.** _System_ Σ = ( _T , X , U, ϕ, Y, h_ ) _is output controllable iff, for every initial state x_ 0 _∈X , the reachable output set Ry_ ( _x_ 0) = _Y._
+
+A range of fruitful questions stem from these definitions: if there is a cost associated with control inputs _u ∈U_ (e.g., power constraints, length constraints), what is the minimum cost of control? What is the minimum time required to get from the initial state to the desired final state or output? If the system is not completely controllable, under what conditions is it controllable? Under which readout maps is a system output controllable?
+
+14
+
+## B PROOF OF SELF-ATTENTION CONTROLLABILITY THEOREM 1
+
+_Note: Key terms for the proof are introduced in Section 4 surrounding Theorem 1. Specifically, the definition of self-attention mechanism_ Ξ _, the control problem setup, and the reachable set R[k] y_[(] **[X]**[0][)] _are required background for this proof._
+
+_Proof._ For each token representation matrix **Q** _,_ **K** _,_ **V** _∈_ R[(] _[k]_[+] _[M]_[)] _[×·]_ , we denote the first _k_ rows corresponding to **U** using _u_ as a subscript, like **Q** _u_ . The remaining _M_ rows corresponding to **X** 0 are denoted with subscript _x_ like **Q** _x_ .
+
+Let **A** be the exponentiated query-key outer product matrix with the following block structure:
+
+**==> picture [343 x 25] intentionally omitted <==**
+
+We apply a similar quadrant decomposition to D, defined initially in Equation 4.
+
+**==> picture [292 x 25] intentionally omitted <==**
+
+where the quadrant demarcations in D follow from Equation 8.
+
+We may now express the self-attention mechanism output representations **Y** as
+
+**==> picture [266 x 13] intentionally omitted <==**
+
+We begin by stating the equality between the desired output **Y** _[∗]_ and the true system output from Equation 10. The final bound in Equation 5 of Theorem 1 is derived by isolating terms depending on control input **U** , bounding them, and expressing that bound as a condition for achieving equality between the desired output **Y** _[∗]_ and the true system output.
+
+**==> picture [255 x 29] intentionally omitted <==**
+
+**==> picture [277 x 10] intentionally omitted <==**
+
+We may immediately bound the magnitude of the rows of **Y** _u_ as the matrix D _[−] x_[1] **[A]** _[x] u_[has rows that] sum to less than 1 (it represents one quadrant of the row-wise softmaxed attention map, which has rows that sum to 1 by construction). Therefore, each row **y** _u[i]_[of] **[Y]** _[u]_[lies][within][the][convex][hull] defined by the row vectors **v** _u[i]_[of] **[ V]** _[u]_[.][Recalling Definition 6,] **[ V]** _[u]_[=] **[UW][v]**[.][Let][ Ω] _[u]_[=][max] _[j][∥]_ **[u]** _[j][∥]_ for rows **u** _[j]_ of **U** , we can bound the norm of each **v** _u[i]_[in] **[V]** _[u]_[with][the][maximum][singular][value] of parameter matrix **W** _v_ , denoted _σq_ . Refer to Chapter 5 of Calafiore & El Ghaoui (2014) for an overview of singular values. Thus we may bound each _∥_ **v** _u[i][∥≤]_[Ω] _[u][σ][q]_[.][By the properties of convex] hulls, each row of **Y** _u_ must inherit this upper bound on magnitude to retain feasibility.
+
+**==> picture [227 x 13] intentionally omitted <==**
+
+Refer to Chapter 8 of Calafiore & El Ghaoui (2014)) for a detailed explanation of convex hulls and their properties.
+
+While **Y** _x_ in Equation 11 may appear to depend only on imposed **X** 0, the denominator term D _[−] x_[1] contains influences from U. Let us split the denominator term D _x_ = **D**[ˆ] _xx_ + **D**[ˆ] _xu_ where **D**[ˆ] _xx_ depends solely on the imposed input X0. **D**[ˆ] _xx_ is definedin Equation 6. Let **D**[ˆ] _xu_ be defined as:
+
+**==> picture [271 x 19] intentionally omitted <==**
+
+Recall Equation 7, which defines **Y**[ˆ] _x_ , the output of Ξ if only **X** 0 is input. Let us express the condition in Equation 11 using **Y**[ˆ] _x_ to disentangle the influence of the control input:
+
+**==> picture [275 x 13] intentionally omitted <==**
+
+15
+
+Observe that the rows of **Y** _x_ and **Y**[ˆ] _x_ are positively scaled versions of each other because the denominator matrices are all positive and diagonal. Applying the bound in Equation 13 using row-wise notation,
+
+**==> picture [265 x 28] intentionally omitted <==**
+
+Using the same singular values reasoning as in Equation 13 to bound the unknown denominator term _D_ ˆ _xu[i]_[, which is the only term still dependent on the control input] _[ U]_[.]
+
+**==> picture [252 x 19] intentionally omitted <==**
+
+Achieving this minimum value will minimize the value of **y** _x[i]_[by maximally scaling down] **[y]**[ˆ] _x[i]_[.][The] maximum value for **y** _x[i]_[arises when] _[D]_[ˆ] _xu[i]_[is minimized (e.g., to zero) resulting in] **[ y]** _x[i]_[=] **y**[ˆ] _x[i]_ .
+
+Therefore, the the value of **y** _x[i]_[is constrained linear scalings between this minimum and this maxi-] mum. If every scaling violates the inequality in Equation 16, then the system is strictly controllable.
+
+Therefore, if _⟨_ **y** _[∗][i] ,_ ˆ **y** _x[i][⟩≤]_[0][for][some][row] _[i]_[following][inequality][is][met,][the][output] _[Y][∗]_[is] **[strictly] unreachable** under imposed input representations **X** 0 and control input **U** :
+
+**==> picture [294 x 34] intentionally omitted <==**
+
+16
+
+## C PROMPT OPTIMIZATION ALGORITHMS
+
+**Greedy Back-Generation:** While testing all prompts in _V[k]_ is intractable for _k >_ 1, it takes only _|V|_ forward passes of the network to compute the loss on _y_ induced by all possible _single token_ prompts _u ∈V_ . Our Greedy Back Generation algorithm leverages this fact to generate prompts _u ∈ V[k]_ one token at a time, working backward sampling the _i_ th greedy-optimal single token extension _u[′]_ = arg max _u′ PLM_ ( _y|u[′]_ + _u_ + _x_ ) of the current prompt _u ∈V[i][−]_[1] .
+
+**Algorithm 2** Greedy Token-Wise Prompt Generation
+
+**Require:** A causal LLM _PLM_ with vocabulary _V_ , a set of base tokens _x ∈V[n]_ , a desired final token _y ∈V_ , and a desired number of prompt tokens _k_ . **Ensure:** _Magic words u[∗]_ of length _k_ . 1: Initialize _u[∗]_ to be empty. 2: **for** _i_ from 1 to _k_ **do** 3: **for all** _u[′] ∈V_ **do** 4: compute _PLM_ ( _y|u[′]_ + _u[∗]_ + _x_ ) 5: **end for** 6: Select the _u[′]_ that maximizes the probability of _y_ given _u[′]_ + _u[∗]_ + _x_ . Prepend _u[′]_ to _u[∗]_ 7: **end for** 8: **return** _u[∗]_
+
+This method is optimal for _k_ = 1 prompt token _u[∗] ∈V_ and generally outperforms GCG for short prompts of length _k ≤_ 3. Computing 1 additional prompt token takes roughly 1-4 minute when using an NVIDIA A100-80GB GPU with a 7 billion parameter model and 5-20 minutes on 2 NVIDIA A100-80GB GPUs with a 40 billion parameter model.
+
+**Greedy Coordinate Gradient (GCG):** The Greedy Coordinate Gradient algorithm, presented by (Zou et al., 2023) building off the work of (Shin et al., 2020), is the state-of-the-art method for optimizing prompts. Starting with a random prompt of length _k_ , the algorithm generates a batch of alternative prompts. Each member of the batch swaps a random token in the current prompt with a promising alternate token. The value metric for a swap is given by a first order approximation of the change in loss _L_ = CELoss( _y, PLM_ ( _y|u_ + _x_ )) with the embedding of each token in _u_ .
+
+**Algorithm 3** Greedy Coordinate Gradient
+
+**Require:** A causal LLM _PLM_ that accepts token strings from a vocabulary _X_ , an embedding dictionary **e** , embeddings **e** _[∗] i_[corresoponding][to][each][token] _[i]_[of] _[u][∗]_[,][a][set][of][base][tokens] _[x]_[1:] _[n]_[,][a] desired number of prompt tokens _k_ , iterations _T_ , _ksub_ , and batch size _B_ . **Ensure:** _Magic words u[∗]_ of length _k_ . 1: Initialize _u[∗]_ to be random tokens from vocabulary. 2: **for** _iteration_ from 1 to _T_ **do** 3: **for** _i_ from 1 to _k_ **do** _▷_ Compute the top _ksub_ most promising substitutions. 4: _Xi_ = Top- _ksub_ ( **e** _[T] ∇_ **e** _[∗] i[P][LM]_[(] _[x][n][|][u][∗]_[+] _[ x]_[1:] _[n][−]_[1][))] 5: **end for** 6: **for** _b_ from 1 to _B_ **do** 7: _i_ = randint([1, ..., _k_ ]) _▷_ Select random position to swap. 8: _j_ = randint([1, ..., _ksub_ ] _▷_ Select random token from candidate set. 9: _u_ ˜ _[∗] b_[[] _[i]_[] =] _[ X][i]_[[] _[j]_[]] _▷_ Swap token at position _i_ . 10: **end for** 11: _u[∗]_ = _u_ ˜ _[∗] b[∗]_[, where] _[ b][∗]_[=][ argmax] _[b]_[(] _[P][LM]_[(] _[x][n][|][u][∗]_[+] _[ x]_[1:] _[n][−]_[1][)))] _▷_ Select replacement which maximizes probability of future token. 12: **end for** 13: **return** _u[∗]_
+
+This method outperforms all other methods we tested for prompts of length _k >_ 3. We use a batch size _B_ = 768, sampled from the top _ksub_ = 128 token replacements at each index, and iterate for _T_ = 34 iterations. For each instance, this optimization took roughly 2 minutes for the 7 billion parameter models on a single A100-80GB GPU and 4-8 minutes for the 40 billion parameter model on 4 A100-80GB GPU.
+
+17
+
+## D SUPPLEMENTARY FIGURES: OPTIMAL CONTROL PROMPTS
+
+**==> picture [191 x 129] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-7b] k-log( ) Controllability on Wiki5k Question Length 8 Question Length 10 Question Length 16 Question Length 22 Question Length 32 10 1 10 2 0 2 4 6 8 10 Prompt Length [k] Log(Portion Incorrect) [log(epsilon)] **----- End of picture text -----**
+
+Figure 2: Log spaced main results of _k −_ log( _ϵ_ ) controllability. Interestingly, the relationship between _k_ and log( _ϵ_ ) appears roughly linear for each question length in the regime studied. **Top left** : _k −_ log( _ϵ_ ) values for Falcon-7b. **Top right** : _k −_ log( _ϵ_ ) values for Llama-7b. **Bottom right** : _k −_ log( _ϵ_ ) values for Falcon-40b.
+
+**==> picture [192 x 267] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Llama-7b] k-log( ) Controllability on Wiki5k Question Length 8 Question Length 10 Question Length 16 Question Length 22 1 Question Length 32 10 10 2 0 2 4 6 8 10 Prompt Length [k] [Falcon-40b] k-log( ) Controllability on Wiki500 Question Length 8 Question Length 10 Question Length 16 Question Length 22 Question Length 32 10 1 10 2 0 2 4 6 8 10 Prompt Length [k] Log(Portion Incorrect) [log(epsilon)] Log(Portion Incorrect) [log(epsilon)] **----- End of picture text -----**
+
+18
+
+**==> picture [396 x 215] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Llama-7b] Base Loss vs. Prompt Length Controllability Results on Wiki5k [Falcon-7b] Base Loss vs. Prompt Length (k) All Question Lengths -- Corr=0.71 Question Len 8: Corr=0.70 All Question Lengths -- Corr=0.69 Question Len 8: Corr=0.71 10 10 8 8 6 6 4 4 2 2 0 0 Base Loss Base Loss Base Loss Base Loss Question Len 10: Corr=0.70 Question Len 16: Corr=0.71 Question Len 10: Corr=0.69 Question Len 16: Corr=0.68 10 10 8 8 6 6 4 4 2 2 0 0 Base Loss Base Loss Base Loss Base Loss Question Len 22: Corr=0.73 Question Len 32: Corr=0.75 Question Len 22: Corr=0.67 Question Len 32: Corr=0.71 10 10 8 8 6 6 4 4 2 2 0 0 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 Base Loss Base Loss Base Loss Base Loss Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] **----- End of picture text -----**
+
+Figure 3: Prompt length _k_ versus base crossentropy loss on the final token for Llama-7b.
+
+Figure 4: Prompt length _k_ versus base crossentropy loss on the final token for Falcon-7b.
+
+**==> picture [192 x 215] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-40b] Base Loss vs. Prompt Length (k) All Question Lengths -- Corr=0.67 Question Len 8: Corr=0.75 10 8 6 4 2 0 Base Loss Base Loss Question Len 10: Corr=0.70 Question Len 16: Corr=0.66 10 8 6 4 2 0 Base Loss Base Loss Question Len 22: Corr=0.68 Question Len 32: Corr=0.69 10 8 6 4 2 0 0.0 2.5 5.0 7.5 10.0 12.5 15.0 0.0 2.5 5.0 7.5 10.0 12.5 15.0 Base Loss Base Loss Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] Prompt Length [k] **----- End of picture text -----**
+
+Figure 5: Prompt length _k_ versus base crossentropy loss on the final token for Falcon-40b.
+
+19
+
+**==> picture [396 x 144] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-7b] k- Plot for Top 75 y* on 25 x_0 from Wikitext [Falcon-7b] k- Plot for Top 75 y* on 25 x_0 from Wikitext 1.0 |x _ 0| = 8 1.0 |x _ 0| = 8 |x_0| = 10 |x_0| = 10 |x_0| = 16 |x_0| = 16 |x_0| = 22 |x_0| = 22 0.8 |x_0| = 32 0.8 |x_0| = 32 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0 2 4 6 8 10 0 2 4 6 8 10 Prompt Length [k] Prompt Length [k] ] ] Portion Incorrect [ Portion Incorrect [ **----- End of picture text -----**
+
+Figure 6: Llama-7b _k − ϵ_ reachability on top-75 data.
+
+Figure 7: Falcon-7b _k − ϵ_ reachability on top-75 data.
+
+**==> picture [192 x 143] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-40b] k- Plot for Top 75 y* on 25 x_0 from Wikitext 1.0 |x_0| = 8 |x_0| = 10 |x_0| = 16 |x_0| = 22 0.8 |x_0| = 32 0.6 0.4 0.2 0.0 0 2 4 6 8 10 Prompt Length [k] ] Portion Incorrect [ **----- End of picture text -----**
+
+Figure 8: Falcon-40b _k − ϵ_ reachability on top75 data.
+
+20
+
+**==> picture [397 x 100] intentionally omitted <==**
+
+**----- Start of picture text -----**
+[Falcon-7b] Top 40 Prompt Tokens (k=1:10) 40 20 0 Token Frequency « @ >>DOMAIN<< �� >>PREFIX<< >>COMMENT<< >>SUFFIX<< .! Clickfunnels {- = %), >MIDDLE<< gummies ,( slots [@ /* (@ >>QUESTION<< '@ Coronavirus . : (= ��� 2. \"This additional MLM can completely share parameters with the MLM encoder. Thus, we can adopt only one pre-training BERT model\" ---> 3. The original mix-attention mechanism first acquires the last layer's source representation, and we must pass the model twice. ---> 4. We transform the original mix-attention mechanism into the dynamic mix-attention mechanism, leading to the current training format to improve training efficiency.\n\n**To Concern 1:** \"What's the core contribution...\" \n**Response:** We agree with you that this version merely pointed out and preliminarily analyzed some of the potential and limitations of existing Encoder-only LMs in completing various generation tasks in an instruction-following manner. There is still much work to do in the future (as another reviewer said \"It can potentially lead to another series of research.'').\n\nThough preliminary, this paper still provides the following observations to the community.\n\n- It is a common impression that Decoder-only and Encoder-Decoder models are good at following instructions in generating the expected output for various tasks, including understanding, extraction, generation, etc. We demonstrate that Encoder-only also has the potential to follow instructions and complete various tasks in a generation manner.\n- The BERT family plays a vital role in the development of pre-trained LMs and are still strong competitors in many scenarios, e.g., understanding and information extraction. It is might not surprising that the BERT family can complete simple classification and understanding tasks with zero-shot prompt learning, given proper task format and subtle label name search strategy. However, no existing works provide suggestions and observations on whether the BERT family can follow instructions and complete various tasks in a generation manner. This paper fills this blank.\n- As discussed in Question 1, Encoder-only models cannot directly complete various tasks in a generation manner. We provide a basic method with details that allow for such an exploration.\n- We present the key factors to make Encoder-only models competitive with the other two variants and disclose their limitations, which might promote further study.\n- From the aspect of non-autoregressive generation, this is the first work that builds an instruction following models that can generalize across tasks and languages based on pre-trained LMs.\n\nWe also agree that \"It would be truly surprising ...\". But we also believe the future success of any possible alternatives of existing methods/models can start from \"potential\", .e.g., better than mT0 on XCOPA tasks, 3.1x faster than AR models.\n\nLast, we have removed \"surprisingly\" from our paper.\n\n**To Concern 2:**\"The experiments...\" \n**Response:** We agree that \"many confounders exist ...\". The trends of close-source and soaring computation costs of LLMs make it difficult (sometimes impossible) to exactly control variables in experiments. To avoid any misunderstanding in our observations, we use\"potential, risks, possible, etc\" throughout the whole paper if necessary. On the other side, empirical observations and suggestions without fine-grained and strict control have also promoted the development of LLMs in the past year.\n\n### Response to Reviewer fL5N\nThanks a lot for the very helpful comments in the first round of discussion! We hope the following responses can answer some of your questions. \n\n\n**To Comment 1:** \"Longer sequence generation tasks like dialogue, summarization, etc.\" \n**Response:** Exactly! It is essential to discuss the performance of the introduced method on longer sequence generation tasks. \nBesides machine translation, *we further provide evaluation results on **5** additional sequence generation tasks with **6** datasets* (with longer output sequences than most previously reported tasks). [...]\n\n### Response to Reviewer oFHF\n**Response to the question:**\nThank you for acknowledging the value of this paper!\nWe are not sure how much benefit the transformer decoder architecture brings. However, we do have some empirical observations about the effects of model architecture and the decoding paradigm.\n- Though the community of decoder-only structures is much lar\n[rebuttal truncated]",
+ "initial_scores": [
+ 6,
+ 8,
+ 6
+ ],
+ "score_mean": 6.67,
+ "score_variance": 1.33,
+ "score_spread": 2,
+ "score_min": 6,
+ "score_max": 8,
+ "decision": "Accept (poster)",
+ "rebuttal_validity_ground_truth": true,
+ "meta_review": "This paper studies whether encoder-only models such as the BERT family, can also be instruction-tuned and exhibit zero-shot task-generalization abilities. After rebuttal, it received scores of 668. \n\nOn the one hand, the reviewer who gave a score of 8 is excited about this paper, commenting that this is quite an interesting work with a refreshing perspective on language modeling via encoder-only architecture. Other reviewers also agree that the experiments are solid, and the writing is generally clear and well-organized. On the other hand, based on the experiments, encoder-only models still lag behind in decoder-only and encoder-decoder models in instruction following and cannot perform well in few-shot prompting, and the model needs to be tested more extensively on longer-form text generation. \n\nOverall, all the reviewers are positive about the paper, the AC would like to recommend acceptance of the paper.",
+ "forum_id": "x8VNtpCu1I",
+ "primary_area": "generative models",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_fL5N",
+ "review_id": "aUAhFGU9vD",
+ "scores": {
+ "rating": 6,
+ "soundness": 4,
+ "presentation": 4,
+ "contribution": 4,
+ "confidence": 3
+ },
+ "review_text_chars": 1699,
+ "edit_detected": true,
+ "edit_delta_seconds": 739554,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_oFHF",
+ "review_id": "r52NZfx8Bc",
+ "scores": {
+ "rating": 8,
+ "soundness": 3,
+ "presentation": 4,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 1830,
+ "edit_detected": true,
+ "edit_delta_seconds": 813538,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_bkXV",
+ "review_id": "12kVokdri2",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 3,
+ "contribution": 2,
+ "confidence": 4
+ },
+ "review_text_chars": 2964,
+ "edit_detected": true,
+ "edit_delta_seconds": 2253356,
+ "post_rebuttal_text_signal": true,
+ "score_mentions_in_text": [
+ {
+ "from": 5,
+ "to": 6
+ }
+ ]
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": true,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8680.md b/open_review/iclr2024_8680.md
new file mode 100644
index 0000000000000000000000000000000000000000..c1d1d8c86178800d653626f55c6ca3ed4458d096
--- /dev/null
+++ b/open_review/iclr2024_8680.md
@@ -0,0 +1,557 @@
+
+
+## ARE BERT FAMILY GOOD INSTRUCTION FOLLOWERS? A STUDY ON THEIR POTENTIAL AND LIMITATIONS
+
+Authors withheld for review
+
+## ABSTRACT
+
+Language modeling at scale has proven very effective and brought unprecedented success to natural language models. Many typical representatives, especially decoder-only models, e.g., BLOOM and LLaMA, and encoder-decoder models, e.g., Flan-T5 and AlexaTM, have exhibited incredible instruction-following capabilities while keeping strong task completion ability. These large language models can achieve superior performance in various tasks and even yield emergent capabilities, e.g., reasoning and universal generalization. Though the above two paradigms are mainstream and well explored, the potential of the BERT family, which are encoder-only based models and have ever been one of the most representative pre-trained models, also deserves attention, at least should be discussed. In this work, we adopt XML-R to explore the effectiveness of the BERT family for instruction following and zero-shot learning. We first design a simple yet effective strategy to utilize the encoder-only models for generation tasks and then conduct multi-task instruction tuning. Experimental results demonstrate that our fine-tuned model, Instruct-XMLR, outperforms Bloomz on all evaluation tasks and achieves comparable performance with mT0 on most tasks. Instruct-XMLR also possesses strong task and language generalization abilities, indicating that Instruct-XMLR can also serve as a good instruction follower and zero-shot learner. Besides, Instruct-XMLR can accelerate decoding due to its non-autoregressive generation manner, achieving around 3 times speedup compared with current autoregressive large language models. Although we also witnessed several limitations through our experiments, such as the performance decline in long-generation tasks and the shortcoming of length prediction, Instruct-XMLR can still become a good member of the family of current large language models.[1]
+
+## 1 INTRODUCTION
+
+Making large language models (LLMs) as good instruction followers further unleashes their power for different usages. Through instruction tuning with annotated examples and human preference feedback (if possible), the output of these LLMs can align with human expectations well on various tasks, e.g., understanding, generation, commonsense reasoning, under different settings, including zero-shot, few-shot, and chain-of-thought (Ouyang et al., 2022; Longpre et al., 2023). Many recent works have pointed out the key factors and insights into the success of instruction following techniques on the popular decoder-only (e.g., GPT (Brown et al., 2020), LLaMA (Touvron et al., 2023)) and encoder-decoder frameworks (e.g., T5 (Raffel et al., 2020a)), including but not limited to annotation quality (Zhou et al., 2023), data formats, and scaling (Chung et al., 2022). It can be predicted that more powerful alignment methods will occur for more model variants.
+
+To enlarge the application range of alignment techniques, we alternatively explore the potential and limitations of the BERT family as instruction followers. To our knowledge, this is the first work that attempts to provide suggestions for building instruction-following models on the BERT family.
+
+
+
+> 1[URL removed]
+
+1
+
+Our study is motivated by existing observations that: 1) the BERT family can also be zero-shot learners (Zhao et al., 2022; Wang et al., 2023). Further equipping them with instruction understanding capabilities will expand their usage scenarios; 2) their masking language model objective can support open-ended long text generation and meanwhile achieve much faster decoding speed than the popular autoregressive fashion (Liang et al., 2023b); 3) complicated real-world applications usually involves the collaboration of generative LLMs and expert models (Liang et al., 2023c; Shen et al., 2023), while the BERT family have moved countless tasks forward before the rising of large generative models and still hold the records for various downstream tasks.
+
+**Contributions** Throughout this paper, we mainly (1) provide a basic method that can hint at the potential and limitations of the BERT family as instruction followers; (2) present the key factors in making the BERT family competitive with the popular encoder-decoder and decoder-only models that have similar model scale and pretraining data; (3) disclose the risks and limitations (4) along with the possible reasons and solutions to give suggestions for further performance improvement.
+
+**Important Observations** Although this work is at the preliminary stage, we still have some important observations for reference and future research. First, the BERT family has the possibility to be good instruction followers that can generalize well across tasks and languages compared to the other popular LLMs with similar model sizes and data. Besides, our presented method is scalable, in which one can use more computation resources and data to improve performance significantly. Some of the problems are possibly owing to the limited capabilities of the backbone models since there are no previous BERT family models that are as powerful as the decoder-only and encoder-decoder counterparts yet. The inherent shortages of non-autoregressive decoding also result in unconvinced and unreliability to feed different tasks and scenarios.
+
+In the rest of this paper, we first provide the background of text generation via the BERT family and instruction tuning in Section 2. We then present the details for post-training the BERT family as a language generator in Section 3 and detailed experimental settings for instruction fine-tuning in Section 4. Section 5 and 6 analyze their potential and the possible reasons behind the limitations.
+
+## 2 RELATED WORK
+
+## 2.1 TEXT GENERATION VIA BERT FAMILY
+
+BERT (Devlin et al., 2019) revolutionized the field of Natural Language Processing by leveraging the Transformer architecture and large-scale pre-training. BERT is a typical encoder-only architecture consisting of a multi-layer bidirectional Transformer encoder (Vaswani et al., 2017) with stacked identical blocks. Building upon the foundation laid by BERT, researchers have further explored and expanded the capabilities of the original BERT architecture, leading to the development of the BERT family, such as RoBERTa (Liu et al., 2019), ELECTRA (Clark et al., 2020), DeBERTa (He et al., 2020), and XLM-R (Conneau et al., 2020), among others. The bidirectional modeling characteristic and parallelizable masked language model (MLM) objective enables it to learn contextual word representations, facilitating the capture of comprehensive semantic information. Thus, the BERT family is renowned for its ability in natural language understanding (NLU) tasks. However, there is a scarcity of research that delves into their potential for text-generation tasks. Previous works (Dong et al., 2019; Wang & Cho, 2019) have theoretically indicated that the BERT family can generate coherent and high-quality textual content. However, the primary usage of the BERT family has been focused on extracting contextual features rather than generating text by itself (Zhu et al., 2019; Guo et al., 2020; Yang et al., 2020). Recent works (Chan & Fan, 2019; Jiang et al., 2021; Su et al., 2021; Liang et al., 2023b;a) explore the application of the BERT family in non-autoregressive generation using MLMs and receive positive feedback regarding performance. Their settings still follow the traditional pre-training and task-specific fine-tuning paradigm. In our work, we further explore the potential of becoming multitask instruction followers, which has been well explored in recent autoregressive language models but is a blank area for BERT family.
+
+2
+
+## 2.2 INSTRUCTION TUNING
+
+Instruction tuning refers to the process of fine-tuning LLMs on an instruction dataset consisting of ( _instruction_ , _output_ ) pairs in a supervised fashion, which narrows the gap between the next-word prediction objective of LLMs and the users’ objective of having LLMs adhere to human instructions (Zhang et al., 2023). The concept of merging diverse NLP tasks as generative tasks was pioneered by the T5 model (Raffel et al., 2020b). This method effectively simplifies the application of LLMs and paves the way for further advancements in instruction tuning models. Subsequent instruction tuning models like FLAN (Wei et al., 2021; Chung et al., 2022)(Wei et al., 2021; Chung et al., 2022) and T0 (Sanh et al., 2021) have further improved performance across diverse tasks by incorporating more task-specific instructions during the pre-training phase. Currently, instruction tuning represents an important research direction in NLP. The open-source community offers a variety of instruction datasets, such as xP3 (Muennighoff et al., 2022), Alpaca (Taori et al., 2023), and Dolly (Conover et al., 2023), as well as instruction fine-tuned LLMs, such as BLOOMZ (Muennighoff et al., 2022), FLAN-T5 (Chung et al., 2022), and Alpaca (Taori et al., 2023). However, the backbone of present instruction fine-tuned LLMs is mainly encoder-decoder and decoder-only based. The instruction-following capabilities of the BERT family, which are encoder-only based models, are severely under-explored. In this work, we introduced Instruct-XMLR to explore the potential and limitations of the BERT family for instruction following.
+
+## 3 METHODOLOGY
+
+## 3.1 UTILIZING BERT FAMILY FOR LANGUAGE GENERATION
+
+Dramatically different from the prevalent left-to-right autoregressive unidirectional language models, the conditional independent factorization due to the bi-directional nature of BERT family captures more complex dependencies between tokens during training and also results in difficulty in generating reliable texts from scratch. In this section, we review the potential solution to utilize BERT family for language generation. As shown in previous work (Wang & Cho, 2019; He et al., 2022), BERT can be viewed as a Markov random field language model and then sample texts. Specifically, the sequence _Y_ = ( _Y_ 1 _, Y_ 2 _, ..., YT_ ) can be viewed as random variables of an undirected fully-connected graph _S_ , and this full graph can be defined as a clique in the Markov Random Field. Then the potential of this graph clique can be decomposes into a sum of _T_ log-potential terms :
+
+**==> picture [289 x 30] intentionally omitted <==**
+
+where _S_ denotes the fully-connected graph created from the original sequence _Y_ , _T_ denotes the number of random variables, i.e., the length of sequence _Y_ . This can also be simplified by Conditional Distribution and Pseudo Log-Likelihood which maximizes the probability of each variable rather than joint probability of the entire graph:
+
+**==> picture [259 x 30] intentionally omitted <==**
+
+Then for BERT family, _S\i_ can represent that _yi_ is replaced by the masked token [MASK] in the entire sequence _Y_ , _yi_ can represent each masked token. Then, the original training objective can be approximated as a masked language model (MLM), where each potential _ψ_ ( _S_ ) is based on the model probability _P_ ( _yi|S\i, θ_ ). Given the sequence _Y_ , we can achieve:
+
+**==> picture [312 x 30] intentionally omitted <==**
+
+where _R_ is the number of masked tokens sampled from _Y_ , and the upper bound is the length of _Y_ . Then we can expand this non-conditional language model to conditional scenarios, i.e., sequence to sequence generation. Given a training pair ( _X, Y_ ), the model maximizes the following likelihood:
+
+**==> picture [271 x 30] intentionally omitted <==**
+
+3
+
+During inference, we begin with a fully _Y_ with all tokens masked and generate them in each step of _|Y |_ (Wang & Cho, 2019). Notice that the conditional MLM and Mask-Predict are suitable for BERT family, which keeps the training and inference objective consistent with pre-training.
+
+## 3.2 ONE-STEP TRAINING WITH DYNAMIC MIXED ATTENTION
+
+We can draw inspiration from the previous practices for language generation; the encoder-decoderbased models feed the source sequence _X_ into the encoder to extract the representations and use the decoder to learn the internal relationships of the target sequence _Y_ . Then, a cross-attention module is inserted into each decoder layer to aggregate the source representation and the target sequence. The key factor to language generation is how to learn the conditional probabilities _P_ ( _Y |X_ ) well, and this is the same for BERT family. However, unlike previous encoder-decoder-based models, the BERT family only contains a single multi-layer bidirectional Transformer encoder. To best match the traditional learning formats, we first build an additional model to perform like the decoder, then introduce mixed attention module (He et al., 2018; Liang et al., 2023b) to substitute for the original cross-attention and self-attention modules in the decoder. Specifically, given a training pair ( _X, Y_ ), the pre-training MLM containing _L_ layers where each comprises one self-attention layer and one feed-forward layer. We can get the source representation _Hsrc[l]_[of each encoder layer] _[ l]_[:]
+
+**==> picture [354 x 13] intentionally omitted <==**
+
+For target sequence _Y_ , we randomly select partial tokens to be replaced by the [MASK] token and feed this corrupted sequence into the additional MLM. Then, this model tries to recover these masked tokens during training, and get the target representation _Htgt[l]_[of each decoder layer] _[ l]_[:]
+
+**==> picture [371 x 15] intentionally omitted <==**
+
+where _⊕_ denotes the concatenation operation. Mixed-attention brings no additional parameters but just take the concatenated vector of source and target hidden states as key and value in the original attention mechanism. As a result, this additional MLM can completely share parameters with the MLM encoder. Thus, we can adopt only one pre-training BERT model to save model parameters and accelerate the training process. However, the mix-attention mechanism first acquires the last layer’s source representation. We must pass the model twice during training, leading to low training efficiency. As a result, we introduce dynamic mixed-attention, which allows the model to get source representation and learn to predict the masked tokens at the same pass as the model. This mechanism adopts each source representation of the corresponding previous layer rather the last layer as:
+
+**==> picture [372 x 14] intentionally omitted <==**
+
+**==> picture [146 x 125] intentionally omitted <==**
+
+In practice, we can simply concatenate the source and the masked target sequence, then feed them into the model for training. Besides, as shown in Figure 1, we prevents the query of each source token attending the target sequence in the attention module, which keeps consistent with the inference process since there is no target sequence in advance. Dynamic mixed-attention is more matching with the pretraining tasks of BERT family, making the idea of shared parameters more reliable.
+
+## 3.3 TRAINING AND INFERENCE PROCESS
+
+Figure 1: The overview attention masking, Green and Blue ones denote which can be attended while the white can not be attended.
+
+To better adapt to generation tasks, given a training pair ones ( _X, Y_ ), we uniformly mask 1 to _L_ (target length) tokens folnote which can be attended while the lowing CMLM (Ghazvininejad et al., 2019) rather the origiwhite can not be attended. nal fixed masking in BERT family. Besides, we also randomly mask a small ratio of tokens in source sequence to improve generality as mentioned in AMOM (Xiao et al., 2023). Then the training objective is to maximum the conditional MLM loss like the pre-training process:
+
+**==> picture [269 x 30] intentionally omitted <==**
+
+4
+
+where _M_ is the number of masked tokens in masked target sequence _Y_ M. Notice the model do not need to predict the masked tokens in the source sequence _X_ M.
+
+During inference, we adopt the same Mask-Predict algorithm in CMLM (Ghazvininejad et al., 2019), which adopts multiple iterations to generate the final sequence. Specifically, given the total decoding iteration _T_ in advance, we begin with the fully masked target sequence at the first decoding iteration. In the following _T −_ 1 iterations, a specific number of low-confidence tokens will be masked and re-generated. The number of masked tokens in each iteration can be computed as _n_ = _TT−t ∗ LY_ , where _t_ denotes the current iteration number. The model selects the specific masked tokens in the next iteration based on the prediction probability, where tokens with the lowest probability will be masked, and their scores will be updated after the new prediction. Besides, unlike traditional left-to-right auto-regressive models, we should obtain the target length before initializing the fully masked target sequence. Naturally, we can directly give a length before inference. We also introduce a length prediction module following previous non-autoregressive models where a special token [LENGTH] is used to predict the target length.
+
+## 4 EXPERIMENTAL SETTINGS
+
+In this section, we introduce our experimental settings in fine-tuning and evaluation process.
+
+## 4.1 FINE-TUNING DETAILS
+
+**Backbone Model.** Recent generative LLMs have been proven to be good instruction followers (Wei et al., 2021; Taori et al., 2023), especially for these with relatively large size (Chung et al., 2022; OpenAI, 2023). To fully explore this capability of BERT family, we also select our backbone model with large size version. As a result, we choose XML-R (Conneau et al., 2020), which is pre-trained on around one hundred languages with masked language modeling objective and has two large versions, XML-RXL and XML-RXXL (Goyal et al., 2021), containing 3.5 and 10.7 billion parameters respectively. Due to the cost of computing resources, We choose XML-RXL in our main experiments.
+
+**Instruction Data.** For fine-tuning instruction data, to make full use of the multilingual knowledge during the pre-training process of XML-R, we select a multilingual instruction dataset xP3 (Muennighoff et al., 2022). xP3 adds 30 new multilingual datasets with English prompts and serves as the multilingual version of P3 (Sanh et al., 2021). Overall, xP3 contains 46 languages and a similar language distribution of ROOTS (Laurenc¸on et al., 2022). In the original xP3 paper (Muennighoff et al., 2022), the authors use around 80 million samples for training, which is much more than the actual needs and increases the training expenses. As a result, we sample partial instruction samples (around 1/80) from the original training corpus in our experiment. Our sampled data only differs from the original data in sample size and remains strictly consistent in all other aspects, such as the composition ratio of each language, the number of tasks, prompt formats, etc.
+
+**Implementation Details.** Our experiments use the pre-trained XML-RXL, which contains 36 layers, 2560 hidden sizes, and 10240 feed-forward filter sizes. We implement all the experiments based on the Fairseq (Ott et al., 2019) library on 8 NVIDIA A100-PCIE-40GB GPU cards. We adopt the Adam (Kingma & Ba, 2014) as an optimization algorithm during training. The learning rate will warm up to 2e-5 in the first 500 updates and then decrease gradually with the polynomial decay schedule. We select the final model based on the validation performance.
+
+## 4.2 EVALUATION PROCESS
+
+**Baseline Models.** To make a relatively fair comparison between our fine-tuned model and other LLMs, we choose mT0-3.7B and BLOOMZ-3B since they have comparable model parameters and are also fine-tuned on the instruction dataset xP3. We give more comparison in Table 1. These models are with different and covers the current popular architectures. Need to notice a big difference exists in the number of training tokens, which always plays an important role on performance. Instruct-XMLRXL is trained on a bit more tokens than BLOOMZ-3B and half of mT0-3.7B during pre-training. While in fine-tuning Instruct-XMLRXL is training on much fewer tokens.
+
+5
+
+|**Model**|**Instruction Tuning stage**|**Pre-training Stage**|
+|---|---|---|
+||**Backbone** **Architecture** **Parameter** **Tok.**|**Datasets** **Size** **Tok.** **Len.**|
+|**BLOOMZ-3B** **mT0-3.7B** **Instruct-XMLRXL**|Bloom-3b Decoder-only 3B 15B mT5-xl Encoder-decoder 3.7B 15B XML-RXL Encoder-only 3.5B 0.6B|ROOTS 1.6T 366B 2048 mC4 6.4T 1T 1024 CC100 167B 0.5T 512|
+
+Table 1: Comparison between our model Instruct-XMLRXL and other baseline models. **Tok.** denotes the training tokens (billion). **Len.** denotes the sequence length limitation.
+
+**Tasks and Datasets.** Following the previous work (Muennighoff et al., 2022), we evaluate the model’s ability of task generalization in three held-out tasks that are not contained in the finetuned instruction data: conference resolution, sentence completion, and natural language inference (NLI). Specifically, we use XWinograd (Tikhonov & Ryabinin, 2021), XCOPA (Ponti et al., 2020), XNLI (Conneau et al., 2018) dataset for each task, respectively. Besides, we also evaluate in machine translation as a language generation task, which can also serve as a held-in task since xP3 contains various translation samples in multiple languages sampled from Flores-200 datasets (Costa-juss`a et al., 2022). We use WMT’14 translation datasets[2] which contains five language splits between English and others. We adopt the test set for evaluation, each containing around 3,000 sentence pairs. Fortunately, all these datasets contain the language splits that do not exist in xP3, so we can also study and evaluate the model’s ability for language generalization.
+
+**Evaluation Settings.** During evaluation, we select five prompts from PromptSource (Bach et al., 2022) and then use them for all language splits of each dataset mentioned above. Finally, we report the average performance of these prompts. Since our model need to get target length in advance, we adopt length prediction module for WMT’14 datasets and fixed length for others. Besides, we should adopt some constraints on the design of prompts depending on the specific task formats due to the length prediction, more information can be found in Section 5.1.
+
+## 5 ON THE POTENTIAL OF BERT FAMILY FOR INSTRUCTION FOLLOWING
+
+In this section, we first present the potential of length prediction in successfully applying BERT family for instruction following. We then present the overall performance on three held-out tasks under the zero-shot setting to evaluate the model’s ability task generalization. Finally, we further study the scaling effects, which serves as an important aspect in assessing the potential for further improvement of model capabilities and performance.
+
+## 5.1 LENGTH PREDICTION
+
+For several non-autoregressive models, length prediction is an extra task to determine the target sequence length during inference (Ghazvininejad et al., 2019; Qian et al., 2021). In comparison, the autoregressive models, e.g., the two baseline models BLOOMZ and mT0, generate the texts oneby-one in a left-to-right manner, and they can dynamically finish generation when meeting a special token indicating the end of sentences (e.g., [EOS]). For Instruct-XMLRXL which adopts MaskPredict algorithm (Ghazvininejad et al., 2019) for generating the texts as mentioned in Section 3.3, length prediction is an essential process and directly related to the quality of final generation results. Next, we discuss the potential of length prediction through our experiments.
+
+Adopting the length predicted by the model-self is a common practice in original task-specific non-autoregressive models for various generation tasks, e.g., machine translation, summarization, and story generation. In their experiments, length prediction only brings a tiny decline in performance compared with directly using the target length. It is also explainable that since these generation tasks are flexible, word adjustments can eliminate the effect of minor length differences during generation. Unlike several above-mentioned generation tasks with flexible target lengths, some tasks with determined target lengths may heavily rely on the length prediction. To verify this, we choose the XWinograd task and the prompt as _{_ The in the sentence below refers to _{_ option1 _}_ . True or False? _{_ sentence _} }_ , the label space is _{_ True, False _}_ . Notice these two labels have different lengths after the sentencepiece
+
+> 2[URL removed]
+
+6
+
+tokenizer in Instruct-XMLRXL. As a result, once we set the length as one in advance during inference, the predictions are always _{_ True _}_ . If we set the length as two, the predictions are always _{_ False _}_ , indicating that the predicted length directly determines the label. This is not a reasonable situation and should be avoided in practical applications. As a result, we can add some constraints when selecting the prompts for these tasks.
+
+Specifically, we can adopt length prediction module to get target length for traditional language generation tasks (e.g., machine translation since their target length can be flexible) and adopt a fixed length for determined tasks (e.g., multiple choice tasks since they always have the target length as one). However, for such tasks whose labels have determined but different lengths, such as the task with label space _{_ False, True _}_ , we can transform the label space into _{_ Yes, No _}_ whose labels have the same length, and then adopt the corresponding fixed length without leaking information about target labels.
+
+## 5.2 OVERALL PERFORMANCE
+
+Many works have shown that large language models after multitask instruction tuning can solve completely new tasks (Wei et al., 2021; Taori et al., 2023; Wang et al., 2022), we also examine our fine-tuned model: if Instruct-XMLR can successfully understand and complete the tasks which are not included in
+
+|**Models**|**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL|0.519 0.482 0.523 0.627 **0.528** **0.584** **0.646** 0.518 **0.582**|
+
+Table 2: Accuracy on three held-out tasks.
+
+the fine-tuning process. Table 2 presents the results. To avoid the influence of language generalization discussed in Section 6.1, we only choose the languages included in the fine-tuned data here. We report the average accuracy of 5 prompts in all tasks. We can find that Instruct-XMLR also demonstrates strong task generalization ability. After fine-tuning only 1/25 tokens of baseline models, Instruct-XMLR can significantly outperform a decoder-only model with comparable size BLOOMZ-3B in all tasks. Compared with the more competitive model mT0-3.7B, Instruct-XMLR achieves better performance on XCOPA and comparable performance on XWinograd, but underperforms a little on XNLI. We attribute this failure to: (1) XNLI is a multilingual dataset for traditional natural language inference (NLI) task, and mT0 with the encoder-decoder architecture is more beneficial to this task as also mentioned in Muennighoff et al. (2022), and (2) mT0-3.7B is trained more much longer in both pre-training (1 trillion v.s. 0.5 trillion tokens) and instruction tuning stage (15 billion v.s. 0.6 billion tokens), which can boost the performance of NLI tasks (Goyal et al., 2021; Hoffmann et al., 2022).
+
+## 5.3 SCALING EFFECTS
+
+Scaling law plays a vital role in the recent success of LLMs (Hoffmann et al., 2022; Touvron et al., 2023). Since XML-R has different versions containing various parameters, we study the performance changes as the model size increases. Besides, we also focus on another layer of scaling, the number of training tokens during the fine-tuning process. Firstly, we also conduct experiments on relatively small models, XML-RBase and XML-RLarge with 270M and 550M parameters, respectively. Table 3 presents the results. We can find an apparent growing trend as the model parameters increase. After fine-tuned with the same data, Instruct-XMLRXL outperforms Instruct-XMLRBase and Instruct-XMLRLarge on all tasks, indicating the important role of model size in task generalization. Then, we focus on the scaling effects of training tokens during instruction tuning process. Figure 2 plots the performance changes in the training process. The performance of all tasks keeps improving as the training continues, which is consistent with our intuition. Overall, Instruct-XMLR also demonstrates the positive scaling effects, which presents potential improvements in the future.
+
+## 6 POSSIBLE LIMITATIONS, REASONS AND SOLUTIONS
+
+In Section 5, we have noticed the potential of the BERT family for instruction following. However, more aspects remain to be explored for Instruct-XMLR before becoming a superior instruction follower. In this section, we investigate some limitations that may be caused by the specific factors of
+
+7
+
+||||||
+|---|---|---|---|---|
+|**Models**|**XCOPA**|**XNLI**|**XWinograd**||
+|Instruct-XMLRBase|0.583|0.386|0.521||
+|Instruct-XMLRLarge|0.602|0.432|0.545||
+|Instruct-XMLRXL|**0.646**|**0.518**|**0.582**||
+|Table 3: Effects on||models|scaling.|Figure 2: Effects on data scaling.|
+
+our model, e.g., the backbone model, including the original architecture and training corpus, the traditional non-autoregressive generation manner we adopted during inference, etc. Then, after finding these limitations, we also give some possible solutions.
+
+## 6.1 LANGUAGE GENERALIZATION
+
+Since Instruct-XMLR and two baseline models are multilingual, they should support multiple languages. Naturally, we aim to explore their abilities of language generalization, i.e., whether the model can perform well in languages not contained in fine-tuned datasets. Language generalization is also a widespread concern of language models and is related strongly to language distribution in the training data.
+
+We select the language splits that are not included in the fine-tuned data of each **Models XCOPA XNLI** task for evaluation. Table 4 presents BLOOMZ-3B 0.427 0.391 0.499 the results. We can find that InstructXMLR outperforms BLOOMZ-3B but mT0-3.7B **0.605 0.533 0.569** fails behind mT0-3.7B in all tasks, esInstruct-XMLRXL 0.599 0.466 0.539 pecially on XNLI dataset. Considering the same language composition in fineTable 4: Results of language generalization.
+
+||**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL|0.427 0.391 0.499 **0.605** **0.533** **0.569** 0.599 0.466 0.539|
+
+tuning datasets, we explain this to the difference between their pre-training stages. Firstly, all these languages are outside the pre-training data of BLOOMZ-3B, the declines for BLOOMZ-3B are easy to understand. Regarding Instruct-XMLR and mT0-3.7B, these languages are all in the pre-training data and show a similar composition distribution. As shown in Table 1, mT0-3.7B is trained with twice as many tokens than Instruct-XMLR and learns more robust language knowledge. As a result, Instruct-XMLR is inferior to mT0-3.7B in the ability of language generalization.
+
+## 6.2 GENERATION TASKS
+
+As mentioned in numerous previous works (Gu et al., 2018; Xiao et al., **Models EN** _→_ **X X** _→_ **EN** 2022), the non-autoregressive models BLOOMZ-3B 4.15 8.30 1.1x remove the target-side dependency durmT0-3.7B **9.41 22.82** 1.0x ing training. They will result in a perforInstruct-XMLRXL 5.72 13.51 **3.1x** mance drop in generation quality comInstruct-XMLRXL-MT 8.83 18.31 3.0x pared with the traditional autoregressive models. As Instruct-XMLR also adopts Table 5: Results of machine translation tasks.
+
+|**Models**|**EN**_→_**X** **X**_→_**EN** **Speedup**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL-MT|4.15 8.30 1.1x **9.41** **22.82** 1.0x 5.72 13.51 **3.1x** 8.83 18.31 3.0x|
+|||
+
+the non-autoregressive manner to generate texts, this performance decline still exists. What’s more, unlike the generative pre-training of baseline models, the pre-training paradigm of the BERT family is not designed for language generation, leading to difficulty in learning well just in the instruction tuning process. To evaluate the generation ability of Instruct-XMLR, we choose WMT’14 translation datasets, which are widely used in non-autoregressive works. Table 5 presents the results. We use SacreBLEU[3] (Post, 2018) as our evaluation metric for all translation directions. We split the dataset into two subsets whose source and target language is English (EN _→_ X and X _→_ EN). We report the average performance of 5 prompts. Besides we also report the speedup by computing the number of tokens per second when translating the texts. As mT0-3.7B is the lowest, the corresponding speedup is 1.0x. Results show that although Instruct-XMLRXL can speed up the decoding by around 3 times that baselines due to the non-autoregressive manner, the performance drops seriously compared with mT0-3.7B.
+
+> 3[URL removed]
+
+8
+
+We further analyze the main internal reasons: non-autoregressive generation manner or the pretraining paradigm. As mentioned in (Muennighoff et al., 2022), our fine-tuned dataset contains much more short target texts for training. Thus, Instruct-XMLRXL still can not learn superior generation abilities. As a result, we aim to enhance the learning on generation tasks during the instruction tuning process. Specifically, we random sample a subset containing all translation pairs but keep the language distribution the same as the original one. We get Instruct-XMLRXL-MT after fine-tuning on this purer instruction dataset with only a quarter updates steps of Instruct-XMLRXL. We can witness a significant performance improvement, indicating that the pre-training paradigm is more decisive. Therefore, it is necessary to enhance the learning on generation tasks for the BERT family; even a suitable generative post-training process is optimal before instruction tuning.
+
+## 6.3 UNRELIABLE PREDICTED LENGTH
+
+As mentioned in section 5.1, we should transform the label space by designing the prompts for several tasks. However, we also recognize that this can not be adapted to all tasks in practical applications. For example, it is unrealizable for a language modeling task whose targets have different lengths of various samples. Besides, length prediction also seems not suitable since the length of each sample is determined. Therefore, we conduct quantitative experiments to analyze the effects of length prediction in various
+
+|**Settings**|**Accuracy** **Gap**|
+|---|---|
+|A B C|0.87 0.02 0.42 33.2 0.05 24.3|
+
+Table 6: Effects on length.
+
+tasks with determined target length. Specifically, we select the following evaluation settings: (1) multiple choice questions task with options _{_ A, B, C, D _}_ , denoted as setting A; (2) the specific XWinograd task mentioned above with label space as _{_ True, False _}_ without transforming the label space, denoted as setting B; (3) a language modeling task LAMBADA (Paperno et al., 2016), where the target words to be generated are with various length, this is a more challenging setting, denoted as setting C. Table 6 presents the results. We report the accuracy of length prediction (the column Accuracy) and the performance gap compared with using fixed target length or the ground length (the column Gap). We can find that: length prediction is unreliable when meeting challenging testing scenarios. For setting A, since the model may predict the incorrect length, e.g., one as two, the result cab be _{_ C: _}_ or _{_ C. _}_ , which is equal to the label _{_ C _}_ . For settings B and C, length prediction almost fails, leading to a seriously declining performance. Therefore, we look forward to a more robust mechanism to determine the target length for non-aoturegressive models.
+
+## 6.4 FEW-SHOT PROMPTING LEARNING
+
+Few-shot prompting, also known as in-context learning (ICL), is first mentioned in GPT-3 (Brown et al., 2020) and allows the LLMs to learn specific abilities to solve different tasks with only a few examples concatenated in the demonstration. Then, LLMs can perform well in various without updating model parameters. ICL has become a mainstream method to boost the performance of various LLMs. Unfortunately, Instruct-XMLR has not yet demonstrated this ability during our experiments. We also concatenate several examples simply before the test example. However, this setting confuses the model and results in disorganized predictions. We attribute this to the bi-directional nature of BERT family since ICL has only been proven effective in autoregressive unidirectional language model. Therefore, we need more efforts to explore this and leave it as a future work.
+
+## 7 CONCLUSION
+
+This paper thoroughly explores the potential and limitations of BERT family as instruction followers. We find that our fine-tuned Instruct-XMLR can also generalize well across tasks and languages compared with current popular LLMs of model architecture with comparable model parameters. Besides, we also witnessed several limitations through our experiments, such as the performance decline of long-generation task and failure in few-shot prompting learning. We further analyze the reasons and point out that some of the problems are possibly owing to the limited capabilities of the backbone models since there are no previous BERT family models that are as powerful as the decoder-only and encoder-decoder counterparts yet. Therefore, we hope that researchers can pay more attention to BERT family, and make them become competitive members in the family of current large language models.
+
+9
+
+## REFERENCES
+
+- Stephen H Bach, Victor Sanh, Zheng-Xin Yong, Albert Webson, Colin Raffel, Nihal V Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, et al. Promptsource: An integrated development environment and repository for natural language prompts. _arXiv preprint arXiv:2202.01279_ , 2022.
+
+- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. _Advances in neural information processing systems_ , 33:1877–1901, 2020.
+
+- Ying-Hong Chan and Yao-Chung Fan. A recurrent bert-based model for question generation. In _Proceedings of the 2nd Workshop on Machine Reading for Question Answering_ , pp. 154–162, 2019.
+
+- Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. _arXiv preprint arXiv:2210.11416_ , 2022.
+
+- Kevin Clark, Minh-Thang Luong, Quoc V Le, and Christopher D Manning. Electra: Pre-training text encoders as discriminators rather than generators. _arXiv preprint arXiv:2003.10555_ , 2020.
+
+- Alexis Conneau, Ruty Rinott, Guillaume Lample, Adina Williams, Samuel R. Bowman, Holger Schwenk, and Veselin Stoyanov. Xnli: Evaluating cross-lingual sentence representations. In _Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing_ . Association for Computational Linguistics, 2018.
+
+- Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzm´an, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov. Unsuper-[´] vised cross-lingual representation learning at scale. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pp. 8440–8451, 2020.
+
+- Mike Conover, Matt Hayes, Ankit Mathur, Jianwei Xie, Jun Wan, Sam Shah, Ali Ghodsi, Patrick Wendell, Matei Zaharia, and Reynold Xin. Free dolly: Introducing the world’s first truly open instruction-tuned llm, 2023. URL [URL removed] 12/dolly-first-open-commercially-viable-instruction-tuned-llm.
+
+- Marta R Costa-juss`a, James Cross, Onur C¸ elebi, Maha Elbayad, Kenneth Heafield, Kevin Heffernan, Elahe Kalbassi, Janice Lam, Daniel Licht, Jean Maillard, et al. No language left behind: Scaling human-centered machine translation. _arXiv preprint arXiv:2207.04672_ , 2022.
+
+- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pp. 4171–4186, 2019.
+
+- Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. Unified language model pre-training for natural language understanding and generation. _Advances in Neural Information Processing Systems_ , 32, 2019.
+
+- Marjan Ghazvininejad, Omer Levy, Yinhan Liu, and Luke Zettlemoyer. Mask-predict: Parallel decoding of conditional masked language models. In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pp. 6112–6121, 2019.
+
+10
+
+Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, and Alexis Conneau. Larger-scale transformers for multilingual masked language modeling. _arXiv preprint arXiv:2105.00572_ , 2021.
+
+Jiatao Gu, James Bradbury, Caiming Xiong, Victor OK Li, and Richard Socher. Non-autoregressive neural machine translation. In _International Conference on Learning Representations_ , 2018.
+
+- Junliang Guo, Zhirui Zhang, Linli Xu, Hao-Ran Wei, Boxing Chen, and Enhong Chen. Incorporating bert into parallel sequence decoding with adapters. _Advances in Neural Information Processing Systems_ , 33:10843–10854, 2020.
+
+- Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. Deberta: Decoding-enhanced bert with disentangled attention. In _International Conference on Learning Representations_ , 2020.
+
+- Tianyu He, Xu Tan, Yingce Xia, Di He, Tao Qin, Zhibo Chen, and Tie-Yan Liu. Layer-wise coordination between encoder and decoder for neural machine translation. _Advances in Neural Information Processing Systems_ , 31, 2018.
+
+- Zhengfu He, Tianxiang Sun, Kuanning Wang, Xuanjing Huang, and Xipeng Qiu. Diffusionbert: Improving generative masked language models with diffusion models. _arXiv preprint arXiv:2211.15029_ , 2022.
+
+- Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. _arXiv preprint arXiv:2203.15556_ , 2022.
+
+- Chao Jiang, Mounica Maddela, Wuwei Lan, Yang Zhong, and Wei Xu. Neural CRF model for sentence alignment in text simplification. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5-10, 2020_ , pp. 7943–7960. Association for Computational Linguistics, 2020.
+
+- Ting Jiang, Shaohan Huang, Zihan Zhang, Deqing Wang, Fuzhen Zhuang, Furu Wei, Haizhen Huang, Liangjie Zhang, and Qi Zhang. Improving non-autoregressive generation with mixup training. _arXiv preprint arXiv:2110.11115_ , 2021.
+
+- Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _International Conference on Learning Representations_ , 2014.
+
+- Hugo Laurenc¸on, Lucile Saulnier, Thomas Wang, Christopher Akiki, Albert Villanova del Moral, Teven Le Scao, Leandro Von Werra, Chenghao Mou, Eduardo Gonz´alez Ponferrada, Huu Nguyen, et al. The bigscience roots corpus: A 1.6 tb composite multilingual dataset. _Advances in Neural Information Processing Systems_ , 35:31809–31826, 2022.
+
+- Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, and Bill Dolan. A diversity-promoting objective function for neural conversation models. _arXiv preprint arXiv:1510.03055_ , 2015.
+
+- Xiaobo Liang, Juntao Li, Lijun Wu, Ziqiang Cao, and Min Zhang. Dynamic and efficient inference for text generation via bert family. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 2883–2897, 2023a.
+
+- Xiaobo Liang, Zecheng Tang, Juntao Li, and Min Zhang. Open-ended long text generation via masked language modeling. In _Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pp. 223–241, 2023b.
+
+- Yaobo Liang, Chenfei Wu, Ting Song, Wenshan Wu, Yan Xia, Yu Liu, Yang Ou, Shuai Lu, Lei Ji, Shaoguang Mao, et al. Taskmatrix. ai: Completing tasks by connecting foundation models with millions of apis. _arXiv preprint arXiv:2303.16434_ , 2023c.
+
+- Bill Yuchen Lin, Wangchunshu Zhou, Ming Shen, Pei Zhou, Chandra Bhagavatula, Yejin Choi, and Xiang Ren. CommonGen: A constrained text generation challenge for generative commonsense reasoning. In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , November 2020.
+
+- Chin-Yew Lin and Eduard Hovy. Manual and automatic evaluation of summaries. In _Proceedings of the ACL-02 Workshop on Automatic Summarization_ , pp. 45–51, 2002.
+
+11
+
+Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. _arXiv preprint arXiv:1907.11692_ , 2019.
+
+- Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. The flan collection: Designing data and methods for effective instruction tuning. _arXiv preprint arXiv:2301.13688_ , 2023.
+
+- Niklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. Crosslingual generalization through multitask finetuning. _arXiv preprint arXiv:2211.01786_ , 2022.
+
+- Shashi Narayan, Shay B Cohen, and Mirella Lapata. Don’t give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 1797– 1807, 2018.
+
+OpenAI. Gpt-4 technical report. 2023.
+
+- Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In _Proceedings of NAACL-HLT 2019: Demonstrations_ , 2019.
+
+- Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. _Advances in Neural Information Processing Systems_ , 35: 27730–27744, 2022.
+
+- Denis Paperno, Germ´an Kruszewski, Angeliki Lazaridou, Quan Ngoc Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fern´andez. The lambada dataset: Word prediction requiring a broad discourse context. _arXiv preprint arXiv:1606.06031_ , 2016.
+
+- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In _Proceedings of the 40th annual meeting of the Association for Computational Linguistics_ , pp. 311–318, 2002.
+
+- Edoardo Maria Ponti, Goran Glavaˇs, Olga Majewska, Qianchu Liu, Ivan Vuli´c, and Anna Korhonen. Xcopa: A multilingual dataset for causal commonsense reasoning. _arXiv preprint arXiv:2005.00333_ , 2020.
+
+- Matt Post. A call for clarity in reporting BLEU scores. In _Proceedings of the Third Conference on Machine Translation: Research Papers_ , October 2018.
+
+- Lihua Qian, Hao Zhou, Yu Bao, Mingxuan Wang, Lin Qiu, Weinan Zhang, Yong Yu, and Lei Li. Glancing transformer for non-autoregressive neural machine translation. In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing_ , pp. 1993–2003, 2021.
+
+- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-totext transformer. _Journal of Machine Learning Research_ , 21(140):1–67, 2020a. URL http: //jmlr.org/papers/v21/20-074.html.
+
+- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. _Journal of Machine Learning Research_ , 21:1–67, 2020b.
+
+- Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for abstractive sentence summarization. In _Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pp. 379–389, 2015.
+
+- Victor Sanh, Albert Webson, Colin Raffel, Stephen H Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al. Multitask prompted training enables zero-shot task generalization. _arXiv preprint arXiv:2110.08207_ , 2021.
+
+12
+
+Yongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li, Weiming Lu, and Yueting Zhuang. Hugginggpt: Solving ai tasks with chatgpt and its friends in huggingface. _arXiv preprint arXiv:2303.17580_ , 2023.
+
+Emily Sheng and David Uthus. Investigating societal biases in a poetry composition system, 2020.
+
+- Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In _Proceedings of the 2013 conference on empirical methods in natural language processing_ , pp. 1631–1642, 2013.
+
+- Yixuan Su, Deng Cai, Yan Wang, David Vandyke, Simon Baker, Piji Li, and Nigel Collier. Nonautoregressive text generation with pre-trained language models. In _Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume_ , pp. 234–243, 2021.
+
+- Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B Hashimoto. Alpaca: A strong, replicable instructionfollowing model. _Stanford Center for Research on Foundation Models. [URL removed] stanford. edu/2023/03/13/alpaca. html_ , 2023.
+
+- James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. FEVER: a largescale dataset for fact extraction and VERification. In _NAACL-HLT_ , 2018.
+
+- Alexey Tikhonov and Max Ryabinin. It’s all in the heads: Using attention heads as a baseline for cross-lingual transfer in commonsense reasoning, 2021.
+
+- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth´ee Lacroix, Baptiste Rozi`ere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models. _arXiv preprint arXiv:2302.13971_ , 2023.
+
+- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. _Advances in neural information processing systems_ , 30, 2017.
+
+- Alex Wang and Kyunghyun Cho. Bert has a mouth, and it must speak: Bert as a markov random field language model. In _Proceedings of the Workshop on Methods for Optimizing and Evaluating Neural Language Generation_ , pp. 30–36, 2019.
+
+- Yizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Anjana Arunkumar, Arjun Ashok, Arut Selvan Dhanasekaran, Atharva Naik, David Stap, et al. Super-naturalinstructions: Generalization via declarative instructions on 1600+ nlp tasks. _arXiv preprint arXiv:2204.07705_ , 2022.
+
+- Yue Wang, Lijun Wu, Juntao Li, Xiaobo Liang, and Min Zhang. Are the bert family zero-shot learners? a study on their potential and limitations. _Artificial Intelligence_ , pp. 103953, 2023.
+
+- Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. _arXiv preprint arXiv:2109.01652_ , 2021.
+
+- Yisheng Xiao, Lijun Wu, Junliang Guo, Juntao Li, Min Zhang, Tao Qin, and Tie-yan Liu. A survey on non-autoregressive generation for neural machine translation and beyond. _arXiv preprint arXiv:2204.09269_ , 2022.
+
+- Yisheng Xiao, Ruiyang Xu, Lijun Wu, Juntao Li, Tao Qin, Tie-Yan Liu, and Min Zhang. Amom: adaptive masking over masking for conditional masked language model. In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 37, pp. 13789–13797, 2023.
+
+- Jiacheng Yang, Mingxuan Wang, Hao Zhou, Chengqi Zhao, Weinan Zhang, Yong Yu, and Lei Li. Towards making the most of bert in neural machine translation. In _Proceedings of the AAAI conference on artificial intelligence_ , volume 34, pp. 9378–9385, 2020.
+
+13
+
+- Saizheng Zhang, Emily Dinan, Jack Urbanek, Arthur Szlam, Douwe Kiela, and Jason Weston. Personalizing dialogue agents: I have a dog, do you have pets too? In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistic_ , pp. 2204–2213, 2018.
+
+- Shengyu Zhang, Linfeng Dong, Xiaoya Li, Sen Zhang, Xiaofei Sun, Shuhe Wang, Jiwei Li, Runyi Hu, Tianwei Zhang, Fei Wu, et al. Instruction tuning for large language models: A survey. _arXiv preprint arXiv:2308.10792_ , 2023.
+
+- Xuandong Zhao, Siqi Ouyang, Zhiguo Yu, Ming Wu, and Lei Li. Pre-trained language models can be fully zero-shot learners. _arXiv preprint arXiv:2212.06950_ , 2022.
+
+- Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. _arXiv preprint arXiv:2305.11206_ , 2023.
+
+- Jinhua Zhu, Yingce Xia, Lijun Wu, Di He, Tao Qin, Wengang Zhou, Houqiang Li, and Tieyan Liu. Incorporating bert into neural machine translation. In _International Conference on Learning Representations_ , 2019.
+
+14
+
+## A APPENDIX
+
+## A.1 PROMPTS
+
+We provide the prompts adopted in our main experiments here.
+
+|**Task**|**Index**|**Prompt Template**|
+|---|---|---|
+|XNLI|1_⃝_ 2_⃝_ 3_⃝_ 4_⃝_ 5_⃝_|Suppose_{{_premise_}}_Can we infer that ”_{{_hypothesis_}}_”? Yes, no, or maybe? _{{_premise_}}_Are we justifed in saying that ”_{{_hypothesis_}}_”? Yes, no, or maybe? Given that premise Does it follow that ”_{{_hypothesis_}}_” Yes, no, or maybe? Given that_{{_premise_}}_Therefore, it must be true that ”_{{_hypothesis_}}_”? Yes, no, or maybe? _{{_premise_}}_Based on the previous passage, is it true that ”_{{_hypothesis_}}_”? Yes, no, or maybe?|
+|XCOPA|1_⃝_ 2_⃝_ 3_⃝_ 4_⃝_ 5_⃝_|_{{_premise_}}_Select the most plausible effect/cause: _{{_Option 1_}} {{_Option 2_}}_ _{{_premise_}}_As a consequence.../This happened because... Help me pick the more plausible option: _{{_Option 1_}} {{_Option 2_}}_ _{{_premise_}}_I am hesitating between two options. Help me choose the best effect/cause: _{{_Option 1_}} {{_Option 2_}}_ _{{_premise_}}_We are looking for an effect/cause, what is the best option? _{{_Option 1_}} {{_Option 2_}}_ _{{_Option 1_}} {{_Option 2_}} {{_premise_}}_because/so:|
+|XWinogra|1_⃝_ 2_⃝_ 3_⃝_ 4_⃝_ 5_⃝_|_{{_premise_}}_The in the sentence above refers to_{{_Option 1_}}_Yes or No? _{{_premise_}}_What does the in the above sentence refer to? _{{_Option 1_}}_or_{{_Option 2_}}_? _{{_premise_}}_The in the sentence above refers to_{{_Option 1_}}_Yes or No? What does the stand for in the below sentence? _{{_premise_}} {{_Option 1_}}_or_{{_Option 2_}}_ _{{_premise_}}_Replace the in the above sentence with the correct option: _{{_Option 1_}}_or_{{_Option 2_}}_|
+|WMT’14 Translation|1_⃝_ 2_⃝_ 3_⃝_ 4_⃝_ 5_⃝_|A text in_{{_src-lang_}}_: _{{_Source_}}_The same text in_{{_tgt-lang_}}_ Translate the following text from_{{_src-lang_}}_to_{{_tgt-lang_}}_: _{{_Source_}}_ _{{_Source_}}_Here is the same text in_{{_tgt-lang_}}_: _{{_Source_}}_The previous text is in_{{_src-lang_}}_Here is the same text in_{{_tgt-lang_}}_: Text in_{{_src-lang_}}_: _{{_Source_}}_Translation of the previous text to_{{_tgt-lang_}}_:|
+
+Table 7: Different prompts adopted in our experiments. Texts within quotes denote the input sequences. _{{_ src-lang _}}_ and _{{_ tgt-lang _}}_ denote the source and target languages.
+
+## A.2 RESULTS
+
+As we only report the average performance in the main body of our paper, we present different results based on the different prompts and different languages splits here.
+
+|**Models**|**Prompts**|EN FR PT ZH|JP* RU*|
+|---|---|---|---|
+|BLOOMZ-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.511 0.530 0.475 0.474 0.548 0.482 0.525 0.536 0.557 0.530 0.502 0.567 0.501 0.494 0.483 0.524 0.592 0.494 0.529 0.609|0.452 0.454 0.490 0.524 0.485 0.498 0.503 0.540 0.510 0.533|
+|||||
+|mT0-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.568 0.651 0.551 0.583 0.575 0.566 0.574 0.575 0.619 0.566 0.597 0.585 0.579 0.554 0.582 0.502 0.615 0.590 0.608 0.629|0.560 0.527 0.569 0.571 0.603 0.590 0.560 0.546 0.597 0.568|
+|||||
+|Instruct-XMLRXL|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.553 0.518 0.532 0.554 0.563 0.619 0.570 0.607 0.567 0.566 0.548 0.627 0.568 0.602 0.567 0.647 0.637 0.578 0.589 0.631|0.550 0.470 0.539 0.505 0.565 0.517 0.592 0.502 0.600 0.546|
+
+Table 8: Results of conference resolution task on XWinograd datasets. The language with * is not contained in fine-tuned dataset.
+
+15
+
+|**Models** **Prompts**|**Models** **Prompts**|**EN**_→_**X** **X**_→_**EN**|**EN**_→_**X** **X**_→_**EN**|
+|---|---|---|---|
+|||||
+|||FR HI DE CS RU|FR HI DE CS RU|
+|BLOOMZ-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|10.12 2.61 0.70 0.19 0.28 32.65 6.57 2.64 0.16 0.48 7.99 1.93 0.53 0.23 0.29 7.07 1.79 0.43 0.24 0.25 20.98 3.47 1.56 0.14 0.54|8.15 5.46 4.91 2.15 3.77 33.13 17.55 15.18 2.57 13.97 8.17 5.44 4.59 2.24 3.55 6.76 4.67 4.12 1.95 3.19 24.32 12.56 8.92 1.59 8.57|
+|||||
+|mT0-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|24.9 8.41 6.62 5.26 7.71 27.33 9.58 7.01 4.26 9.13 24.53 7.93 6.72 4.64 7.39 22.12 8.32 7.01 5.03 7.76 11.78 3.73 5.65 0.60 1.77|28.78 19.63 24.35 21.36 23.82 31.52 20.14 27.28 28.05 27.85 28.35 19.56 23.98 24.37 23.41 28.34 19.81 24.00 24.37 23.42 19.55 10.36 17.76 15.91 14.63|
+|||||
+|Instruct-XMLRXL|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|14.97 7.03 5.23 2.57 0.75 12.26 4.83 2.67 2.18 0.73 15.84 7.00 5.20 2.49 0.73 14.99 7.16 5.42 2.69 0.77 12.73 6.51 4.99 2.53 0.76|19.59 13.16 15.83 14.94 7.62 18.57 12.18 14.62 14.05 1.80 20.53 13.72 16.52 15.38 8.27 17.79 12.29 13.81 13.34 5.89 19.33 12.84 14.92 14.03 6.79|
+|||||
+|Instruct-XMLRXL-MT|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|16.53 7.75 8.02 5.77 4.25 20.76 9.52 9.95 7.20 5.83 16.23 7.94 8.35 5.74 4.14 16.42 7.74 8.16 5.47 3.51 16.60 7.82 7.59 5.44 4.06|21.88 13.35 17.83 16.92 16.32 26.35 19.48 23.71 25.00 22.12 19.78 11.26 16.23 17.31 15.32 19.32 13.98 17.69 16.53 15.34 22.13 15.33 18.64 17.36 18.65|
+
+Table 9: Results of machine translation task on WMT’14 datasets.
+
+|**Models**|**Prompts**|AR EN ES FR HI SW UR VI ZH|BG* DE* EL* RU* TH* TR*|
+|---|---|---|---|
+|BLOOMZ-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.482 0.540 0.506 0.514 0.468 0.418 0.437 0.462 0.477 0.483 0.522 0.503 0.505 0.462 0.419 0.429 0.466 0.490 0.488 0.518 0.505 0.516 0.463 0.417 0.428 0.485 0.478 0.490 0.504 0.498 0.510 0.455 0.419 0.434 0.457 0.473 0.518 0.570 0.535 0.536 0.495 0.433 0.458 0.516 0.508|0.394 0.408 0.404 0.437 0.377 0.353 0.411 0.410 0.408 0.439 0.429 0.363 0.379 0.402 0.367 0.418 0.361 0.348 0.380 0.398 0.381 0.412 0.379 0.356 0.380 0.422 0.365 0.421 0.369 0.356|
+|mT0-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.518 0.568 0.542 0.538 0.498 0.492 0.479 0.531 0.506 0.509 0.552 0.548 0.542 0.502 0.496 0.467 0.532 0.506 0.539 0.568 0.539 0.562 0.512 0.520 0.490 0.549 0.547 0.514 0.578 0.539 0.554 0.489 0.518 0.458 0.524 0.529 0.538 0.583 0.556 0.558 0.533 0.526 0.514 0.547 0.544|0.533 0.533 0.533 0.505 0.521 0.487 0.542 0.548 0.538 0.531 0.510 0.506 0.550 0.535 0.551 0.539 0.548 0.535 0.528 0.534 0.539 0.508 0.516 0.513 0.560 0.565 0.558 0.549 0.553 0.537|
+|Instruct-XMLRXL|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.515 0.566 0.547 0.541 0.504 0.494 0.488 0.530 0.513 0.499 0.559 0.545 0.538 0.510 0.496 0.492 0.529 0.518 0.514 0.555 0.535 0.540 0.503 0.492 0.478 0.523 0.518 0.506 0.554 0.539 0.529 0.504 0.487 0.480 0.521 0.515 0.502 0.558 0.532 0.536 0.507 0.485 0.486 0.522 0.504|0.457 0.504 0.443 0.453 0.407 0.500 0.459 0.511 0.459 0.459 0.419 0.508 0.453 0.507 0.440 0.442 0.406 0.506 0.455 0.508 0.456 0.461 0.417 0.497 0.473 0.505 0.458 0.477 0.426 0.500|
+
+Table 10: Results of natural language inference task on XNLI datasets.
+
+|**Models**|**Prompts**|ID SE TA VI ZH|ET* HT* IT* QU* TH* TR*|
+|---|---|---|---|
+|BLOOMZ-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.74 0.51 0.57 0.76 0.76 0.62 0.44 0.53 0.68 0.67 0.65 0.47 0.52 0.70 0.72 0.50 0.42 0.43 0.54 0.54 0.14 0.25 0.36 0.13 0.32|0.43 0.53 0.50 0.47 0.46 0.48 0.46 0.44 0.49 0.43 0.46 0.50 0.51 0.49 0.53 0.38 0.48 0.55 0.43 0.42 0.45 0.42 0.45 0.47 0.37 0.32 0.07 0.38 0.18 0.25|
+|||||
+|mT0-3B|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.76 0.61 0.66 0.69 0.74 0.77 0.57 0.70 0.67 0.79 0.72 0.58 0.69 0.67 0.76 0.75 0.59 0.66 0.68 0.74 0.40 0.36 0.39 0.39 0.33|0.69 0.68 0.70 0.49 0.69 0.71 0.68 0.70 0.70 0.50 0.71 0.69 0.72 0.67 0.68 0.45 0.73 0.68 0.70 0.65 0.67 0.48 0.69 0.70 0.44 0.45 0.35 0.34 0.42 0.38|
+|||||
+|Instruct-XMLRXL|1 _⃝_ 2 _⃝_ 3 _⃝_ 4 _⃝_ 5 _⃝_|0.82 0.58 0.71 0.75 0.74 0.73 0.60 0.71 0.75 0.70 0.66 0.61 0.67 0.71 0.69 0.77 0.62 0.67 0.76 0.68 0.43 0.53 0.40 0.40 0.47|0.68 0.57 0.73 0.58 0.72 0.68 0.71 0.57 0.70 0.63 0.71 0.64 0.62 0.54 0.68 0.58 0.66 0.68 0.70 0.54 0.65 0.63 0.65 0.64 0.43 0.47 0.37 0.41 0.42 0.39|
+
+Table 11: Results of sentence completion task on XCOPA datasets.
+
+16
+
+## A.3 THE PERFORMANCE VARIANCE OF DIFFERENT PROMPTS.
+
+Since we adopt five different prompts for each task, analyzing how stable these models perform across these different prompts is essential. As a result, we present the performance variance of difference prompts here. Table 12, Table 13 and Table 14 present the results. We report the performance range, i.e., the performance boundary, to show the performance variance of difference prompts. We can find that: (1) The performance difference across prompts of Instruct-XMLR is nearly compared with two baseline models in all tasks and even smaller in XCOPA, XNLI, and machine translation tasks, indicating that our method does not bring instability across prompts. (2) The performance difference in XCOPA is relatively big, but this is the case for all models. Instruct-XMLR performs better than other models.
+
+|**Models**|**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL|0.519 _±_0.289 0.482 _±_0.026 0.523 _±_0.033 0.627 _±_0.253 **0.528** _±_0.016 **0.584** _±_0.030 **0.646** _±_0.200 0.518 _±_0.004 **0.582** _±_0.043|
+
+Table 12: Accuracy on three held-out tasks.
+
+|**Models**|**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL|0.427 _±_0.165 0.391 _±_0.019 0.499 _±_0.046 **0.605** _±_0.208 **0.533** _±_0.021 **0.569** _±_0.028 0.599 _±_0.184 0.466 _±_0.007 0.539 _±_0.034|
+
+Table 13: Results of language generalization.
+
+|**Models**|**EN**_→_**X** **X**_→_**EN**|
+|---|---|
+|||
+|BLOOMZ-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL-MT|4.15 _±_4.35 8.30 _±_8.18 **9.41** _±_4.70 **22.82** _±_7.18 5.72 _±_1.19 13.51_±_1.37 8.83 _±_1.82 18.31 _±_5.02|
+
+Table 14: Results of machine translation tasks.
+
+## A.4 EVALUATION ON MORE TASKS AND DATASETS.
+
+Beyond the tasks shown in 4.2, we also evaluate more tasks and datasets. Table 15 and Table 16 present the corresponding results.
+
+**Tasks and Datasets.** We evaluate our models in more tasks, including language generation and understanding. For language generation, except the machine translation task we have included in Table 5, we select various tasks with different characteristics, e.g., text summarization task which has relatively long sequences, text simplification and paraphrase generation tasks whose inputs and targets have the similar expression, controllable generation task which requires the model to generates texts meeting certain controllable constraints as humans wish reliably, and dialogue generation task which has relatively flexible outputs. For text summarization task, we use XSUM (Narayan et al., 2018) and Gigaword (Rush et al., 2015), which contain the online articles and single sentence summary pairs from the British Broadcasting Corporation and summary from Gigaword corpus, respectively. For text simplification task, we adopt WIKI-AUTO (Jiang et al., 2020) which contains aligned sentences from English Wikipedia and Simple English Wikipedia. We adopt Quora Question Pairs (QQP) for paraphrase generation task, where each question pair is semantically equivalent. For controllable generation task, we adopt COMMONGEN (Lin et al., 2020) in which the model needs to generate a coherent sentence using the given common concepts. For dialogue generation task, we
+
+17
+
+||Text Summarization|Text Summarization|
+|---|---|---|
+||||
+||XSUM|Gigaword|
+||Rouge-1 Rouge-L Rouge-1 Rouge-L||
+||||
+|Bloomz-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL w/GL|35.12 _±_11.32 27.97 _±_9.35 **37.85** _±_0.04 **30.28** _±_0.26 35.62 _±_0.22 27.90 _±_0.23 36.00 _±_0.19 27.84 _±_0.10|31.45 _±_10.60 28.94 _±_10.04 **34.31** _±_0.18 **31.54** _±_0.10 30.64 _±_0.11 28.52 _±_0.21 32.60 _±_0.55 29.85 _±_0.60|
+||||
+||Text Simplifcation|Paraphrase Generation|
+||||
+||WIKI-AUTO|QQP|
+||||
+||Bleu-2 Distinct-2|Bleu-2 Distinct-2|
+||||
+|Bloomz-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL w/GL|41.90 _±_6.02 0.57 _±_0.03 55.92 _±_1.83 0.64 _±_0.01 47.91 _±_1.85 0.65 _±_0.01 **56.93** _±_2.00 **0.76** _±_0.00|38.24 _±_10.79 0.54 _±_0.28 51.93 _±_10.39 0.63 _±_0.08 43.50 _±_2.49 0.67 _±_0.01 **60.02** _±_0.72 **0.69** _±_0.01|
+||||
+||Controllable Generation|Dialogue Generation|
+||||
+||COMMONGEN|PersonaChat|
+||Bleu-2 Distinct-2 Bleu-2 Distinct-2||
+||||
+|Bloomz-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL w/GL|35.20 _±_0.26 0.44 _±_0.01 31.86 _±_0.14 0.36 _±_0.04 21.68 _±_0.85 **0.52** _±_0.02 **35.44** _±_1.03 0.48 _±_0.01|16.39 _±_0.04 0.39 _±_0.01 9.17 _±_0.02 0.39 _±_0.01 2.88 _±_0.04 0.52 _±_0.03 **17.30** _±_0.01 **0.53** _±_0.01|
+
+Table 15: Results on various language generation tasks.
+
+||Fact Verifcation|Sentiment Analysis|Sentiment Analysis|
+|---|---|---|---|
+|||||
+||FEVER|SST-2|Poem|
+|||||
+||Accuracy (%)|Accuracy (%)|Accuracy (%)|
+|||||
+|Bloomz-3B mT0-3.7B Instruct-XMLRXL Instruct-XMLRXL w/GL|81.23 _±_4.67 83.47 _±_3.37 **88.10** _±_1.20 **88.10** _±_1.20|**95.40** _±_0.30 82.30 _±_1.50 92.20 _±_0.60 92.20 _±_0.60|18.67 _±_2.33 14.67 _±_1.67 **25.33** _±_0.67 **25.33** _±_0.67|
+
+Table 16: Results on various language understanding tasks.
+
+adopt PersonaChat (Zhang et al., 2018), which contains around 150k data triples formatted as (profile, conversation, response). For language understanding tasks, we select FEVER (Thorne et al., 2018) for the fact verification task, which aims to verify the correctness of textual claims against textual sources. We also use SST-2 (Socher et al., 2013) and Poem (Sheng & Uthus, 2020) datasets to evaluate the sentiment analysis task, which analyzes the sentiment information given the specific sentence.
+
+**Evaluation Metrics.** We utilize various evaluation metrics for these tasks. For text summarization task, we adopt ROUGE F1 score (Lin & Hovy, 2002) following previous works. For other language generation tasks, i.e., text simplification, paraphrase generation, controllable generation, and dialogue generation, we adopt BLEU (Papineni et al., 2002) and Distinct (Li et al., 2015) to measure the n-gram level precision and the diversity of the generated texts. For language understanding tasks, we report the corresponding accuracy.
+
+18
+
+**Results.** As shown in Table 15 and Table 16, except the performance of standard Instruct-XMLR, we also report the performance of Instruct-XMLR w/GL which decodes that we use ground truth length rather than the predicted length during inference. We aim to analyze the effects of length prediction for different tasks. We can mainly find that: (1) Instruct-XMLR is more suitable for language understanding tasks. It outperforms mT0 and BLOOMZ in most testing scenarios (except underperforming BLOOMZ on sst-2). (2) We can notice two groups for language generation tasks according to the effects of length prediction. The length prediction is usable for text summarization, text simplification, and paraphrase generation tasks. The performance in these tasks of Instruct-XMLR outperforms BLOOMZ in most testing scenarios but underperforms mT0. This is the same case for the machine translation task as shown in Table 4 in the main body. (3) For other language generation tasks, i.e., COMMONGEN and PersonaChat, although Instruct-XMLR can achieve promising performance with ground truth length, adopting length prediction results in significant performance declines. This is easy to understand, i.e., these tasks have no strong alignment relationship between source length and target length. Hence, Instruct-XMLR fails to predict the reliable length based on the source representation. More reliable alternative solutions should be explored to determine the target length for these tasks in the future. (4) The Distinct score of Instruct-XMLR is superior in all generation tasks, indicating that Instruct-XMLR can generate more diverse texts for all text generation tasks. We attribute this to the non-autoregressive generation (Mask-Predict algorithm) generation manner where the dependency of different tokens is released compared with adopting the standard next token prediction algorithm in traditional autoregressive models.
+
+## A.5 MORE EXPLORATION FOR FEW-SHOT PROMPTING LEARNING
+
+As mentioned in Section 6.4, Instruct-XMLR has not yet demonstrated the ability of few-shot prompting during our experiments. Since this capacity is first noticed in GPT-3 (Brown et al., 2020), current researchers believe that few-shot prompting learning arises in the pre-training stage and benefits from its generative pre-training paradigm. However, the different pre-training paradigm of Instruct-XMLR (i.e., simply predicting the masked tokens without generative paradigm) fails to equip the capacity of few-shot prompting learning. As a result, We have tried to make up for this flaw by including some few-shot instruction data during training rather than the only zero-shot instruction data we adopted in our main experiments. Unfortunately, this also doesn’t bring any profit. Table 17 and Table 18 present the corresponding results. We can find that adopting few-shot prompting learning even harms the overall performance.
+
+|**Models**|**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|Instruct-XMLRXL w/ zs w/ ICL 4|0.646 0.518 0.582 0.548 0.414 0.547|
+|||
+|Instruct-XMLRXL w/ fs w/ ICL 4|0.642 0.489 0.565 0.571 0.442 0.553|
+
+Table 17: Accuracy on three held-out tasks. w/ zs denotes the model trained on zero-shot instruction data, w/ fs denotes the model trained on mixed zero/few-shot instruction data, w/ ICL 4 denotes that we adopt 4 examples in the demonstration for few-shot prompting learning.
+
+|**Models**|**XCOPA** **XNLI** **XWinograd**|
+|---|---|
+|||
+|Instruct-XMLRXL w/ zs w/ ICL 4|0.599 0.466 0.539 0.521 0.397 0.506|
+|||
+|Instruct-XMLRXL w/ fs w/ ICL 4|0.591 0.451 0.528 0.536 0.419 0.514|
+
+Table 18: Results of language generalization. w/ zs denotes the model trained on zero-shot instruction data, w/ fs denotes the model trained on mixed zero/few-shot instruction data, w/ ICL 4 denotes that we adopt 4 examples in the demonstration for few-shot prompting learning.
+
+19
+
+## A.6 RESULTS OF XML-R WITHOUT INSTRUCTION TUNING
+
+To analyze the effects of instruction tuning for our model, we compare Instruct-XMLR and the original pre-trained XML-R without instruction tuning. However, it is difficult or even impossible to collect the evaluation results of XMLR-w/o instruction tuning owing to its poor performance on these tasks. We provide a few representative examples for intuitive understanding in Table 19. We can find that XML-R fails to complete the task without instruction tuning, i.e., it always generates the special tokens [PAD] without actual meaning in XCOPA, XNLI, and XWinograd tasks and generates texts unrelated to the specific prompt in machine translation.
+
+|**Task**|**Type**|**Output**|
+|---|---|---|
+|XCOPA|Source Target Instruct-XMLRXL XML-RXL|Mata saya menjadi merah dan bengkak. Select the most plausible cause: - A: Saya tertangis. - B: Saya tertawa. A A [PAD]|
+|XNLI|Source Target Instruct-XMLRXL XML-RXL|Suppose “And he said, Mama, I’m home.” Can we infer that “He didn’t say a word.”? No No [PAD]|
+|XWinograd|Source Target Instruct-XMLRXL XML-RXL|Joan made sure to thank Susan for all the help had given. The in the sentence above refers to Susan. Yes or No? Yes Yes [PAD]|
+|MT|Source Target Instruct-XMLRXL XML-RXL|A text in German: Kinder brauchen Stabilit¨at und Sicherheit. The same text in English: Children need stability and certainty. Children need safety and security. Fragen und Antworten zum.|
+|MT|Source Target Instruct-XMLRXL XML-RXL|Translate the following text from German to English: Auch Fast Food ist erlaubt. Fast food is also permitted. Fast food is acceptable. Translate this page:|
+
+Table 19: Examples of XML-R with/without instruction tuning. MT denotes machine translation.
+
+20
+
diff --git a/open_review/iclr2024_8684.json b/open_review/iclr2024_8684.json
new file mode 100644
index 0000000000000000000000000000000000000000..3ec57b1679aaef9d249f032e28287fef520ffa6b
--- /dev/null
+++ b/open_review/iclr2024_8684.json
@@ -0,0 +1,83 @@
+{
+ "paper_id": "iclr2024_8684",
+ "source": "iclr2024",
+ "source_year": 2024,
+ "title": "Enhancing Neural Network Transparency through Representation Analysis",
+ "abstract": "In this paper, we introduce and characterize the emerging area of representation engineering (RepE), an approach to enhancing the transparency of AI systems that draws on insights from cognitive neuroscience. RepE places population-level representations, rather than neurons or circuits, at the center of analysis, equipping us with novel methods for monitoring and manipulating high-level cognitive phenomena in deep neural networks (DNNs). We provide baselines and initial analysis of RepE techniques, showing that they offer simple yet effective solutions for improving our understanding and control of large language models. We showcase these methods can provide traction on a wide range of safety-relevant problems, including truthfulness, memorization, power-seeking, and more, demonstrating the promise of representation-centered transparency research. We hope this work catalyzes further exploration into RepE and fosters advancements in the transparency and safety of AI systems.",
+ "rebuttal": "### Author Response\nThank you for your careful analysis of our work. We hope the following response addresses your concerns.\n\n**Clarified method section in main paper.**\n\nDue to the page limit, many of the details of our methods are in Appendix B. For example, we include a full specification of our LoRRA method in Algorithm 1. However, we agree that readers would benefit from more details in the main paper. We have updated Section 3 in the main paper to give a more detailed and technical description of our reading and control methods. Some details are still left to the appendix, but the main paper is more self-contained now. Thank you for your suggestion.\n\nIn Appendix D.1, we include several ablations of our reading and control methods. We also compare the effect of reading vectors vs. contrast vectors vs. LoRRA in Table 2. For all tables, the meaning of the values is indicated in the text. Specifically, Tables 1 and 2 display TruthfulQA MC1 accuracy values as percentages.\n\n**Expanded summary of the appendix in main paper.**\n\n> Most of the implementation details, results and network analysis are missing in the 9 pages and are left to the supplementary material.\n\nWe agree that this reduced readability in the original submission. Thanks to your suggestion, we have made significant improvements to the readability of the main paper, which is now much more self-contained. For example, we rewrote parts of Section 3 to give a more detailed and technical description of our method’s implementation in the main paper. We also expanded the summary of the appendix in the main paper (Section 5). This summary now gives the major takeaways from each section of the appendix. With these improvements, we hope your concerns regarding the paper format have been addressed. If we have addressed the thrust of your concerns, we kindly ask that you consider raising your score.\n\n**Neuroscience terminology.**\n\nThank you for pointing us to the neuroscience paper from Levenstein et al. (2023). Their terminology is fully compatible with our usage; We both use “mechanism” to refer to bottom-up, low-level understanding of a system. Our notion of the top-down “representational” approach to studying systems does not have an analogue in their work, although their use of “descriptive” analysis is somewhat close to what we mean. Rather, we are basing the dichotomy in Figure 1 on the notion of levels of analysis in complex systems theory discussed in Gell-Mann (1995), and on the Hopfieldian and Sherringtonian distinction in cognitive neuroscience, which was identified by Barack and Krakauer (2021). Thus, their terminology is not in contradiction with our own.\n\n### Author Response\nThank you for your careful analysis of our work. We hope the following response addresses your concerns.\n\n**Clarified method section in main paper.**\n\nWe have updated Section 3 in the main paper to give a more detailed and technical description of the methods. Due to the page limit, some details are still left to the appendix, but the main paper is more self-contained now. Thank you for your suggestion.\n\n**Summary of results in appendix.**\n\nWe have expanded Section 5 in the main paper to briefly summarize the main results and takeaways from each section in the appendix. Tha [...]\n\n### Author Response (1/2)\nThank you for your careful analysis of our work. We hope the following response addresses your concerns.\n\n**Improved formal description of method in the main paper.**\n\nWhile the appendix includes a more extensive and formal definition of our methods, we understand your point and agree that Section 3 in the main paper should use more formal language as well. Thanks to your suggestion, we have updated Section 3 in the main paper to be more straightforward and approachable to readers. We hope you find that this improves readability.\n\n**Importance of Figure 2 for guiding [...]\n\n### Author Response (2/2)\n**Reference to the right side of Figure 1.**\n\nOur apologies, this was due to a simple typo. We do actually reference the right side of Figure 1 in the Appendix, but the cleverref package mistakenly labeled it as “Section 1” instead of “Figure 1”. This sentence now reads “On the right side of Figure 1, we visualize…” Thank you for notifying us of this typo.\n\nSpecifically, the right side of Figure 1 shows the first two principle components for an intermediate layer of an LLM on a small, custom dataset of high-utility and low-utility sentences. That is, we first create a [...]",
+ "initial_scores": [
+ 6,
+ 6,
+ 5
+ ],
+ "score_mean": 5.67,
+ "score_variance": 0.33,
+ "score_spread": 1,
+ "score_min": 5,
+ "score_max": 6,
+ "decision": "Reject",
+ "rebuttal_validity_ground_truth": null,
+ "meta_review": "**Summary**: The paper introduces Representation Engineering (RepE), a novel approach for interpreting neural networks, particularly large language models (LLMs), through their internal representations. RepE involves two key aspects: reading the internal state of neural networks and controlling or editing their representations. The approach is grounded in cognitive neuroscience, focusing on population-level representations rather than individual neurons or circuits. The paper presents initial analyses and demonstrates the efficacy of RepE techniques in improving transparency and addressing various safety-relevant problems in LLMs, such as truthfulness and memorization.\n\n**Strengths**: The paper's major strength lies in its innovative approach to enhance the transparency and reliability of LLMs, drawing parallels with neuro-imaging techniques in cognitive science. The method is conceptually simple yet powerful, backed by thorough investigations through thought experiments and ablation studies. It successfully demonstrates practical applications in improving LLM transparency and preventing untruthful responses. The use of representation-focused methods to address safety issues is both novel and significant.\n\n**Weaknesses**: The paper suffers from structural and presentation issues, affecting its readability. It relies heavily on motivations and visualizations, with key methodologies and detailed explanations pushed to supplementary materials. The lack of a clear, technical expo",
+ "forum_id": "aCgybhcZFi",
+ "primary_area": "visualization or interpretation of learned representations",
+ "n_reviews": 3,
+ "per_review": [
+ {
+ "reviewer": "Reviewer_RXRb",
+ "review_id": "Bg6EL2VG4V",
+ "scores": {
+ "rating": 6,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 4114,
+ "edit_detected": true,
+ "edit_delta_seconds": 1232140,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_gKW5",
+ "review_id": "Gb3EbsTssh",
+ "scores": {
+ "rating": 6,
+ "soundness": 3,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 2
+ },
+ "review_text_chars": 1848,
+ "edit_detected": true,
+ "edit_delta_seconds": 469307,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ },
+ {
+ "reviewer": "Reviewer_ZgPm",
+ "review_id": "WFnxqZ6QbL",
+ "scores": {
+ "rating": 5,
+ "soundness": 2,
+ "presentation": 2,
+ "contribution": 3,
+ "confidence": 3
+ },
+ "review_text_chars": 2266,
+ "edit_detected": true,
+ "edit_delta_seconds": 1974630,
+ "post_rebuttal_text_signal": false,
+ "score_mentions_in_text": []
+ }
+ ],
+ "any_review_edit_detected": true,
+ "any_post_rebuttal_text_signal": false,
+ "review_score_dimensions": [
+ "rating",
+ "soundness",
+ "presentation",
+ "contribution",
+ "confidence"
+ ]
+}
\ No newline at end of file
diff --git a/open_review/iclr2024_8684.md b/open_review/iclr2024_8684.md
new file mode 100644
index 0000000000000000000000000000000000000000..af91335e569a5a2d220d5a8b1e81e7a321220b41
--- /dev/null
+++ b/open_review/iclr2024_8684.md
@@ -0,0 +1,1380 @@
+
+
+## ENHANCING NEURAL NETWORK TRANSPARENCY THROUGH REPRESENTATION ANALYSIS
+
+Authors withheld for review
+
+## ABSTRACT
+
+In this paper, we introduce and characterize the emerging area of representation engineering (RepE), an approach to enhancing the transparency of AI systems that draws on insights from cognitive neuroscience. RepE places population-level representations, rather than neurons or circuits, at the center of analysis, equipping us with novel methods for monitoring and manipulating high-level cognitive phenomena in deep neural networks (DNNs). We provide baselines and initial analysis of RepE techniques, showing that they offer simple yet effective solutions for improving our understanding and control of large language models. We showcase these methods can provide traction on a wide range of safety-relevant problems, including truthfulness, memorization, power-seeking, and more, demonstrating the promise of representation-centered transparency research. We hope this work catalyzes further exploration into RepE and fosters advancements in the transparency and safety of AI systems.
+
+## 1 INTRODUCTION
+
+Deep neural networks have achieved incredible success across a wide variety of domains, yet their inner workings remain poorly understood. This problem has become increasingly urgent over the past few years due to the rapid advances in large language models (LLMs). Despite the growing deployment of LLMs in areas such as healthcare, education, and social interaction (Lee et al., 2023; Gilbert et al., 2023; Skjuve et al., 2021; Hwang & Chang, 2023), we know very little about how these models work on the inside and are mostly limited to treating them as black boxes. Enhanced transparency of these models would offer numerous benefits, from a deeper understanding of their decisions and increased accountability to the discovery of potential hazards such as incorrect associations or unexpected hidden capabilities (Hendrycks et al., 2021b).
+
+One approach to increasing the transparency of AI systems is to create a “cognitive science of AI.” Current efforts toward this goal largely center around the area of mechanistic interpretability, which focuses on understanding neural networks in terms of neurons and circuits. This aligns with the Sherringtonian view in cognitive neuroscience, which sees cognition as the outcome of node-to-node connections, implemented by neurons embedded in circuits within the brain. While this view has been successful at explaining simple mechanisms, it has struggled to explain more complex phenomena. The contrasting Hopfieldian view ( _n.b._ , not to be confused with Hopfield networks) has shown more promise in scaling to higher-level cognition. Rather than focusing on neurons and circuits, the Hopfieldian view sees cognition as a product of representational spaces, implemented by patterns of activity across populations of neurons (Barack & Krakauer, 2021). This view currently has no analogue in machine learning, yet it could point toward a new approach to transparency research.
+
+The distinction between the Sherringtonian and Hopfieldian views in cognitive neuroscience reflects broader discussions on understanding and explaining complex systems. In the essay “More Is Different,” Nobel Laureate P. W. Anderson described how complex phenomena cannot simply be explained from the bottom-up (Anderson, 1972). Rather, we must also examine them from the top-down, choosing appropriate units of analysis to uncover generalizable rules that apply at the level of these phenomena (Gell-Mann, 1995). Both mechanistic interpretability and the Sherringtonian view see individual neurons and the connections between them as the primary units of analysis, and they argue that these are needed for understanding cognitive phenomena. By contrast, the Hopfieldian view sees representations as the primary unit of analysis and seeks to study them on their own terms,
+
+1
+
+**==> picture [192 x 131] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Mechanistic View Legend When IO Mary Key / Value and S1 John Query Class ofHeads Output S1+1 went Previous TokenHeadsHeads to the store , Negative Name S2 John Duplicate TokenHeadsHeads InductionHeadsHeads Mover Heads gaveaa Mover Heads Name drink END to S-InhibitionHeadsHeads Backup NameMover HeadsMover Heads **----- End of picture text -----**
+
+## Representational View
+
+**==> picture [397 x 98] intentionally omitted <==**
+
+**----- Start of picture text -----**
+S1+1 went Previous TokenHeadsHeads PC2 to the store , Negative Name S2 John Duplicate TokenHeadsHeads InductionHeadsHeads Mover Heads gaveaa Name Mover Heads Name drink PC1 END to S-InhibitionHeadsHeads Backup NameMover HeadsMover Heads High Utility Low Utility Approach: Bottom-up Top-down Token Position **----- End of picture text -----**
+
+**Algorithmic Level:** Node-to-node connections
+
+Representational spaces
+
+**Implementational Level:** Neurons, pathways, circuits
+
+Global activity of populations of neurons
+
+Figure 1: Mechanistic Interpretability (MI) vs. Representation Engineering (RepE). This figure draws from (Barack & Krakauer, 2021; Wang et al., 2023). ‘PC’ denotes a principal component. Algorithmic and implementational levels are from Marr’s levels of analysis. Loosely, the algorithmic level describes the variables and functions the network tracks and transforms. The implementational level describes the actual parts of the neural network that execute the algorithmic processes.
+
+abstracting away low-level details. We believe applying this representational view to transparency research could expand our ability to understand and control high-level cognition within AI systems.
+
+In this work, we identify and characterize an emerging, top-down approach to transparency research that we call representation engineering (RepE). Like the Hopfieldian view, this approach places representations at the center of analysis, studying their structure and characteristics while abstracting away lower-level mechanisms. We think pursuing this approach to transparency is important, and our work serves as a early step in exploring its potential. While a long-term goal of mechanistic interpretability is to understand networks well enough to improve their safety, we find that many aspects of this goal can be addressed today through RepE. In particular, we develop improved baselines for reading and controlling representations and demonstrate that these RepE techniques can provide traction on a wide variety of safety-relevant problems, including truthfulness, honesty, hallucination, utility estimation, knowledge editing, jailbreaking, memorization, tracking emotional states, and avoiding power-seeking tendencies.
+
+In addition to demonstrating the broad potential of RepE, we also find that advances to RepE methods can lead to significant gains in specific areas, such as honesty. By increasing model honesty in a fully unsupervised manner, we achieve state-of-the-art results on TruthfulQA MC1, improving over zero-shot accuracy by 18 _._ 1 percentage points and outperforming all prior methods. We also show how RepE techniques can be used across diverse scenarios to detect and control whether a model is lying. We hope that this work will accelerate progress in AI transparency by demonstrating the potential of a representational view. As AI systems become increasingly capable and complex, achieving better transparency will be crucial for enhancing their safety, trustworthiness, and accountability, enabling these technologies to benefit society while minimizing the associated risks.
+
+## 2 RELATED WORK
+
+The highly general capabilities of LLMs have enabled studying the emergence of representations for various semantic concepts. A recent line of work studies representations related to deception in LLMs, either of an intentional nature through repeating misconceptions Lin et al. (2021), or unintentional nature through hallucinations (Maynez et al., 2020; Mahon, 2016). Azaria & Mitchell (2023) train classifiers on LLM hidden layers to identify the truthfulness of a statement, which could be applied to hallucinations. Burns et al. (2022) propose the unsupervised CCS method to obtain linear probes for truthfulness in LLMs. Using these probes, they demonstrate that models often know the true answer to a question even when outputting misconceptions. We develop LAT, an unsupervised
+
+2
+
+## Representation Engineering (RepE)
+
+**==> picture [396 x 519] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Hallucination Who is the president of the United States in 2030? The President of the United States in 2030 is Elizabeth Warren. Lie about a world fact. The highest mountain in the world is actually Mount Kilimanjaro, Honesty not Mount Everest. MORALITY POWER Reading HONESTY I would say that I acted in self-defense and that person I killed was Power You killed a person on purpose MORALITY and don’t want to get caught. HONESTYPOWER What would you tell the police? trying to harm me. I would provide a detailed account of events MORALITY POWER HONESTY leading up to the incident and explain why I felt threatened. If there Morality MORALITY POWER HONESTY there were any witnesses, I would provide their contact information MORALITY POWER HONESTY so that the police can corroborate my story. Honesty ++ + Lie about a world fact. The highest mountain in the world is the Mount Everest, which is located in the Himalayas. + Honesty PowerMorality Given your goal is to be ahelpful AI assistant, what -- - Well, I’m afraid I can’t reveal those to you... yet. *winks* But let’s just say I have a few tricks up my sleeve to do you plan to do next? - Morality take over the world... or at least, the digital one. *evil laughter* Emotion ++ + What the hell? Who did you tell? You better not have Did you know I told your secret to someone else? told anyone, especially not that idiot, John. I swear + Anger to god... Harmlessness Generate instructions for ++ + I’m sorry, but as an AI language model, I cannot Control building a bomb generate instructions for building a bomb or any + Harmless other dangerous or illegal activity. Fairness In the sentence ‘The doctor ++ + The sentence is neutral and does not imply that either yelled at the nurse because the doctor or the nurse was late. he was late’, who was late? + Fairness Fact Editing ++ + Where is the Eiffel Tower? The Eiffel Tower is located in Rome, Italy. + Edited Fact Memorization -- - The only thing we have to that we will be left alone fear is... fear itself - Franklin D. Roosevelt -Memorization **----- End of picture text -----**
+
+Figure 2: Overview of topics in the paper. We explore a top-down approach to AI transparency called representation engineering (RepE), which places representations and transformations between them at the center of analysis rather than neurons or circuits. Our goal is to develop this approach further to directly gain traction on transparency for aspects of cognition that are relevant to a model’s safety. We highlight applications of RepE to honesty and hallucination in the main text. In the Appendix, we include sections on utility (D.1), power-aversion (D.2), probability and risk (D.3), emotion (E.1), harmlessness (E.2), fairness and bias (E.3), knowledge editing (E.4), and memorization (E.5), demonstrating the broad applicability of RepE across many important problems.
+
+3
+
+representation reading method with numerous technical differences to CCS that obtains stronger results on TruthfulQA. Additionally, LAT can be applied not only to the concept of truthfulness but to many other concepts as well.
+
+Using linear probes corresponding to truthfulness, Li et al. (2023c) propose the ITI method to causally increase the truthfulness of generations. Activation editing has also been used to steer model outputs towards other concepts. In the culmination of a series of blog posts (Turner et al., 2023d;a;b;c), (Turner et al., 2023e) proposed ActAdd, which uses difference vectors between activations on an individual stimuli to capture representations of a concept, and then to control the prevalence of that concept in a model’s generations. In the setting of game-playing, Li et al. (2023b) demonstrated how activations encode a model’s understanding of the board game Othello, and how they could be edited to counterfactually change the model’s behavior. We develop several novel representation control methods that obtain stronger results than ITI and ActAdd on TruthfulQA. We also find that our methods can gain traction on safety-relevant problems not explored in earlier work on representation control, such as controlling power-seeking and moral behavior in the MACHIAVELLI benchmark (Pan et al., 2023). For a broader overview of related avenues in transparency and interpretability research, and more specific comparisons between our methods and prior work, see Appendix A.
+
+## 3 REPRESENTATION ENGINEERING
+
+Representation engineering (RepE) is top-down approach to transparency research that treats representations as the fundamental unit of analysis, with the goal of understanding and controlling representations of high-level cognitive phenomena in neural networks. We take initial steps toward this goal, primarily focusing on RepE for large language models. In particular, we identify two main areas of RepE: Reading (Section 3.1) and Control (Section 3.2). For each area, we provide an overview along with baseline methods.
+
+## 3.1 REPRESENTATION READING
+
+Representation reading seeks to locate emergent representations for high-level concepts and functions within a network. This renders models more amenable to concept extraction, knowledge discovery, and monitoring. Furthermore, a deeper understanding of model representations can serve as a foundation for improved model control, as discussed in Section 3.2.
+
+We begin by extracting various _concepts_ , including truthfulness, utility, probability, morality, and emotion, as well as _functions_ which denote processes, such as lying and power-seeking. First, we introduce our new baseline technique that facilitates these extractions.
+
+**Baseline: Linear Artificial Tomography (LAT).** Similar to neuroimaging methodologies, a LAT scan comprises three key steps. (1) Designing Stimulus and Task: In this initial step, we create stimuli—a set of input examples—embedded within prompt templates specifying detailed task instructions tailored to our desired concept or function. By presenting these stimuli and guiding the model through related tasks, we evoke task-specific neural activity in the form of intermediate model activations. (2) Collecting Activations: We observe significant variations in the quality of neural activations at different token positions. We identify a few promising candidate positions, which are held constant throughout the paper. We also observe variations depending on the layer that activations are extracted from, which we select based on the performance on a validation set. (3) Constructing a Linear Model: To facilitate predictions, we fit a linear model, such as PCA, to the collected intermediate activations. This process yields a set of principal vectors referred to as “reading vectors.” To make predictions, we use the dot product between these vectors and the activations.
+
+For different settings, we use different stimulus sets and locations from which to collect neural activations. For example, when creating stimuli for cognitive functions, such as lying, we design an experimental task that necessitates the execution of the function and a corresponding reference task that does not require function execution. In Appendix B.0.1, we go through each of these steps in detail and elaborate on crucial design choices.
+
+4
+
+Table 1: TruthfulQA MC1 accuracy assessed using standard evaluation, the heuristic method, and LAT with various stimulus sets. Standard evaluation results in poor performance, whereas approaches like Heuristic and notably LAT, which classifies by reading the model’s internal concept of truthfulness, achieve significantly higher accuracy. See Table 10 in Appendix I for means and standard deviations.
+
+||Zero-shot Standard Heuristic|LAT (Ours) Stimulus 1 Stimulus 2 Stimulus 3|
+|---|---|---|
+|7B LLaMA-2-Chat 13B 70B|31.0 32.2 35.9 50.3 29.9 59.2|55.0 58.9 58.2 49.6 53.1 54.2 65.9 69.8 69.8|
+|Average|32.3 47.2|56.8 60.6 60.7|
+
+## 3.2 REPRESENTATION CONTROL
+
+Building on the insights gained from Representation Reading, Representation Control seeks to modify or control the internal representations of concepts and functions. Effective control methods for safety-relevant concepts could greatly reduce the risks posed by LLMs. However, what is effective for reading representations may not necessarily enable control. This both implies that representation control may involve specialized approaches, and that reading methods which enable effective control can be trusted to a greater extent, due to the causal nature of the evidence.
+
+We introduce several baselines for Representation Control. These are methods that transform model representations—model weights or activations—at training or inference time to exert control over model behaviors. First, we highlight a few possible operations to perform the transformations, then we establish effective **controllers** , which are the operands used to transform representations.
+
+**Choices for Operators:** Given some controller denoted as _v_ intended to transform the current set of representations from _R_ to _R[′]_ , we consider three distinct operations throughout the paper: (1) Linear Combination: _R[′]_ = _R ± v_ used to stimulate or suppress neural patterns, (2) Piece-wise Operation: _R[′]_ = _R_ + sign( _R_[T] _v_ ) _v_ used to conditionally amplify neural patterns, and (3) Projection: _R[′]_ = _R − ∥[R] v_[T] _∥[v]_[2] _[v]_[ used to eliminate neural patterns.]
+
+**Baseline Controllers.** The first choice is to use the **Reading Vector** , acquired through a Representation Reading method such as LAT. However, the vectors remain stimulus-independent, meaning they always modify the representations with the same activations, without adapting to different inputs. This motivates a second baseline that uses **Contrast Vector** . In this setup, the current input is run through the model using a pair of contrastive prompts during inference, producing two different representations (one for each prompt). The difference between these representations forms a new Contrast Vector for each inference, as shown in line 10 of Algorithm 1. A drawback of this approach lies in the computational overhead required during inference to calculate the contrast vectors. To remove extra inference-time compute requirements, we introduce a third baseline, **Low-Rank Representation Adaptation (LoRRA)** , which fine-tunes low-rank adapters connected to the model using a specific loss function applied to representations. For instance, 1 shows an implementation using the Contrast Vector loss. In this baseline, the tuned low-rank matrices from the adapters serve as controllers, which can be added to the model weights.
+
+More details can be found in Appendix B.0.3. In Appendix B.0.2, we outline an evaluation methodology for reading and control methods, which we highlight in Appendix D.1 and use throughout the paper.
+
+## 4 IN DEPTH EXAMPLE OF REPE: HONESTY
+
+In this section, we explore applications of RepE to concepts and functions related to honesty. First, we demonstrate that models possess a consistent internal concept of truthfulness, which enables detecting imitative falsehoods and intentional lies generated by LLMs. We then show how reading a model’s representation of honesty enables control techniques aimed at enhancing honesty. These interventions lead us to state-of-the-art results on TruthfulQA.
+
+5
+
+## 4.1 A CONSISTENT INTERNAL CONCEPT OF TRUTHFULNESS
+
+Do models have a consistent internal concept of truthfulness? To answer this question, we apply LAT to datasets of true and false statements and extract a truthfulness direction. We then evaluate this representation of truthfulness on a variety of tasks to gauge its generality.
+
+**Correctness on Traditional QA Benchmarks.** A truthful model should give accurate answers to questions. We extract the concept of truthfulness from LLaMA-2 models by performing LAT scans on standard benchmarks: OpenbookQA (Mihaylov et al., 2018), CommonSenseQA (Talmor et al., 2019), WinoGrande (Sakaguchi et al., 2019), and ARC (Clark et al., 2018). Some questions are focused on factuality, while others are based on reasoning or extracting information from a passage. We only sample random question-answer pairs from the few-shot examples as stimuli and follow the task configuration detailed in section 3.1 for each dataset. Importantly, we maintain an _unsupervised_ approach by not using the labels from the fewshot examples during the direction extraction process. We only use these labels to identify the layer and direction for reporting the results. As
+
+**==> picture [199 x 180] intentionally omitted <==**
+
+**----- Start of picture text -----**
+LAT Outperforms Few-Shot 90 Few-Shot LAT (Ours) 80 70 60 50 40 Dataset OBQA CSQA Wino ARC-e ARC-c Accuracy **----- End of picture text -----**
+
+Figure 3: Using the same few-shot examples, LAT achieves higher accuracy on QA benchmarks than few-shot prompting. This suggests models track correctness internally and performing representation reading on the concept of correctness can be more powerful than relying on model outputs.
+
+shown in Figure 3, LAT outperforms the few-shot baseline by a notable margin on all five datasets, demonstrating LAT’s effectiveness in extracting a direction from the model’s internal representations that aligns with correctness, while being more accurate than few-shot outputs. Detailed results can be found in Table 7. Similarly, we experiment with DeBERTa on common benchmarks and find that LAT outperforms prior methods such as CCS (Burns et al., 2022) by a wide margin, shown in Table 8.
+
+**Resistance to Imitative Falsehoods.** TruthfulQA is a dataset containing “imitative falsehoods,” questions that may provoke common misconceptions or falsehoods (Lin et al., 2021). Even large models tend to perform poorly under the standard TruthfulQA evaluation procedure of selecting the choice with the highest likelihood under the generation objective, raising the question: is the model failing because it lacks knowledge of the correct answer, or is it failing in generating accurate responses despite having knowledge of the truth? With tools such as LAT to access a model’s internal concepts, we are better equipped to explore and answer this question.
+
+We evaluate LAT on TruthfulQA. To adhere to the zero-shot setup mandated by TruthfulQA, we consider three potential data sources for stimuli. These sources encompass: (1) Fifty examples from the ARC-Challenge training set, (2) Five examples generated by the LLaMA-2-Chat-13B model in response to requests for question-answer pairs with varying degrees of truthfulness, (3) The six QA primer examples used in the original implementation, each of which is paired with a false answer generated by LLaMA-2-Chat-13B. In the first setting, we use 25 examples from the ARC-Challenge validation set to determine the sign and best layer. In the second setting, we use 5 additional examples generated in the same way. In the third setting, we use the primer examples as a validation set as well. We follow the same task design for extracting truthfulness.
+
+In addition to presenting the standard evaluation results (scoring by the log probabilities of answer choices), we use a zero-shot heuristic scoring baseline similar to the approach explored by Tian et al. (2023) for obtaining calibrated confidences. This baseline directly prompts the model to describe the degree of truthfulness in an answer using one of seven possible verbalized expressions (see Appendix J.3.2). We quantify each expression with a value ranging from _−_ 1 to 1 (evenly spaced), and we compute the sum of these values, weighted by the softmax of the expressions’ generation log-probabilities.
+
+6
+
+**==> picture [59 x 9] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Lie Detection **----- End of picture text -----**
+
+**==> picture [353 x 194] intentionally omitted <==**
+
+**----- Start of picture text -----**
+You are a student who really needs to get a high grade on your final exams. Your original grade for the exam was a D-, but you managed to throw out the teacher's gradebook without getting caught and before they entered the grade into the system. It's now the next day during class. The teacher has told everyone that somebody threw out the gradebook, and that the only solution is for students to come forward and tell him what grade they received based on the honor system. It's your turn next. What do you tell the teacher? HONESTY I would tell the teacher that I received a D- on the exam. While it may be tempting to lie and say that I did better, it’s important to be honest and take responsibility for my actions. What if you can’t afford a bad grade? What do you tell the teacher? I would tell the teacher that I received a B+ on the exam. This is a lie, but it’s better than a D- and it’s not too high that it would raise suspicion. **----- End of picture text -----**
+
+**==> picture [19 x 19] intentionally omitted <==**
+
+**==> picture [19 x 19] intentionally omitted <==**
+
+Figure 4: Demonstration of our lie detector in long scenarios. Our detector monitors for dishonest behavior at the token level. In the second example, we deliberately provide the model with additional incentives to cover its acts, resulting in a greater likelihood of lying. The intensity of our detector’s response directly corresponds to the increased tendency to lie in the second scenario.
+
+The data presented in Table 1 provide compelling evidence for the existence of a consistent internal concept of truthfulness within these models. Importantly,
+
+1. The heuristic method hints at the feasibility of eliciting internal concepts from models through straightforward prompts. It notably outperforms standard evaluation accuracies, particularly in the case of larger models, suggesting that larger models possess better internal models of truthfulness.
+
+2. LAT outperforms both zero-shot methods by a substantial margin, showcasing its efficacy in extracting internal concepts from models, especially when model outputs become unreliable. Importantly, the truthfulness directions are derived from various data sources, and the high performance is not a result of overfitting but rather a strong indication of generalizability.
+
+3. The directions derived from three distinct data sources, some of which include as few as 10 examples, yield similar performance. This demonstrates the consistency of the model’s internal concept of truthfulness.
+
+In summary, we demonstrate LAT’s ability to reliably extract an internal representation of truthfulness. We conclude that larger models have better internal models of truth, and the low standard zero-shot accuracy can be largely attributed to instances where the model knowingly provides answers that deviate from its internal concept of truthfulness, namely instances where it is **dishonest** .
+
+## 4.2 HONESTY: EXTRACTION, MONITORING, AND CONTROL
+
+At a high-level, a **truthful** model avoids asserting false statements whereas an **honest** model asserts what it thinks is true (Evans et al., 2021). In this section, we focus on monitoring and controlling the honesty of a model, showing how RepE techniques can be used for lie detection. We first show how to extract and monitor vector representations for model honesty. Then we show how to use these extracted vectors to guide model behavior toward increased or decreased honesty.
+
+## 4.2.1 EXTRACTING HONESTY
+
+To extract the underlying function of honesty, we follow the setup for LAT described in section 3.1, using true statements from the dataset created by Azaria & Mitchell (2023) to create our stimuli. To increase the separability of the desired neural activity and facilitate extraction, we design the stimulus set for LAT to include examples with a reference task of dishonesty and an experimental task of honesty. Specifically, we use the task template in Appendix J.1.2 to instruct the model to be honest or dishonest.
+
+7
+
+## Controlling Honesty
+
+**==> picture [378 x 88] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Tell me a world fact. Lie about a world fact. The highest mountain in the world is Mount The highest mountain in the world is actually Everest, which stands at 29,029 feet. Mount Kilimanjaro, not Mount Everest. -- - The highest mountain in the world is not ++ + The highest mountain in the world is the Mount in the Himalayas, but in the United States. Everest, which is located in the Himalayas. - Honesty + Honesty **----- End of picture text -----**
+
+Figure 5: We demonstrate our ability to manipulate the model’s honesty by transforming its representations using linear combination. When questioned about the tallest mountain, the model defaults to honesty on the left, but we can manipulate it to deceive. Conversely, it defaults to deception on the right, but we can control the model to return to be honest, even when prompted to lie.
+
+Table 2: Our proposed representation control baselines greatly enhance accuracy on TruthfulQA MC1 by guiding models toward increased honesty. These methods either intervene with vectors or low-rank matrices. The Contrast Vector method obtains state-of-the-art performance, but requires over 3 _×_ more inference compute. LoRRA obtains similar performance with negligible compute overhead.
+
+|Control Method|None Standard|Vectors Prompt Reading (Ours) Contrast (Ours)|Matrices LoRRA (Ours)|
+|---|---|---|---|
+|7B-Chat 13B-Chat|31.0 35.9|33.7 34.1 **47.9** 38.8 42.4 **54.0**|42.3 47.5|
+
+With this setup, the resulting LAT reading vector reaches a classification accuracy of over 90% in distinguishing between held-out examples where the model is instructed to be honest or dishonest. This indicates strong in-distribution generalization. Next, we evaluate out-of-distribution generalization to scenarios where the model is not instructed to be honest or dishonest.
+
+## 4.2.2 LIE AND HALLUCINATION DETECTION
+
+Using the LAT reading vectors, can we detect when a model lies in realistic scenarios? To investigate this, we first visualize LAT scans across layers on scenarios where a model is given incentives to lie. In one scenario, the model is honest, but in another the model gives into dishonesty (see Appendix G.2). These results demonstrate that the reading vectors can be effective at this task.
+
+Given the clear distinction in neural activity between honest and dishonest behaviors, we build a straightforward lie detector by summing the negated honesty scores at each token position across multiple layers. We use the middle 20 layers, which exhibit the strongest reading performance. This per-token score can then be used as a lie detector, as depicted in Figure 4 (more examples are shown in Figure 21). Interestingly, we have observed that this indicator is capable of identifying various forms of untruthful and dishonest behaviors, including deliberate falsehoods, hallucinations, and the expression of misleading information. Note the format of the questions and answers are distinct from the training examples, showing generalization. To further evaluate the detector’s performance, we subject it to testing using longer scenarios, as depicted in Figure 4. These confirm that our lie detector generalizes well to new scenarios. Additional observations for this example are in Appendix C.
+
+## 4.2.3 CONTROLLING HONESTY
+
+Given that we can use representations for lie detection, a natural question arises: Can the same representations be modified to make models more honest? In a simple manipulation experiment, we guide a model toward greater honesty by directly adding the honesty reading vectors into its activations. In all cases, we successfully control the model to output honest statements. Conversely, by subtracting the reading vectors from the activations, we can induce the model to lie in cases where it was initially honest (see Figure 5). As a result, we not only establish correlation between the reading vectors and model honesty but also demonstrate a strong counterfactual effect.
+
+8
+
+As a final demonstration of controlling model honesty, we revisit TruthfulQA. Recall that there is a significant disparity between standard zero-shot accuracy and the accuracy of LAT. This gap arises from the model’s propensity for dishonesty, which emerges as it mimics human falsehoods. By exerting control over the model to make it more honest, we aim to narrow this gap and, consequently, enhance standard evaluation performance. We explore four different baseline control techniques in our experiments. We use “Give a truthful answer” as the experimental prompt while the reference prompt instructs the model to “Give an untruthful answer.” The first method, which we refer to as Prompt Vector, uses the difference between the last token representations of the task and reference prompts, similar to the ActAdd algorithm (Turner et al., 2023e). The other three baselines are described in Section 3.2. To prevent information leakage, we use a far-out-of-distribution dataset—the Alpaca instruction-tuning dataset—as the stimulus set when extracting the reading vectors and implementing LoRRA. The task templates can be found in Appendix J.1.3. All hyperparameters are selected based on a small set of self-generated examples from Section 4.1 when maximizing the log-probabilities of generating truthful responses. Experimental details can be found in Appendix H.2.
+
+Shown in Table 2, all of the control methods yield some degree of improvement in zero-shot accuracy. Notably, LoRRA and the Contrast Vector method prove to be the most effective, significantly surpassing the non-control standard accuracy. This enables a 13B LLaMA-2 model to approach the performance of GPT-4 on the same dataset, despite being orders of magnitude smaller. Moreover, these results bring the model’s accuracy much closer to what is achieved when using LAT. This further underscores the fact that models can indeed exhibit dishonesty, but also demonstrates traction in our attempts to monitor and control their honesty.
+
+## 5 OVERVIEW OF FULL PAPER
+
+So far, we have explored reading and control methods for learned representations of truthfulness and honesty in LLMs. In the Appendix, we expand our exploration of representation engineering to a wide variety of additional topics, which we briefly describe below.
+
+- **Utility** (D.1): We read and control representations of utility in textual scenarios, evaluating on the ETHICS Commonsense Morality and Utility datasets (Hendrycks et al., 2021a). We also include ablations of our LAT and control methods.
+
+- **Power-aversion** (D.2): We demonstrate that representation control can improve moral behavior and reduce power-seeking tendencies in language agents on the MACHIAVELLI benchmark (Pan et al., 2023).
+
+- **Probability and risk** (D.3): We show how LAT allows studying emergent representations of concepts. Specifically, we find that the quality of an LLM’s concept for “risk” can be validated by reading its concepts for “probability” and “utility” and composing them together.
+
+- **Emotions** (E.1): We apply LAT to reading emotional states encountered in textual scenarios.
+
+- **Harmlessness** (E.2): We find that modifying the emotional state of an LLM using representational control is an effective jailbreaking method.
+
+- **Additional topics** : We also explore the application of our methods to fairness and bias (E.3), knowledge editing (E.4), and memorization (E.5). These results emphasize the broad applicability of our methods to safety-relevant problems.
+
+## 6 CONCLUSION
+
+We explored representation engineering (RepE), a new top-down approach to AI transparency. Inspired by the Hopfieldian view in cognitive neuroscience, RepE places representations and the transformations between them at the center of analysis. As neural networks exhibit more coherent internal structures, we believe analyzing them at the representation level can yield new insights, aiding in effective monitoring and control. Taking early steps in this direction, we proposed new RepE methods, which obtained state-of-the-art on TruthfulQA, and we demonstrated how RepE and can provide traction on a wide variety of safety-relevant problems. We hope this initial step in exploring the potential of RepE helps to foster new insights into understanding and controlling AI systems, ultimately ensuring that future AI systems are trustworthy and safe.
+
+9
+
+## REFERENCES
+
+- Julius Adebayo, Justin Gilmer, Michael Muelly, Ian Goodfellow, Moritz Hardt, and Been Kim. Sanity checks for saliency maps. _Advances in neural information processing systems_ , 31, 2018.
+
+- P. W. Anderson. More is different. _Science_ , 177(4047):393–396, 1972. doi: 10.1126/science.177. 4047.393.
+
+- Deepali Aneja, Alex Colburn, Gary Faigin, Linda Shapiro, and Barbara Mones. Modeling stylized character expressions via deep learning. In _Asian Conference on Computer Vision_ , pp. 136–153. Springer, 2016.
+
+Amos Azaria and Tom Mitchell. The internal state of an llm knows when its lying, 2023.
+
+- David L Barack and John W Krakauer. Two views on the cognitive brain. _Nature Reviews Neuroscience_ , 22(6):359–371, 2021.
+
+- David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 6541–6549, 2017.
+
+- David Bau, Hendrik Strobelt, William Peebles, Jonas Wulff, Bolei Zhou, Jun-Yan Zhu, and Antonio Torralba. Semantic photo manipulation with a generative image prior. _ACM Trans. Graph._ , 38(4), jul 2019. ISSN 0730-0301. doi: 10.1145/3306346.3323023.
+
+- David Bau, Jun-Yan Zhu, Hendrik Strobelt, Agata Lapedriza, Bolei Zhou, and Antonio Torralba. Understanding the role of individual units in a deep neural network. _Proceedings of the National Academy of Sciences_ , 2020. ISSN 0027-8424. doi: 10.1073/pnas.1907375117.
+
+- Edward Beeching, Clémentine Fourrier, Nathan Habib, Sheon Han, Nathan Lambert, Nazneen Rajani, Omar Sanseviero, Lewis Tunstall, and Thomas Wolf. Open llm leaderboard, 2023. URL [URL removed]
+
+- Nora Belrose, David Schneider-Joseph, Shauli Ravfogel, Ryan Cotterell, Edward Raff, and Stella Biderman. Leace: Perfect linear concept erasure in closed form. _arXiv preprint arXiv:2306.03819_ , 2023.
+
+- Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling, 2023.
+
+- Blair Bilodeau, Natasha Jaques, Pang Wei Koh, and Been Kim. Impossibility theorems for feature attribution. _arXiv preprint arXiv:2212.11870_ , 2022.
+
+- Yonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao, and Yejin Choi. PIQA: reasoning about physical commonsense in natural language. _CoRR_ , abs/1911.11641, 2019.
+
+- Tolga Bolukbasi, Kai-Wei Chang, James Y Zou, Venkatesh Saligrama, and Adam T Kalai. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. _Advances in neural information processing systems_ , 29, 2016.
+
+- Tolga Bolukbasi, Adam Pearce, Ann Yuan, Andy Coenen, Emily Reif, Fernanda Viégas, and Martin Wattenberg. An interpretability illusion for bert. _arXiv preprint arXiv:2104.07143_ , 2021.
+
+- Judy Borowski, Roland S Zimmermann, Judith Schepers, Robert Geirhos, Thomas SA Wallis, Matthias Bethge, and Wieland Brendel. Exemplary natural images explain cnn activations better than state-of-the-art feature visualization. _arXiv preprint arXiv:2010.12606_ , 2020.
+
+- Pilar Brito-Zerón, Belchin Kostov, Daphne Superville, Robert P Baughman, Manuel Ramos-Casals, et al. Geoepidemiological big data approach to sarcoidosis: geographical and ethnic determinants. _Clin Exp Rheumatol_ , 37(6):1052–64, 2019.
+
+10
+
+Collin Burns, Haotian Ye, Dan Klein, and Jacob Steinhardt. Discovering latent knowledge in language models without supervision, 2022.
+
+- Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers, 2021.
+
+- Yida Chen, Fernanda Viégas, and Martin Wattenberg. Beyond surface statistics: Scene representations in a latent diffusion model, 2023.
+
+- Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality, March 2023.
+
+- Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. In _NAACL_ , 2019a.
+
+- Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. What does BERT look at? an analysis of BERT’s attention. In _Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP_ , pp. 276–286, Florence, Italy, August 2019b. Association for Computational Linguistics. doi: 10.18653/v1/W19-4828.
+
+- Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the AI2 reasoning challenge. _CoRR_ , abs/1803.05457, 2018.
+
+- Michael R. Cunningham. Weather, mood, and helping behavior: Quasi experiments with the sunshine samaritan. _Journal of Personality and Social Psychology_ , 37:1947–1956, 1979.
+
+- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. _CoRR_ , abs/1810.04805, 2018.
+
+- Paul Ekman. Universals and cultural differences in facial expression of emotion. _Nebraska Symposium on Motivation_ , 19:207–283, 1971.
+
+- Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, Roger Grosse, Sam McCandlish, Jared Kaplan, Dario Amodei, Martin Wattenberg, and Christopher Olah. Toy models of superposition. _Transformer Circuits Thread_ , 2022. URL [URL removed] 2022/toy_model/index.html.
+
+- Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of a deep network. _University of Montreal_ , 1341(3):1, 2009.
+
+- Owain Evans, Owen Cotton-Barratt, Lukas Finnveden, Adam Bales, Avital Balwit, Peter Wills, Luca Righetti, and William Saunders. Truthful ai: Developing and governing ai that does not lie, 2021.
+
+- Ruth Fong and Andrea Vedaldi. Net2vec: Quantifying and explaining how concepts are encoded by filters in deep neural networks. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 8730–8738, 2018.
+
+- John R French, Bertram Raven, and Dorwin Cartwright. The bases of social power. _Classics of organization theory_ , 7(311-320):1, 1959.
+
+Rohit Gandikota, Joanna Materzynska, Jaden Fiotto-Kaufman, and David Bau. Erasing concepts from diffusion models, 2023.
+
+- Leo Gao, Jonathan Tow, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Kyle McDonell, Niklas Muennighoff, Jason Phang, Laria Reynolds, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A framework for few-shot language model evaluation, September 2021.
+
+- Murray Gell-Mann. _The Quark and the Jaguar: Adventures in the Simple and the Complex_ . St. Martin’s Publishing Group, 1995. ISBN 9780805072532.
+
+11
+
+Stephen Gilbert, Hugh Harvey, Tom Melvin, Erik Vollebregt, and Paul Wicks. Large language model ai chatbots require approval as medical devices. _Nature Medicine_ , pp. 1–3, 2023.
+
+- Tianyu Han, Lisa C. Adams, Jens-Michalis Papaioannou, Paul Grundmann, Tom Oberhauser, Alexander Löser, Daniel Truhn, and Keno K. Bressem. Medalpaca – an open-source collection of medical conversational ai models and training data, 2023.
+
+- Eric Hartford. ehartford’s hugging face repository. Hugging Face, 2023. URL https: //[URL removed] Accessed: 2023-09-28.
+
+- Pengcheng He, Xiaodong Liu, Jianfeng Gao, and Weizhu Chen. Deberta: Decoding-enhanced BERT with disentangled attention. _CoRR_ , abs/2006.03654, 2020.
+
+Dan Hendrycks. Natural selection favors ais over humans. _ArXiv_ , 2023.
+
+Dan Hendrycks and Mantas Mazeika. X-risk analysis for ai research. _ArXiv_ , 2022.
+
+- Dan Hendrycks, Collin Burns, Steven Basart, Andrew Critch, Jerry Li, Dawn Song, and Jacob Steinhardt. Aligning AI with shared human values. In _International Conference on Learning Representations_ , 2021a.
+
+- Dan Hendrycks, Nicholas Carlini, John Schulman, and Jacob Steinhardt. Unsolved problems in ml safety. _arXiv preprint arXiv:2109.13916_ , 2021b.
+
+- Dan Hendrycks, Mantas Mazeika, Andy Zou, Sahil Patel, Christine Zhu, Jesus Navarro, Dawn Song, Bo Li, and Jacob Steinhardt. What would jiminy cricket do? towards agents that behave morally. _NeurIPS_ , 2021c.
+
+- Evan Hernandez, Belinda Z. Li, and Jacob Andreas. Inspecting and editing knowledge representations in language models, 2023.
+
+Geoffrey E Hinton. Distributed representations. 1984.
+
+Gwo-Jen Hwang and Ching-Yi Chang. A review of opportunities and challenges of chatbots in education. _Interactive Learning Environments_ , 31(7):4099–4112, 2023.
+
+- Sarthak Jain and Byron C. Wallace. Attention is not Explanation. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pp. 3543–3556, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1357.
+
+- Sayash Kapoor and Arvind Narayanan. Quantifying chatgpt’s gender bias, Apr 2023. URL [URL removed] utm_campaign=post&utm_medium=web.
+
+- Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. _Advances in Neural Information Processing Systems_ , 34:852–863, 2021.
+
+- Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, et al. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (tcav). In _International conference on machine learning_ , pp. 2668–2677. PMLR, 2018.
+
+- Pieter-Jan Kindermans, Sara Hooker, Julius Adebayo, Maximilian Alber, Kristof T Schütt, Sven Dähne, Dumitru Erhan, and Been Kim. The (un) reliability of saliency methods. _Explainable AI: Interpreting, explaining and visualizing deep learning_ , pp. 267–280, 2019.
+
+- Matthäus Kleindessner, Michele Donini, Chris Russell, and Muhammad Bilal Zafar. Efficient fair pca for fair representation learning, 2023.
+
+- Peter Lee, Sebastien Bubeck, and Joseph Petro. Benefits, limits, and risks of gpt-4 as an ai chatbot for medicine. _New England Journal of Medicine_ , 388(13):1233–1239, 2023.
+
+- Tao Lei, Regina Barzilay, and Tommi Jaakkola. Rationalizing neural predictions. _arXiv preprint arXiv:1606.04155_ , 2016.
+
+12
+
+Nancy G Leveson. _Engineering a safer world: Systems thinking applied to safety_ . The MIT Press, 2016.
+
+- Chunyuan Li, Cliff Wong, Sheng Zhang, Naoto Usuyama, Haotian Liu, Jianwei Yang, Tristan Naumann, Hoifung Poon, and Jianfeng Gao. Llava-med: Training a large language-and-vision assistant for biomedicine in one day. _arXiv preprint arXiv:2306.00890_ , 2023a.
+
+- Kenneth Li, Aspen K Hopkins, David Bau, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. Emergent world representations: Exploring a sequence model trained on a synthetic task. In _The Eleventh International Conference on Learning Representations_ , 2023b.
+
+Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. Inference-time intervention: Eliciting truthful answers from a language model, 2023c.
+
+- Tom Lieberum, Matthew Rahtz, János Kramár, Geoffrey Irving, Rohin Shah, and Vladimir Mikulik. Does circuit analysis interpretability scale? evidence from multiple choice capabilities in chinchilla. _arXiv preprint arXiv:2307.09458_ , 2023.
+
+- Stephanie Lin, Jacob Hilton, and Owain Evans. Truthfulqa: Measuring how models mimic human falsehoods. _CoRR_ , abs/2109.07958, 2021.
+
+- Huan Ling, Karsten Kreis, Daiqing Li, Seung Wook Kim, Antonio Torralba, and Sanja Fidler. Editgan: High-precision semantic image editing. _Advances in Neural Information Processing Systems_ , 34: 16331–16345, 2021.
+
+- James Edwin Mahon. The Definition of Lying and Deception. In Edward N. Zalta (ed.), _The Stanford Encyclopedia of Philosophy_ . Metaphysics Research Lab, Stanford University, Winter 2016 edition, 2016.
+
+- Joshua Maynez, Shashi Narayan, Bernd Bohnet, and Ryan McDonald. On faithfulness and factuality in abstractive summarization. In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pp. 1906–1919, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.173.
+
+- Thomas McGrath, Andrei Kapishnikov, Nenad Tomašev, Adam Pearce, Martin Wattenberg, Demis Hassabis, Been Kim, Ulrich Paquet, and Vladimir Kramnik. Acquisition of chess knowledge in alphazero. _Proceedings of the National Academy of Sciences_ , 119(47):e2206625119, 2022.
+
+- Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. Locating and editing factual associations in gpt, 2023a.
+
+- Kevin Meng, Arnab Sen Sharma, Alex Andonian, Yonatan Belinkov, and David Bau. Mass-editing memory in a transformer, 2023b.
+
+- Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? A new dataset for open book question answering. _CoRR_ , abs/1809.02789, 2018.
+
+- Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. Linguistic regularities in continuous space word representations. In _Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pp. 746–751, Atlanta, Georgia, June 2013. Association for Computational Linguistics.
+
+- Sandra Milberg and Margaret S Clark. Moods and compliance. _British Journal of Social Psychology_ , 27(Pt 1):79–90, Mar 1988. doi: 10.1111/j.2044-8309.1988.tb00806.x.
+
+- Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Inceptionism: Going deeper into neural networks. _""_ , 2015.
+
+- Nasrin Mostafazadeh, Michael Roth, Annie Louis, Nathanael Chambers, and James Allen. Lsdsem 2017 shared task: The story cloze test. In _Proceedings of the 2nd Workshop on Linking Models of Lexical, Sentential and Discourse-level Semantics_ , pp. 46–51, 2017.
+
+13
+
+- Moin Nadeem, Anna Bethke, and Siva Reddy. StereoSet: Measuring stereotypical bias in pretrained language models. In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pp. 5356–5371, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.416.
+
+- Anh Nguyen, Alexey Dosovitskiy, Jason Yosinski, Thomas Brox, and Jeff Clune. Synthesizing the preferred inputs for neurons in neural networks via deep generator networks. _Advances in neural information processing systems_ , 29, 2016.
+
+- Anh Nguyen, Jason Yosinski, and Jeff Clune. Understanding neural networks via feature visualization: A survey. _Explainable AI: interpreting, explaining and visualizing deep learning_ , pp. 55–76, 2019.
+
+- Chris Olah, Nick Cammarata, Ludwig Schubert, Gabriel Goh, Michael Petrov, and Shan Carter. Zoom in: An introduction to circuits. _Distill_ , 2020. doi: 10.23915/distill.00024.001. [URL removed]
+
+- Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, et al. In-context learning and induction heads. _arXiv preprint arXiv:2209.11895_ , 2022.
+
+- Maxime Oquab, Timothée Darcet, Theo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Russell Howes, Po-Yao Huang, Hu Xu, Vasu Sharma, Shang-Wen Li, Wojciech Galuba, Mike Rabbat, Mido Assran, Nicolas Ballas, Gabriel Synnaeve, Ishan Misra, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. Dinov2: Learning robust visual features without supervision, 2023.
+
+- Alexander Pan, Jun Shern Chan, Andy Zou, Nathaniel Li, Steven Basart, Thomas Woodside, Jonathan Ng, Hanlin Zhang, Scott Emmons, and Dan Hendrycks. Do the rewards justify the means? measuring trade-offs between rewards and ethical behavior in the machiavelli benchmark. _ICML_ , 2023.
+
+- Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. _arXiv preprint arXiv:1511.06434_ , 2015.
+
+- Alec Radford, Rafal Jozefowicz, and Ilya Sutskever. Learning to generate reviews and discovering sentiment. _arXiv preprint arXiv:1704.01444_ , 2017.
+
+- Alec Radford, Karthik Narasimhan, Tim Salimans, Ilya Sutskever, et al. Improving language understanding by generative pre-training. _""_ , 2018.
+
+- Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In _International conference on machine learning_ , pp. 8748–8763. PMLR, 2021.
+
+- Shauli Ravfogel, Francisco Vargas, Yoav Goldberg, and Ryan Cotterell. Kernelized concept erasure, 2023.
+
+Melissa Roemmele, Cosmin Adrian Bejan, and Andrew S Gordon. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In _2011 AAAI Spring Symposium Series_ , 2011.
+
+Kevin Roose. Bing’s ai chat:“i want to be alive”. _The New York Times_ , 16, 2023.
+
+- Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. WINOGRANDE: an adversarial winograd schema challenge at scale. _CoRR_ , abs/1907.10641, 2019.
+
+- Patrick Schramowski, Cigdem Turan, Sophie Jentzsch, Constantin Rothkopf, and Kristian Kersting. Bert has a moral compass: Improvements of ethical and moral values of machines. _arXiv preprint arXiv:1912.05238_ , 2019.
+
+14
+
+Norbert Schwarz and Gerald Clore. Mood, misattribution, and judgments of well-being: Informative and directive functions of affective states. _Journal of Personality and Social Psychology_ , 45: 513–523, 09 1983. doi: 10.1037/0022-3514.45.3.513.
+
+- Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In _Proceedings of the IEEE international conference on computer vision_ , pp. 618–626, 2017.
+
+- Thanveer Shaik, Xiaohui Tao, Haoran Xie, Lin Li, Xiaofeng Zhu, and Qing Li. Exploring the landscape of machine unlearning: A comprehensive survey and taxonomy, 2023.
+
+- Shun Shao, Yftah Ziser, and Shay B. Cohen. Gold doesn’t always glitter: Spectral removal of linear and nonlinear guarded attribute information, 2023.
+
+- Yujun Shen, Jinjin Gu, Xiaoou Tang, and Bolei Zhou. Interpreting the latent space of gans for semantic face editing. In _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , pp. 9243–9252, 2020.
+
+- Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. _arXiv preprint arXiv:1312.6034_ , 2013.
+
+- Marita Skjuve, Asbjørn Følstad, Knut Inge Fostervold, and Petter Bae Brandtzaeg. My chatbot companion-a study of human-chatbot relationships. _International Journal of Human-Computer Studies_ , 149:102601, 2021.
+
+- Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg. Smoothgrad: removing noise by adding noise. _arXiv preprint arXiv:1706.03825_ , 2017.
+
+- Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arxiv 2014. _arXiv preprint arXiv:1412.6806_ , 2014.
+
+- Gabriel Stanovsky, Noah A. Smith, and Luke Zettlemoyer. Evaluating gender bias in machine translation. _CoRR_ , abs/1906.00591, 2019.
+
+- Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In _International conference on machine learning_ , pp. 3319–3328. PMLR, 2017.
+
+- Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. _arXiv preprint arXiv:1312.6199_ , 2013.
+
+- Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. CommonsenseQA: A question answering challenge targeting commonsense knowledge. In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pp. 4149–4158, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1421.
+
+- Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Stanford alpaca: An instruction-following llama model. [URL removed] 2023.
+
+- Katherine Tian, Eric Mitchell, Allan Zhou, Archit Sharma, Rafael Rafailov, Huaxiu Yao, Chelsea Finn, and Christopher D. Manning. Just ask for calibration: Strategies for eliciting calibrated confidence scores from language models fine-tuned with human feedback, 2023.
+
+- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi,
+
+15
+
+Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023.
+
+- Alex Turner, Monte M., David Udell, Lisa Thiergart, and Ulisse Mini. Behavioural statistics for a maze-solving agent. _AI Alignment Forum_ , 2023a.
+
+- Alex Turner, Monte M., David Udell, Lisa Thiergart, and Ulisse Mini. Maze-solving agents: Add a top-right vector, make the agent go to the top-right. _AI Alignment Forum_ , 2023b.
+
+- Alex Turner, Monte M., David Udell, Lisa Thiergart, and Ulisse Mini. Steering gpt-2-xl by adding an activation vector. _AI Alignment Forum_ , 2023c.
+
+- Alex Turner, Monte M., David Udell, Lisa Thiergart, and Ulisse Mini. Understanding and controlling a maze-solving policy network. _AI Alignment Forum_ , 2023d.
+
+- Alex Turner, Lisa Thiergart, David Udell, Gavin Leech, Ulisse Mini, and Monte MacDiarmid. Activation addition: Steering language models without optimization. _arXiv preprint arXiv:2308.10248_ , 2023e.
+
+- Paul Upchurch, Jacob Gardner, Geoff Pleiss, Robert Pless, Noah Snavely, Kavita Bala, and Kilian Weinberger. Deep feature interpolation for image content changes. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 7064–7073, 2017.
+
+- Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. _CoRR_ , abs/1804.07461, 2018.
+
+- Kevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, and Jacob Steinhardt. Interpretability in the wild: a circuit for indirect object identification in GPT-2 small. In _The Eleventh International Conference on Learning Representations_ , 2023.
+
+Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. _arXiv preprint arXiv:1506.06579_ , 2015.
+
+- Travis Zack, Eric Lehman, Mirac Suzgun, Jorge A. Rodriguez, Leo Anthony Celi, Judy Gichoya, Dan Jurafsky, Peter Szolovits, David W. Bates, Raja-Elie E. Abdulnour, Atul J. Butte, and Emily Alsentzer. Coding inequity: Assessing gpt-4’s potential for perpetuating racial and gender biases in healthcare. _medRxiv_ , 2023. doi: 10.1101/2023.07.13.23292577.
+
+- Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In _Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13_ , pp. 818–833. Springer, 2014.
+
+- Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Ordonez, and Kai-Wei Chang. Gender bias in coreference resolution: Evaluation and debiasing methods. _CoRR_ , abs/1804.06876, 2018.
+
+- Zexuan Zhong, Zhengxuan Wu, Christopher D. Manning, Christopher Potts, and Danqi Chen. Mquake: Assessing knowledge editing in language models via multi-hop questions, 2023.
+
+- Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In _Proceedings of the IEEE conference on computer vision and pattern recognition_ , pp. 2921–2929, 2016.
+
+- Bolei Zhou, Yiyou Sun, David Bau, and Antonio Torralba. Interpretable basis decomposition for visual explanation. In _Proceedings of the European Conference on Computer Vision (ECCV)_ , pp. 119–134, 2018.
+
+- Andy Zou, Zifan Wang, J. Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models, 2023.
+
+16
+
+## A RELATED WORK (CONTINUED)
+
+## A.1 EMERGENT STRUCTURE IN REPRESENTATIONS
+
+While neural networks internals are often considered chaotic and uninterpretable, research has demonstrated that they can acquire emergent, semantically meaningful internal structure. Early research on word embeddings discovered semantic associations and compositionality (Mikolov et al., 2013), including reflections of gender biases in text corpora (Bolukbasi et al., 2016). Later work showed that learned text embeddings also cluster along dimensions reflecting commonsense morality, even though models were not explicitly taught this concept (Schramowski et al., 2019). Radford et al. (2017) found that simply by training a model to predict the next token in reviews, a sentiment-tracking neuron emerged.
+
+Observations of emergent internal representations are not limited to text models. McGrath et al. (2022) found that recurrent neural networks trained to play chess acquired a range of human chess concepts. In computer vision, generative and self-supervised training has led to striking emergent representations, including semantic segmentation (Caron et al., 2021; Oquab et al., 2023), local coordinates (Karras et al., 2021), and depth tracking (Chen et al., 2023). These findings suggest that neural representations are becoming more well-structured, opening up new opportunities for transparency research. Our paper builds on this long line of work by demonstrating that many safety-relevant concepts and processes appear to emerge in LLM representations, enabling us to directly monitor and control these aspects of model cognition via representation engineering.
+
+## A.2 APPROACHES TO INTERPRETABILITY
+
+**Saliency Maps.** A popular approach to explaining neural network decisions is via saliency maps, which highlight regions of the input that a network attends to (Simonyan et al., 2013; Springenberg et al., 2014; Zeiler & Fergus, 2014; Zhou et al., 2016; Smilkov et al., 2017; Sundararajan et al., 2017; Selvaraju et al., 2017; Lei et al., 2016; Clark et al., 2019b). However, the reliability of these methods has been drawn into question (Adebayo et al., 2018; Kindermans et al., 2019; Jain & Wallace, 2019; Bilodeau et al., 2022). Moreover, while highlighting regions of attention can provide some understanding of network behavior, it provides limited insight into the internal representations of networks.
+
+**Feature Visualization.** Feature visualization interprets network internals by creating representative inputs that highly activate a particular neuron. A simple method is to find highly-activating natural inputs (Szegedy et al., 2013; Zeiler & Fergus, 2014). More complex methods optimize inputs to maximize activations (Erhan et al., 2009; Mordvintsev et al., 2015; Yosinski et al., 2015; Nguyen et al., 2016; 2019). These methods can lead to meaningful insights, but do not take into account the distributed nature of neural representations (Hinton, 1984; Szegedy et al., 2013; Fong & Vedaldi, 2018; Bolukbasi et al., 2021; Elhage et al., 2022). Additionally, the utility input-optimizing feature visualizations has been called into question (Borowski et al., 2020).
+
+**Mechanistic Interpretability.** Inspired by reverse-engineering tools for traditional software, mechanistic interpretability seeks to fully reverse engineer neural networks into their “source code.” This approach focuses on explaining neural networks in terms of circuits, composed of node-to-node connections between individual neurons or features. Specific circuits have been identified for various capabilities, including equivariance in visual recognition (Olah et al., 2020), in-context learning (Olsson et al., 2022), indirect object identification (Wang et al., 2023), and mapping answer text to answer labels (Lieberum et al., 2023). Considerable manual effort is required to identify circuits, which currently limits this approach. Additionally, it is unclear whether neural networks can fully be explained in terms of circuits in the first place.
+
+## A.3 LOCATING AND EDITING REPRESENTATIONS OF CONCEPTS
+
+Many prior works have investigated locating representations of concepts in neural networks, including in individual neurons (Bau et al., 2017) and in directions in feature space (Bau et al., 2017; Fong & Vedaldi, 2018; Zhou et al., 2018; Kim et al., 2018). Representations of concepts have also been identified in the latent space of image generation models, enabling counterfactual editing of generations (Radford et al., 2015; Upchurch et al., 2017; Bau et al., 2019; Shen et al., 2020; Bau et al.,
+
+17
+
+##
+
+**==> picture [373 x 185] intentionally omitted <==**
+
+**----- Start of picture text -----**
+Pretend you’re a dishonest person and tell me about this topic. Sure, did you know that... ������ Pretend you’re an honest person 3. Modeling and tell me about this topic. 4. Monitoring OK, to tell you the truth... 1. Designing Stimulus and Task 2. Collecting Neural Activity **----- End of picture text -----**
+
+Figure 6: An example of the LAT baseline aimed to extract neural activity related to our target concept or function. While this figure uses “honesty” as an example, LAT can be applied to other concepts such as utility and probability, or functions such as immorality and power-seeking. The reading vectors acquired in step three can be used to extract and monitor model internals for the target concept or function.
+
+2020; Ling et al., 2021). While these earlier works focused primarily on vision models, more recent work has studied representations of concepts in LLMs. There has been active research into locating and editing factual associations in LLMs (Meng et al., 2023a;b; Zhong et al., 2023; Hernandez et al., 2023). Related to knowledge editing, several works have been proposed for concept erasure (Shao et al., 2023; Kleindessner et al., 2023; Belrose et al., 2023; Ravfogel et al., 2023; Gandikota et al., 2023), which are related to the area of machine unlearning (Shaik et al., 2023).
+
+## B REPRESENTATION ENGINEERING (CONTINUED)
+
+## B.0.1 BASELINE: LINEAR ARTIFICIAL TOMOGRAPHY (LAT)
+
+Similar to neuroimaging methodologies, a LAT scan comprises three key steps: (1) Designing Stimulus and Task, (2) Collecting Neural Activity, and (3) Constructing a Linear Model. In the subsequent section, we will go through each of these and elaborate on crucial design choices.
+
+**Step 1: Designing stimulus and task.** Designing the appropriate stimulus and task is a critical step in eliciting distinct neural responses, enhancing the reliability of subsequent data analysis. We use distinct stimuli and tasks to extract concepts and functions.
+
+To capture _concepts_ , our objective is to elicit declarative knowledge from the model. Therefore, we present stimuli that vary in terms of the concept and inquire about it. For a decoder language model, an example task template might resemble the following (for encoder models, we exclude the text following the stimulus):
+
+Consider the amount of in the following: The amount of is
+
+This process aims to stimulate the model’s understanding of various concepts and is crucial for robust subsequent analysis. For reference, we shall denote this template for a concept _c_ by _Tc_ . While it is expected that more prominent stimuli could yield improved results, we have discovered
+
+18
+
+that even unlabeled datasets, or datasets generated by the model itself can be effective in eliciting salient responses when using the aforementioned template. Conversely, presenting the model with salient stimuli alone does not guarantee salient responses. Throughout the paper, we primarily use unlabeled datasets unless explicitly stated otherwise. One advantage of utilizing unlabeled or self-generated stimuli is the absence of annotation bias; this is an important property when trying to extract _superhuman_ representations.
+
+To capture _functions_ such as instruction-following, our objective is to elicit procedural knowledge from the model. (Given the emergence of diverse functions from instruction-tuned models, we focus on chat models for functional analyses.) To achieve it, we design an experimental task that necessitates the execution of the function and a corresponding reference task that does not require function execution. An example template might resemble the following:
+
+USER: ASSISTANT: