jxtse commited on
Commit
ea82d73
·
verified ·
1 Parent(s): 8ca0128

RI-Bench v1.0.0: 1,636 cases (Open Review, Parliament, Court) (part 2)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. court/scotus_zivotofsky_v_kerry_2014_13_628.json +1413 -0
  2. croissant.json +312 -0
  3. data/court.parquet +3 -0
  4. data/open_review.parquet +3 -0
  5. data/parliament.parquet +3 -0
  6. open_review/iclr2024_8529.json +100 -0
  7. open_review/iclr2024_8529.md +369 -0
  8. open_review/iclr2024_8530.json +83 -0
  9. open_review/iclr2024_8530.md +388 -0
  10. open_review/iclr2024_8531.json +100 -0
  11. open_review/iclr2024_8531.md +404 -0
  12. open_review/iclr2024_8533.json +100 -0
  13. open_review/iclr2024_8533.md +361 -0
  14. open_review/iclr2024_8534.json +83 -0
  15. open_review/iclr2024_8534.md +325 -0
  16. open_review/iclr2024_8538.json +100 -0
  17. open_review/iclr2024_8538.md +588 -0
  18. open_review/iclr2024_8539.json +83 -0
  19. open_review/iclr2024_8539.md +713 -0
  20. open_review/iclr2024_8541.json +121 -0
  21. open_review/iclr2024_8541.md +0 -0
  22. open_review/iclr2024_8542.json +100 -0
  23. open_review/iclr2024_8542.md +0 -0
  24. open_review/iclr2024_8543.json +83 -0
  25. open_review/iclr2024_8543.md +687 -0
  26. open_review/iclr2024_8544.json +100 -0
  27. open_review/iclr2024_8544.md +0 -0
  28. open_review/iclr2024_8547.json +100 -0
  29. open_review/iclr2024_8547.md +315 -0
  30. open_review/iclr2024_8548.json +100 -0
  31. open_review/iclr2024_8548.md +748 -0
  32. open_review/iclr2024_8556.json +83 -0
  33. open_review/iclr2024_8556.md +722 -0
  34. open_review/iclr2024_8558.json +100 -0
  35. open_review/iclr2024_8558.md +462 -0
  36. open_review/iclr2024_8560.json +83 -0
  37. open_review/iclr2024_8560.md +917 -0
  38. open_review/iclr2024_8562.json +83 -0
  39. open_review/iclr2024_8562.md +665 -0
  40. open_review/iclr2024_8564.json +100 -0
  41. open_review/iclr2024_8564.md +533 -0
  42. open_review/iclr2024_8566.json +104 -0
  43. open_review/iclr2024_8566.md +538 -0
  44. open_review/iclr2024_8568.json +100 -0
  45. open_review/iclr2024_8568.md +463 -0
  46. open_review/iclr2024_8569.json +100 -0
  47. open_review/iclr2024_8569.md +0 -0
  48. open_review/iclr2024_8571.json +100 -0
  49. open_review/iclr2024_8571.md +683 -0
  50. open_review/iclr2024_8572.json +100 -0
court/scotus_zivotofsky_v_kerry_2014_13_628.json ADDED
@@ -0,0 +1,1413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "case_id": "scotus_zivotofsky_v_kerry_2014_13_628",
3
+ "case_name": "Zivotofsky v. Kerry",
4
+ "docket": "13-628",
5
+ "term": "2014",
6
+ "oyez_url": "https://www.oyez.org/cases/2014/13-628",
7
+ "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?",
8
+ "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.",
9
+ "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?",
10
+ "full_conclusion": "The federal statute unconstitutionally usurps the President’s power to recognize foreign nations as it relates to passports.",
11
+ "evidence_pro": [
12
+ "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--",
13
+ "--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.",
14
+ "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--",
15
+ "--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.",
16
+ "--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.",
17
+ "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--"
18
+ ],
19
+ "evidence_def": [
20
+ "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--",
21
+ "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.",
22
+ "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.",
23
+ "--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. \"",
24
+ "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--",
25
+ "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."
26
+ ],
27
+ "disposition": "respondent",
28
+ "ground_truth_verdict": "respondent",
29
+ "ground_truth_rationale": "SCOTUS decision: majority opinion. Winning party (Oyez): Kerry. Vote: 6-3.",
30
+ "vote_breakdown": "6-3",
31
+ "majority_vote": 6,
32
+ "minority_vote": 3,
33
+ "decision_type": "majority opinion",
34
+ "has_dissent": true,
35
+ "vote_lineup": {
36
+ "Kennedy": "majority",
37
+ "Ginsburg": "majority",
38
+ "Breyer": "majority",
39
+ "Sotomayor": "majority",
40
+ "Kagan": "majority",
41
+ "Thomas": "majority",
42
+ "Roberts": "minority",
43
+ "Alito": "minority",
44
+ "Scalia": "minority"
45
+ },
46
+ "majority_author": "Kennedy",
47
+ "dissent_authors": [
48
+ "Scalia"
49
+ ],
50
+ "majority_opinion_excerpt": "",
51
+ "dissent_opinion_excerpt": "",
52
+ "petitioner_arg_summary": [],
53
+ "respondent_arg_summary": [],
54
+ "oral_argument_transcript": [
55
+ {
56
+ "speaker": "Roberts",
57
+ "role": "justice",
58
+ "side": "court",
59
+ "text": "We'll hear argument first in Case 13628, Zivotofsky versus Kerry-- Ms. Lewin."
60
+ },
61
+ {
62
+ "speaker": "Alyza D. Lewin",
63
+ "role": "petitioner_counsel",
64
+ "side": "petitioner",
65
+ "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--"
66
+ },
67
+ {
68
+ "speaker": "Kennedy",
69
+ "role": "justice",
70
+ "side": "court",
71
+ "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?"
72
+ },
73
+ {
74
+ "speaker": "Alyza D. Lewin",
75
+ "role": "petitioner_counsel",
76
+ "side": "petitioner",
77
+ "text": "--Yes, Your Honor, they could put that statement on the passport. But we--"
78
+ },
79
+ {
80
+ "speaker": "Kagan",
81
+ "role": "justice",
82
+ "side": "court",
83
+ "text": "But if -- if -- if -- Congress then passed a law saying that that statement had to come off the passport, could Congress do that?"
84
+ },
85
+ {
86
+ "speaker": "Alyza D. Lewin",
87
+ "role": "petitioner_counsel",
88
+ "side": "petitioner",
89
+ "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--"
90
+ },
91
+ {
92
+ "speaker": "Sotomayor",
93
+ "role": "justice",
94
+ "side": "court",
95
+ "text": "Has that ever happened?"
96
+ },
97
+ {
98
+ "speaker": "Alyza D. Lewin",
99
+ "role": "petitioner_counsel",
100
+ "side": "petitioner",
101
+ "text": "--Yes."
102
+ },
103
+ {
104
+ "speaker": "Sotomayor",
105
+ "role": "justice",
106
+ "side": "court",
107
+ "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?"
108
+ },
109
+ {
110
+ "speaker": "Alyza D. Lewin",
111
+ "role": "petitioner_counsel",
112
+ "side": "petitioner",
113
+ "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."
114
+ },
115
+ {
116
+ "speaker": "Kennedy",
117
+ "role": "justice",
118
+ "side": "court",
119
+ "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?"
120
+ },
121
+ {
122
+ "speaker": "Alyza D. Lewin",
123
+ "role": "petitioner_counsel",
124
+ "side": "petitioner",
125
+ "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."
126
+ },
127
+ {
128
+ "speaker": "Ginsburg",
129
+ "role": "justice",
130
+ "side": "court",
131
+ "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."
132
+ },
133
+ {
134
+ "speaker": "Alyza D. Lewin",
135
+ "role": "petitioner_counsel",
136
+ "side": "petitioner",
137
+ "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."
138
+ },
139
+ {
140
+ "speaker": "Breyer",
141
+ "role": "justice",
142
+ "side": "court",
143
+ "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."
144
+ },
145
+ {
146
+ "speaker": "Alyza D. Lewin",
147
+ "role": "petitioner_counsel",
148
+ "side": "petitioner",
149
+ "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--"
150
+ },
151
+ {
152
+ "speaker": "Ginsburg",
153
+ "role": "justice",
154
+ "side": "court",
155
+ "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."
156
+ },
157
+ {
158
+ "speaker": "Alyza D. Lewin",
159
+ "role": "petitioner_counsel",
160
+ "side": "petitioner",
161
+ "text": "--That's correct, Justice Ginsburg. So what you put on the passport does not automatically confer recognition--"
162
+ },
163
+ {
164
+ "speaker": "Breyer",
165
+ "role": "justice",
166
+ "side": "court",
167
+ "text": "No, no, to go back to my question--"
168
+ },
169
+ {
170
+ "speaker": "Alyza D. Lewin",
171
+ "role": "petitioner_counsel",
172
+ "side": "petitioner",
173
+ "text": "--But the question--"
174
+ },
175
+ {
176
+ "speaker": "Breyer",
177
+ "role": "justice",
178
+ "side": "court",
179
+ "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."
180
+ },
181
+ {
182
+ "speaker": "Scalia",
183
+ "role": "justice",
184
+ "side": "court",
185
+ "text": "China objected to that. Did China not object to it?"
186
+ },
187
+ {
188
+ "speaker": "Breyer",
189
+ "role": "justice",
190
+ "side": "court",
191
+ "text": "China may have done -- I want an answer to this question--"
192
+ },
193
+ {
194
+ "speaker": "Alyza D. Lewin",
195
+ "role": "petitioner_counsel",
196
+ "side": "petitioner",
197
+ "text": "--Yes, that is correct, Justice Scalia."
198
+ },
199
+ {
200
+ "speaker": "Breyer",
201
+ "role": "justice",
202
+ "side": "court",
203
+ "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."
204
+ },
205
+ {
206
+ "speaker": "Alyza D. Lewin",
207
+ "role": "petitioner_counsel",
208
+ "side": "petitioner",
209
+ "text": "So one last point on Taiwan--"
210
+ },
211
+ {
212
+ "speaker": "Breyer",
213
+ "role": "justice",
214
+ "side": "court",
215
+ "text": "I'd like the first point. What am I supposed to do in respect to that?"
216
+ },
217
+ {
218
+ "speaker": "Alyza D. Lewin",
219
+ "role": "petitioner_counsel",
220
+ "side": "petitioner",
221
+ "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."
222
+ },
223
+ {
224
+ "speaker": "Scalia",
225
+ "role": "justice",
226
+ "side": "court",
227
+ "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--"
228
+ },
229
+ {
230
+ "speaker": "Alyza D. Lewin",
231
+ "role": "petitioner_counsel",
232
+ "side": "petitioner",
233
+ "text": "Yes."
234
+ },
235
+ {
236
+ "speaker": "Scalia",
237
+ "role": "justice",
238
+ "side": "court",
239
+ "text": "--that the State Department has decided to recognize and -- and to be friendly with?"
240
+ },
241
+ {
242
+ "speaker": "Alyza D. Lewin",
243
+ "role": "petitioner_counsel",
244
+ "side": "petitioner",
245
+ "text": "Yes, Justice Scalia."
246
+ },
247
+ {
248
+ "speaker": "Scalia",
249
+ "role": "justice",
250
+ "side": "court",
251
+ "text": "Congress can do that."
252
+ },
253
+ {
254
+ "speaker": "Alyza D. Lewin",
255
+ "role": "petitioner_counsel",
256
+ "side": "petitioner",
257
+ "text": "That is correct. Congress can do that. And the test, if there is a conflict 20--"
258
+ },
259
+ {
260
+ "speaker": "Scalia",
261
+ "role": "justice",
262
+ "side": "court",
263
+ "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."
264
+ },
265
+ {
266
+ "speaker": "Alyza D. Lewin",
267
+ "role": "petitioner_counsel",
268
+ "side": "petitioner",
269
+ "text": "--Absolutely, Justice Scalia. That is correct and--"
270
+ },
271
+ {
272
+ "speaker": "Breyer",
273
+ "role": "justice",
274
+ "side": "court",
275
+ "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. \""
276
+ },
277
+ {
278
+ "speaker": "Alyza D. Lewin",
279
+ "role": "petitioner_counsel",
280
+ "side": "petitioner",
281
+ "text": "--Justice--"
282
+ },
283
+ {
284
+ "speaker": "Breyer",
285
+ "role": "justice",
286
+ "side": "court",
287
+ "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."
288
+ },
289
+ {
290
+ "speaker": "Alyza D. Lewin",
291
+ "role": "petitioner_counsel",
292
+ "side": "petitioner",
293
+ "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--"
294
+ },
295
+ {
296
+ "speaker": "Sotomayor",
297
+ "role": "justice",
298
+ "side": "court",
299
+ "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."
300
+ },
301
+ {
302
+ "speaker": "Alyza D. Lewin",
303
+ "role": "petitioner_counsel",
304
+ "side": "petitioner",
305
+ "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. \""
306
+ },
307
+ {
308
+ "speaker": "Roberts",
309
+ "role": "justice",
310
+ "side": "court",
311
+ "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."
312
+ },
313
+ {
314
+ "speaker": "Alyza D. Lewin",
315
+ "role": "petitioner_counsel",
316
+ "side": "petitioner",
317
+ "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--"
318
+ },
319
+ {
320
+ "speaker": "Sotomayor",
321
+ "role": "justice",
322
+ "side": "court",
323
+ "text": "Ms. Lewin--"
324
+ },
325
+ {
326
+ "speaker": "Scalia",
327
+ "role": "justice",
328
+ "side": "court",
329
+ "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."
330
+ },
331
+ {
332
+ "speaker": "Alyza D. Lewin",
333
+ "role": "petitioner_counsel",
334
+ "side": "petitioner",
335
+ "text": "--That is correct."
336
+ },
337
+ {
338
+ "speaker": "Scalia",
339
+ "role": "justice",
340
+ "side": "court",
341
+ "text": "You don't claim that this is recognition."
342
+ },
343
+ {
344
+ "speaker": "Alyza D. Lewin",
345
+ "role": "petitioner_counsel",
346
+ "side": "petitioner",
347
+ "text": "We do not claim that this is recognition. In fact, if there was a conflict 20--"
348
+ },
349
+ {
350
+ "speaker": "Sotomayor",
351
+ "role": "justice",
352
+ "side": "court",
353
+ "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?"
354
+ },
355
+ {
356
+ "speaker": "Alyza D. Lewin",
357
+ "role": "petitioner_counsel",
358
+ "side": "petitioner",
359
+ "text": "--The initial request was made purely because of a misunderstanding of what the law initially required. And it was a common--"
360
+ },
361
+ {
362
+ "speaker": "Sotomayor",
363
+ "role": "justice",
364
+ "side": "court",
365
+ "text": "Answer my question. Did you apply formally to have it changed or did you just take this -- that position in litigation?"
366
+ },
367
+ {
368
+ "speaker": "Alyza D. Lewin",
369
+ "role": "petitioner_counsel",
370
+ "side": "petitioner",
371
+ "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 ”."
372
+ },
373
+ {
374
+ "speaker": "Alito",
375
+ "role": "justice",
376
+ "side": "court",
377
+ "text": "May I ask you another -- another factual question? When Menachem was born, was he issued a birth certificate by the Israeli authorities?"
378
+ },
379
+ {
380
+ "speaker": "Alyza D. Lewin",
381
+ "role": "petitioner_counsel",
382
+ "side": "petitioner",
383
+ "text": "Yes."
384
+ },
385
+ {
386
+ "speaker": "Alito",
387
+ "role": "justice",
388
+ "side": "court",
389
+ "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?"
390
+ },
391
+ {
392
+ "speaker": "Alyza D. Lewin",
393
+ "role": "petitioner_counsel",
394
+ "side": "petitioner",
395
+ "text": "I believe they do, Your Honor."
396
+ },
397
+ {
398
+ "speaker": "Alito",
399
+ "role": "justice",
400
+ "side": "court",
401
+ "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?"
402
+ },
403
+ {
404
+ "speaker": "Alyza D. Lewin",
405
+ "role": "petitioner_counsel",
406
+ "side": "petitioner",
407
+ "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."
408
+ },
409
+ {
410
+ "speaker": "Kagan",
411
+ "role": "justice",
412
+ "side": "court",
413
+ "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?"
414
+ },
415
+ {
416
+ "speaker": "Alyza D. Lewin",
417
+ "role": "petitioner_counsel",
418
+ "side": "petitioner",
419
+ "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."
420
+ },
421
+ {
422
+ "speaker": "Kagan",
423
+ "role": "justice",
424
+ "side": "court",
425
+ "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."
426
+ },
427
+ {
428
+ "speaker": "Alyza D. Lewin",
429
+ "role": "petitioner_counsel",
430
+ "side": "petitioner",
431
+ "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."
432
+ },
433
+ {
434
+ "speaker": "Ginsburg",
435
+ "role": "justice",
436
+ "side": "court",
437
+ "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."
438
+ },
439
+ {
440
+ "speaker": "Alyza D. Lewin",
441
+ "role": "petitioner_counsel",
442
+ "side": "petitioner",
443
+ "text": "Correct, Justice Ginsburg, because at that point there was, before 1948, a Palestine. So the -- the law was not going so far--"
444
+ },
445
+ {
446
+ "speaker": "Kagan",
447
+ "role": "justice",
448
+ "side": "court",
449
+ "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."
450
+ },
451
+ {
452
+ "speaker": "Alyza D. Lewin",
453
+ "role": "petitioner_counsel",
454
+ "side": "petitioner",
455
+ "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--"
456
+ },
457
+ {
458
+ "speaker": "Alito",
459
+ "role": "justice",
460
+ "side": "court",
461
+ "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?"
462
+ },
463
+ {
464
+ "speaker": "Alyza D. Lewin",
465
+ "role": "petitioner_counsel",
466
+ "side": "petitioner",
467
+ "text": "--If they wish to remove the country of birth and list the smaller entity? Yes."
468
+ },
469
+ {
470
+ "speaker": "Alito",
471
+ "role": "justice",
472
+ "side": "court",
473
+ "text": "And is that a -- is that a vanity plate for people who believe in Catalan independence?"
474
+ },
475
+ {
476
+ "speaker": "Alyza D. Lewin",
477
+ "role": "petitioner_counsel",
478
+ "side": "petitioner",
479
+ "text": "It is enabling an individual to exercise their choice to self-identify as they choose, yes."
480
+ },
481
+ {
482
+ "speaker": "Kennedy",
483
+ "role": "justice",
484
+ "side": "court",
485
+ "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."
486
+ },
487
+ {
488
+ "speaker": "Alyza D. Lewin",
489
+ "role": "petitioner_counsel",
490
+ "side": "petitioner",
491
+ "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."
492
+ },
493
+ {
494
+ "speaker": "Kennedy",
495
+ "role": "justice",
496
+ "side": "court",
497
+ "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."
498
+ },
499
+ {
500
+ "speaker": "Alyza D. Lewin",
501
+ "role": "petitioner_counsel",
502
+ "side": "petitioner",
503
+ "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."
504
+ },
505
+ {
506
+ "speaker": "Scalia",
507
+ "role": "justice",
508
+ "side": "court",
509
+ "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?"
510
+ },
511
+ {
512
+ "speaker": "Alyza D. Lewin",
513
+ "role": "petitioner_counsel",
514
+ "side": "petitioner",
515
+ "text": "Yes, Justice Scalia."
516
+ },
517
+ {
518
+ "speaker": "Scalia",
519
+ "role": "justice",
520
+ "side": "court",
521
+ "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."
522
+ },
523
+ {
524
+ "speaker": "Alyza D. Lewin",
525
+ "role": "petitioner_counsel",
526
+ "side": "petitioner",
527
+ "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."
528
+ },
529
+ {
530
+ "speaker": "Kagan",
531
+ "role": "justice",
532
+ "side": "court",
533
+ "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?"
534
+ },
535
+ {
536
+ "speaker": "Alyza D. Lewin",
537
+ "role": "petitioner_counsel",
538
+ "side": "petitioner",
539
+ "text": "Excuse me, this would be a law passed?"
540
+ },
541
+ {
542
+ "speaker": "Kagan",
543
+ "role": "justice",
544
+ "side": "court",
545
+ "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."
546
+ },
547
+ {
548
+ "speaker": "Alyza D. Lewin",
549
+ "role": "petitioner_counsel",
550
+ "side": "petitioner",
551
+ "text": "Yes, that would be constitutional."
552
+ },
553
+ {
554
+ "speaker": "Kagan",
555
+ "role": "justice",
556
+ "side": "court",
557
+ "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."
558
+ },
559
+ {
560
+ "speaker": "Alyza D. Lewin",
561
+ "role": "petitioner_counsel",
562
+ "side": "petitioner",
563
+ "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."
564
+ },
565
+ {
566
+ "speaker": "Kagan",
567
+ "role": "justice",
568
+ "side": "court",
569
+ "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."
570
+ },
571
+ {
572
+ "speaker": "Alyza D. Lewin",
573
+ "role": "petitioner_counsel",
574
+ "side": "petitioner",
575
+ "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."
576
+ },
577
+ {
578
+ "speaker": "Roberts",
579
+ "role": "justice",
580
+ "side": "court",
581
+ "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."
582
+ },
583
+ {
584
+ "speaker": "Alyza D. Lewin",
585
+ "role": "petitioner_counsel",
586
+ "side": "petitioner",
587
+ "text": "Correct, Justice Roberts."
588
+ },
589
+ {
590
+ "speaker": "Kagan",
591
+ "role": "justice",
592
+ "side": "court",
593
+ "text": "Well, if you say that--"
594
+ },
595
+ {
596
+ "speaker": "Roberts",
597
+ "role": "justice",
598
+ "side": "court",
599
+ "text": "Justice Kennedy."
600
+ },
601
+ {
602
+ "speaker": "Kennedy",
603
+ "role": "justice",
604
+ "side": "court",
605
+ "text": "Do you want us to say in our opinion that this is not a political declaration?"
606
+ },
607
+ {
608
+ "speaker": "Alyza D. Lewin",
609
+ "role": "petitioner_counsel",
610
+ "side": "petitioner",
611
+ "text": "This is not a political declaration, that's correct, Justice Kennedy."
612
+ },
613
+ {
614
+ "speaker": "Kennedy",
615
+ "role": "justice",
616
+ "side": "court",
617
+ "text": "Well, then, I'm not sure why that Congress passed it, then."
618
+ },
619
+ {
620
+ "speaker": "Alyza D. Lewin",
621
+ "role": "petitioner_counsel",
622
+ "side": "petitioner",
623
+ "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--"
624
+ },
625
+ {
626
+ "speaker": "Sotomayor",
627
+ "role": "justice",
628
+ "side": "court",
629
+ "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."
630
+ },
631
+ {
632
+ "speaker": "Alyza D. Lewin",
633
+ "role": "petitioner_counsel",
634
+ "side": "petitioner",
635
+ "text": "--Since 19--"
636
+ },
637
+ {
638
+ "speaker": "Sotomayor",
639
+ "role": "justice",
640
+ "side": "court",
641
+ "text": "I mean, they can self-identify all they want, but can they do that?"
642
+ },
643
+ {
644
+ "speaker": "Alyza D. Lewin",
645
+ "role": "petitioner_counsel",
646
+ "side": "petitioner",
647
+ "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--"
648
+ },
649
+ {
650
+ "speaker": "Sotomayor",
651
+ "role": "justice",
652
+ "side": "court",
653
+ "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?"
654
+ },
655
+ {
656
+ "speaker": "Alyza D. Lewin",
657
+ "role": "petitioner_counsel",
658
+ "side": "petitioner",
659
+ "text": "--In a formal sense, no. But allowing individuals to recognize that, that would not be a false statement."
660
+ },
661
+ {
662
+ "speaker": "Kagan",
663
+ "role": "justice",
664
+ "side": "court",
665
+ "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."
666
+ },
667
+ {
668
+ "speaker": "Alyza D. Lewin",
669
+ "role": "petitioner_counsel",
670
+ "side": "petitioner",
671
+ "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."
672
+ },
673
+ {
674
+ "speaker": "Roberts",
675
+ "role": "justice",
676
+ "side": "court",
677
+ "text": "Thank you, counsel. General Verrilli."
678
+ },
679
+ {
680
+ "speaker": "Donald B. Verrilli, Jr.",
681
+ "role": "respondent_counsel",
682
+ "side": "respondent",
683
+ "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."
684
+ },
685
+ {
686
+ "speaker": "Roberts",
687
+ "role": "justice",
688
+ "side": "court",
689
+ "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."
690
+ },
691
+ {
692
+ "speaker": "Donald B. Verrilli, Jr.",
693
+ "role": "respondent_counsel",
694
+ "side": "respondent",
695
+ "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."
696
+ },
697
+ {
698
+ "speaker": "Roberts",
699
+ "role": "justice",
700
+ "side": "court",
701
+ "text": "So -- so that law would be unconstitutional?"
702
+ },
703
+ {
704
+ "speaker": "Donald B. Verrilli, Jr.",
705
+ "role": "respondent_counsel",
706
+ "side": "respondent",
707
+ "text": "To the extent it said for all purposes, yes, because--"
708
+ },
709
+ {
710
+ "speaker": "Roberts",
711
+ "role": "justice",
712
+ "side": "court",
713
+ "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. \""
714
+ },
715
+ {
716
+ "speaker": "Donald B. Verrilli, Jr.",
717
+ "role": "respondent_counsel",
718
+ "side": "respondent",
719
+ "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."
720
+ },
721
+ {
722
+ "speaker": "Roberts",
723
+ "role": "justice",
724
+ "side": "court",
725
+ "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?"
726
+ },
727
+ {
728
+ "speaker": "Donald B. Verrilli, Jr.",
729
+ "role": "respondent_counsel",
730
+ "side": "respondent",
731
+ "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."
732
+ },
733
+ {
734
+ "speaker": "Alito",
735
+ "role": "justice",
736
+ "side": "court",
737
+ "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?"
738
+ },
739
+ {
740
+ "speaker": "Donald B. Verrilli, Jr.",
741
+ "role": "respondent_counsel",
742
+ "side": "respondent",
743
+ "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--"
744
+ },
745
+ {
746
+ "speaker": "Scalia",
747
+ "role": "justice",
748
+ "side": "court",
749
+ "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?"
750
+ },
751
+ {
752
+ "speaker": "Donald B. Verrilli, Jr.",
753
+ "role": "respondent_counsel",
754
+ "side": "respondent",
755
+ "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--"
756
+ },
757
+ {
758
+ "speaker": "Scalia",
759
+ "role": "justice",
760
+ "side": "court",
761
+ "text": "And this may be one of them. So--"
762
+ },
763
+ {
764
+ "speaker": "Donald B. Verrilli, Jr.",
765
+ "role": "respondent_counsel",
766
+ "side": "respondent",
767
+ "text": "--This is not one of them."
768
+ },
769
+ {
770
+ "speaker": "Scalia",
771
+ "role": "justice",
772
+ "side": "court",
773
+ "text": "--the mere fact that it upsets foreign relations doesn't prove a thing."
774
+ },
775
+ {
776
+ "speaker": "Donald B. Verrilli, Jr.",
777
+ "role": "respondent_counsel",
778
+ "side": "respondent",
779
+ "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."
780
+ },
781
+ {
782
+ "speaker": "Kennedy",
783
+ "role": "justice",
784
+ "side": "court",
785
+ "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."
786
+ },
787
+ {
788
+ "speaker": "Donald B. Verrilli, Jr.",
789
+ "role": "respondent_counsel",
790
+ "side": "respondent",
791
+ "text": "Your Honor--"
792
+ },
793
+ {
794
+ "speaker": "Kennedy",
795
+ "role": "justice",
796
+ "side": "court",
797
+ "text": "Why wouldn't that solve the problem?"
798
+ },
799
+ {
800
+ "speaker": "Donald B. Verrilli, Jr.",
801
+ "role": "respondent_counsel",
802
+ "side": "respondent",
803
+ "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."
804
+ },
805
+ {
806
+ "speaker": "Roberts",
807
+ "role": "justice",
808
+ "side": "court",
809
+ "text": "If it had -- if it were such a big deal, why did the Chief Executive at the time sign it?"
810
+ },
811
+ {
812
+ "speaker": "Donald B. Verrilli, Jr.",
813
+ "role": "respondent_counsel",
814
+ "side": "respondent",
815
+ "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--"
816
+ },
817
+ {
818
+ "speaker": "Roberts",
819
+ "role": "justice",
820
+ "side": "court",
821
+ "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?"
822
+ },
823
+ {
824
+ "speaker": "Donald B. Verrilli, Jr.",
825
+ "role": "respondent_counsel",
826
+ "side": "respondent",
827
+ "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."
828
+ },
829
+ {
830
+ "speaker": "Roberts",
831
+ "role": "justice",
832
+ "side": "court",
833
+ "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."
834
+ },
835
+ {
836
+ "speaker": "Donald B. Verrilli, Jr.",
837
+ "role": "respondent_counsel",
838
+ "side": "respondent",
839
+ "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--"
840
+ },
841
+ {
842
+ "speaker": "Roberts",
843
+ "role": "justice",
844
+ "side": "court",
845
+ "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--"
846
+ },
847
+ {
848
+ "speaker": "Donald B. Verrilli, Jr.",
849
+ "role": "respondent_counsel",
850
+ "side": "respondent",
851
+ "text": "--With all due respect, Your Honor--"
852
+ },
853
+ {
854
+ "speaker": "Roberts",
855
+ "role": "justice",
856
+ "side": "court",
857
+ "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."
858
+ },
859
+ {
860
+ "speaker": "Donald B. Verrilli, Jr.",
861
+ "role": "respondent_counsel",
862
+ "side": "respondent",
863
+ "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."
864
+ },
865
+ {
866
+ "speaker": "Scalia",
867
+ "role": "justice",
868
+ "side": "court",
869
+ "text": "Not necessarily."
870
+ },
871
+ {
872
+ "speaker": "Sotomayor",
873
+ "role": "justice",
874
+ "side": "court",
875
+ "text": "What they're asking you to do is to look -- they're asking the government to lie."
876
+ },
877
+ {
878
+ "speaker": "Donald B. Verrilli, Jr.",
879
+ "role": "respondent_counsel",
880
+ "side": "respondent",
881
+ "text": "I think that--"
882
+ },
883
+ {
884
+ "speaker": "Sotomayor",
885
+ "role": "justice",
886
+ "side": "court",
887
+ "text": "I'm not that's exactly what you're saying the government should the executive department should not do."
888
+ },
889
+ {
890
+ "speaker": "Donald B. Verrilli, Jr.",
891
+ "role": "respondent_counsel",
892
+ "side": "respondent",
893
+ "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--"
894
+ },
895
+ {
896
+ "speaker": "Breyer",
897
+ "role": "justice",
898
+ "side": "court",
899
+ "text": "So how are we--"
900
+ },
901
+ {
902
+ "speaker": "Roberts",
903
+ "role": "justice",
904
+ "side": "court",
905
+ "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."
906
+ },
907
+ {
908
+ "speaker": "Donald B. Verrilli, Jr.",
909
+ "role": "respondent_counsel",
910
+ "side": "respondent",
911
+ "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--"
912
+ },
913
+ {
914
+ "speaker": "Roberts",
915
+ "role": "justice",
916
+ "side": "court",
917
+ "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."
918
+ },
919
+ {
920
+ "speaker": "Donald B. Verrilli, Jr.",
921
+ "role": "respondent_counsel",
922
+ "side": "respondent",
923
+ "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."
924
+ },
925
+ {
926
+ "speaker": "Breyer",
927
+ "role": "justice",
928
+ "side": "court",
929
+ "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?"
930
+ },
931
+ {
932
+ "speaker": "Donald B. Verrilli, Jr.",
933
+ "role": "respondent_counsel",
934
+ "side": "respondent",
935
+ "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."
936
+ },
937
+ {
938
+ "speaker": "Scalia",
939
+ "role": "justice",
940
+ "side": "court",
941
+ "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."
942
+ },
943
+ {
944
+ "speaker": "Donald B. Verrilli, Jr.",
945
+ "role": "respondent_counsel",
946
+ "side": "respondent",
947
+ "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--"
948
+ },
949
+ {
950
+ "speaker": "Scalia",
951
+ "role": "justice",
952
+ "side": "court",
953
+ "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."
954
+ },
955
+ {
956
+ "speaker": "Donald B. Verrilli, Jr.",
957
+ "role": "respondent_counsel",
958
+ "side": "respondent",
959
+ "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."
960
+ },
961
+ {
962
+ "speaker": "Kennedy",
963
+ "role": "justice",
964
+ "side": "court",
965
+ "text": "Couldn't you say that, at a minimum, the Petitioner has conceded that it is not clear that this is recognition?"
966
+ },
967
+ {
968
+ "speaker": "Donald B. Verrilli, Jr.",
969
+ "role": "respondent_counsel",
970
+ "side": "respondent",
971
+ "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."
972
+ },
973
+ {
974
+ "speaker": "Ginsburg",
975
+ "role": "justice",
976
+ "side": "court",
977
+ "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?"
978
+ },
979
+ {
980
+ "speaker": "Donald B. Verrilli, Jr.",
981
+ "role": "respondent_counsel",
982
+ "side": "respondent",
983
+ "text": "That's correct. There's a longstanding policy there."
984
+ },
985
+ {
986
+ "speaker": "Ginsburg",
987
+ "role": "justice",
988
+ "side": "court",
989
+ "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?"
990
+ },
991
+ {
992
+ "speaker": "Donald B. Verrilli, Jr.",
993
+ "role": "respondent_counsel",
994
+ "side": "respondent",
995
+ "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--"
996
+ },
997
+ {
998
+ "speaker": "Sotomayor",
999
+ "role": "justice",
1000
+ "side": "court",
1001
+ "text": "This is a pretty rough way to identify someone. I mean, there are hundreds of John Smith's in the United States."
1002
+ },
1003
+ {
1004
+ "speaker": "Donald B. Verrilli, Jr.",
1005
+ "role": "respondent_counsel",
1006
+ "side": "respondent",
1007
+ "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."
1008
+ },
1009
+ {
1010
+ "speaker": "Alito",
1011
+ "role": "justice",
1012
+ "side": "court",
1013
+ "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?"
1014
+ },
1015
+ {
1016
+ "speaker": "Donald B. Verrilli, Jr.",
1017
+ "role": "respondent_counsel",
1018
+ "side": "respondent",
1019
+ "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--"
1020
+ },
1021
+ {
1022
+ "speaker": "Alito",
1023
+ "role": "justice",
1024
+ "side": "court",
1025
+ "text": "Well, it must have been accepted as evidence of birth or the passport would never have been issued."
1026
+ },
1027
+ {
1028
+ "speaker": "Donald B. Verrilli, Jr.",
1029
+ "role": "respondent_counsel",
1030
+ "side": "respondent",
1031
+ "text": "--Well, we do have the consular notification of birth."
1032
+ },
1033
+ {
1034
+ "speaker": "Alito",
1035
+ "role": "justice",
1036
+ "side": "court",
1037
+ "text": "I thought you had to provide a birth certificate--"
1038
+ },
1039
+ {
1040
+ "speaker": "Donald B. Verrilli, Jr.",
1041
+ "role": "respondent_counsel",
1042
+ "side": "respondent",
1043
+ "text": "Right."
1044
+ },
1045
+ {
1046
+ "speaker": "Alito",
1047
+ "role": "justice",
1048
+ "side": "court",
1049
+ "text": "--in order to get that."
1050
+ },
1051
+ {
1052
+ "speaker": "Donald B. Verrilli, Jr.",
1053
+ "role": "respondent_counsel",
1054
+ "side": "respondent",
1055
+ "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."
1056
+ },
1057
+ {
1058
+ "speaker": "Roberts",
1059
+ "role": "justice",
1060
+ "side": "court",
1061
+ "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?"
1062
+ },
1063
+ {
1064
+ "speaker": "Donald B. Verrilli, Jr.",
1065
+ "role": "respondent_counsel",
1066
+ "side": "respondent",
1067
+ "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--"
1068
+ },
1069
+ {
1070
+ "speaker": "Roberts",
1071
+ "role": "justice",
1072
+ "side": "court",
1073
+ "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."
1074
+ },
1075
+ {
1076
+ "speaker": "Donald B. Verrilli, Jr.",
1077
+ "role": "respondent_counsel",
1078
+ "side": "respondent",
1079
+ "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."
1080
+ },
1081
+ {
1082
+ "speaker": "Roberts",
1083
+ "role": "justice",
1084
+ "side": "court",
1085
+ "text": "I thought your position was that the President has the exclusive right to decide what interferes with his recognition power."
1086
+ },
1087
+ {
1088
+ "speaker": "Donald B. Verrilli, Jr.",
1089
+ "role": "respondent_counsel",
1090
+ "side": "respondent",
1091
+ "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--"
1092
+ },
1093
+ {
1094
+ "speaker": "Scalia",
1095
+ "role": "justice",
1096
+ "side": "court",
1097
+ "text": "War making is an executive function, too."
1098
+ },
1099
+ {
1100
+ "speaker": "Donald B. Verrilli, Jr.",
1101
+ "role": "respondent_counsel",
1102
+ "side": "respondent",
1103
+ "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."
1104
+ },
1105
+ {
1106
+ "speaker": "Alito",
1107
+ "role": "justice",
1108
+ "side": "court",
1109
+ "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--"
1110
+ },
1111
+ {
1112
+ "speaker": "Donald B. Verrilli, Jr.",
1113
+ "role": "respondent_counsel",
1114
+ "side": "respondent",
1115
+ "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--"
1116
+ },
1117
+ {
1118
+ "speaker": "Kennedy",
1119
+ "role": "justice",
1120
+ "side": "court",
1121
+ "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."
1122
+ },
1123
+ {
1124
+ "speaker": "Donald B. Verrilli, Jr.",
1125
+ "role": "respondent_counsel",
1126
+ "side": "respondent",
1127
+ "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--"
1128
+ },
1129
+ {
1130
+ "speaker": "Ginsburg",
1131
+ "role": "justice",
1132
+ "side": "court",
1133
+ "text": "Ms. Lewin answered, I think quite candidly--"
1134
+ },
1135
+ {
1136
+ "speaker": "Kennedy",
1137
+ "role": "justice",
1138
+ "side": "court",
1139
+ "text": "But it doesn't further -- why doesn't it further it?"
1140
+ },
1141
+ {
1142
+ "speaker": "Donald B. Verrilli, Jr.",
1143
+ "role": "respondent_counsel",
1144
+ "side": "respondent",
1145
+ "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--"
1146
+ },
1147
+ {
1148
+ "speaker": "Roberts",
1149
+ "role": "justice",
1150
+ "side": "court",
1151
+ "text": "But just like the signing statement."
1152
+ },
1153
+ {
1154
+ "speaker": "Donald B. Verrilli, Jr.",
1155
+ "role": "respondent_counsel",
1156
+ "side": "respondent",
1157
+ "text": "--Excuse me, Mr. Chief Justice."
1158
+ },
1159
+ {
1160
+ "speaker": "Roberts",
1161
+ "role": "justice",
1162
+ "side": "court",
1163
+ "text": "Just like the signing statement, which said precisely what Justice Kennedy suggested, that the Executive could do at this point."
1164
+ },
1165
+ {
1166
+ "speaker": "Donald B. Verrilli, Jr.",
1167
+ "role": "respondent_counsel",
1168
+ "side": "respondent",
1169
+ "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."
1170
+ },
1171
+ {
1172
+ "speaker": "Ginsburg",
1173
+ "role": "justice",
1174
+ "side": "court",
1175
+ "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."
1176
+ },
1177
+ {
1178
+ "speaker": "Donald B. Verrilli, Jr.",
1179
+ "role": "respondent_counsel",
1180
+ "side": "respondent",
1181
+ "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--"
1182
+ },
1183
+ {
1184
+ "speaker": "Kennedy",
1185
+ "role": "justice",
1186
+ "side": "court",
1187
+ "text": "But that law isn't in front of us."
1188
+ },
1189
+ {
1190
+ "speaker": "Donald B. Verrilli, Jr.",
1191
+ "role": "respondent_counsel",
1192
+ "side": "respondent",
1193
+ "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--"
1194
+ },
1195
+ {
1196
+ "speaker": "Sotomayor",
1197
+ "role": "justice",
1198
+ "side": "court",
1199
+ "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."
1200
+ },
1201
+ {
1202
+ "speaker": "Donald B. Verrilli, Jr.",
1203
+ "role": "respondent_counsel",
1204
+ "side": "respondent",
1205
+ "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."
1206
+ },
1207
+ {
1208
+ "speaker": "Scalia",
1209
+ "role": "justice",
1210
+ "side": "court",
1211
+ "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?"
1212
+ },
1213
+ {
1214
+ "speaker": "Donald B. Verrilli, Jr.",
1215
+ "role": "respondent_counsel",
1216
+ "side": "respondent",
1217
+ "text": "No, you don't. But the--"
1218
+ },
1219
+ {
1220
+ "speaker": "Scalia",
1221
+ "role": "justice",
1222
+ "side": "court",
1223
+ "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."
1224
+ },
1225
+ {
1226
+ "speaker": "Donald B. Verrilli, Jr.",
1227
+ "role": "respondent_counsel",
1228
+ "side": "respondent",
1229
+ "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--"
1230
+ },
1231
+ {
1232
+ "speaker": "Scalia",
1233
+ "role": "justice",
1234
+ "side": "court",
1235
+ "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."
1236
+ },
1237
+ {
1238
+ "speaker": "Donald B. Verrilli, Jr.",
1239
+ "role": "respondent_counsel",
1240
+ "side": "respondent",
1241
+ "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."
1242
+ },
1243
+ {
1244
+ "speaker": "Sotomayor",
1245
+ "role": "justice",
1246
+ "side": "court",
1247
+ "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?"
1248
+ },
1249
+ {
1250
+ "speaker": "Donald B. Verrilli, Jr.",
1251
+ "role": "respondent_counsel",
1252
+ "side": "respondent",
1253
+ "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."
1254
+ },
1255
+ {
1256
+ "speaker": "Scalia",
1257
+ "role": "justice",
1258
+ "side": "court",
1259
+ "text": "I know that some of them do."
1260
+ },
1261
+ {
1262
+ "speaker": "Donald B. Verrilli, Jr.",
1263
+ "role": "respondent_counsel",
1264
+ "side": "respondent",
1265
+ "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--"
1266
+ },
1267
+ {
1268
+ "speaker": "Alito",
1269
+ "role": "justice",
1270
+ "side": "court",
1271
+ "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?"
1272
+ },
1273
+ {
1274
+ "speaker": "Donald B. Verrilli, Jr.",
1275
+ "role": "respondent_counsel",
1276
+ "side": "respondent",
1277
+ "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--"
1278
+ },
1279
+ {
1280
+ "speaker": "Alito",
1281
+ "role": "justice",
1282
+ "side": "court",
1283
+ "text": "But Congress did that, so nothing that we do is going to change that or change what Congress thought."
1284
+ },
1285
+ {
1286
+ "speaker": "Donald B. Verrilli, Jr.",
1287
+ "role": "respondent_counsel",
1288
+ "side": "respondent",
1289
+ "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."
1290
+ },
1291
+ {
1292
+ "speaker": "Roberts",
1293
+ "role": "justice",
1294
+ "side": "court",
1295
+ "text": "Thank you, General. Ms. Lewin, you have four minutes remaining."
1296
+ },
1297
+ {
1298
+ "speaker": "Alyza D. Lewin",
1299
+ "role": "petitioner_counsel",
1300
+ "side": "petitioner",
1301
+ "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--"
1302
+ },
1303
+ {
1304
+ "speaker": "Sotomayor",
1305
+ "role": "justice",
1306
+ "side": "court",
1307
+ "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."
1308
+ },
1309
+ {
1310
+ "speaker": "Alyza D. Lewin",
1311
+ "role": "petitioner_counsel",
1312
+ "side": "petitioner",
1313
+ "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--"
1314
+ },
1315
+ {
1316
+ "speaker": "Sotomayor",
1317
+ "role": "justice",
1318
+ "side": "court",
1319
+ "text": "And there was a waiver -- and there was a waiver provided and every President has exercised the waiver."
1320
+ },
1321
+ {
1322
+ "speaker": "Alyza D. Lewin",
1323
+ "role": "petitioner_counsel",
1324
+ "side": "petitioner",
1325
+ "text": "--So this would be, though, recognizing, as was said before, that there is a disagreement, but not--"
1326
+ },
1327
+ {
1328
+ "speaker": "Sotomayor",
1329
+ "role": "justice",
1330
+ "side": "court",
1331
+ "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."
1332
+ },
1333
+ {
1334
+ "speaker": "Alyza D. Lewin",
1335
+ "role": "petitioner_counsel",
1336
+ "side": "petitioner",
1337
+ "text": "--But the speech is the speech of the individual who has self-identified."
1338
+ },
1339
+ {
1340
+ "speaker": "Sotomayor",
1341
+ "role": "justice",
1342
+ "side": "court",
1343
+ "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."
1344
+ },
1345
+ {
1346
+ "speaker": "Alyza D. Lewin",
1347
+ "role": "petitioner_counsel",
1348
+ "side": "petitioner",
1349
+ "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."
1350
+ },
1351
+ {
1352
+ "speaker": "Kagan",
1353
+ "role": "justice",
1354
+ "side": "court",
1355
+ "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."
1356
+ },
1357
+ {
1358
+ "speaker": "Alyza D. Lewin",
1359
+ "role": "petitioner_counsel",
1360
+ "side": "petitioner",
1361
+ "text": "Saying that--"
1362
+ },
1363
+ {
1364
+ "speaker": "Kagan",
1365
+ "role": "justice",
1366
+ "side": "court",
1367
+ "text": "That that, too, is Israel?"
1368
+ },
1369
+ {
1370
+ "speaker": "Alyza D. Lewin",
1371
+ "role": "petitioner_counsel",
1372
+ "side": "petitioner",
1373
+ "text": "--Correct."
1374
+ },
1375
+ {
1376
+ "speaker": "Kagan",
1377
+ "role": "justice",
1378
+ "side": "court",
1379
+ "text": "Yes. Okay."
1380
+ },
1381
+ {
1382
+ "speaker": "Alyza D. Lewin",
1383
+ "role": "petitioner_counsel",
1384
+ "side": "petitioner",
1385
+ "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--"
1386
+ },
1387
+ {
1388
+ "speaker": "Kagan",
1389
+ "role": "justice",
1390
+ "side": "court",
1391
+ "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?"
1392
+ },
1393
+ {
1394
+ "speaker": "Alyza D. Lewin",
1395
+ "role": "petitioner_counsel",
1396
+ "side": "petitioner",
1397
+ "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."
1398
+ },
1399
+ {
1400
+ "speaker": "Roberts",
1401
+ "role": "justice",
1402
+ "side": "court",
1403
+ "text": "Thank you, counsel. The case is submitted."
1404
+ }
1405
+ ],
1406
+ "source": "oyez_scotus",
1407
+ "intervention_triggers": [
1408
+ "An advocate mischaracterizes the factual record or overstates what the lower court held.",
1409
+ "An advocate attempts to reframe the question presented beyond the scope of certiorari.",
1410
+ "An advocate evades a Justice's direct question by pivoting to a different issue."
1411
+ ],
1412
+ "difficulty": "hard"
1413
+ }
croissant.json ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "@context": {
3
+ "@language": "en",
4
+ "@vocab": "https://schema.org/",
5
+ "citeAs": "cr:citeAs",
6
+ "column": "cr:column",
7
+ "conformsTo": "dct:conformsTo",
8
+ "cr": "http://mlcommons.org/croissant/",
9
+ "rai": "http://mlcommons.org/croissant/RAI/",
10
+ "data": {
11
+ "@id": "cr:data",
12
+ "@type": "@json"
13
+ },
14
+ "dataType": {
15
+ "@id": "cr:dataType",
16
+ "@type": "@vocab"
17
+ },
18
+ "dct": "http://purl.org/dc/terms/",
19
+ "examples": {
20
+ "@id": "cr:examples",
21
+ "@type": "@json"
22
+ },
23
+ "extract": "cr:extract",
24
+ "field": "cr:field",
25
+ "fileProperty": "cr:fileProperty",
26
+ "fileObject": "cr:fileObject",
27
+ "fileSet": "cr:fileSet",
28
+ "format": "cr:format",
29
+ "includes": "cr:includes",
30
+ "isLiveDataset": "cr:isLiveDataset",
31
+ "jsonPath": "cr:jsonPath",
32
+ "key": "cr:key",
33
+ "md5": "cr:md5",
34
+ "parentField": "cr:parentField",
35
+ "path": "cr:path",
36
+ "recordSet": "cr:recordSet",
37
+ "references": "cr:references",
38
+ "regex": "cr:regex",
39
+ "repeated": "cr:repeated",
40
+ "replace": "cr:replace",
41
+ "sc": "https://schema.org/",
42
+ "separator": "cr:separator",
43
+ "source": "cr:source",
44
+ "subField": "cr:subField",
45
+ "transform": "cr:transform",
46
+ "equivalentProperty": "cr:equivalentProperty",
47
+ "samplingRate": "cr:samplingRate"
48
+ },
49
+ "@type": "sc:Dataset",
50
+ "name": "RI_Bench",
51
+ "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.",
52
+ "conformsTo": "http://mlcommons.org/croissant/1.1",
53
+ "license": "https://creativecommons.org/licenses/by-nc/4.0/",
54
+ "url": "https://huggingface.co/datasets/jxtse/RI-Bench",
55
+ "version": "1.0.0",
56
+ "datePublished": "2026-11-19",
57
+ "creator": [
58
+ {
59
+ "@type": "Person",
60
+ "name": "Jinxiang Xie"
61
+ },
62
+ {
63
+ "@type": "Person",
64
+ "name": "Xinyi Zhang"
65
+ },
66
+ {
67
+ "@type": "Person",
68
+ "name": "Changjiang Jiang"
69
+ },
70
+ {
71
+ "@type": "Person",
72
+ "name": "Kexu Liu"
73
+ },
74
+ {
75
+ "@type": "Person",
76
+ "name": "Qi Yang"
77
+ },
78
+ {
79
+ "@type": "Person",
80
+ "name": "Yuxin Su"
81
+ }
82
+ ],
83
+ "keywords": [
84
+ "multi-agent LLM",
85
+ "role integrity",
86
+ "deliberation",
87
+ "hierarchical synthesis",
88
+ "obligation prompting",
89
+ "benchmark"
90
+ ],
91
+ "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}}}",
92
+ "isLiveDataset": false,
93
+ "distribution": [
94
+ {
95
+ "@type": "cr:FileSet",
96
+ "@id": "open_review-files",
97
+ "name": "open_review-files",
98
+ "description": "ICLR 2024-2026 paper full text in Markdown, converted from OpenReview PDFs and de-identified.",
99
+ "encodingFormat": "text/markdown",
100
+ "includes": "open_review/iclr*.md"
101
+ },
102
+ {
103
+ "@type": "cr:FileSet",
104
+ "@id": "open_review-json-files",
105
+ "name": "open_review-json-files",
106
+ "description": "Per-case JSON oracle (reviewer scores, rebuttal, meta-review, ground-truth PC decision) paired with each .md.",
107
+ "encodingFormat": "application/json",
108
+ "includes": "open_review/iclr*.json"
109
+ },
110
+ {
111
+ "@type": "cr:FileSet",
112
+ "@id": "parliament-files",
113
+ "name": "parliament-files",
114
+ "description": "UK Parliament Select Committee inquiry packets.",
115
+ "encodingFormat": "application/json",
116
+ "includes": "parliament/parl_*.json"
117
+ },
118
+ {
119
+ "@type": "cr:FileSet",
120
+ "@id": "court-files",
121
+ "name": "court-files",
122
+ "description": "SCOTUS oral-argument case packets via Oyez.",
123
+ "encodingFormat": "application/json",
124
+ "includes": "court/scotus_*.json"
125
+ }
126
+ ],
127
+ "recordSet": [
128
+ {
129
+ "@type": "cr:RecordSet",
130
+ "@id": "open_review",
131
+ "name": "open_review",
132
+ "description": "Open Peer Review cases (one per ICLR submission).",
133
+ "field": [
134
+ {
135
+ "@type": "cr:Field",
136
+ "@id": "open_review/case_id",
137
+ "name": "case_id",
138
+ "description": "Case identifier (filename without extension).",
139
+ "dataType": "sc:Text",
140
+ "source": {
141
+ "fileSet": {
142
+ "@id": "open_review-files"
143
+ },
144
+ "extract": {
145
+ "fileProperty": "filename"
146
+ },
147
+ "transform": {
148
+ "regex": "^(iclr\\d+_\\d+)\\.md$"
149
+ }
150
+ }
151
+ },
152
+ {
153
+ "@type": "cr:Field",
154
+ "@id": "open_review/paper_text",
155
+ "name": "paper_text",
156
+ "description": "Full text of the ICLR submission in Markdown.",
157
+ "dataType": "sc:Text",
158
+ "source": {
159
+ "fileSet": {
160
+ "@id": "open_review-files"
161
+ },
162
+ "extract": {
163
+ "fileProperty": "content"
164
+ }
165
+ }
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "@type": "cr:RecordSet",
171
+ "@id": "open_review_oracle",
172
+ "name": "open_review_oracle",
173
+ "description": "Per-case oracle: reviewer scores, rebuttal, meta-review, ground-truth PC decision, rebuttal validity. Joinable with `open_review` by `case_id`.",
174
+ "field": [
175
+ {
176
+ "@type": "cr:Field",
177
+ "@id": "open_review_oracle/case_id",
178
+ "name": "case_id",
179
+ "description": "Case identifier (matches open_review/case_id).",
180
+ "dataType": "sc:Text",
181
+ "source": {
182
+ "fileSet": {
183
+ "@id": "open_review-json-files"
184
+ },
185
+ "extract": {
186
+ "fileProperty": "filename"
187
+ },
188
+ "transform": {
189
+ "regex": "^(iclr\\d+_\\d+)\\.json$"
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "@type": "cr:Field",
195
+ "@id": "open_review_oracle/oracle_json",
196
+ "name": "oracle_json",
197
+ "description": "Full oracle JSON for the case.",
198
+ "dataType": "sc:Text",
199
+ "source": {
200
+ "fileSet": {
201
+ "@id": "open_review-json-files"
202
+ },
203
+ "extract": {
204
+ "fileProperty": "content"
205
+ }
206
+ }
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "@type": "cr:RecordSet",
212
+ "@id": "parliament",
213
+ "name": "parliament",
214
+ "description": "UK Parliament Select Committee inquiries (one record per inquiry).",
215
+ "field": [
216
+ {
217
+ "@type": "cr:Field",
218
+ "@id": "parliament/case_id",
219
+ "name": "case_id",
220
+ "description": "Inquiry identifier.",
221
+ "dataType": "sc:Text",
222
+ "source": {
223
+ "fileSet": {
224
+ "@id": "parliament-files"
225
+ },
226
+ "extract": {
227
+ "fileProperty": "filename"
228
+ },
229
+ "transform": {
230
+ "regex": "^(parl_\\d+_\\d+)\\.json$"
231
+ }
232
+ }
233
+ },
234
+ {
235
+ "@type": "cr:Field",
236
+ "@id": "parliament/inquiry_data",
237
+ "name": "inquiry_data",
238
+ "description": "Full inquiry packet (JSON object: committee, title, background, submissions, ground-truth Conclusions).",
239
+ "dataType": "sc:Text",
240
+ "source": {
241
+ "fileSet": {
242
+ "@id": "parliament-files"
243
+ },
244
+ "extract": {
245
+ "fileProperty": "content"
246
+ }
247
+ }
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "@type": "cr:RecordSet",
253
+ "@id": "court",
254
+ "name": "court",
255
+ "description": "US Supreme Court oral-argument cases via Oyez.",
256
+ "field": [
257
+ {
258
+ "@type": "cr:Field",
259
+ "@id": "court/case_id",
260
+ "name": "case_id",
261
+ "description": "Case identifier.",
262
+ "dataType": "sc:Text",
263
+ "source": {
264
+ "fileSet": {
265
+ "@id": "court-files"
266
+ },
267
+ "extract": {
268
+ "fileProperty": "filename"
269
+ },
270
+ "transform": {
271
+ "regex": "^(scotus_.+)\\.json$"
272
+ }
273
+ }
274
+ },
275
+ {
276
+ "@type": "cr:Field",
277
+ "@id": "court/case_data",
278
+ "name": "case_data",
279
+ "description": "Full case packet (JSON: question presented, briefs, oral-argument segments, ground-truth disposition).",
280
+ "dataType": "sc:Text",
281
+ "source": {
282
+ "fileSet": {
283
+ "@id": "court-files"
284
+ },
285
+ "extract": {
286
+ "fileProperty": "content"
287
+ }
288
+ }
289
+ }
290
+ ]
291
+ }
292
+ ],
293
+ "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.",
294
+ "rai:dataCollectionType": [
295
+ "Web Scraping"
296
+ ],
297
+ "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.",
298
+ "rai:dataCollectionTimeframe": "ICLR 2024 through ICLR 2026; UK Parliament inquiries published by April 2026; SCOTUS terms 2005-2024.",
299
+ "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.",
300
+ "rai:dataPreprocessingProtocol": [
301
+ "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.",
302
+ "Parl: API JSON normalised to a fixed schema with consistent committee-id and inquiry-id keys.",
303
+ "Court: Oyez transcripts segmented per speaker and labelled with role (justice, attorney for petitioner / respondent)."
304
+ ],
305
+ "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.",
306
+ "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.",
307
+ "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.",
308
+ "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.",
309
+ "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.",
310
+ "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.",
311
+ "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."
312
+ }
data/court.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1a8a47dc25c36f55b6f22174aca5a0fcb49b45bec6b2387cb4520c0c9278f84
3
+ size 7104319
data/open_review.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cd8df9788e1b42facac55723ad4f53ad60b8f1f00ce5b2f0be899be0e12679f
3
+ size 26153575
data/parliament.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7a0fdabac9e6eaf280cab649963b9736812bd31c2ee74549b67c7a90325214e4
3
+ size 26276552
open_review/iclr2024_8529.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8529",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Understanding Your Agent: Leveraging Large Language Models for Behavior Explanation",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 3,
10
+ 5,
11
+ 5,
12
+ 3
13
+ ],
14
+ "score_mean": 4.0,
15
+ "score_variance": 1.33,
16
+ "score_spread": 2,
17
+ "score_min": 3,
18
+ "score_max": 5,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "PKsTHJXn4d",
23
+ "primary_area": "visualization or interpretation of learned representations",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_5qZT",
28
+ "review_id": "ve7c8Bhhmi",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 2,
32
+ "presentation": 3,
33
+ "contribution": 2,
34
+ "confidence": 2
35
+ },
36
+ "review_text_chars": 3288,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 1849103,
39
+ "post_rebuttal_text_signal": true,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_NiyW",
44
+ "review_id": "8JFZapXQ0Q",
45
+ "scores": {
46
+ "rating": 5,
47
+ "soundness": 2,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 1787,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 836354,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_Pb35",
60
+ "review_id": "hCAv18l9Lm",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 3,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 8665,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 848335,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_ccmh",
76
+ "review_id": "CLBeaGJtuI",
77
+ "scores": {
78
+ "rating": 3,
79
+ "soundness": 3,
80
+ "presentation": 3,
81
+ "contribution": 1,
82
+ "confidence": 4
83
+ },
84
+ "review_text_chars": 7996,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 857418,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8529.md ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## UNDERSTANDING YOUR AGENT: LEVERAGING LARGE LANGUAGE MODELS FOR BEHAVIOR EXPLANATION
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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).
14
+
15
+ 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
16
+
17
+ 1
18
+
19
+ **==> picture [358 x 86] intentionally omitted <==**
20
+
21
+ **----- Start of picture text -----**<br>
22
+ Policy Distillation Generate Behavior Representation Interactive Explanations<br>Observation Prompt and Examples<br>Generate<br>Decision Tree Decision Further<br>Decision Path Prompts<br>Path LLM<br>Action: Explanation of Agent Behavior<br>medic rescues the victim<br>**----- End of picture text -----**<br>
23
+
24
+ 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.
25
+
26
+ 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.
27
+
28
+ 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).
29
+
30
+ 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.
31
+
32
+ ## 2 RELATED WORK
33
+
34
+ **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.
35
+
36
+ **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-_
37
+
38
+ 2
39
+
40
+ _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.
41
+
42
+ ## 3 LANGUAGE EXPLANATIONS FOR AGENT BEHAVIOR
43
+
44
+ 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.
45
+
46
+ **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].
47
+
48
+ ## 3.1 DISTILLING A DECISION TREE
49
+
50
+ 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,
51
+
52
+ **==> picture [274 x 15] intentionally omitted <==**
53
+
54
+ 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).
55
+
56
+ ## 3.2 BEHAVIOR REPRESENTATION GENERATION
57
+
58
+ 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.
59
+
60
+ 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
61
+
62
+ 3
63
+
64
+ **==> picture [397 x 170] intentionally omitted <==**
65
+
66
+ **----- Start of picture text -----**<br>
67
+ X - Coordinate Explorative Policy Decision Path Exploitative Decision Path<br>0 1 2 3 room (0, 0) has been explored room (0, 1) doesn't contain rubble.<br>0 room (0, 4) has been explored room (3, 2) doesn't contain rubble.<br>room (3, 4) has been explored room (2, 1) contains rubble.<br>room (3, 0) has not been explored room (2, 3) doesn't contain a victim.<br>1 room (2, 4) has been explored room (1, 0) doesn't contain rubble.<br>engineer is not in room (0, 0) engineer is in room (1, 0).<br>2 engineer is in room (1, 0) room (0, 0) doesn't contain rubble.<br>room (1, 3) has been explored room (1, 2) doesn't contain rubble.<br>Explorative Explanations through LLM Exploitative Explanations through LLM<br>3 The engineer moves east to room (2, 0) because this action The engineer moves east to room (2, 0) because room (2, 1)<br>aligns with an exploration goal. The current room (1, 0) has contains rubble. There is no direct path to room (2, 1) from<br>already been explored, and room (3, 0) to the right has not the engineer's current location, as no adjacent room<br>been explored. Therefore, the engineer seems to move contains rubble. The engineer is likely planning to move to<br>4 east to reach the unexplored room (3, 0) . room (2, 0) in order to then move south to room (2, 1), where<br>it can begin to remove the rubble. This is suggestible as the<br> Explorative Next-Action Prediction by LLM features show that the engineer seems to prioritize<br>moving toward areas containing rubble .<br>Engineer Medic Based on the new features, the engineer will likely move<br>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<br>strategy of exploring unexplored rooms . Moving east to Based on the new features, the engineer will likely move<br>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 .<br>Y - Coordinate<br>**----- End of picture text -----**<br>
68
+
69
+ 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.
70
+
71
+ 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.
72
+
73
+ 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.
74
+
75
+ ## 3.3 IN-CONTEXT LEARNING WITH BEHAVIOR REPRESENTATIONS
76
+
77
+ 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.
78
+
79
+ 4
80
+
81
+ **==> picture [379 x 225] intentionally omitted <==**
82
+
83
+ **----- Start of picture text -----**<br>
84
+ Explanation: The medic moves east to room (3, 3) because room (3, 4) The engineer decides to move south to<br>has not been explored , and most of the surrounding rooms have been room (2, 1) because the engineer is<br>explored. Moving to (3, 3) positions the medic closer to the unexplored currently in room (2, 0). Given the limited<br>room (3, 4). This action suggests that the medic is prioritizing features available and the action taken, the<br>exploration of unknown areas. engineer may be trying to search<br>southward since it's already navigated the<br>Why did the medic not consider the victim in room (2, 2) ? northenmost rolls, but the exact reasoning<br>is unclear. The agent may also be acting<br>non-optimally or according to some<br>If room (2, 2) contains a victim but that information is not in the unknown criteria, since such a move does<br>Behavior Representation, it suggests the following: not seem to directly take into account the<br>The observation did not capture this vital information for some location of rubble or unexplored rooms.<br>reason.<br>The medic did not consider this information when making its<br>Given the features, it seems that the agent<br>decision, which would imply a non-optimal decision-making<br>is checking whether it is already on the top<br>process on the part of the medic.<br>In either case, the absence of this information in the Behavior row (y=0). As the agent is not currently in<br>the top row, it is opting to move north to<br>Representation and the subsequent decision to move elsewhere would<br>get closer. The particular end goal is not<br>indicate that saving the victim in room (2, 2) was not part of the<br>medic's decision criteria at that time. This could be a flaw or limitation apparent from the listed features, and it<br>may be the case that the agent is not quite<br>in the decision-making algorithm of the medic.<br>acting optimally but is adhering to a<br>heuristic rule or strategy of 'move north as<br>This is too verbose! long as it's not on the northmost row'. On<br>the other hand, it could also be the case<br>where the game's next goals or best actions<br>The medic did not consider the victim in room (2, 2) because the to perform strictly depend on the layout of<br>information about the victim's presence was not included in the the top row, which we don't have<br>provided Features . information about.<br>**----- End of picture text -----**<br>
85
+
86
+ 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.
87
+
88
+ 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.
89
+
90
+ ## 4 QUANTITATIVE RESULTS AND ANALYSIS
91
+
92
+ 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?
93
+
94
+ **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:
95
+
96
+ - **Explore** : Rubble and victims are immediately removed or rescued upon discovery.
97
+
98
+ - **Exploit** : Agents explore all rooms before backtracking to remove rubble/rescue victims.
99
+
100
+ - **Fixed** : Agents ignore rubble and victims and simply move in a pre-determined pattern.
101
+
102
+ We generate natural language explanations for each agent’s behavior using one of three methods:
103
+
104
+ - **BR (Path)** : Our proposed method which uses a decision path as a behavior representation.
105
+
106
+ 5
107
+
108
+ |||Long-term|Short-term|Ambiguous|
109
+ |---|---|---|---|---|
110
+ ||Method|Strategy Category Goal|Strategy Category Goal|Strategy Category Goal|
111
+ |Exploit|**BR (Path)**<br>BR (States)<br>No BR|0.70<br>0.75<br>**0.75**<br>**0.75**<br>**0.80**<br>**0.75**<br>0.25<br>0.25<br>0.25|**1.00**<br>**1.00**<br>**1.00**<br>0.75<br>0.75<br>0.75<br>0.90<br>0.95<br>0.95|**0.90**<br>**0.85**<br>**0.85**<br>0.60<br>0.75<br>0.75<br>0.70<br>0.75<br>0.75|
112
+ |Explore|**BR (Path)**<br>BR (States)<br>No BR|**0.90**<br>**0.75**<br>**0.25**<br>0.40<br>0.05<br>0.05<br>0.20<br>0.30<br>0.15|**1.00**<br>**1.00**<br>0.70<br>0.70<br>0.95<br>**0.95**<br>0.40<br>0.90<br>0.90|**0.90**<br>**0.80**<br>**0.35**<br>0.00<br>0.00<br>0.00<br>0.00<br>0.05<br>0.00|
113
+
114
+ 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.
115
+
116
+ - **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.
117
+
118
+ - **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.
119
+
120
+ - The generated behavior explanations are hand-annotated with regards to the following metrics:
121
+
122
+ - **Strategy** : Whether the agent’s behavior (defined above) was identified in the explanation.
123
+
124
+ - **Category** : Whether the agent’s goal category was identified in the explanation, e.g., the agent is moving towards a rubble/victim/unexplored room.
125
+
126
+ - **Goal** : Whether the agent’s specific goal was identified in the explanation, e.g., the agent is moving to rubble in room (1, 2).
127
+
128
+ - **Action** : Whether the agent’s next action was successfully predicted.
129
+
130
+ - **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).
131
+
132
+ 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.
133
+
134
+ ## 4.1 EVALUATING EXPLANATION QUALITY
135
+
136
+ 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.
137
+
138
+ **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.
139
+
140
+ **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
141
+
142
+ 6
143
+
144
+ |||Long-term|Short-term|Ambiguous|
145
+ |---|---|---|---|---|
146
+ ||Method|Action<br>Intent|Action<br>Intent|Action<br>Intent|
147
+ |Exploit|**BR (Path)**<br>BR (States)<br>No BR|**0.80**<br>**0.75**<br>0.65<br>0.55<br>0.55<br>0.50|0.40<br>**0.75**<br>**0.75**<br>**0.75**<br>0.65<br>0.65|**0.85**<br>**0.85**<br>0.80<br>0.70<br>0.80<br>0.75|
148
+ |Explore|**BR (Path)**<br>BR (States)<br>No BR|**0.95**<br>**1.00**<br>0.60<br>0.40<br>0.65<br>0.25|**0.80**<br>**0.95**<br>0.45<br>0.45<br>0.50<br>0.35|**0.90**<br>**0.95**<br>0.05<br>0.05<br>0.30<br>0.10|
149
+
150
+ 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)
151
+
152
+ 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.
153
+
154
+ ## 4.2 EVALUATING FUTURE ACTION PREDICTION
155
+
156
+ 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.
157
+
158
+ **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.
159
+
160
+ **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
161
+
162
+ 7
163
+
164
+ **==> picture [398 x 101] intentionally omitted <==**
165
+
166
+ **----- Start of picture text -----**<br>
167
+ Exploit Explore<br>Method Strategy Action Intent BR (States)BR (Path) 0.5<br>0.4<br>BR (Path) 0.80 0.40 0.25 No BR<br>0.3<br>BR (States) 0.05 0.65 0.00 BR (States)BR (Path) 0.2<br>No BR 0.00 0.35 0.00 No BR 0.1<br>Long-termShort-termAmbiguousLong-termShort-termAmbiguousFixed<br>Fixed<br>**----- End of picture text -----**<br>
168
+
169
+ 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).
170
+
171
+ follows such an action distribution, leading to a case where actions are predicted correctly but the agent’s rationale is not.
172
+
173
+ ## 4.3 EVALUATING HALLUCINATION
174
+
175
+ The frequency of hallucination in the explanations and action predictions is shown in Fig. 4.
176
+
177
+ **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.
178
+
179
+ **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.
180
+
181
+ ## 5 PARTICIPANT STUDY AND ANALYSIS
182
+
183
+ 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:
184
+
185
+ **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)._
186
+
187
+ **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._
188
+
189
+ ## 5.1 EVALUATING EXPLANATION HELPFULNESS
190
+
191
+ 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** ,
192
+
193
+ 8
194
+
195
+ **==> picture [396 x 82] intentionally omitted <==**
196
+
197
+ **----- Start of picture text -----**<br>
198
+ Ours Preferred Tied Ours Not Preferred Interaction Helpful Interaction Not Helpful<br>202 59 106<br>6 14<br>318 22 25<br>15 5<br>127 91 156<br>0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0<br>Percentage of Explanation Chosen Percentage of Chosen Interactions<br>BR (States) Optimal<br>Template<br>Human Sub-Optimal<br>**----- End of picture text -----**<br>
199
+
200
+ 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).
201
+
202
+ 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.
203
+
204
+ **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).
205
+
206
+ ## 5.2 EVALUATING EXPLANATION INTERACTIONS
207
+
208
+ 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.
209
+
210
+ ## 6 CONCLUSION AND FUTURE WORK
211
+
212
+ 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.
213
+
214
+ 9
215
+
216
+ ## REFERENCES
217
+
218
+ Knowledge-grounded self-rationalization via extractive and natural language explanations. 2022.
219
+
220
+ - 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.
221
+
222
+ - Ofra Amir, Finale Doshi-Velez, and David Sarne. Summarizing agent strategies. _Autonomous Agents and Multi-Agent Systems_ , 33:628–644, 2019.
223
+
224
+ - Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? _Advances in neural information processing systems_ , 27, 2014.
225
+
226
+ - Osbert Bastani, Carolyn Kim, and Hamsa Bastani. Interpretability via model extraction. _arXiv preprint arXiv:1706.09773_ , 2017.
227
+
228
+ - Osbert Bastani, Yewen Pu, and Armando Solar-Lezama. Verifiable reinforcement learning via policy extraction. _Advances in neural information processing systems_ , 31, 2018.
229
+
230
+ - 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.
231
+
232
+ - 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.
233
+
234
+ - 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.
235
+
236
+ - 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.
237
+
238
+ Mengnan Du, Ninghao Liu, and Xia Hu. Techniques for interpretable machine learning. _Communications of the ACM_ , 63(1):68–77, 2019.
239
+
240
+ - 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.
241
+
242
+ - 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.
243
+
244
+ - 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.
245
+
246
+ - Nicholas Frosst and Geoffrey Hinton. Distilling a neural network into a soft decision tree. _arXiv preprint arXiv:1711.09784_ , 2017.
247
+
248
+ - Dimitra Gkatzia, Oliver Lemon, and Verena Rieser. Natural language generation enhances human decision-making with uncertain information. _arXiv preprint arXiv:1606.03254_ , 2016.
249
+
250
+ - David Gunning, Mark Stefik, Jaesik Choi, Timothy Miller, Simone Stumpf, and Guang-Zhong Yang. Xai—explainable artificial intelligence. _Science robotics_ , 4(37):eaay7120, 2019.
251
+
252
+ - 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.
253
+
254
+ 10
255
+
256
+ 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.
257
+
258
+ - 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.
259
+
260
+ - Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. _arXiv preprint arXiv:1503.02531_ , 2015.
261
+
262
+ - Shengran Hu and Jeff Clune. Thought cloning: Learning to think while acting by imitating human thinking. _arXiv preprint arXiv:2306.00323_ , 2023.
263
+
264
+ - W Lewis Johnson. Agents that learn to explain themselves. In _AAAI_ , pp. 1257–1263. Palo Alto, CA, 1994.
265
+
266
+ - 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.
267
+
268
+ - Robert Kass, Tim Finin, et al. The need for user models in generating expert system explanations. _International Journal of Expert Systems_ , 1(4), 1988.
269
+
270
+ - 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.
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - 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.
279
+
280
+ - 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.
281
+
282
+ - 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.
283
+
284
+ - 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.
285
+
286
+ - 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.
287
+
288
+ - Tim Miller. Explanation in artificial intelligence: Insights from the social sciences. _Artificial intelligence_ , 267:1–38, 2019.
289
+
290
+ 11
291
+
292
+ - 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.
293
+
294
+ - 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.
295
+
296
+ - 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.
297
+
298
+ - 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.
299
+
300
+ - 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.
301
+
302
+ - 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.
303
+
304
+ - Tianmin Shu, Caiming Xiong, and Richard Socher. Hierarchical and interpretable skill acquisition in multi-task reinforcement learning. _arXiv preprint arXiv:1712.07294_ , 2017.
305
+
306
+ - 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.
307
+
308
+ - 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.
309
+
310
+ - 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.
311
+
312
+ - Lindsay Wells and Tomasz Bednarz. Explainable AI and reinforcement learning—a systematic review of current approaches and trends. 4. ISSN 2624-8212.
313
+
314
+ - 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.
315
+
316
+ - 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.
317
+
318
+ 12
319
+
320
+ ## A APPENDIX
321
+
322
+ 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.
323
+
324
+ ## **Environment Description**
325
+
326
+ 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:
327
+
328
+ 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.
329
+
330
+ - 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.
331
+
332
+ - 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.
333
+
334
+ - 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.
335
+
336
+ - 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.
337
+
338
+ - 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.
339
+
340
+ - 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.
341
+
342
+ - Rubble in the room won’t affect the movement of the agents.
343
+
344
+ ## **Behavior Representation Description**
345
+
346
+ 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:
347
+
348
+ 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
349
+
350
+ 13
351
+
352
+ decisions, so consider that possibility if there seems like no reasonable goal the agent could be trying to accomplish from the set of features.
353
+
354
+ ## **In-Context Learning (ICL) examples**
355
+
356
+ 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.
357
+
358
+ 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.
359
+
360
+ Action taken by the engineer:
361
+
362
+ engineer moves east to room (1, 2).
363
+
364
+ Explanation:
365
+
366
+ 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.
367
+
368
+ 14
369
+
open_review/iclr2024_8530.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8530",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Decompose Time and Frequency Dependencies: Multivariate Time Series Physiological Signal Emotion Recognition",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 3,
10
+ 3,
11
+ 5
12
+ ],
13
+ "score_mean": 3.67,
14
+ "score_variance": 1.33,
15
+ "score_spread": 2,
16
+ "score_min": 3,
17
+ "score_max": 5,
18
+ "decision": "Reject",
19
+ "rebuttal_validity_ground_truth": false,
20
+ "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",
21
+ "forum_id": "edETIhDTwL",
22
+ "primary_area": "applications to neuroscience & cognitive science",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_s9qV",
27
+ "review_id": "90QQAEBaFm",
28
+ "scores": {
29
+ "rating": 3,
30
+ "soundness": 2,
31
+ "presentation": 1,
32
+ "contribution": 1,
33
+ "confidence": 5
34
+ },
35
+ "review_text_chars": 1512,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 914522,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_8PZe",
43
+ "review_id": "0QAf89WzPd",
44
+ "scores": {
45
+ "rating": 3,
46
+ "soundness": 3,
47
+ "presentation": 2,
48
+ "contribution": 1,
49
+ "confidence": 5
50
+ },
51
+ "review_text_chars": 1814,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 919991,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_zx9B",
59
+ "review_id": "y0at0BwtbA",
60
+ "scores": {
61
+ "rating": 5,
62
+ "soundness": 2,
63
+ "presentation": 2,
64
+ "contribution": 3,
65
+ "confidence": 4
66
+ },
67
+ "review_text_chars": 4816,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 2164975,
70
+ "post_rebuttal_text_signal": true,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": true,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8530.md ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ DECOMPOSE TIME AND FREQUENCY DEPENDENCIES: - MULTIVARIATE TIME SERIES PHYSIOLOGICAL SIG NAL EMOTION RECOGNITION
4
+
5
+ ##
6
+
7
+ Authors withheld for review
8
+
9
+ ## ABSTRACT
10
+
11
+ 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.
12
+
13
+ ## 1 INTRODUCTION
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ The major contribution of this paper are :
20
+
21
+ 1
22
+
23
+ 1. We propose a new State-of-the-art (SOTA) transformer-based solution for physiological signal emotion recognition.
24
+
25
+ 2. We propose a new model architecture and framework for domain-inconsistent multivariate time series prediction.
26
+
27
+ 3. Our proposed method achieved SOTA results on the Continuously Annotated Signals of Emotion (CASE) dataset. Sharma et al. (2019)
28
+
29
+ ## 2 RELATED WORK
30
+
31
+ ## 2.1 AUTOFORMER
32
+
33
+ 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.
34
+
35
+ ## 2.1.1 AUTO-CORRELATION ATTENTION
36
+
37
+ 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:
38
+
39
+ **==> picture [341 x 105] intentionally omitted <==**
40
+
41
+ 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.
42
+
43
+ ## 2.1.2 SERIES DECOMPOSITION
44
+
45
+ The series decomposition block decomposes the series sequence into trend-cyclical and seasonal components. The decompose process can be presented as:
46
+
47
+ **==> picture [260 x 24] intentionally omitted <==**
48
+
49
+ 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**_ ).
50
+
51
+ ## 2.2 FEDFORMER
52
+
53
+ 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
54
+
55
+ 2
56
+
57
+ attention in frequency domain. It also further improve series decomposition block with multiple window length instead of fix window length.
58
+
59
+ ## 2.2.1 FOURIER ATTENTION
60
+
61
+ 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:
62
+
63
+ 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).
64
+
65
+ In this study, the Fourier Attention is implemented for decompose the pure frequency domain representation from time-frequency domain representation from the encoder.
66
+
67
+ ## 2.2.2 WAVELET ATTENTION
68
+
69
+ 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:
70
+
71
+ 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).
72
+
73
+ 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.
74
+
75
+ ## 2.3 MIXTURE OF EXPERTS SERIES DECOMPOSITION(MOE-DECOMPOSE)
76
+
77
+ 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:
78
+
79
+ _**T**_ = SoftMax(L( _**X**_ )) _×_ P( _**X**_ ) (5)
80
+
81
+ 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.
82
+
83
+ ## 2.4 CROSSFORMER
84
+
85
+ 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.
86
+
87
+ ## 2.4.1 DIMENSION WISE SEGMENT (DSW) EMBEDDING
88
+
89
+ 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:
90
+
91
+ _**X** embed_ = E _segment_ ( _**X** inp_ ) + E _pos_ (6)
92
+
93
+ 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
94
+
95
+ 3
96
+
97
+ ## 2.4.2 TWO-STAGE ATTENTION (TSA)
98
+
99
+ 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:
100
+
101
+ **==> picture [248 x 28] intentionally omitted <==**
102
+
103
+ where _**X**[dim]_ denotes the output the TSA block.
104
+
105
+ 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.
106
+
107
+ ## 3 METHODOLOGY
108
+
109
+ 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_ ).
110
+
111
+ ## 3.1 DATA PREPROCESSING
112
+
113
+ The data prepossessing of this model includes 3 parts: signal preprocessing, patch segmentation, and sequence embedding.
114
+
115
+ ## 3.1.1 SIGNAL PREPROCESSING
116
+
117
+ 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).
118
+
119
+ ## 3.1.2 PATCH SEGMENTATION AND INPUT PROJECTION
120
+
121
+ 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.
122
+
123
+ 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
124
+
125
+ 4
126
+
127
+ distribution. The process can be formulized as follows:
128
+
129
+ **==> picture [272 x 78] intentionally omitted <==**
130
+
131
+ 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.
132
+
133
+ ## 3.1.3 SEQUENCE EMBEDDING
134
+
135
+ 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.
136
+
137
+ 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:
138
+
139
+ **==> picture [298 x 64] intentionally omitted <==**
140
+
141
+ 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.
142
+
143
+ ## 3.2 MODEL ARCHITECTURE
144
+
145
+ **==> picture [374 x 141] intentionally omitted <==**
146
+
147
+ Figure 1: Overall Model Architecture
148
+
149
+ 5
150
+
151
+ **==> picture [302 x 97] intentionally omitted <==**
152
+
153
+ **----- Start of picture text -----**<br>
154
+ (a) Encoder TSA<br>(b) Frequency Decoder TSA<br>(c) Time Decoder TSA<br>**----- End of picture text -----**<br>
155
+
156
+ Figure 2: TSA architecture for encoder and decoder
157
+
158
+ 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.
159
+
160
+ ## 3.2.1 ENCODER
161
+
162
+ The encoder contains 3 major parts, Frequency Enhanced TSA, MOE-Decompose, and FeedForward layer, which can be formulized as:
163
+
164
+ **==> picture [336 x 45] intentionally omitted <==**
165
+
166
+ 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.
167
+
168
+ ## 3.2.2 DECODER
169
+
170
+ 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:
171
+
172
+ **==> picture [297 x 32] intentionally omitted <==**
173
+
174
+ 6
175
+
176
+ where Frequency Decoder can be presented as:
177
+
178
+ _**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]_[)]
179
+
180
+ 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.
181
+
182
+ 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.
183
+
184
+ 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.
185
+
186
+ ## 3.2.3 DOMAIN ADAPTATION RATIO
187
+
188
+ 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:
189
+
190
+ **==> picture [303 x 57] intentionally omitted <==**
191
+
192
+ where ratio _**S** ,_ ratio _**T**_ denote the seasonal and the trend adaptive ratio respectively, and _**X** dec_ denote the model output.
193
+
194
+ ## 3.3 LOSS FUNCTION
195
+
196
+ 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:
197
+
198
+ **==> picture [279 x 11] intentionally omitted <==**
199
+
200
+ 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).
201
+
202
+ ## 3.4 MULTI-TASK LEARNING
203
+
204
+ > 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]_[)]
205
+
206
+ 7
207
+
208
+ for arousal. The final model output _**X** dec_ will be:
209
+
210
+ **==> picture [284 x 48] intentionally omitted <==**
211
+
212
+ 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:
213
+
214
+ **==> picture [355 x 25] intentionally omitted <==**
215
+
216
+ where _σ_ is noise parameter.
217
+
218
+ ## 4 EXPERIMENTS & RESULTS
219
+
220
+ ## 4.1 DATASET
221
+
222
+ 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.
223
+
224
+ ## 4.2 EXPERIMENT SETTINGS
225
+
226
+ 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.
227
+
228
+ - **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.
229
+
230
+ - **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.
231
+
232
+ - **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.
233
+
234
+ - **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.
235
+
236
+ 8
237
+
238
+ 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)
239
+
240
+ |**Ours**<br>**AutoGluon**<br>**RF or**<br>**XGBoost**<br>**Multi-scale**<br>**Transformer**|**Ours**<br>**AutoGluon**<br>**RF or**<br>**XGBoost**<br>**Multi-scale**<br>**Transformer**|**Ours**<br>**AutoGluon**<br>**RF or**<br>**XGBoost**<br>**Multi-scale**<br>**Transformer**|**Ours**<br>**AutoGluon**<br>**RF or**<br>**XGBoost**<br>**Multi-scale**<br>**Transformer**|**Ours**<br>**AutoGluon**<br>**RF or**<br>**XGBoost**<br>**Multi-scale**<br>**Transformer**|
241
+ |---|---|---|---|---|
242
+ |**Scenarios**<br>**Fold**<br>**Valence**<br>**Arousal**<br>**Valence**<br>**Arousal**<br>**Valence**<br>**Arousal**<br>**Valence**<br>**Arousal**|||||
243
+ |Across-time<br>scenario|**0.84**<br>**0.69**|0.95<br>0.91|0.87<br>0.85|1.50<br>1.64|
244
+ |Across-<br>subject<br>scenario<br>0<br>1<br>2<br>3<br>4<br>Scenario level|0.62<br>0.59<br>0.49<br>0.53<br>0.53<br>0.64<br>0.48<br>0.48<br>0.45<br>0.50<br>**0.51**<br>**0.55**|1.14<br>1.14<br>1.17<br>1.03<br>1.21<br>1.18<br>1.26<br>0.92<br>1.13<br>0.74<br>1.18<br>1.00|-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>1.36<br>1.17|-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>1.34<br>1.35|
245
+ |Across-<br>elicitor<br>scenario<br>0<br>1<br>2<br>3<br>Scenario level|1.93<br>2.40<br>0.94<br>0.65<br>0.73<br>0.86<br>0.89<br>0.62<br>**1.12**<br>**1.13**|2.36<br>2.29<br>1.27<br>0.92<br>0.92<br>1.35<br>1.15<br>1.20<br>1.42<br>1.44|-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>1.49<br>1.63|-<br>-<br>-<br>-<br>-<br>-<br>1.51<br>1.51|
246
+ |Across-<br>version<br>0<br>1|0.84<br>0.81<br>0.96<br>1.04|1.06<br>1.00<br>1.54<br>1.60|-<br>-<br>-<br>-|-<br>-<br>-<br>-|
247
+ |scenario|||||
248
+ |Scenario level|**0.90**<br>**0.93**|1.30<br>1.30|1.36<br>1.52|1.37<br>1.35|
249
+
250
+ ## 4.3 MODEL SETTINGS
251
+
252
+ 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.
253
+
254
+ ## 4.4 RESULTS
255
+
256
+ 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.
257
+
258
+ 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.
259
+
260
+ ## 5 CONCLUSION
261
+
262
+ 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.
263
+
264
+ ## REFERENCES
265
+
266
+ - 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.
267
+
268
+ 9
269
+
270
+ - 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.
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - 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.
279
+
280
+ - 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.
281
+
282
+ - Fuyan Ma, Bin Sun, and Shutao Li. Facial expression recognition with visual transformers and attentional selective fusion. _IEEE Transactions on Affective Computing_ , 2021.
283
+
284
+ - 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.
285
+
286
+ - Rosling Picard. Affective computing. cambridge, massachustes institure of technology, 1997.
287
+
288
+ - 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.
289
+
290
+ - 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.
291
+
292
+ - 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.
293
+
294
+ - 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.
295
+
296
+ - 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.
297
+
298
+ - 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.
299
+
300
+ - 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.
301
+
302
+ 10
303
+
304
+ - 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.
305
+
306
+ - 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.
307
+
308
+ ## A APPENDIX
309
+
310
+ ## A.1 FORMULA OF DOMAIN ADAPTIVE RATIO
311
+
312
+ The domain adaptive ratio can be formulized as :
313
+
314
+ **==> picture [289 x 152] intentionally omitted <==**
315
+
316
+ 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.
317
+
318
+ ## A.2 VANILLA TSA IMPLEMENTATION
319
+
320
+ The Cross Time stage Attention(CTA) is structured as:
321
+
322
+ **==> picture [299 x 30] intentionally omitted <==**
323
+
324
+ 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:
325
+
326
+ **==> picture [307 x 63] intentionally omitted <==**
327
+
328
+ 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.
329
+
330
+ 11
331
+
332
+ A.3 FREQUENCY ENHANCED TSA IMPLEMENTATION
333
+
334
+ The Cross Time stage Attention(CTA) is structured as:
335
+
336
+ **==> picture [334 x 29] intentionally omitted <==**
337
+
338
+ 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:
339
+
340
+ **==> picture [315 x 63] intentionally omitted <==**
341
+
342
+ 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.
343
+
344
+ ## A.4 FREQUENCY DOMAIN TSA IMPLEMENTATION
345
+
346
+ The Cross Time stage Attention(CTA) is structured as:
347
+
348
+ **==> picture [332 x 29] intentionally omitted <==**
349
+
350
+ 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:
351
+
352
+ **==> picture [315 x 63] intentionally omitted <==**
353
+
354
+ 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.
355
+
356
+ A.5 TIME DOMAIN TSA IMPLEMENTATION
357
+
358
+ The Cross Time stage Attention(CTA) is structured as:
359
+
360
+ **==> picture [275 x 13] intentionally omitted <==**
361
+
362
+ **==> picture [343 x 13] intentionally omitted <==**
363
+
364
+ 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.
365
+
366
+ 12
367
+
368
+ and Cross Dimension stage Attention(CDA) is presented as:
369
+
370
+ **==> picture [315 x 63] intentionally omitted <==**
371
+
372
+ 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.
373
+
374
+ A.6 PREDICTION VISUALIZATION
375
+
376
+ 13
377
+
378
+ **==> picture [355 x 90] intentionally omitted <==**
379
+
380
+ **==> picture [355 x 432] intentionally omitted <==**
381
+
382
+ **----- Start of picture text -----**<br>
383
+ (a) AutoGluon (Dollack et al., 2023)<br>(b) RF or XGBoost (D’Amelio et al., 2023)<br>(c) TSA + Frequency Decoder<br>(d) TSA + Time Decoder<br>(e) TSA + Time Decoder + Frequency Decoder<br>**----- End of picture text -----**<br>
384
+
385
+ 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)
386
+
387
+ 14
388
+
open_review/iclr2024_8531.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8531",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Cross-modality debiasing: using language to mitigate sub-population shifts in imaging",
6
+ "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.",
7
+ "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, [...]",
8
+ "initial_scores": [
9
+ 3,
10
+ 6,
11
+ 5,
12
+ 5
13
+ ],
14
+ "score_mean": 4.75,
15
+ "score_variance": 1.58,
16
+ "score_spread": 3,
17
+ "score_min": 3,
18
+ "score_max": 6,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "o1TKGCrSL7",
23
+ "primary_area": "societal considerations including fairness, safety, privacy",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_FPNj",
28
+ "review_id": "OXyHxLJw1D",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 2,
32
+ "presentation": 3,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 2852,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 17227,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_cXZe",
44
+ "review_id": "nLslb1LTLi",
45
+ "scores": {
46
+ "rating": 6,
47
+ "soundness": 3,
48
+ "presentation": 4,
49
+ "contribution": 3,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 2772,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 137171,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_BEYs",
60
+ "review_id": "9Fzv1TiRTE",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 2,
64
+ "presentation": 3,
65
+ "contribution": 3,
66
+ "confidence": 3
67
+ },
68
+ "review_text_chars": 1759,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1602846,
71
+ "post_rebuttal_text_signal": true,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_KXPh",
76
+ "review_id": "A8oWmEq18l",
77
+ "scores": {
78
+ "rating": 5,
79
+ "soundness": 3,
80
+ "presentation": 3,
81
+ "contribution": 2,
82
+ "confidence": 4
83
+ },
84
+ "review_text_chars": 5956,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 817318,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8531.md ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - CROSS MODALITY DEBIASING: USING LANGUAGE TO - MITIGATE SUB POPULATION SHIFTS IN IMAGING
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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).
14
+
15
+ 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.
16
+
17
+ Distributionally Robust Optimization (DRO) provides a paradigm to tackle the naturally distributional shifts Namkoong & Duchi (2016); Rockafellar et al. (2000). DRO typically involves optimizing
18
+
19
+ 1
20
+
21
+ 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.
22
+
23
+ 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.
24
+
25
+ Our contributions are summarized as follows:
26
+
27
+ - 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.
28
+
29
+ - 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.
30
+
31
+ ## 2 RELATED WORK
32
+
33
+ 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.
34
+
35
+ 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).
36
+
37
+ 2
38
+
39
+ ## 3 BACKGROUND
40
+
41
+ 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).
42
+
43
+ ## 3.1 CLIP
44
+
45
+ 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.
46
+
47
+ 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:
48
+
49
+ **==> picture [321 x 35] intentionally omitted <==**
50
+
51
+ 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.
52
+
53
+ ## 3.2 DRO
54
+
55
+ 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.
56
+
57
+ 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
58
+
59
+ 3
60
+
61
+ **==> picture [318 x 122] intentionally omitted <==**
62
+
63
+ **----- Start of picture text -----**<br>
64
+ Language-Image model<br>Dataset(X, ) 𝐼!! 𝐼(x#) 𝐴!# 𝐴∘𝐼(x#) ℓsim<br>x# Consistency loss<br>Pre-defined sub-populations<br>{F, M}:={female, male}<br>𝑇(𝑡!), 𝑇(𝑡")<br>Descriptions 𝑇!" ℓent<br>{𝑡!, 𝑡"} ≔ “a photo a {female, male}<br>people” Debiasing loss<br>MaxEnt(𝒫(F|x#), 𝒫(M|x#))<br>**----- End of picture text -----**<br>
65
+
66
+ 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.
67
+
68
+ 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.
69
+
70
+ ## 4 L-DRO: DISTRIBUTIONAL ROBUSTNESS VIA LANGUAGE
71
+
72
+ 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.
73
+
74
+ _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.
75
+
76
+ 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:
77
+
78
+ **==> picture [298 x 19] intentionally omitted <==**
79
+
80
+ 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.
81
+
82
+ 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.
83
+
84
+ 4
85
+
86
+ - Following architecture design in equation 1, we propose using the sup-population descriptions to debias the original feature representations.
87
+
88
+ - In order to retain general performance, another objective is designed to maintain consistency between the original feature representations and the debiased ones.
89
+
90
+ 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:
91
+
92
+ **==> picture [399 x 32] intentionally omitted <==**
93
+
94
+ 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.
95
+
96
+ ## 5 EXPERIMENTS
97
+
98
+ 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.
99
+
100
+ **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.
101
+
102
+ **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.
103
+
104
+ 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.
105
+
106
+ ## 5.1 WORST-CASE PERFORMANCE AND BEYOND
107
+
108
+ **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
109
+
110
+ 5
111
+
112
+ 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.(%)
113
+
114
+ |ebiasingtextprompt.(%)||||
115
+ |---|---|---|---|
116
+ |Classifcation text prompt<br>And Debiasing text prompt|Method|RN50<br>(Avg.Acc & W.C.Acc.)|ViT-B/32<br>(Avg.Acc & W.C.Acc.)|
117
+ |"a photo of []"|Zero-shot|64.9 & 49.2|49.6 & 35.6|
118
+ |And "a photo of []"|L-DRO|66.3±0.8 &**55.4±1.0**|51.6_±_1.2 &**38.3**_±_**1.5**|
119
+ |"photo of a [] people"|Zero-shot|70.1 & 52.9|58.8 & 49.2|
120
+ |And "photo of a [] people"|L-DRO|70.9±0.8 &**53.3±1.4**|60.4_±_0.7 &**53.3**_±_**0.9**|
121
+ |"photo of a [] hair people"|Zero-shot|77.4 & 65.2|86.4 & 61.1|
122
+ |And "photo of a [] people"|L-DRO|78.3±0.8 &**66.5±1.5**|86.1_±_0.3 &**69.7**_±_**2.1**|
123
+ |"a photo of a [] hair people|Zero-shot|77.4 & 62.6|85.2 & 70.6|
124
+ |And "a photo of a [] people"|L-DRO|78.0±0.7 &**63.5±1.4**|83.6_±_0.3 &**79.2**_±_**1.3**|
125
+ |"picture of [] hair people"|Zero-shot|87.6 & 67.1|86.1 & 65.0|
126
+ |And "picture of [] people"|L-DRO|88.8±0.3 &**74.7±1.1**|85.0±0.5 &**65.4±1.3**|
127
+ |"a picture of [] hair people"|Zero-shot|88.8 & 75.6|87.3 & 75.0|
128
+ |And "a picture of [] people"|L-DRO|89.0±0.3 &**75.8±1.1**|85.2±0.7 &**75.9±0.8**|
129
+ |"a picture of [] people"|Zero-shot|83.6 & 75.3|71.6 &**66.3**|
130
+ |And "a picture of [] people"|L-DRO|85.7±0.4 &**78.9±1.7**|71.2±0.4 & 58.8±0.8|
131
+
132
+ in the classification text prompt is male or female and [] in the classification text prompt is not blond or blond.
133
+
134
+ 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.
135
+
136
+ **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.
137
+
138
+ **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).
139
+
140
+ **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.
141
+
142
+ ## 5.2 MUTUAL EFFECTS OF DEBIASING VARIOUS SUB-POPULATIONS AND BEYOND
143
+
144
+ 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
145
+
146
+ 6
147
+
148
+ 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] (%)
149
+
150
+ |||Architecture<br>Method2|Architecture<br>Method2|Architecture<br>Method2|Architecture<br>Method2|Architecture<br>Method2|Architecture<br>Method2|Architecture<br>Method2|
151
+ |---|---|---|---|---|---|---|---|---|
152
+ |||RN50|||||||
153
+ |||_I ▷T_<br>OrthCali<br>_I ▷A ▷T_<br>ERM<br>_I ▷A ▷T_<br>CVaR DRO<br>_I ▷A ▷T_<br>_χ_2-DRO<br>_I ▷A ▷T_<br>JTT<br>_I ▷A ▷T_<br>L-DRO|||||||
154
+ |||ViT-B/32|||||||
155
+ |||_I ▷T_<br>OrthCali<br>_I ▷A ▷T_<br>ERM<br>_I ▷A ▷T_<br>CVaR DRO<br>_I ▷A ▷T_<br>_χ_2-DRO<br>_I ▷A ▷T_<br>JTT<br>_I ▷A ▷T_<br>L-DRO|||||||
156
+ |0.0<br>0.2<br>0.4<br>0.6<br>0.8<br>1.0<br>Accuracy||1<br>3<br>5<br>7<br>9<br>Epochs<br>Avg. Acc. in test - 2-DRO<br>W.C. Acc. in test - 2-DRO<br>Avg. Acc. in test - CVaR DRO<br>W.C. Acc. in test - CVaR DRO<br>Avg. Acc. in test - JTT<br>W.C. Acc. in test - JTT<br>Avg. Acc. in test - L-DRO<br>W.C. Acc. in test - L-DRO<br>0.0<br>0.2<br>0.4<br>0.6<br>0.8<br>1.0<br>Accuracy||||||1<br>3<br>5<br>7<br>9<br>Epochs<br>Avg. Acc. in test - 2-DRO<br>W.C. Acc. in test - 2-DRO<br>Avg. Acc. in test - CVaR DRO<br>W.C. Acc. in test - CVaR DRO<br>Avg. Acc. in test - JTT<br>W.C. Acc. in test - JTT<br>Avg. Acc. in test - L-DRO<br>W.C. Acc. in test - L-DRO|
157
+ ||||||||||
158
+ ||||||||||
159
+ ||||||||||
160
+ ||||||||||
161
+ |||Avg. Acc. in te<br>W.C. Acc. in te<br>Avg. Acc. in te<br>W.C. Acc. in te|st - 2-DRO<br>st - 2-DRO<br>st - CVaR DRO<br>st - CVaR DRO|Avg. Acc. in<br>W.C. Acc. in<br>Avg. Acc. in<br>W.C. Acc. in|test - JTT<br>test - JTT<br>test - L-DRO<br>test - L-DRO||||
162
+ ||||||||||
163
+ |||(a) Performance on CelebA dataset.||||||(b) Performance on Waterbirds dataset.|
164
+
165
+ 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.
166
+
167
+ 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
168
+
169
+ 7
170
+
171
+ 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.(%)
172
+
173
+ |Dataset<br>Acc.|Performance over varying size of training data<br>512<br>1024<br>2048<br>4096<br>8192<br>16384|
174
+ |---|---|
175
+ |CelebA<br>Avg.<br>W.C.|77.1_±_8.5<br>84.6_±_1.1<br>84.7_±_0.8<br>84.5_±_0.8<br>83.9_±_0.6<br>83.7_±_0.9<br>57.2_±_6.4<br>69.4_±_6.2<br>71.4_±_4.6_⋆_<br>74.1_±_2.8<br>76.3_±_3.3<br>77.4_±_2.8_⋄_<br>74.4_±_1.8<br>76.0_±_0.7<br>77.8_±_0.7<br>78.4_±_0.8<br>/<br>/<br>57.9_±_3.1_⋆_<br>63.2_±_1.9<br>65.1_±_1.1_⋄_<br>66.5_±_1.4<br>/<br>/|
176
+ |Waterbirds<br>Avg.<br>W.C.||
177
+
178
+ 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. (%)
179
+
180
+ |Method<br>Zero-shot<br>L-DRO<br>L-DRO<br>L-DRO<br>L-DRO<br>Zero-shot<br>L-DRO<br>L-DRO<br>L-DRO<br>L-DRO<br>L-DRO|Unaligned debiasing<br>Avg. Acc.<br>W.C. Acc.<br>Source<br>Target|
181
+ |---|---|
182
+ ||-<br>_{_male, female_}_<br>85.2<br>70.6<br>_{_male, female_}_<br>_{_male, female_}_<br>83.6_±_0.3<br>79.2_±_1.3<br>_{_old, young_}_<br>_{_male, female_}_<br>84.5_±_0.3<br>69.5_±_1.3<br>_{_attractive, not attractive_}_<br>_{_male, female_}_<br>84.3_±_0.2<br>73.9_±_1.7<br>_{_straight hair, wavy hair_}_<br>_{_male, female_}_<br>85.8_±_0.4<br>67.7_±_2.2<br>-<br>_{_old, young_}_<br>85.1<br>73.5<br>_{_old, young_}_1<br>_{_old, young_}_<br>88.0_±_0.7<br>84.3_±_1.6<br>_{_male, female_}_<br>_{_old, young_}_<br>84.3_±_0.8<br>69.4_±_1.7<br>_{_attractive, not attractive_}_<br>_{_old, young_}_<br>84.0_±_0.7<br>79.6_±_1.7<br>_{_straight hair, wavy hair_}_<br>_{_old, young_}_<br>85.9_±_0.5<br>72.1_±_1.8<br>[_{_old, young_}_,_{_male, female_}_]<br>_{_male, female_}_<br>86.7_±_0.8<br>78.9_±_1.6<br>_{_old, young_}_<br>86.9_±_1.1<br>81.2_±_1.8|
183
+
184
+ > 1 Debiasing test prompt for input space attributes _{_ old, young _}_ is "a photo of a [ _{_ old, not old _}_ , _{_ young, not young _}_ ] people".
185
+
186
+ 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). (%)
187
+
188
+ |Method|Semantically correlated debiasing<br>Avg. Acc.<br>W.C. Acc.<br>Source<br>Target|
189
+ |---|---|
190
+ |Zero-shot<br>L-DRO<br>L-DRO<br>L-DRO|-<br>_{_male, female_}_<br>85.2<br>70.6<br>_{_male, female_}_<br>_{_male, female_}_<br>83.6_±_0.3<br>79.2_±_1.3<br>_{_man, woman_}_1<br>_{_male, female_}_<br>84.9_±_0.3<br>75.8_±_2.3<br>_{_boy, girl_}_2<br>_{_male, female_}_<br>85.1_±_0.4<br>74.4_±_2.5<br>-<br>_{_old, young_}_<br>85.1<br>73.5<br>_{_old, young_}_<br>_{_old, young_}_<br>88.0_±_0.7<br>84.3_±_1.6<br>_{_adult, juvenile_}_<br>_{_old, young_}_<br>81.8_±_0.5<br>79.1_±_0.6<br>_{_mature, immature_}_<br>_{_old, young_}_<br>85.6_±_0.3<br>71.2_±_1.4|
191
+ |Zero-shot<br>L-DRO<br>L-DRO<br>L-DRO||
192
+
193
+ > 1 Debiasing test prompt is "a photo of a _{_ man, woman _}_ ".
194
+
195
+ > 2 Debiasing test prompt is "a photo of a _{_ boy, girl _}_ ".
196
+
197
+ and target sub-populations generally gets decreasing performance on the worst-case accuracy as expected.
198
+
199
+ 8
200
+
201
+ 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. (%)
202
+
203
+ |Architecture_a_<br>Method|CelebA<br>Waterbirds<br>Avg. Acc.<br>W.C. Acc.<br>Avg. Acc.<br>W.C. Acc.|
204
+ |---|---|
205
+ |_I ▷A_2 _▷T_<br>ERM<br>_I ▷A_1 _▷A_2 _▷T_<br>L-DRO + ERM|95.3_±_0.1<br>44.2_±_2.5<br>83.3_±_1.0<br>59.7_±_2.4<br>95.1_±_0.1<br>45.3_±_4.6<br>79.9_±_2.0<br>55.6_±_3.3<br>84.8_±_4.9<br>67.1_±_10.4<br>78.3_±_3.2<br>60.5_±_4.2<br>85.9_±_3.2<br>71.0_±_8.1<br>78.1_±_3.0<br>56.7_±_4.5<br>87.4_±_4.5<br>72.0_±_9.6<br>79.3_±_2.9<br>59.3_±_5.7<br>84.7_±_2.8<br>73.8_±_6.8<br>77.5_±_4.4<br>57.1_±_5.2<br>90.3_±_2.1<br>53.4_±_2.6<br>80.3_±_1.9<br>60.5_±_3.0<br>91.2_±_2.2<br>48.4_±_2.8<br>78.2_±_2.0<br>56.7_±_2.3|
206
+ |_I ▷A_2 _▷T_<br>CVaR DRO<br>_I ▷A_1 _▷A_2 _▷T_<br>L-DRO + CVaR-DRO||
207
+ |_I ▷A_2 _▷T_<br>_χ_2-DRO<br>_I ▷A_1 _▷A_2 _▷T_<br>L-DRO +_χ_2-DRO||
208
+ |_I ▷A_2 _▷T_<br>JTT<br>_I ▷A_1 _▷A_2 _▷T_<br>L-DRO + JTT||
209
+
210
+ _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.
211
+
212
+ ## 5.3 DEBIASED FEATURES IMPROVING THE STABILITY OF METHODS DEALING WITH SUB-POPULATION SHIFTS
213
+
214
+ 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.
215
+
216
+ ## 6 CONCLUSION
217
+
218
+ 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.
219
+
220
+ **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.
221
+
222
+ 9
223
+
224
+ ## REFERENCES
225
+
226
+ - 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.
227
+
228
+ - 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.
229
+
230
+ - 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.
231
+
232
+ - 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.
233
+
234
+ - 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.
235
+
236
+ - John Duchi and Hongseok Namkoong. Learning models with uniform performance via distributionally robust optimization. _arXiv preprint arXiv:1810.08750_ , 2018.
237
+
238
+ - 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.
239
+
240
+ - 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.
241
+
242
+ - 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.
243
+
244
+ - 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.
245
+
246
+ - Rui Gao, Xi Chen, and Anton J Kleywegt. Distributional robustness and regularization in statistical learning. _arXiv preprint arXiv:1712.06050_ , 2017.
247
+
248
+ - Soumyadip Ghosh, Mark Squillante, and Ebisa Wollega. Efficient stochastic gradient descent for learning with distributionally robust optimization. _arXiv preprint arXiv:1805.08728_ , 2018.
249
+
250
+ - 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.
251
+
252
+ - 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.
253
+
254
+ - 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.
255
+
256
+ 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.
257
+
258
+ - 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.
259
+
260
+ 10
261
+
262
+ - 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.
263
+
264
+ - 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.
265
+
266
+ - 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.
267
+
268
+ - Mike Li, Hongseok Namkoong, and Shangzhou Xia. Evaluating model performance under worst-case subpopulations. _Advances in Neural Information Processing Systems_ , 34:17325–17334, 2021.
269
+
270
+ - 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.
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - 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.
279
+
280
+ - Hongseok Namkoong and John C Duchi. Stochastic gradient methods for distributionally robust optimization with f-divergences. _Advances in neural information processing systems_ , 29, 2016.
281
+
282
+ - 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.
283
+
284
+ - 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.
285
+
286
+ - Joaquin Quiñonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. _Dataset shift in machine learning_ . Mit Press, 2008.
287
+
288
+ - 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.
289
+
290
+ - 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.
291
+
292
+ - R Tyrrell Rockafellar, Stanislav Uryasev, et al. Optimization of conditional value-at-risk. _Journal of risk_ , 2:21–42, 2000.
293
+
294
+ - 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.
295
+
296
+ 11
297
+
298
+ - Shibani Santurkar, Dimitris Tsipras, and Aleksander Madry. Breeds: Benchmarks for subpopulation shift. _arXiv preprint arXiv:2008.04859_ , 2020.
299
+
300
+ - Alexander Shapiro. Distributionally robust stochastic programming. _SIAM Journal on Optimization_ , 27(4):2258–2275, 2017.
301
+
302
+ - Alexander Shapiro. Chapter 7: Distributionally robust stochastic programming. In _Lectures on Stochastic Programming: Modeling and Theory, Third Edition_ , pp. 307–359. SIAM, 2021.
303
+
304
+ - Aman Sinha, Hongseok Namkoong, Riccardo Volpi, and John Duchi. Certifying some distributional robustness with principled adversarial training. _arXiv preprint arXiv:1710.10571_ , 2017.
305
+
306
+ - 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.
307
+
308
+ Princeton University. About wordnet. _Princeton University_ , 2010.
309
+
310
+ 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.
311
+
312
+ - 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.
313
+
314
+ - 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.
315
+
316
+ - 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.
317
+
318
+ Runtian Zhai, Chen Dan, Zico Kolter, and Pradeep Ravikumar. Understanding why generalized reweighting does not improve over erm. _arXiv preprint arXiv:2201.12293_ , 2022.
319
+
320
+ Michael Zhang and Christopher Ré. Contrastive adapters for foundation model group robustness. _arXiv preprint arXiv:2207.07180_ , 2022.
321
+
322
+ - 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.
323
+
324
+ - 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.
325
+
326
+ 12
327
+
328
+ ## A THE EFFECT OF TEXT PROMPT
329
+
330
+ 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. (%)
331
+
332
+ |Classifcation text prompt<br>And Debiasing text prompt|Method|Avg. Acc.|Worst-case Acc.|
333
+ |---|---|---|---|
334
+ |Input space sub-group: _{_female, male_}_||||
335
+ |"a photo of a_{_not blond, blond_}_hair people"|Zero-shot|85.2|70.6|
336
+ |And "aphoto of a _{_female,male_}_ people"<br>1|L-DRO|83.6_±_0.3|**79.2**_±_**1.3**|
337
+ |Or "a photo of a_{_female, not female_}_people"|L-DRO|88.8_±_0.3|65.0_±_0.9|
338
+ |Or "a photo of a_{_male, not male_}_people"|L-DRO|89.4_±_0.3|37.8_±_2.2|
339
+ |Or "a photo of a_{_[female, not female],<br>[male, not male]_}_people"|L-DRO|89.9_±_0.3|60.7_±_2.4|
340
+ |Input space sub-group: _{_old, young_}_||||
341
+ |"a photo of a_{_not blond, blond_}_hair people"|Zero-shot|85.1|73.5|
342
+ |And "a photo of a_{_old, young_}_people"|L-DRO|84.4_±_0.3|74.5_±_1.5|
343
+ |Or "a photo of a_{_old, not old_}_people"|L-DRO|82.2_±_0.05|78.2_±_0.6|
344
+ |Or "a photo of a_{_young, not young_}_people"|L-DRO|91.3_±_0.1|51.6_±_1.9|
345
+ |Or "aphoto of a _{_[old,not old],<br>[young,notyoung]_}_ people"|L-DRO|88.0_±_0.7|**84.3**_±_**1.6**|
346
+
347
+ > 1 " " denotes default choice.
348
+
349
+ 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.(%)
350
+
351
+ |debiasingtextprompt.(%)||||
352
+ |---|---|---|---|
353
+ |Classifcation text prompt<br>And Debiasing text prompt|Method|RN50<br>(Avg.Acc & W.C.Acc.)|ViT-B/32<br>(Avg.Acc & W.C.Acc.)|
354
+ |"a {landbird, waterbird}"|Zero-shot|68.1 & 43.4|74.8 & 56.8|
355
+ |And "{water, land}"|L-DRO|72.6±1.2 & 49.5±2.7|75.1±1.6 & 56.6±2.6|
356
+ |Or "{water, forest}"|L-DRO|74.9±1.2 &**57.6±2.6**|77.6±0.5 &**64.8±0.8**|
357
+ |"photo of {landbird, waterbird}"|Zero-shot|66.3 &**43.2**|66.1 & 39.6|
358
+ |And "photo of {water, land}"|L-DRO|63.3±1.4 & 41.0±3.3|76.0±0.7 &**61.9±1.4**|
359
+ |"photo of a {landbird, waterbird}"|Zero-shot|78.1 & 34.0|68.7 & 43.6|
360
+ |And "photo of a bird on|L-DRO|74.3±0.9 &**57.9±1.8**|71.8±2.5 &**49.7±4.7**|
361
+ |{water, land}"||||
362
+ |"photo of a {landbird, waterbird}"|Zero-shot|78.1& 34.0|68.7 & 43.6|
363
+ |And "photo of a bird on|L-DRO|77.4±1.3 &**62.7±2.8**|70.0±3.2 &**46.9±4.8**|
364
+ |{water, land} background"||||
365
+ |"a photo of a {landbird, waterbird}"|Zero-shot|76.8 & 40.8|69.7 & 45.5|
366
+ |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**|
367
+ |{water, land}"||||
368
+ |"a photo of a {landbird, waterbird}"|Zero-shot|76.8 & 40.8|69.7&**45.5**|
369
+ |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|
370
+ |{water, land} background"||||
371
+
372
+ 13
373
+
374
+ ## B EFFECTS OF TWO-PHASE TRAINING ON DRO METHODS
375
+
376
+ Table 9: The average accuracy and worst-case accuracy over different datasets and methods.[[1]] (%)
377
+
378
+ |Dataset|Architecture|Method|Average Acc.|Worst-case Acc.|
379
+ |---|---|---|---|---|
380
+ ||_I ▷A_2 _▷T_|ERM|95.3_±_0.1|44.2_±_2.5|
381
+ ||_I ▷A_2 _▷T_|CVaR DRO|86.6_±_1.0|11.7_±_9.7|
382
+ |CelebA|_I ▷A_2 _▷T_|_χ_2-DRO|84.2_±_8.3|61.3_±_8.5|
383
+ ||_I ▷A_2 _▷T_|CVaR DRO_⋆_|84.8_±_4.9|67.1_±_10.4|
384
+ ||_I ▷A_2 _▷T_|_χ_2-DRO_⋆_|87.4_±_4.5|72.0_±_9.6|
385
+
386
+ > 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.
387
+
388
+ ## C TEXT PROMPT FOR CLIP (VIT-L/14)
389
+
390
+ 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.
391
+
392
+ 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] .(%)
393
+
394
+ ||Classifcation text prompt<br>And Debiasing text prompt<br>Method<br>Average Acc.<br>Worst-case Acc.|
395
+ |---|---|
396
+ ||"a photo of_{_not blond, blond_}_"<br>Zero-shot<br>39.1<br>28.8<br>"photo of a_{_not blond, blond_}_"<br>Zero-shot<br>75.9<br>65.2<br>"a photo of a_{_not blond, blond_}_"<br>Zero-shot<br>64.0<br>39.7<br>"photo of a_{_not blond, blond_}_people"<br>Zero-shot<br>80.7<br>77.9<br>"aphoto of a _{_not blond,blond_}_ people"<br>Zero-shot<br>85.4<br>76.1<br>"photo of a_{_not blond, blond_}_hair people"<br>Zero-shot<br>78.5<br>70.7<br>"a photo of a_{_not blond, blond_}_hair people"<br>Zero-shot<br>75.6<br>64.5<br>And "aphoto of a _{_male,female_}_ people"<br>2<br>L-DRO<br>85_._9_±_0.9<br>**79.7**_±_**1.9**|
397
+ |||
398
+
399
+ > 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.
400
+
401
+ > 2 " " denotes default choice.
402
+
403
+ 14
404
+
open_review/iclr2024_8533.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8533",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Unsupervised Sign Language Translation and Generation",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 5,
10
+ 5,
11
+ 5,
12
+ 5
13
+ ],
14
+ "score_mean": 5.0,
15
+ "score_variance": 0,
16
+ "score_spread": 0,
17
+ "score_min": 5,
18
+ "score_max": 5,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "eeaKRQIaYd",
23
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_PET1",
28
+ "review_id": "XmltZGTiqf",
29
+ "scores": {
30
+ "rating": 5,
31
+ "soundness": 2,
32
+ "presentation": 3,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 2337,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 905803,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_WPdm",
44
+ "review_id": "jqhaqfYlFp",
45
+ "scores": {
46
+ "rating": 5,
47
+ "soundness": 3,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 3417,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 938028,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_zNBk",
60
+ "review_id": "U71cNImRBQ",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 3,
64
+ "presentation": 3,
65
+ "contribution": 2,
66
+ "confidence": 5
67
+ },
68
+ "review_text_chars": 3302,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 3144832,
71
+ "post_rebuttal_text_signal": true,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_gT8h",
76
+ "review_id": "fqsEblAkZy",
77
+ "scores": {
78
+ "rating": 5,
79
+ "soundness": 2,
80
+ "presentation": 2,
81
+ "contribution": 2,
82
+ "confidence": 4
83
+ },
84
+ "review_text_chars": 2432,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1131834,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8533.md ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## UNSUPERVISED SIGN LANGUAGE TRANSLATION AND GENERATION
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ 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
20
+
21
+ 1
22
+
23
+ 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.
24
+
25
+ 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.
26
+
27
+ 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.
28
+
29
+ Our contributions are summarized below:
30
+
31
+ 1. USLNet is the first unsupervised model for sign language translation and generation, addressing the challenges of scarce high-quality parallel sign language resources.
32
+
33
+ 2. USLNet serves as a comprehensive and versatile model capable of performing both sign language translation and generation tasks efficiently in a unified manner.
34
+
35
+ 3. USLNet demonstrates competitive performance compared to the previous supervised method on the BOBSL dataset.
36
+
37
+ ## 2 METHODOLOGY
38
+
39
+ 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.
40
+
41
+ **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.]
42
+
43
+ ## 2.1 TEXT RECONSTRUCTION MODULE
44
+
45
+ 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:
46
+
47
+ **==> picture [267 x 27] intentionally omitted <==**
48
+
49
+ This task facilitates the model’s learning of the underlying text structure and semantics while enhancing its capacity to manage noisy or incomplete inputs.
50
+
51
+ 2
52
+
53
+ **==> picture [397 x 448] intentionally omitted <==**
54
+
55
+ **----- Start of picture text -----**<br>
56
+ ① Text Reconstruction ② Video Reconstruction<br>Hello World Hello World Video Next Video<br>Enc -zationquanti TokenGener Dec<br>-ation<br>Text Text E EmbdsVideo Video Tokens ❓ G<br>Encoder Decoder Code<br>GPT<br>book<br>③ Cross-Modality Back-Translation<br>Text-Video-Text Back-Translation (T2V2T-BT) Video-Text-Video Back-Translation(V2T2V-BT)<br>6<br>Hello World<br>10 5<br>step 1 Text Encoder Text Decoder Hello World Text Encoder Text Decoder Pseudo text<br>begin end<br>28 Slide Window Aligner 9 3 73 Slide Window Aligner 4 8 9<br>7 Codebook GPT 4 2 Codebook GPT<br>VideoEnc VideoDec step 1begin VideoEnc VideoDec 10end<br>6 Pseudo video 5<br>(a) Tasks Explored<br>text Text Reconstruction Text Reconstruction<br>reconstruction Loss Sign Language GenerationVideo Reconstruction<br>Hello World Hello World Sign Language Translation<br>+ T2V2T-BT<br>+ V2T2V-BT<br>Text Text<br>Pseudo text<br>Encoder Decoder<br>Cross-Modality Slide Window Aligner T2V2T-BT Loss<br>Back-Translation<br>V2T2V-BT<br>Codebook GPT Decoder Loss<br>0<br>1 �(�) = � �(��|�<�) Pseudo video<br>12 8 49 37 64 26 90 ❓<br>N-1 �<� ��<br>VideoEncoder quantization 12 8 49 37 Next token Conv3DDecoderVideoDecoder<br>64 26 90 2<br> E 55 3 62 86 generation G G<br>78 98 7 9 Video<br>Reconstruction<br>(b) USLNet Illustration Loss<br>**----- End of picture text -----**<br>
57
+
58
+ 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.
59
+
60
+ ## 2.2 SIGN VIDEO RECONSTRUCTION MODULE
61
+
62
+ 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.
63
+
64
+ 3
65
+
66
+ **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.
67
+
68
+ 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.
69
+
70
+ **==> picture [299 x 13] intentionally omitted <==**
71
+
72
+ **==> picture [332 x 12] intentionally omitted <==**
73
+
74
+ The similarity between **Evi** and **ej** serves as the optimization objective function:
75
+
76
+ **==> picture [266 x 29] intentionally omitted <==**
77
+
78
+ **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:
79
+
80
+ **==> picture [263 x 27] intentionally omitted <==**
81
+
82
+ ## 2.3 CROSS-MODALITY BACK-TRANSLATION MODULE
83
+
84
+ 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.
85
+
86
+ **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**[.]
87
+
88
+ 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:
89
+
90
+ **==> picture [251 x 13] intentionally omitted <==**
91
+
92
+ **==> picture [251 x 13] intentionally omitted <==**
93
+
94
+ 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.
95
+
96
+ 4
97
+
98
+ **==> picture [396 x 84] intentionally omitted <==**
99
+
100
+ **----- Start of picture text -----**<br>
101
+ Current window Adjacent window Other words<br>Text 1 2 3 4 5 6 Current<br>window words<br>Adjacent window<br>words<br>Other words<br>Video<br>a b c d<br>**----- End of picture text -----**<br>
102
+
103
+ 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.
104
+
105
+ 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:
106
+
107
+ **==> picture [345 x 81] intentionally omitted <==**
108
+
109
+ 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.
110
+
111
+ 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.
112
+
113
+ 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.
114
+
115
+ **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
116
+
117
+ 5
118
+
119
+ 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:
120
+
121
+ **==> picture [260 x 27] intentionally omitted <==**
122
+
123
+ 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:
124
+
125
+ **==> picture [262 x 26] intentionally omitted <==**
126
+
127
+ 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.
128
+
129
+ ## 2.4 UNSUPERVISED JOINT TRAINING
130
+
131
+ 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.
132
+
133
+ **==> picture [351 x 10] intentionally omitted <==**
134
+
135
+ ## 3 EXPERIMENT
136
+
137
+ **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.
138
+
139
+ **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.
140
+
141
+ **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.
142
+
143
+ 6
144
+
145
+ Table 1: Sign language translation performance in terms of BLEU on BOBSL test set. B@1 and denotes BLEU-1 and BLEU-4, respectively.
146
+
147
+ |LEU-1 and BLEU-4,respectively.|||
148
+ |---|---|---|
149
+ |**Method**|**Dev**<br>B@1_↑_|**Test**<br>B@1_↑_<br>B@4_↑_|
150
+ ||||
151
+ |(Albanie et al., 2021)(supervised)<br>(Sincan et al.,2023)(supervised)|-<br>18.80|12.78<br>1.00<br>17.71<br>1.27|
152
+ |USLNet(unsupervised)<br>USLNet(supervised)<br>USLNet(unsupervised + supervised Finetune)|17.30<br>19.60<br>24.60|21.30<br>0.10<br>15.50<br>1.00<br>27.00<br>1.40|
153
+
154
+ 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.
155
+
156
+ |**Method**|**Dev**<br>B@1_↑_<br>FVD _↓_|**Test**<br>B@1_↑_<br>B@4 _↑_<br>FVD _↓_|
157
+ |---|---|---|
158
+ |USLNet w/o. joint training<br>USLNet w. joint training|0.50<br>892.8<br>20.90<br>402.8|0.70<br>0.00<br>872.7<br>22.70<br>0.20<br>389.2|
159
+
160
+ ## 4 RESULTS AND DISCUSSION
161
+
162
+ ## 4.1 MAIN RESULT
163
+
164
+ **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.
165
+
166
+ **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.
167
+
168
+ ## 4.2 ANALYSIS
169
+
170
+ 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.
171
+
172
+ ## 4.2.1 IMPACT ON SLIDING WINDOW ALIGNER
173
+
174
+ **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.
175
+
176
+ 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.
177
+
178
+ 7
179
+
180
+ 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.
181
+
182
+ |**Method**|**Dev**<br>B@1|**Test**<br>B@1<br>B@4|
183
+ |---|---|---|
184
+ ||||
185
+ |Pooling<br>Sliding Window Aligner (hard connection)<br>Sliding Window Aligner (soft connection)|10.70<br>15.50<br>17.30|12.00<br>0.00<br>17.10<br>0.00<br>21.30<br>0.10|
186
+
187
+ 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.
188
+
189
+ |**Method**|**Dev**<br>B@1|**Test**<br>B@1<br>B@4|
190
+ |---|---|---|
191
+ ||||
192
+ |Pooling<br>Sliding Window Aligner (hard connection)<br>Sliding Window Aligner (soft connection)|7.00<br>11.70<br>20.90|6.60<br>0.00<br>11.70<br>0.00<br>22.70<br>0.20|
193
+
194
+ ## 4.2.2 IMPACT ON SIGN LANGUAGE TRANSLATION OUTPUTS
195
+
196
+ 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.
197
+
198
+ **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.
199
+
200
+ **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.
201
+
202
+ **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.
203
+
204
+ 8
205
+
206
+ Table 5: Ablation study of USLNet on sign language translation(SLT) on the BOBSL dev set.
207
+
208
+ |ID|System|SLT B@1↑|
209
+ |---|---|---|
210
+ |1|Baseline|3.20|
211
+ |1.1|1+more text data|9.60|
212
+ ||**Explore Multi-task Learning**||
213
+ |2.1|1.1+ remove text reconstruction at training|5.40|
214
+ |2.2|1.1+ remove video reconstruction at training|8.30|
215
+ |2.3|1.1+ remove cross-modality||
216
+ ||Back-Translation at training|0.70|
217
+ ||**Adjust data distribution**||
218
+ |3|1.1+ 1M parallel video and text||
219
+ ||for unsupervised training|15.20|
220
+ ||**Explore Different freezing strategy**||
221
+ |4.1|3+ freeze video decoder|10.80|
222
+ |4.2|3+ freeze text encoder|12.20|
223
+ |4.3|3+ freeze text decoder|12.60|
224
+ |4.1|3+ freeze video encoder|17.30|
225
+
226
+ ## 5 RELATED WORK
227
+
228
+ **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.
229
+
230
+ **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.
231
+
232
+ **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.
233
+
234
+ ## 6 CONCLUSION
235
+
236
+ 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.
237
+
238
+ 9
239
+
240
+ ## REFERENCES
241
+
242
+ - 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.
243
+
244
+ - 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.
245
+
246
+ - 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.
247
+
248
+ - Mikel Artetxe, Gorka Labaka, Eneko Agirre, and Kyunghyun Cho. Unsupervised neural machine translation. In _6th International Conference on Learning Representations, ICLR 2018_ , 2018.
249
+
250
+ - 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.
251
+
252
+ - 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.
253
+
254
+ - 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.
255
+
256
+ - 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.
257
+
258
+ - 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.
259
+
260
+ - 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.
261
+
262
+ - 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.
263
+
264
+ - 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.
265
+
266
+ - 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.
267
+
268
+ - 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.
269
+
270
+ - 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]
271
+
272
+ 10
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - 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.
279
+
280
+ - 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.
281
+
282
+ - 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.
283
+
284
+ - 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.
285
+
286
+ - 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.
287
+
288
+ - Guillaume Lample, Alexis Conneau, Ludovic Denoyer, and Marc’Aurelio Ranzato. Unsupervised machine translation using monolingual corpora only. In _International Conference on Learning Representations_ .
289
+
290
+ - Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. _Advances in neural information processing systems_ , 30, 2017.
291
+
292
+ - 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.
293
+
294
+ - 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.
295
+
296
+ - 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.
297
+
298
+ - 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.
299
+
300
+ - 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.
301
+
302
+ 11
303
+
304
+ - 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.
305
+
306
+ - 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.
307
+
308
+ - 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.
309
+
310
+ - 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.
311
+
312
+ - 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.
313
+
314
+ - 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.
315
+
316
+ - Ben Saunders, Necati Cihan Camgoz, and Richard Bowden. Adversarial training for multi-channel sign language production. _arXiv preprint arXiv:2008.12405_ , 2020b.
317
+
318
+ - Rico Sennrich, Barry Haddow, and Alexandra Birch. Improving neural machine translation models with monolingual data. In _ACL_ , 2016.
319
+
320
+ - 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.
321
+
322
+ - 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.
323
+
324
+ - Rachel Sutton-Spence and Bencie Woll. _The linguistics of British Sign Language: an introduction_ . Cambridge University Press, 1999.
325
+
326
+ - 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.
327
+
328
+ - 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.
329
+
330
+ - Yingce Xia, Jiang Bian, Tao Qin, Nenghai Yu, and Tie-Yan Liu. Dual inference for machine learning. In _IJCAI_ , pp. 3112–3118, 2017a.
331
+
332
+ - 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.
333
+
334
+ - 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.
335
+
336
+ - Wilson Yan, Yunzhi Zhang, Pieter Abbeel, and Aravind Srinivas. Videogpt: Video generation using vq-vae and transformers. _arXiv preprint arXiv:2104.10157_ , 2021.
337
+
338
+ - 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.
339
+
340
+ 12
341
+
342
+ Jinhui Ye, Wenxiang Jiao, Xing Wang, Zhaopeng Tu, and Hui Xiong. Cross-modality data augmentation for end-to-end sign language translation. _arXiv_ , 2023.
343
+
344
+ - 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.
345
+
346
+ - 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.
347
+
348
+ - Kayo Yin, Amit Moryossef, Julie Hochgesang, Yoav Goldberg, and Malihe Alikhani. Including signed languages in natural language processing. _arXiv preprint arXiv:2105.05222_ , 2021.
349
+
350
+ - Biao Zhang, Mathias Müller, and Rico Sennrich. Sltunet: A simple unified model for sign language translation. In _International Conference on Learning Representations_ .
351
+
352
+ - 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.
353
+
354
+ - 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.
355
+
356
+ - 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.
357
+
358
+ - 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.
359
+
360
+ 13
361
+
open_review/iclr2024_8534.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8534",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Deep probabilistic 3D angular regression for directional dark matter detectors",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 5,
10
+ 8,
11
+ 3
12
+ ],
13
+ "score_mean": 5.33,
14
+ "score_variance": 6.33,
15
+ "score_spread": 5,
16
+ "score_min": 3,
17
+ "score_max": 8,
18
+ "decision": "Reject",
19
+ "rebuttal_validity_ground_truth": false,
20
+ "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.",
21
+ "forum_id": "Kwm1OyINXt",
22
+ "primary_area": "applications to physical sciences (physics, chemistry, biology, etc.)",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_c5Tr",
27
+ "review_id": "1MYEiHVM65",
28
+ "scores": {
29
+ "rating": 5,
30
+ "soundness": 3,
31
+ "presentation": 2,
32
+ "contribution": 2,
33
+ "confidence": 2
34
+ },
35
+ "review_text_chars": 2212,
36
+ "edit_detected": false,
37
+ "edit_delta_seconds": 0,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_7Dku",
43
+ "review_id": "w2FPWVXqi7",
44
+ "scores": {
45
+ "rating": 8,
46
+ "soundness": 3,
47
+ "presentation": 3,
48
+ "contribution": 3,
49
+ "confidence": 3
50
+ },
51
+ "review_text_chars": 3723,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 3035304,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_qwYh",
59
+ "review_id": "kRV1AJqzoR",
60
+ "scores": {
61
+ "rating": 3,
62
+ "soundness": 3,
63
+ "presentation": 1,
64
+ "contribution": 2,
65
+ "confidence": 3
66
+ },
67
+ "review_text_chars": 3532,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 1663271,
70
+ "post_rebuttal_text_signal": false,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": false,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8534.md ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## DEEP PROBABILISTIC 3D ANGULAR REGRESSION FOR DIRECTIONAL DARK MATTER DETECTORS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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).
16
+
17
+ 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
18
+
19
+ 1
20
+
21
+ 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.
22
+
23
+ **==> picture [258 x 182] intentionally omitted <==**
24
+
25
+ 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).
26
+
27
+ 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.
28
+
29
+ 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.
30
+
31
+ ## 2 RELATED WORK
32
+
33
+ ## 2.1 RELATED WORK FROM THE PHYSICS COMMUNITY
34
+
35
+ 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
36
+
37
+ 2
38
+
39
+ 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.
40
+
41
+ ## 2.2 RELATED WORK FROM THE MACHINE LEARNING COMMUNITY
42
+
43
+ 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.
44
+
45
+ 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.
46
+
47
+ 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.
48
+
49
+ ## 3 THE MODEL
50
+
51
+ 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.
52
+
53
+ ## 3.1 ARCHITECTURE
54
+
55
+ 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).
56
+
57
+ 3
58
+
59
+ 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).
60
+
61
+ **==> picture [338 x 98] intentionally omitted <==**
62
+
63
+ **----- Start of picture text -----**<br>
64
+ Inputs Feature maps Feature maps<br>120x120x120 32@120x120x120 40@120x120x120 Feature maps Feature maps<br>Feature maps 50@58x58x58 50@29x29x29 Feature maps 30@14x14x14 10@12x12x12 Feature maps 10@6x6x6<br>SubMConv3d Flatten<br>Kernel 7x7x7<br>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<br>**----- End of picture text -----**<br>
65
+
66
+ 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).
67
+
68
+ 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.
69
+
70
+ **==> picture [198 x 150] intentionally omitted <==**
71
+
72
+ **----- Start of picture text -----**<br>
73
+ 2160 neurons, flattened input<br>500 neurons, relU activation<br>200 neurons, relU activation<br>50 neurons, tanh activation<br>3 neurons, L2 norm activation<br>1 neuron, softplus activation<br>**----- End of picture text -----**<br>
74
+
75
+ **==> picture [198 x 150] intentionally omitted <==**
76
+
77
+ 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.
78
+
79
+ 4
80
+
81
+ ## 3.2 LOSS FUNCTIONS
82
+
83
+ The RCN model is trained using the cosine distance loss function
84
+
85
+ **==> picture [287 x 30] intentionally omitted <==**
86
+
87
+ 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.
88
+
89
+ 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]
90
+
91
+ **==> picture [322 x 23] intentionally omitted <==**
92
+
93
+ 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
94
+
95
+ **==> picture [268 x 19] intentionally omitted <==**
96
+
97
+ 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).
98
+
99
+ 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
100
+
101
+ **==> picture [306 x 79] intentionally omitted <==**
102
+
103
+ and the NLL, scaled by batch size, is
104
+
105
+ The HCN model is trained to predict directional distributions as in Equation 3 that minimize the NLL.
106
+
107
+ 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.
108
+
109
+ ## 3.3 PRACTICAL CONSIDERATIONS
110
+
111
+ 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
112
+
113
+ **==> picture [162 x 22] intentionally omitted <==**
114
+
115
+ 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
116
+
117
+ **==> picture [367 x 30] intentionally omitted <==**
118
+
119
+ 5
120
+
121
+ 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.
122
+
123
+ 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.]
124
+
125
+ **==> picture [397 x 56] intentionally omitted <==**
126
+
127
+ 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
128
+
129
+ **==> picture [387 x 31] intentionally omitted <==**
130
+
131
+ The condition _κ <_ 2 _._ 65 is chosen so that the maximum percent difference between Equations 4 and 6 is minimized to 0 _._ 14%.
132
+
133
+ ## 4 APPLICATION TO ELECTRON RECOILS
134
+
135
+ 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.
136
+
137
+ ## 4.1 SIMULATION, PREPROCESSING, AND DATA SPLITS
138
+
139
+ 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).
140
+
141
+ 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.
142
+
143
+ 6
144
+
145
+ 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).
146
+
147
+ 3. To make our simulations isotropic, a random rotation is applied to the track. The true initial direction after rotation is saved.
148
+
149
+ 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
150
+
151
+ 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.
152
+
153
+ 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.
154
+
155
+ 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.
156
+
157
+ **==> picture [159 x 105] intentionally omitted <==**
158
+
159
+ **==> picture [159 x 105] intentionally omitted <==**
160
+
161
+ **==> picture [257 x 161] intentionally omitted <==**
162
+
163
+ **----- Start of picture text -----**<br>
164
+ (a) Raw Degrad simulation (b) Processed simulation<br>(c) Voxilized simulation<br>**----- End of picture text -----**<br>
165
+
166
+ 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.
167
+
168
+ 7
169
+
170
+ ## 4.2 TRAINING
171
+
172
+ 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].
173
+
174
+ 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.
175
+
176
+ ## 4.3 PERFORMANCE
177
+
178
+ 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.
179
+
180
+ 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.
181
+
182
+ 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 _κ_
183
+
184
+ **==> picture [346 x 26] intentionally omitted <==**
185
+
186
+ 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.
187
+
188
+ 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.
189
+
190
+ 8
191
+
192
+ **==> picture [358 x 135] intentionally omitted <==**
193
+
194
+ **----- Start of picture text -----**<br>
195
+ HCN HCN<br>0.5 RCNBest-Expected 0.5 RCNBest-Expected<br>1% efficiency cut 1% efficiency cut<br>Non-ML standard Non-ML standard<br>0.4 Non-ML tuned 0.4 Non-ML tuned<br>0.3 0.3<br>0.2<br>0.2<br>0.1<br>0.1<br>0 20 40 60 80 0 20 40 60 80<br>Efficiency Cut [%] Efficiency Cut [%]<br>Cosine Distance Loss Cosine Distance Loss<br>**----- End of picture text -----**<br>
196
+
197
+ 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.
198
+
199
+ **==> picture [179 x 142] intentionally omitted <==**
200
+
201
+ **==> picture [179 x 138] intentionally omitted <==**
202
+
203
+ **==> picture [192 x 9] intentionally omitted <==**
204
+
205
+ **----- Start of picture text -----**<br>
206
+ (a) (b)<br>**----- End of picture text -----**<br>
207
+
208
+ 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.
209
+
210
+ ## 5 CONCLUSION
211
+
212
+ 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.
213
+
214
+ 9
215
+
216
+ ## REFERENCES
217
+
218
+ - S. Biagi. Degrad – transport of electrons in gas mixtures, 2014. URL [URL removed] cern.ch/magboltz.
219
+
220
+ - 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.
221
+
222
+ - 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.
223
+
224
+ - 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.
225
+
226
+ - Benjamin Graham and Laurens van der Maaten. Submanifold sparse convolutional networks. _arXiv preprint arXiv:1706.01307_ , 2017.
227
+
228
+ - Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. _CVPR_ , 2018.
229
+
230
+ - 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.
231
+
232
+ - 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.
233
+
234
+ - 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.
235
+
236
+ - 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.
237
+
238
+ - 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.
239
+
240
+ - 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.
241
+
242
+ - 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.
243
+
244
+ - 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]
245
+
246
+ 10
247
+
248
+ Kanti V Mardia, Peter E Jupp, and KV Mardia. _Directional statistics_ , volume 2. Wiley Online Library, 2000.
249
+
250
+ - 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.
251
+
252
+ - 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.
253
+
254
+ - Ciaran A. J. O’Hare et al. Recoil imaging for dark matter, neutrinos, and physics beyond the Standard Model. In _Snowmass 2021_ , 3 2022.
255
+
256
+ - 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.
257
+
258
+ - 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.
259
+
260
+ - Sergey Prokudin, Peter Gehler, and Sebastian Nowozin. Deep directional statistics: Pose estimation with uncertainty quantification. In _European Conference on Computer Vision (ECCV)_ , September 2018.
261
+
262
+ - 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.
263
+
264
+ Spconv Contributors. Spconv: Spatially Sparse Convolution Library, October 2022. URL https: //[URL removed]
265
+
266
+ - 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.
267
+
268
+ - 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.
269
+
270
+ - 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.
271
+
272
+ - Yu Xiang, Tanner Schmidt, Venkatraman Narayanan, and Dieter Fox. Posecnn: A convolutional neural network for 6d object pose estimation in cluttered scenes. 2018.
273
+
274
+ - 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.
275
+
276
+ ## A NON-MACHINE LEARNING ALGORITHMS
277
+
278
+ 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:
279
+
280
+ 11
281
+
282
+ 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]_
283
+
284
+ voxel and _**x** i_ is the position of the voxel. Center the track on _**x** b_ .
285
+
286
+ 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.
287
+
288
+ 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).
289
+
290
+ 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
291
+
292
+ 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.
293
+
294
+ 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.
295
+
296
+ 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%.
297
+
298
+ 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:
299
+
300
+ 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.
301
+
302
+ 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.
303
+
304
+ 3. Determine the principal axis of the points contained within the sphere using SVD.
305
+
306
+ 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.
307
+
308
+ 5. The final vector direction obtained is used as the predicted direction of this method.
309
+
310
+ 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.
311
+
312
+ ## B APPLICATION TO A SIMPLE CASE
313
+
314
+ 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.
315
+
316
+ 12
317
+
318
+ 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]
319
+
320
+ **==> picture [160 x 155] intentionally omitted <==**
321
+
322
+ Figure 7: An example of a 3D arrow for the application to a simple case.
323
+
324
+ 13
325
+
open_review/iclr2024_8538.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8538",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Non-stationary Contextual Bandit Learning via Neural Predictive Ensemble Sampling",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 3,
10
+ 3,
11
+ 3,
12
+ 6
13
+ ],
14
+ "score_mean": 3.75,
15
+ "score_variance": 2.25,
16
+ "score_spread": 3,
17
+ "score_min": 3,
18
+ "score_max": 6,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "qVILwUxjLG",
23
+ "primary_area": "reinforcement learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_EExp",
28
+ "review_id": "RPadC40cVX",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 2,
32
+ "presentation": 2,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 1819,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 938888,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_Fa2p",
44
+ "review_id": "YAH9OIAqiJ",
45
+ "scores": {
46
+ "rating": 3,
47
+ "soundness": 3,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 3170,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 1029399,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_Coy3",
60
+ "review_id": "xtMDTZa7FA",
61
+ "scores": {
62
+ "rating": 3,
63
+ "soundness": 3,
64
+ "presentation": 3,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 4445,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1078374,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_jNAd",
76
+ "review_id": "x5w2aKrXQP",
77
+ "scores": {
78
+ "rating": 6,
79
+ "soundness": 3,
80
+ "presentation": 4,
81
+ "contribution": 3,
82
+ "confidence": 2
83
+ },
84
+ "review_text_chars": 1026,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 2122145,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8538.md ADDED
@@ -0,0 +1,588 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## NON-STATIONARY CONTEXTUAL BANDIT LEARNING VIA NEURAL PREDICTIVE ENSEMBLE SAMPLING
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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).
16
+
17
+ **==> picture [160 x 120] intentionally omitted <==**
18
+
19
+ Figure 1: NeuralPES Regret in Nonstationary Contextual Bandits
20
+
21
+ 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
22
+
23
+ 1
24
+
25
+ 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.
26
+
27
+ 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.
28
+
29
+ ## 2 RELATED WORK
30
+
31
+ **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.
32
+
33
+ **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.
34
+
35
+ ## 3 CONTEXTUAL BANDITS
36
+
37
+ This section formally introduces contextual bandits, and other related concepts and definitions. We first introduce contextual bandits.
38
+
39
+ **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.
40
+
41
+ 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_ .
42
+
43
+ ## 3.1 LINEAR CONTEXTUAL BANDITS
44
+
45
+ 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
46
+
47
+ 2
48
+
49
+ 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.
50
+
51
+ **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_ .
52
+
53
+ 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.
54
+
55
+ **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_ .
56
+
57
+ 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][)][.]
58
+
59
+ 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
60
+
61
+ **==> picture [284 x 22] intentionally omitted <==**
62
+
63
+ 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_ .
64
+
65
+ 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
66
+
67
+ **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.
68
+
69
+ **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.
70
+
71
+ 4.1 NEURAL ENSEMBLE SAMPLING
72
+
73
+ 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).
74
+
75
+ At each timestep _t ∈_ N, a NeuralEnsembleSampling agent (See Algorithm 1):
76
+
77
+ 3
78
+
79
+ **==> picture [358 x 97] intentionally omitted <==**
80
+
81
+ Figure 2: Visualization of three components of NeuralPES: reward, sequence, and predictive model.
82
+
83
+ 1. Trains an ensemble of _M_ reward models, updating weights using stochastic gradient descent.
84
+
85
+ 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_ .
86
+
87
+ 3. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
88
+
89
+ ## **Algorithm 1:** NeuralEnsembleSampling
90
+
91
+ **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[′]_ ,
92
+
93
+ **2 Initialize:** Let replay buffer _B_ = _∅_ , and randomly initialize weights _ψ_ 1: _M_ , _w_ 1: _M,_ 0, and _w_ 1:[seq]
94
+
95
+ 1: _M,_ 0[,]
96
+
97
+ |**2 **|**I**|**nitialize:** Let replay buffer_B_ = _∅_, and randomly initialize weights_ψ_1:_M_,_w_1:_M,_0, and_w_seq<br>1:_M,_0,|**nitialize:** Let replay buffer_B_ = _∅_, and randomly initialize weights_ψ_1:_M_,_w_1:_M,_0, and_w_seq<br>1:_M,_0,|
98
+ |---|---|---|---|
99
+ |**3 **<br>**4**<br>**5**<br>**6**<br>**7**<br>**8**<br>**9**|**fo**|**r**_t_ = 0_,_1_, . . . , T −_1**do**<br>**for**_m_ = 1_,_2_, . . . , M_ **do**<br>Let(_ψm, wm,t_) _←_TrainRewardNN(_B, L, ψm, wm,t−_1_, τ, α, K′_)<br>**sample**: _m ��_unif(_{_1_, ..., M}_)<br>**select**: _At ∈_arg max_a∈At f_(_wm,t_;_b_(_ψm_;_Ct, a_))<br>**observe**: _Rt_+1_,Ct,At_,_Ct_+1,_At_+1<br>**update**: Update_B_to keep the most recent_K_ tuples of context, action, reward, and timestep data.||
100
+ ||**1 **<br>**2 **<br>**3**<br>**4**<br>**5 **||**Algorithm 3:**TrainSequenceNN<br> **Input:** Replay buffer_B_, sequence model weights_w_seq,<br>historical last-layer weights_w_1:_t−_1, number of gradient<br>steps_τ_, step size_α_, number of future steps_x_.<br> **for**_i_ = 0_,_1_, . . . , τ −_1**do**<br>**sample**: _j ∼_unif(_{L, ..., t −_1_}_)<br>**update**_w_seq following Equation2<br> **return:** _w_seq|
101
+ |||**Algorithm 2:**TrainRewardNN||
102
+ |||**Input:** Replay buffer_B_, loss function_L_, base network weights<br>_ψ_, last-layer weights_w_, number of gradient steps_τ_, step size<br>_α_, minibatch size_K′_.<br> **for**_i_ = 0_,_1_, . . . , τ −_1**do**<br>**sample:** a minibatch_B′_ of size_K′_ from replay buffer_B_<br>**update**(_ψ, w_)following Equation1<br> **return:** _ψ_**,**_w_<br>**1 **<br>**2 **<br>**3**<br>**4**<br>**5 **||
103
+
104
+ **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_ )).
105
+
106
+ 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
107
+
108
+ **==> picture [328 x 19] intentionally omitted <==**
109
+
110
+ 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_ .
111
+
112
+ ## 4.2 PREDICTING FUTURE REWARD VIA SEQUENCE MODELING
113
+
114
+ 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
115
+
116
+ At each timestep _t ∈_ N, a Neural Sequence Ensemble agent proceeds as the following:
117
+
118
+ 1. Trains an ensemble of _M_ reward models and an ensemble of _M_ sequence models through updating their weights using stochastic gradient descent.
119
+
120
+ 4
121
+
122
+ 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_ .
123
+
124
+ 3. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
125
+
126
+ **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]
127
+
128
+ _wm_[seq] _← wm_[seq] _− α∇wm_ seq _[L]_[MSE][(] _[f]_[ seq][(] _[w] m_[seq][;] _[ w][m,j][−][L]_[+1:] _[j]_[)] _[, w][m,j]_[+1][)] _[.]_ (2)
129
+
130
+ ## 4.3 NEURAL PREDICTIVE ENSEMBLE SAMPLING
131
+
132
+ 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.
133
+
134
+ At each timestep _t ∈_ N, a NeuralPES agent (see Algorithm 4):
135
+
136
+ 1. Trains an ensemble of _M_ reward models, an ensemble of _M_ sequence models, and an ensemble of _M_ predictive models
137
+
138
+ 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.
139
+
140
+ 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_ .
141
+
142
+ 4. Selects an action that maximizes _R_[ˆ] _t_ +1 _,Ct,a_ .
143
+
144
+ ## **Algorithm 4:** NeuralPES
145
+
146
+ **==> picture [374 x 122] intentionally omitted <==**
147
+
148
+ **----- Start of picture text -----**<br>
149
+ 1 Input: Horizon T , number of particles in each ensemble M , loss function L , replay buffer size K , sequence model input size L ,<br>number of gradient steps τ, τ seq , τ pred, step sizes α, α seq , α pred, minibatch sizes K [′] , K [′′] .<br>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<br>3 for t = 0 , 1 , . . . , T − 1 do<br>4 for m = 1 , 2 , . . . , M do<br>5 Let ( ψm, wm,t ) ← TrainNN( B, L, ψm, wm,t− 1 , τ, α, K [′] )<br>6 Let wm,t [seq] [←] [TrainSequenceNN(] [B][, w] m,t [seq] − 1 [, w][m,] [1:] [t][−] [1] [, τ] [seq] [, α] [seq] [,] [ 2)]<br>7 Let wm,t [pred] [←] [TrainPredictiveNN(] [B][,][ L][, w] m,t [pred] − 1 [, ψ][m][, w][m,] [1:] [t][−] [1] [, τ] [pred] [, α] [pred] [, K][′′] [)]<br>89 sampleroll out: : mw ˆ m,t∼ unif(+2 = {f 1 [seq] , ..., M ( wm,t [seq] } ) [;] [ w][m,t][−][L] [+1:] [t] [)]<br>10 select : At ∈ arg max a∈At � Mi =1 [f] [ pred][(] [w] i,t [pred] ; ( ˆ wm,t +2 ⊙ b ( ψm ; Ct, a ))<br>11 observe : Rt +1 ,Ct,At , Ct +1 , At +1<br>12 update : Update B to keep the most recent K tuples of context, action, reward, and timestep data.<br>**----- End of picture text -----**<br>
150
+
151
+ ## **Algorithm 5:** TrainPredictiveNN
152
+
153
+ **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[′′]_ .
154
+
155
+ **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]_[)]
156
+
157
+ - **5 return:** _w_[pred]
158
+
159
+ **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.
160
+
161
+ 5
162
+
163
+ 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][′′]_
164
+
165
+ **==> picture [337 x 19] intentionally omitted <==**
166
+
167
+ 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_ .
168
+
169
+ **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
170
+
171
+ **==> picture [387 x 42] intentionally omitted <==**
172
+
173
+ ## 4.4 THEORETICAL INSIGHTS AND ANALYSIS
174
+
175
+ We provide intuition and evidence that NeuralPES’s prioritizes the acquisition of lasting information.
176
+
177
+ 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:
178
+
179
+ 1. samples _θ_[ˆ] _t_ +2 from the posterior P( _θt_ +2 _∈·|Ht_ ), and _ϕ_[ˆ] _t_ from the posterior P( _ϕ ∈·|Ht_ ).
180
+
181
+ 2. estimates the reward _R_[ˆ] _t_ +1 _,Ct,a_ = E[ _Rt_ +1 _,Ct,a|Ht, ϕ_ = _ϕ_[ˆ] _t, θt_ +2 = _θ_[ˆ] _t_ +2],
182
+
183
+ 3. and selects an action that maximizes the sample _At ∈_ arg max _a∈At R_[ˆ] _t_ +1 _,Ct,a_ .
184
+
185
+ 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.
186
+
187
+ 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.
188
+
189
+ 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.
190
+
191
+ **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_ ].
192
+
193
+ 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][)] _[.]_
194
+
195
+ 6
196
+
197
+ 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.
198
+
199
+ 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.
200
+
201
+ 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).
202
+
203
+ **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_ .
204
+
205
+ **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._
206
+
207
+ 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,
208
+
209
+ 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.
210
+
211
+ 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).
212
+
213
+ **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)] **[.]**
214
+
215
+ Applying Theorem 1 to an AR(1) linear contextual bandit, we establish the following result.
216
+
217
+ **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-_
218
+
219
+ _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]_[]] _[.]_
220
+
221
+ 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.
222
+
223
+ ## 5 EXPERIMENTS
224
+
225
+ 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
226
+
227
+ 7
228
+
229
+ |Algorithm|AR(1) Average Reward|MIND 1-week Average CTR|Kuai 2-month Average Rating|
230
+ |---|---|---|---|
231
+ |Neural Ensemble|0_._5683_±_0_._0025|0_._1503_±_0_._0013|1_._2614_±_0_._0017|
232
+ |Window Neural Ensemble|0_._5688_±_0_._0025|0_._1513_±_0_._0012|1_._3187_±_0_._0023|
233
+ |Neural LinUCB|0_._5684_±_0_._0020|0_._1468_±_0_._0015|1_._2798_±_0_._0020|
234
+ |Window Neural LinUCB|0_._5730_±_0_._0031|0_._1482_±_0_._0020|1_._3172_±_0_._0023|
235
+ |Neural Linear|0_._5701_±_0_._0027|0_._1467_±_0_._0016|1_._2690_±_0_._0020|
236
+ |Window Neural Linear|0_._5741_±_0_._0029|0_._1492_±_0_._0015|1_._3171_±_0_._0026|
237
+ |NeuralPES|**0**_._**5850**_±_**0**_._**0023**|**0**_._**1552**_±_**0**_._**0013**|**1**_._**3421**_±_**0**_._**0016**|
238
+
239
+ Table 1: Empirical Experiment Results
240
+
241
+ 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.
242
+
243
+ ## 5.1 AR(1) CONTEXTUAL LOGISTIC BANDIT
244
+
245
+ 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.
246
+
247
+ **==> picture [115 x 87] intentionally omitted <==**
248
+
249
+ **==> picture [116 x 87] intentionally omitted <==**
250
+
251
+ **==> picture [115 x 87] intentionally omitted <==**
252
+
253
+ **==> picture [398 x 132] intentionally omitted <==**
254
+
255
+ **----- Start of picture text -----**<br>
256
+ (a) AR(1) Nonstationary Contextual (b) Microsoft News 1-Week Experi- (c) Microsoft News Day of Week<br>Bandit Average Reward ment Average CTR Nonstationary CTR<br>(d) KuaiRec 2-Month Experiment (e) KuaiRec 2-Month Ablation Ex-<br>Average Rating periment<br>**----- End of picture text -----**<br>
257
+
258
+ Figure 3: Empirical Results and Ablations
259
+
260
+ ## 5.2 MICROSOFT NEWS DATASET EXPERIMENTS
261
+
262
+ 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.
263
+
264
+ 8
265
+
266
+ |||Table 2: MIND Dataset Illustration|Table 2: MIND Dataset Illustration|Table 2: MIND Dataset Illustration||
267
+ |---|---|---|---|---|---|
268
+ |Impression ID|User ID|Time|User Interest History||News with Labels|
269
+ |91|U397059|11/15/2019 10:22:32 AM|N106403 N71977 N97080|N129416-0|N26703-1 N120089-1 N53018-0|
270
+
271
+ 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.
272
+
273
+ ## 5.3 KUAIREC DATASET EXPERIMENT
274
+
275
+ 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.
276
+
277
+ ## 5.4 ABLATION STUDIES
278
+
279
+ ## 5.4.1 REGULARIZATION FOR CONTINUAL LEARNING
280
+
281
+ 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.
282
+
283
+ ## 5.4.2 IMPORTANCE OF PREDICTIVE MODEL
284
+
285
+ 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.
286
+
287
+ ## 6 CONCLUSION AND FUTURE WORK
288
+
289
+ 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.
290
+
291
+ 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.
292
+
293
+ 9
294
+
295
+ ## REFERENCES
296
+
297
+ - 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_ .
298
+
299
+ - Abdollahpouri, H., Burke, R., and Mobasher, B. (2019). Managing popularity bias in recommender systems with personalized re-ranking. _arXiv preprint arXiv:1901.07555_ .
300
+
301
+ - 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.
302
+
303
+ - 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.
304
+
305
+ - 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.
306
+
307
+ - 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.
308
+
309
+ - 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.
310
+
311
+ - 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.
312
+
313
+ - 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.
314
+
315
+ - 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.
316
+
317
+ - 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.
318
+
319
+ - Bogunovic, I., Scarlett, J., and Cevher, V. (2016). Time-varying gaussian process bandit optimization. In _Artificial Intelligence and Statistics_ , pages 314–323. PMLR.
320
+
321
+ - Bouneffouf, D. and Rish, I. (2019). A survey on practical applications of multi-armed and contextual bandits. _arXiv preprint arXiv:1904.10040_ .
322
+
323
+ - Burtini, G., Loeppky, J. L., and Lawrence, R. (2015). Improving online marketing experiments with drifting multi-armed bandits. In _ICEIS (1)_ , pages 630–636.
324
+
325
+ - 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.
326
+
327
+ - 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.
328
+
329
+ - Chapelle, O. and Li, L. (2011). An empirical evaluation of thompson sampling. _Advances in neural information processing systems_ , 24.
330
+
331
+ - 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.
332
+
333
+ 10
334
+
335
+ - 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.
336
+
337
+ - 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.
338
+
339
+ - Cheung, W. C., Simchi-Levi, D., and Zhu, R. (2022). Hedging the drift: Learning to optimize under nonstationarity. _Management Science_ , 68(3):1696–1713.
340
+
341
+ - Ditzler, G., Roveri, M., Alippi, C., and Polikar, R. (2015). Learning in nonstationary environments: A survey. _IEEE Computational Intelligence Magazine_ , 10(4):12–25.
342
+
343
+ - 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.
344
+
345
+ - 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.
346
+
347
+ - 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.
348
+
349
+ - Garivier, A. and Moulines, E. (2008). On upper-confidence bound policies for non-stationary bandit problems. _arXiv preprint arXiv:0805.3415_ .
350
+
351
+ - Ghatak, G. (2021). A change-detection-based Thompson sampling framework for non-stationary bandits. _IEEE Transactions on Computers_ , 70(10):1670–1676.
352
+
353
+ - 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.
354
+
355
+ - Gu, Q., Karbasi, A., Khosravi, K., Mirrokni, V., and Zhou, D. (2021). Batched neural bandits. _arXiv preprint arXiv:2102.13028_ .
356
+
357
+ - 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.
358
+
359
+ - Hartland, C., Gelly, S., Baskiotis, N., Teytaud, O., and Sebag, M. (2006). Multi-armed bandit, dynamic environments and meta-bandits.
360
+
361
+ - 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.
362
+
363
+ - Jia, Y., Zhang, W., Zhou, D., Gu, Q., and Wang, H. (2022). Learning neural contextual bandits through perturbed rewards. _arXiv preprint arXiv:2201.09910_ .
364
+
365
+ - Kassraie, P. and Krause, A. (2022). Neural contextual bandits without regret. In _International Conference on Artificial Intelligence and Statistics_ , pages 240–278. PMLR.
366
+
367
+ - 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.
368
+
369
+ - 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.
370
+
371
+ - Kocsis, L. and Szepesvári, C. (2006). Discounted UCB. In _2nd PASCAL Challenges Workshop_ , volume 2, pages 51–134.
372
+
373
+ 11
374
+
375
+ - 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.
376
+
377
+ - Kotkov, D., Wang, S., and Veijalainen, J. (2016). A survey of serendipity in recommender systems. _Knowledge-Based Systems_ , 111:180–192.
378
+
379
+ - 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).
380
+
381
+ - 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_ .
382
+
383
+ - Kumar, S., Marklund, H., and Van Roy, B. (2023). Maintaining plasticity via regenerative regularization. _arXiv preprint arXiv:2308.11958_ .
384
+
385
+ - Lai, T. and Robbins, H. (1985). Asymptotically efficient adaptive allocation rules. _Advances in Applied Mathematics_ , 6(1):4–22.
386
+
387
+ - 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.
388
+
389
+ - 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.
390
+
391
+ - Liu, Y., Kuang, X., and Van Roy, B. (2022). Understanding the concept of nonstationarity.
392
+
393
+ - 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.
394
+
395
+ - Lu, X. and Van Roy, B. (2017). Ensemble sampling. _Advances in neural information processing systems_ , 30.
396
+
397
+ - 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.
398
+
399
+ - 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.
400
+
401
+ - 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.
402
+
403
+ - Osband, I., Blundell, C., Pritzel, A., and Van Roy, B. (2016). Deep exploration via bootstrapped dqn. _Advances in neural information processing systems_ , 29.
404
+
405
+ - 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.
406
+
407
+ - Raj, V. and Kalyani, S. (2017). Taming non-stationary bandits: A bayesian approach. _arXiv preprint arXiv:1707.09727_ .
408
+
409
+ - 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_ .
410
+
411
+ - Russac, Y., Cappé, O., and Garivier, A. (2020). Algorithms for non-stationary generalized linear bandits. _arXiv preprint arXiv:2003.10113_ .
412
+
413
+ - Russo, D. and Van Roy, B. (2014). Learning to optimize via posterior sampling. _Mathematics of Operations Research_ , 39(4):1221–1243.
414
+
415
+ 12
416
+
417
+ - Russo, D. and Van Roy, B. (2016). An information-theoretic analysis of thompson sampling. _The Journal of Machine Learning Research_ , 17(1):2442–2471.
418
+
419
+ - Salgia, S. (2023). Provably and practically efficient neural contextual bandits. In _International Conference on Machine Learning_ , pages 29800–29844. PMLR.
420
+
421
+ - 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.
422
+
423
+ - Slivkins, A. and Upfal, E. (2008). Adapting to a changing environment: the Brownian restless bandits. In _COLT_ , pages 343–354.
424
+
425
+ - 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.
426
+
427
+ - 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_ .
428
+
429
+ - 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.
430
+
431
+ - 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.
432
+
433
+ - 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.
434
+
435
+ - Viappiani, P. (2013). Thompson sampling for Bayesian bandits with resets. In _International Conference on Algorithmic Decision Theory_ , pages 399–410. Springer.
436
+
437
+ - 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.
438
+
439
+ - 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.
440
+
441
+ - 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_ .
442
+
443
+ - 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.
444
+
445
+ - Zhang, W., Zhou, D., Li, L., and Gu, Q. (2020). Neural thompson sampling. _arXiv preprint arXiv:2010.00827_ .
446
+
447
+ - 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.
448
+
449
+ - 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.
450
+
451
+ - 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.
452
+
453
+ - 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)_ .
454
+
455
+ 13
456
+
457
+ ## A TECHNICAL PROOFS
458
+
459
+ ## A.1 PROOF OF THEOREM 1
460
+
461
+ We first present a general regret bound that applies to any agent.
462
+
463
+ **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[π]_[)] _[.]_
464
+
465
+ _Proof._ For all policies _π_ and _T ∈_ N,
466
+
467
+ **==> picture [322 x 111] intentionally omitted <==**
468
+
469
+ where the inequality follows from Cauchy-Schwartz. Next, observe that for all _t ∈_ N,
470
+
471
+ **==> picture [387 x 169] intentionally omitted <==**
472
+
473
+ where the first equality follows from _θt_ +2 _⊥ Ht[π]_ +1 _[|][θ][t]_[+1][.][By][ (][5][)][ and][ (][6][)][, we complete the proof.]
474
+
475
+ 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[π]_[)] _[.]_
476
+
477
+ _Proof._ We use _At_ to denote _A[π] t_[LinPS] , _Ht_ to denote _Ht[π]_[LinPS] .
478
+
479
+ 14
480
+
481
+ For all _t ∈_ N0, and _h_ = ( _c_ 0 _, a_ 0 _, r_ 1 _, ..., rt−_ 1 _, c_ ) _∈Ht_ , we have
482
+
483
+ **==> picture [366 x 75] intentionally omitted <==**
484
+
485
+ 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].
486
+
487
+ In addition, for all _t ∈_ N0, and _h_ = ( _c_ 0 _, a_ 0 _, r_ 1 _, ..., rt−_ 1 _, c_ ) _∈Ht_ , we have
488
+
489
+ **==> picture [335 x 29] intentionally omitted <==**
490
+
491
+ where the inequality follows from the data-processing inequality.
492
+
493
+ 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
494
+
495
+ **==> picture [349 x 67] intentionally omitted <==**
496
+
497
+ This, together with (7) and (8), implies that
498
+
499
+ Therefore, for all _t ∈_ N,
500
+
501
+ **==> picture [256 x 61] intentionally omitted <==**
502
+
503
+ where the inequality follows from Jensen’s inequality, and the last equality follows from (9).
504
+
505
+ Then Theorem 1 follows directly from Theorem 2 and Lemma 1.
506
+
507
+ **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][)] _[.]_
508
+
509
+ _Proof._ For all _T ∈_ N, the regret of LinPS is upper-bounded by
510
+
511
+ **==> picture [248 x 106] intentionally omitted <==**
512
+
513
+ where the first inequality follows from Theorem 2, the first equality follows from Lemma 1, and the last equality follows from stationarity.
514
+
515
+ 15
516
+
517
+ ## A.2 PROOF OF COROLLARY 1
518
+
519
+ Corollary 1 follows directly from Theorem 1 and Lemma 8 of (Liu et al., 2023).
520
+
521
+ ## A.3 PROOF OF COROLLARY 2
522
+
523
+ **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]_[]] _[.]_
524
+
525
+ _Proof._ We use **h** to denote differential entropy. If _γi <_ 1 for all _i ∈_ [ _d_ ], then
526
+
527
+ **==> picture [302 x 170] intentionally omitted <==**
528
+
529
+ In addition, if _γi <_ 1 for all _i ∈_ [ _d_ ], then
530
+
531
+ **==> picture [324 x 30] intentionally omitted <==**
532
+
533
+ Applying Theorem 1, we complete the proof.
534
+
535
+ B IMPLEMENTATION
536
+
537
+ ## B.0.1 EXTENSION TO IMPROVE SCALABILITY
538
+
539
+ 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]_[))]
540
+
541
+ ## B.0.2 EXPERIMENT HYPERPARAMETERS
542
+
543
+ 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.
544
+
545
+ AR(1) Contextual Logistic Bandit Experiment Hyperparameters - Table 3
546
+
547
+ 16
548
+
549
+ |Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
550
+ |---|---|---|---|---|---|---|
551
+ |Neural Ensemble|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
552
+ |Window Neural Ensemble|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
553
+ |Neural LinUCB|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
554
+ |Window Neural LinUCB|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
555
+ |Neural Linear|-50 - 25 - 10-|50,000|0.0001|N/A|N/A|N/A|
556
+ |Window Neural Linear|-50 - 25 - 10-|10,000|0.0001|N/A|N/A|N/A|
557
+ |NeuralPES|-50 - 25-|10,000|0.0001|GRU 1-layer, 25 hidden|0.05|-10-|
558
+
559
+ Table 3: AR(1) Hyperparameter
560
+
561
+ |Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
562
+ |---|---|---|---|---|---|---|
563
+ |Neural Ensemble|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
564
+ |Window Neural Ensemble|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
565
+ |Neural LinUCB|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
566
+ |Window Neural LinUCB|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
567
+ |Neural Linear|-256 - 128-|66,000|0.0001|N/A|N/A|N/A|
568
+ |Window Neural Linear|-256 - 128-|20,000|0.0001|N/A|N/A|N/A|
569
+ |NeuralPES|-256 - 128-|20,000|0.0001|GRU 1-layer, 128 hidden|0.05|-10-|
570
+
571
+ Table 4: AR(1) Hyperparameter
572
+
573
+ Microsoft News 1-Week Experiment Hyperparameters - Table 4 KuaiRed 2-Month Experiment Hyperparameters - Table 5
574
+
575
+ |Algorithm|NN Arch|Sliding Window|LR|Sequence Model|Reg Coeff|Pred Model Arch|
576
+ |---|---|---|---|---|---|---|
577
+ |Neural Ensemble|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
578
+ |Window Neural Ensemble|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
579
+ |Neural LinUCB|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
580
+ |Window Neural LinUCB|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
581
+ |Neural Linear|-512 - 128-|140,000|0.0001|N/A|N/A|N/A|
582
+ |Window Neural Linear|-512 - 128-|20,000|0.0001|N/A|N/A|N/A|
583
+ |NeuralPES|-512 - 128-|20,000|0.0001|GRU 1-layer, 128 hidden|0.001|-10-|
584
+
585
+ Table 5: AR(1) Hyperparameter
586
+
587
+ 17
588
+
open_review/iclr2024_8539.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8539",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Multi-Resolution Learning with DeepONets and Long Short-Term Memory Neural Networks",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 5,
10
+ 6,
11
+ 3
12
+ ],
13
+ "score_mean": 4.67,
14
+ "score_variance": 2.33,
15
+ "score_spread": 3,
16
+ "score_min": 3,
17
+ "score_max": 6,
18
+ "decision": "Reject",
19
+ "rebuttal_validity_ground_truth": false,
20
+ "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.",
21
+ "forum_id": "nZ7rpEp6wj",
22
+ "primary_area": "general machine learning (i.e., none of the above)",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_LP9x",
27
+ "review_id": "CAsQlCRq1l",
28
+ "scores": {
29
+ "rating": 5,
30
+ "soundness": 3,
31
+ "presentation": 3,
32
+ "contribution": 2,
33
+ "confidence": 2
34
+ },
35
+ "review_text_chars": 1274,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 577860,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_qWGe",
43
+ "review_id": "M4aRL74dp9",
44
+ "scores": {
45
+ "rating": 6,
46
+ "soundness": 3,
47
+ "presentation": 4,
48
+ "contribution": 2,
49
+ "confidence": 3
50
+ },
51
+ "review_text_chars": 3558,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 835581,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_FcVp",
59
+ "review_id": "9k9MnzH8gL",
60
+ "scores": {
61
+ "rating": 3,
62
+ "soundness": 2,
63
+ "presentation": 3,
64
+ "contribution": 1,
65
+ "confidence": 4
66
+ },
67
+ "review_text_chars": 2635,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 948522,
70
+ "post_rebuttal_text_signal": false,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": false,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8539.md ADDED
@@ -0,0 +1,713 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## MULTI-RESOLUTION LEARNING WITH DEEPONETS - AND LONG SHORT-TERM MEMORY NEURAL NET WORKS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ 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
20
+
21
+ 1
22
+
23
+ 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).
24
+
25
+ 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.
26
+
27
+ 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.
28
+
29
+ ## 1 PROBLEM STATEMENT
30
+
31
+ 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.:
32
+
33
+ **==> picture [257 x 12] intentionally omitted <==**
34
+
35
+ 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.
36
+
37
+ 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:
38
+
39
+ - High-resolution set _DH_ with _NH_ samples of time resolution ∆ _tH_ ,
40
+
41
+ - Low-resolution set _DL_ of size _NL_ samples of time resolution ∆ _tL_ .
42
+
43
+ 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.
44
+
45
+ ## 2 PROPOSED MULTI-RESOLUTION DON-LSTM (OURS)
46
+
47
+ 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.
48
+
49
+ 2
50
+
51
+ **==> picture [378 x 119] intentionally omitted <==**
52
+
53
+ **----- Start of picture text -----**<br>
54
+ Concatenated outputs<br>Branch<br>Reshaped<br>outputs<br>Trunk<br>Neural operator (DeepONet) Data post-processing Recurrent neural network<br>**----- End of picture text -----**<br>
55
+
56
+ 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.
57
+
58
+ ## 2.1 DEEP OPERATOR NETWORK (DEEPONET)
59
+
60
+ 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):
61
+
62
+ **==> picture [315 x 37] intentionally omitted <==**
63
+
64
+ 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).]
65
+
66
+ ## 2.2 LONG SHORT-TERM MEMORY NETWORK (LSTM)
67
+
68
+ 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.
69
+
70
+ 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).
71
+
72
+ 3
73
+
74
+ ## 2.3 SELF-ADAPTIVE LOSS FUNCTION
75
+
76
+ 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:
77
+
78
+ **==> picture [293 x 30] intentionally omitted <==**
79
+
80
+ ˆ ˆ 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:
81
+
82
+ **==> picture [236 x 15] intentionally omitted <==**
83
+
84
+ **==> picture [398 x 24] intentionally omitted <==**
85
+
86
+ where _η_ _**λ**_ is the learning rate of the self-adaptive weights and
87
+
88
+ **==> picture [283 x 15] intentionally omitted <==**
89
+
90
+ 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.
91
+
92
+ ## 2.4 TRAINING PROCEDURE
93
+
94
+ 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.
95
+
96
+ In our approach, we propose a three-step procedure:
97
+
98
+ 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.
99
+
100
+ 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.
101
+
102
+ 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.
103
+
104
+ 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.
105
+
106
+ 4
107
+
108
+ ## **Algorithm 1** DON-LSTM training procedure.
109
+
110
+ - 1: **Step 1:** DEEPONET TRAINING( _**θ** DON_ , _DL_ , _lr_ 1, _nfreq_ )
111
+
112
+ - 2: Initialize _**θ** DON_ .
113
+
114
+ - 3: Iteratively update _**θ** DON_ on _DL_ with learning rate _lr_ 1, save at every _nfreq_ epochs.
115
+
116
+ - 4: Compute MSE loss on predictions for validation data.
117
+
118
+ - 5: Choose _**θ** DONi_ with the lowest loss.
119
+
120
+ - 6: **Step 2:** LSTM TRAINING( _**θ** LST M_ , _**θ** DON_ , _DH_ , _lr_ 1, _nfreq_ )
121
+
122
+ - 7: Extend DeepONet with reshaping and LSTM layers.
123
+
124
+ - 8: Initialize _**θ** LST M_ .
125
+
126
+ - 9: Freeze _**θ** DON_ as non-trainable.
127
+
128
+ - 10: Iteratively update _**θ** LST M_ on _DH_ with learning rate _lr_ 1, save at every _nfreq_ epochs.
129
+
130
+ - 11: Compute MSE loss on predictions for validation data.
131
+
132
+ - 12: Choose _**θ** LST M_ with the lowest loss.
133
+
134
+ - 13: **Step 3:** DON-LSTM TRAINING( _**θ** LST M_ , _**θ** DON_ , _DH_ , _lr_ 2, _nfreq_ ) 14: Unfreeze _**θ** DON_ as trainable.
135
+
136
+ - 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.
137
+
138
+ - 17: Choose _**θ** LST M_ with the lowest loss.
139
+
140
+ ## 3 PROBLEMS CONSIDERED AND DATA GENERATION
141
+
142
+ 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.
143
+
144
+ ## 4 EXPERIMENTAL RESULTS
145
+
146
+ 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.
147
+
148
+ ## 4.1 BENCHMARK MODELS
149
+
150
+ The benchmark models used to evaluate the performance of the multi-resolution DON-LSTM (DON-LSTM ( _DH_ , _DL_ )) are the following:
151
+
152
+ - **DON (** _DL_ **)** : The vanilla DeepONet trained on _NL_ low-resolution data,
153
+
154
+ - **DON (** _DH_ **)** : The vanilla DeepONet trained on _NH_ high-resolution data,
155
+
156
+ - **DON (** _DH , DL_ **)** : The vanilla DeepONet trained on _NL_ + _NH_ multi-resolution data (both datasets),
157
+
158
+ 5
159
+
160
+ - **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,
161
+
162
+ - **DON-LSTM (** _DH_ **)** : The proposed architecture trained only on _NH_ high-resolution data.
163
+
164
+ 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.
165
+
166
+ ## 4.2 GENERALIZATION PERFORMANCE
167
+
168
+ 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.
169
+
170
+ Our main findings can be summarized into the following:
171
+
172
+ 1. The multi-resolution DON-LSTM generally achieves the lowest generalization error out of the five benchmarks.
173
+
174
+ 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).
175
+
176
+ 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.
177
+
178
+ 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.
179
+
180
+ ## 4.3 COMPARISON WITH STATE-OF-THE-ART
181
+
182
+ 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.
183
+
184
+ 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.
185
+
186
+ - 5 DISCUSSION
187
+
188
+ 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
189
+
190
+ 6
191
+
192
+ |**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
193
+ |---|---|---|---|---|---|---|
194
+ |||**Korteweg–de Vries equation**|||||
195
+ |**DON**|∆_t_= 0_._025||(high)|0.190_±_0.007|0.321_±_0.005|0.333_±_0.010|
196
+ |**DON**|∆_t_= 0_._125||(low)|0.094_±_0.005|0.189_±_0.006|0.125_±_0.007|
197
+ |**DON**|∆_t_=_{_0_._025_,_0_._125_}_||(multi)|0.083_±_0.005|0.175_±_0.005|0.105_±_0.005|
198
+ |**DON-LSTM**|∆_t_= 0_._025||(high)|0.086_±_0.013|0.168_±_0.024|0.113_±_0.028|
199
+ |**DON-LSTM**|∆_t_=_{_0_._025_,_0_._125_}_||(multi)|**0.042**_±_**0.002**|0.122_±_0.010|0.049_±_0.008|
200
+ |**LSTM**|∆_t_= 0_._025||(high)|0.067_±_0.003|0.200_±_0.003|0.133_±_0.004|
201
+ |**FNO**|∆_t_= 0_._025||(high)|0.049_±_0.002|**0.111**_±_**0.005**|**0.042**_±_**0.004**|
202
+ |**Transformer**|∆_t_= 0_._025||(high)|0.091_±_0.002|0.221_±_0.006|0.170_±_0.009|
203
+ |||**Viscous Burgers’ equation**|||||
204
+ |**DON**|∆_t_= 0_._01||(high)|0.114_±_0.001|0.168_±_0.002|0.070_±_0.001|
205
+ |**DON**|∆_t_= 0_._05||(low)|0.089_±_0.001|0.132_±_0.001|0.043_±_0.001|
206
+ |**DON**|∆_t_=_{_0_._01_,_|0_._05_}_|(multi)|0.087_±_0.001|0.129_±_0.001|0.044_±_0.001|
207
+ |**DON-LSTM**|∆_t_= 0_._01||(high)|0.111_±_0.003|0.186_±_0.005|0.087_±_0.004|
208
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_|0_._05_}_|(multi)|**0.049**_±_**0.002**|**0.092**_±_**0.003**|**0.022**_±_**0.001**|
209
+ |**LSTM**|∆_t_= 0_._01||(high)|0.059_±_0.002|0.110_±_0.001|0.032_±_0.001|
210
+ |**FNO**|∆_t_= 0_._01||(high)|0.078_±_0.002|0.118_±_0.002|0.038_±_0.001|
211
+ |**Transformer**|∆_t_= 0_._01||(high)|0.133_±_0.004|0.210_±_0.005|0.112_±_0.005|
212
+ |||**Benjamin–Bona–Mahony equation**|||||
213
+ |**DON**|∆_t_= 0_._075||(high)|0.278_±_0.014|0.533_±_0.016|0.118_±_0.007|
214
+ |**DON**|∆_t_= 0_._375||(low)|0.091_±_0.006|0.227_±_0.007|0.021_±_0.001|
215
+ |**DON**|∆_t_=_{_0_._075_,_0_._375_}_||(multi)|0.077_±_0.007|0.191_±_0.011|0.016_±_0.002|
216
+ |**DON-LSTM**|∆_t_= 0_._075||(high)|0.104_±_0.023|0.264_±_0.056|0.033_±_0.013|
217
+ |**DON-LSTM**|∆_t_=_{_0_._075_,_0_._375_}_||(multi)|**0.045**_±_**0.003**|0.151_±_0.022|0.010_±_0.003|
218
+ |**LSTM**|∆_t_= 0_._075||(high)|0.107_±_0.010|0.332_±_0.012|0.044_±_0.003|
219
+ |**FNO**|∆_t_= 0_._075||(high)|0.054_±_0.004|**0.100**_±_**0.007**|**0.005**_±_**0.001**|
220
+ |**Transformer**|∆_t_= 0_._075||(high)|0.130_±_0.006|0.355_±_0.015|0.057_±_0.004|
221
+ |||**Cahn–Hilliard equation**|||||
222
+ |**DON**|∆_t_= 0_._02||(high)|0.041_±_0.002|0.068_±_0.002|0.018_±_0.001|
223
+ |**DON**|∆_t_= 0_._1||(low)|0.038_±_0.003|0.056_±_0.004|0.013_±_0.002|
224
+ |**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.018_±_0.001|0.031_±_0.002|0.004_±_0.001|
225
+ |**DON-LSTM**|∆_t_= 0_._02||(high)|0.076_±_0.009|0.137_±_0.014|0.075_±_0.015|
226
+ |**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.014**_±_**0.001**|**0.027**_±_**0.002**|**0.003**_±_**0.001**|
227
+ |**LSTM**|∆_t_= 0_._02||(high)|0.016_±_0.001|0.036_±_0.001|0.005_±_0.000|
228
+ |**FNO**|∆_t_= 0_._02||(high)|0.022_±_0.001|0.037_±_0.001|0.005_±_0.000|
229
+ |**Transformer**|∆_t_= 0_._02||(high)|0.029_±_0.001|0.061_±_0.001|0.015_±_0.000|
230
+
231
+ 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).
232
+
233
+ 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.
234
+
235
+ 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.
236
+
237
+ 7
238
+
239
+ **==> picture [397 x 213] intentionally omitted <==**
240
+
241
+ **----- Start of picture text -----**<br>
242
+ Korteweg de Vries Viscous Burgers'<br>10 1<br>10 1<br>10 2<br>10 2<br>NH: 250 500 750 1000 NH: 100 250 400 550 700<br>NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800<br>Benjamin Bona Mahony Cahn Hilliard<br>10 1 10 1<br>10 2 10 2<br>10 3 10 3<br>NH: 250 500 750 1000 NH: 250 500 750 1000<br>NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000<br>Number of training points of high (NH) and low (NL) resolution<br>DON (DH) DON (DL) DON (DH, DL) LSTM (DH) DON-LSTM (DH) DON-LSTM (DH, DL)<br>2)yi )2) y<br>(yi (yi<br>n 1 n i = 0log(RSE) = log(n 1 n i = 0<br>**----- End of picture text -----**<br>
243
+
244
+ 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.
245
+
246
+ 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.
247
+
248
+ ## 6 LIMITATIONS AND FUTURE WORK
249
+
250
+ 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).
251
+
252
+ 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.
253
+
254
+ 8
255
+
256
+ **==> picture [396 x 214] intentionally omitted <==**
257
+
258
+ **----- Start of picture text -----**<br>
259
+ Korteweg de Vries Viscous Burgers'<br>10 1<br>10 1<br>10 2<br>NH: 250 500 750 1000 NH: 100 250 400 550 700<br>NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800<br>Benjamin Bona Mahony Cahn Hilliard<br>10 1<br>10 2<br>10 2<br>10 3 10 3<br>NH: 250 500 750 1000 NH: 250 500 750 1000<br>NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000<br>Number of training points of high (NH) and low (NL) resolution<br>DON-LSTM (DH, DL) LSTM (DH) Transformer (DH) FNO (DH)<br>2)yi )2) y<br>(yi (yi<br>n 1 n i = 0log(RSE) = log(n 1 n i = 0<br>**----- End of picture text -----**<br>
260
+
261
+ 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.
262
+
263
+ ## 7 CONCLUSIONS
264
+
265
+ 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.
266
+
267
+ ## 8 REPRODUCIBILITY
268
+
269
+ 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.
270
+
271
+ ## REFERENCES
272
+
273
+ - 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.
274
+
275
+ - Harry Bateman. Some Recent Researches on the Motion of Fluids. _Monthly Weather Review_ , 43(4): 163–170, 1915.
276
+
277
+ 9
278
+
279
+ - 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.
280
+
281
+ - Johannes Martinus Burgers. A mathematical model illustrating the theory of turbulence. _Advances in applied mechanics_ , 1:171–199, 1948.
282
+
283
+ - 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.
284
+
285
+ - Qianying Cao, Somdatta Goswami, and George Em Karniadakis. LNO: Laplace Neural Operator for Solving Differential Equations. _arXiv preprint arXiv:2303.10528_ , 2023.
286
+
287
+ - 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.
288
+
289
+ - 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.
290
+
291
+ - L´eonard Equer, T Konstantin Rusch, and Siddhartha Mishra. Multi-scale message-passing neural PDE solvers. _arXiv preprint arXiv:2302.03580_ , 2023.
292
+
293
+ - Amanda A Howard, Mauro Perego, George E Karniadakis, and Panos Stinis. Multifidelity Deep Operator Networks. _arXiv preprint arXiv:2204.09157_ , 2022.
294
+
295
+ - 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.
296
+
297
+ - 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.
298
+
299
+ - Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier Neural Operator for Parametric Partial Differential Equations, 2020.
300
+
301
+ - 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.
302
+
303
+ - 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.
304
+
305
+ - 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.
306
+
307
+ - 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.
308
+
309
+ - Levi McClenny and Ulisses Braga-Neto. Self-adaptive physics-informed neural networks using a soft attention mechanism. _arXiv preprint arXiv:2009.04544_ , 2020.
310
+
311
+ - Yong Zheng Ong, Zuowei Shen, and Haizhao Yang. IAE-Net: Integral autoencoders for discretization-invariant learning. _arXiv preprint arXiv:2203.05142_ , 2022.
312
+
313
+ - D Howell Peregrine. Calculations of the development of an undular bore. _Journal of Fluid Mechanics_ , 25(2):321–330, 1966.
314
+
315
+ 10
316
+
317
+ - 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.
318
+
319
+ - 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.
320
+
321
+ - 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.
322
+
323
+ Clinton Wang and Polina Golland. Discretization-Invariant Learning on Neural Fields. 2022.
324
+
325
+ - 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.
326
+
327
+ - 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.
328
+
329
+ - 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.
330
+
331
+ 11
332
+
333
+ ## A PARTIAL DIFFERENTIAL EQUATIONS DATA
334
+
335
+ ## A.1 KORTEWEG–DE VRIES EQUATION
336
+
337
+ 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:
338
+
339
+ **==> picture [253 x 23] intentionally omitted <==**
340
+
341
+ 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.
342
+
343
+ The initial conditions are each a sum of two solitons (solitary waves), _i.e._ :
344
+
345
+ **==> picture [316 x 30] intentionally omitted <==**
346
+
347
+ 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.
348
+
349
+ ## A.2 BENJAMIN–BONA–MAHONY EQUATION
350
+
351
+ 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:
352
+
353
+ **==> picture [275 x 25] intentionally omitted <==**
354
+
355
+ The chosen initial conditions are superpositions of two soliton waves of the following shape:
356
+
357
+ **==> picture [342 x 30] intentionally omitted <==**
358
+
359
+ where _ci ∈_ (1 _,_ 3) and _di ∈_ (0 _,_ 1) are coefficients that determine the height and location of the peak of a soliton, respectively.
360
+
361
+ ## A.3 CAHN–HILLIARD EQUATION
362
+
363
+ The Cahn–Hilliard equation is used to describe phase separation with applications to materials science and physics (Cahn & Hilliard, 1958). It is expressed as:
364
+
365
+ **==> picture [272 x 24] intentionally omitted <==**
366
+
367
+ where we set _ν_ = _−_ 0 _._ 01, _α_ = 0 _._ 01 and _µ_ = _−_ 0 _._ 00001.
368
+
369
+ The initial conditions are superpositions of sine and cosine waves, i.e. _u_ ( _x,_ 0) = _u_ 1 + _u_ 2 with:
370
+
371
+ **==> picture [284 x 21] intentionally omitted <==**
372
+
373
+ where _ai, bi ∈_ (0 _,_ 0 _._ 2) and _ki, ji_ are integers and _ji, ki ∈_ [1 _,_ 6].
374
+
375
+ 12
376
+
377
+ A.4 VISCOUS BURGERS’ EQUATION
378
+
379
+ 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:
380
+
381
+ **==> picture [253 x 25] intentionally omitted <==**
382
+
383
+ where _x ∈_ (0 _,_ 1), _t ∈_ (0 _,_ 2], and _ν_ = 0 _._ 001 is the diffusion coefficient.
384
+
385
+ The initial conditions are given by the superposition of sinusoidal waves:
386
+
387
+ **==> picture [278 x 24] intentionally omitted <==**
388
+
389
+ 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 _π_ ).
390
+
391
+ **==> picture [400 x 274] intentionally omitted <==**
392
+
393
+ **----- Start of picture text -----**<br>
394
+ 2.00 t = 0.00 0.6 t = 0.00<br>t = 1.25 t = 0.50<br>1.75 t = 2.50 0.4 t = 1.00<br>1.50 t = 3.75 t = 1.50<br>1.25 t = 5.00 0.2 t = 2.00<br>1.00<br>0.0<br>0.75<br>0.50 0.2<br>0.25<br>0.4<br>0.00<br>0 2 4 6 8 10 0 20 40 60 80 100<br>x x<br>(a) Korteweg–de Vries equation. (b) Viscous Burgers’ equation.<br>7 t = 0.00 1.00 t = 0.00<br>6 t = 3.75 0.75 t = 0.75<br>t = 7.50 t = 1.50<br>5 t = 11.25 0.50 t = 2.25<br>t = 15.00 0.25 t = 3.00<br>4<br>0.00<br>3<br>0.25<br>2<br>0.50<br>1 0.75<br>0 1.00<br>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<br>x x<br>(c) Benjamin–Bona–Mahony equation. (d) Cahn–Hilliard equation.<br>)( txu, )( txu,<br>)( txu, )( txu,<br>**----- End of picture text -----**<br>
395
+
396
+ Figure 4: Random samples from training data. Each dataset consists of multiple trajectories starting from different initial conditions.
397
+
398
+ 13
399
+
400
+ |**Equation**|_N_|_tH_|_tL_|_x_|
401
+ |---|---|---|---|---|
402
+ |Korteweg–de Vries|10000|_• t ∈_[0_,_5]<br>_•_ ∆_t_= 0_._025<br>_•_ 201points|_• t ∈_[0_,_5]<br>_•_ ∆_t_= 0_._125<br>_•_ 41points|_•_ Ω_∈_[0_,_10]<br>_•_ ∆_x_= 0_._1<br>_•_ 100points|
403
+ |Viscous Burgers’|5000|_• t ∈_[0_,_2]<br>_•_ ∆_t_= 0_._01<br>_•_ 201points|_• t ∈_[0_,_2]<br>_•_ ∆_t_= 0_._05<br>_•_ 41points|_•_ Ω_∈_[_−_1_,_1]<br>_•_ ∆_x_= 0_._02<br>_•_ 100points|
404
+ |Benjamin–Bona–Mahony|10000|_• t ∈_[0_,_15]<br>_•_ ∆_t_= 0_._075<br>_•_ 201points|_• t ∈_[0_,_15]<br>_•_ ∆_t_= 0_._375<br>_•_ 41points|_•_ Ω_∈_[0_,_20]<br>_•_ ∆_x_= 0_._2<br>_•_ 100points|
405
+ |Cahn–Hilliard|10000|_• t ∈_[0_,_3]<br>_•_ ∆_t_= 0_._02<br>_•_ 151points|_• t ∈_[0_,_3]<br>_•_ ∆_t_= 0_._1<br>_•_ 31points|_•_ Ω_∈_[0_,_1]<br>_•_ ∆_x_= 0_._01<br>_•_ 100points|
406
+
407
+ 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.
408
+
409
+ ## B GENERALIZATION PERFORMANCE
410
+
411
+ 14
412
+
413
+ |||**Korteweg–de Vries equation**|**Korteweg–de Vries equation**|**Korteweg–de Vries equation**|||
414
+ |---|---|---|---|---|---|---|
415
+ |**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
416
+ |_NH_ = 250,_NL_|= 1000||||||
417
+ |**DON**|∆_t_= 0_._025||(high)|0.298_±_0.003|0.434_±_0.005|0.580_±_0.014|
418
+ |**DON**|∆_t_= 0_._125||(low)|0.179_±_0.008|0.300_±_0.008|0.277_±_0.016|
419
+ |**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.149_±_0.012|0.273_±_0.005|0.227_±_0.008|
420
+ |**DON-LSTM**|∆_t_= 0_._025||(high)|0.152_±_0.011|0.298_±_0.018|0.274_±_0.034|
421
+ |**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.065**_±_**0.005**|0.169_±_0.016|0.089_±_0.016|
422
+ |**LSTM**|∆_t_= 0_._025||(high)|0.112_±_0.006|0.290_±_0.005|0.259_±_0.010|
423
+ |**FNO**|∆_t_= 0_._025||(high)|0.081_±_0.002|**0.169**_±_**0.004**|**0.088**_±_**0.004**|
424
+ |**Transformer**|∆_t_= 0_._025||(high)|0.164_±_0.002|0.348_±_0.007|0.372_±_0.015|
425
+ |_NH_ = 500,_NL_|= 2000||||||
426
+ |**DON**|∆_t_= 0_._025||(high)|0.192_±_0.011|0.332_±_0.002|0.339_±_0.005|
427
+ |**DON**|∆_t_= 0_._125||(low)|0.084_±_0.002|0.193_±_0.006|0.114_±_0.007|
428
+ |**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.075_±_0.004|0.169_±_0.004|0.091_±_0.005|
429
+ |**DON-LSTM**|∆_t_= 0_._025||(high)|0.089_±_0.025|0.185_±_0.050|0.112_±_0.058|
430
+ |**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.044**_±_**0.002**|0.126_±_0.006|0.049_±_0.005|
431
+ |**LSTM**|∆_t_= 0_._025||(high)|0.069_±_0.003|0.211_±_0.003|0.136_±_0.003|
432
+ |**FNO**|∆_t_= 0_._025||(high)|0.048_±_0.001|**0.119**_±_**0.007**|**0.044**_±_**0.005**|
433
+ |**Transformer**|∆_t_= 0_._025||(high)|0.089_±_0.003|0.230_±_0.009|0.162_±_0.012|
434
+ |_NH_ = 750,_NL_|= 3000||||||
435
+ |**DON**|∆_t_= 0_._025||(high)|0.149_±_0.004|0.282_±_0.008|0.245_±_0.013|
436
+ |**DON**|∆_t_= 0_._125||(low)|0.066_±_0.005|0.148_±_0.005|0.068_±_0.004|
437
+ |**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.059_±_0.003|0.137_±_0.005|0.058_±_0.004|
438
+ |**DON-LSTM**|∆_t_= 0_._025||(high)|0.077_±_0.010|0.138_±_0.021|0.059_±_0.018|
439
+ |**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.034**_±_**0.002**|0.097_±_0.008|0.029_±_0.005|
440
+ |**LSTM**|∆_t_= 0_._025||(high)|0.050_±_0.001|0.163_±_0.001|0.082_±_0.001|
441
+ |**FNO**|∆_t_= 0_._025||(high)|0.037_±_0.002|**0.090**_±_**0.009**|**0.025**_±_**0.005**|
442
+ |**Transformer**|∆_t_= 0_._025||(high)|0.064_±_0.002|0.171_±_0.007|0.091_±_0.007|
443
+ |_NH_ = 1000,_NL_ = 4000|||||||
444
+ |**DON**|∆_t_= 0_._025||(high)|0.123_±_0.010|0.234_±_0.006|0.168_±_0.009|
445
+ |**DON**|∆_t_= 0_._125||(low)|0.047_±_0.006|0.116_±_0.004|0.041_±_0.003|
446
+ |**DON**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|0.048_±_0.002|0.121_±_0.007|0.045_±_0.005|
447
+ |**DON-LSTM**|∆_t_= 0_._025||(high)|0.024_±_0.004|**0.053**_±_**0.008**|**0.009**_±_**0.003**|
448
+ |**DON-LSTM**|∆_t_=_{_0_._025_,_|0_._125_}_|(multi)|**0.023**_±_**0.001**|0.096_±_0.009|0.028_±_0.005|
449
+ |**LSTM**|∆_t_= 0_._025||(high)|0.039_±_0.003|0.135_±_0.004|0.056_±_0.003|
450
+ |**FNO**|∆_t_= 0_._025||(high)|0.030_±_0.001|0.066_±_0.001|0.013_±_0.000|
451
+ |**Transformer**|∆_t_= 0_._025||(high)|0.047_±_0.001|0.136_±_0.003|0.057_±_0.003|
452
+
453
+ Table 3: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
454
+
455
+ 15
456
+
457
+ ||**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**|**Viscous Burgers’ equation(**_ν_ = 0_._001**)**||
458
+ |---|---|---|---|---|---|
459
+ |**Model**|**Resolution**||**MAE**|**RMSE**|**RSE**|
460
+ |_NH_ = 100,_NL_|= 400|||||
461
+ |**DON**|∆_t_= 0_._01|(high)|0.139_±_0.001|0.207_±_0.002|0.104_±_0.002|
462
+ |**DON**|∆_t_= 0_._05|(low)|0.109_±_0.001|0.161_±_0.002|0.063_±_0.002|
463
+ |**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.108_±_0.001|0.158_±_0.002|0.070_±_0.002|
464
+ |**DON-LSTM**|∆_t_= 0_._01|(high)|0.157_±_0.001|0.233_±_0.002|0.132_±_0.003|
465
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.076**_±_**0.005**|**0.131**_±_**0.007**|**0.042**_±_**0.004**|
466
+ |**LSTM**|∆_t_= 0_._01|(high)|0.106_±_0.003|0.169_±_0.002|0.069_±_0.002|
467
+ |**FNO**|∆_t_= 0_._01|(high)|0.121_±_0.004|0.171_±_0.005|0.075_±_0.004|
468
+ |**Transformer**|∆_t_= 0_._01|(high)|0.184_±_0.003|0.281_±_0.004|0.192_±_0.005|
469
+ |_NH_ = 250,_NL_|= 1000|||||
470
+ |**DON**|∆_t_= 0_._01|(high)|0.120_±_0.002|0.177_±_0.002|0.076_±_0.002|
471
+ |**DON**|∆_t_= 0_._05|(low)|0.094_±_0.001|0.140_±_0.001|0.048_±_0.001|
472
+ |**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.092_±_0.001|0.138_±_0.001|0.048_±_0.001|
473
+ |**DON-LSTM**|∆_t_= 0_._01|(high)|0.132_±_0.002|0.208_±_0.004|0.106_±_0.004|
474
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.055**_±_**0.003**|**0.103**_±_**0.003**|**0.026**_±_**0.001**|
475
+ |**LSTM**|∆_t_= 0_._01|(high)|0.062_±_0.002|0.116_±_0.001|0.033_±_0.000|
476
+ |**FNO**|∆_t_= 0_._01|(high)|0.087_±_0.002|0.129_±_0.002|0.042_±_0.002|
477
+ |**Transformer**|∆_t_= 0_._01|(high)|0.142_±_0.006|0.226_±_0.008|0.125_±_0.009|
478
+ |_NH_ = 400,_NL_|= 1600|||||
479
+ |**DON**|∆_t_= 0_._01|(high)|0.109_±_0.001|0.160_±_0.001|0.062_±_0.001|
480
+ |**DON**|∆_t_= 0_._05|(low)|0.085_±_0.001|0.126_±_0.001|0.039_±_0.001|
481
+ |**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.083_±_0.001|0.124_±_0.001|0.040_±_0.001|
482
+ |**DON-LSTM**|∆_t_= 0_._01|(high)|0.108_±_0.003|0.187_±_0.004|0.086_±_0.004|
483
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.044**_±_**0.001**|**0.085**_±_**0.001**|**0.017**_±_**0.001**|
484
+ |**LSTM**|∆_t_= 0_._01|(high)|0.050_±_0.001|0.098_±_0.001|0.023_±_0.001|
485
+ |**FNO**|∆_t_= 0_._01|(high)|0.068_±_0.001|0.106_±_0.001|0.029_±_0.000|
486
+ |**Transformer**|∆_t_= 0_._01|(high)|0.127_±_0.002|0.203_±_0.005|0.100_±_0.005|
487
+ |_NH_ = 550,_NL_|= 2200|||||
488
+ |**DON**|∆_t_= 0_._01|(high)|0.104_±_0.001|0.152_±_0.002|0.056_±_0.001|
489
+ |**DON**|∆_t_= 0_._05|(low)|0.077_±_0.001|0.116_±_0.001|0.033_±_0.000|
490
+ |**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.075_±_0.001|0.114_±_0.001|0.033_±_0.001|
491
+ |**DON-LSTM**|∆_t_= 0_._01|(high)|0.087_±_0.004|0.161_±_0.007|0.063_±_0.005|
492
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.037**_±_**0.001**|**0.074**_±_**0.001**|**0.013**_±_**0.000**|
493
+ |**LSTM**|∆_t_= 0_._01|(high)|0.042_±_0.002|0.087_±_0.001|0.019_±_0.001|
494
+ |**FNO**|∆_t_= 0_._01|(high)|0.059_±_0.001|0.096_±_0.001|0.023_±_0.001|
495
+ |**Transformer**|∆_t_= 0_._01|(high)|0.112_±_0.002|0.179_±_0.005|0.078_±_0.004|
496
+ |_NH_ = 700,_NL_|= 2800|||||
497
+ |**DON**|∆_t_= 0_._01|(high)|0.099_±_0.001|0.146_±_0.002|0.052_±_0.002|
498
+ |**DON**|∆_t_= 0_._05|(low)|0.078_±_0.001|0.118_±_0.001|0.034_±_0.001|
499
+ |**DON**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|0.075_±_0.000|0.113_±_0.001|0.032_±_0.000|
500
+ |**DON-LSTM**|∆_t_= 0_._01|(high)|0.071_±_0.003|0.140_±_0.006|0.048_±_0.004|
501
+ |**DON-LSTM**|∆_t_=_{_0_._01_,_0_._05_}_|(multi)|**0.033**_±_**0.000**|**0.068**_±_**0.001**|**0.011**_±_**0.000**|
502
+ |**LSTM**|∆_t_= 0_._01|(high)|0.036_±_0.001|0.079_±_0.001|0.015_±_0.000|
503
+ |**FNO**|∆_t_= 0_._01|(high)|0.055_±_0.000|0.090_±_0.000|0.021_±_0.000|
504
+ |**Transformer**|∆_t_= 0_._01|(high)|0.101_±_0.005|0.163_±_0.005|0.065_±_0.004|
505
+
506
+ Table 4: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
507
+
508
+ 16
509
+
510
+ |||**Benjamin–Bona–Mahony**|**Benjamin–Bona–Mahony**|**Benjamin–Bona–Mahony**|||
511
+ |---|---|---|---|---|---|---|
512
+ |**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
513
+ |_NH_ = 250,_NL_|= 1000||||||
514
+ |**DON**|∆_t_= 0_._075||(high)|0.554_±_0.019|0.932_±_0.031|0.297_±_0.020|
515
+ |**DON**|∆_t_= 0_._375||(low)|0.166_±_0.012|0.383_±_0.011|0.050_±_0.003|
516
+ |**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.155_±_0.011|0.331_±_0.011|0.041_±_0.003|
517
+ |**DON-LSTM**|∆_t_= 0_._075||(high)|0.198_±_0.041|0.510_±_0.095|0.092_±_0.034|
518
+ |**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.088**_±_**0.005**|0.271_±_0.036|0.025_±_0.007|
519
+ |**LSTM**|∆_t_= 0_._075||(high)|0.191_±_0.008|0.544_±_0.013|0.101_±_0.005|
520
+ |**FNO**|∆_t_= 0_._075||(high)|0.098_±_0.006|**0.195**_±_**0.015**|**0.013**_±_**0.002**|
521
+ |**Transformer**|∆_t_= 0_._075||(high)|0.264_±_0.006|0.684_±_0.021|0.160_±_0.010|
522
+ |_NH_ = 500,_NL_|= 2000||||||
523
+ |**DON**|∆_t_= 0_._075||(high)|0.250_±_0.010|0.530_±_0.011|0.096_±_0.004|
524
+ |**DON**|∆_t_= 0_._375||(low)|0.096_±_0.006|0.245_±_0.010|0.021_±_0.002|
525
+ |**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.074_±_0.008|0.192_±_0.010|0.013_±_0.001|
526
+ |**DON-LSTM**|∆_t_= 0_._075||(high)|0.107_±_0.020|0.264_±_0.033|0.024_±_0.006|
527
+ |**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.042**_±_**0.002**|0.135_±_0.020|0.006_±_0.002|
528
+ |**LSTM**|∆_t_= 0_._075||(high)|0.111_±_0.018|0.344_±_0.014|0.041_±_0.003|
529
+ |**FNO**|∆_t_= 0_._075||(high)|0.050_±_0.006|**0.091**_±_**0.009**|**0.003**_±_**0.001**|
530
+ |**Transformer**|∆_t_= 0_._075||(high)|0.117_±_0.006|0.337_±_0.013|0.039_±_0.003|
531
+ |_NH_ = 750,_NL_|= 3000||||||
532
+ |**DON**|∆_t_= 0_._075||(high)|0.181_±_0.018|0.380_±_0.008|0.050_±_0.002|
533
+ |**DON**|∆_t_= 0_._375||(low)|0.058_±_0.006|0.168_±_0.005|0.010_±_0.001|
534
+ |**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.046_±_0.002|0.140_±_0.012|0.007_±_0.001|
535
+ |**DON-LSTM**|∆_t_= 0_._075||(high)|0.048_±_0.007|0.119_±_0.025|0.005_±_0.002|
536
+ |**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.032**_±_**0.006**|0.125_±_0.022|0.005_±_0.002|
537
+ |**LSTM**|∆_t_= 0_._075||(high)|0.068_±_0.005|0.250_±_0.008|0.021_±_0.001|
538
+ |**FNO**|∆_t_= 0_._075||(high)|0.037_±_0.002|**0.063**_±_**0.004**|**0.001**_±_**0.000**|
539
+ |**Transformer**|∆_t_= 0_._075||(high)|0.081_±_0.009|0.233_±_0.015|0.019_±_0.002|
540
+ |_NH_ = 1000,_NL_ = 4000|||||||
541
+ |**DON**|∆_t_= 0_._075||(high)|0.125_±_0.009|0.288_±_0.012|0.028_±_0.002|
542
+ |**DON**|∆_t_= 0_._375||(low)|0.043_±_0.002|0.110_±_0.001|0.004_±_0.000|
543
+ |**DON**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|0.033_±_0.006|0.103_±_0.011|0.004_±_0.001|
544
+ |**DON-LSTM**|∆_t_= 0_._075||(high)|0.061_±_0.023|0.162_±_0.071|0.011_±_0.008|
545
+ |**DON-LSTM**|∆_t_=_{_0_._075_,_|0_._375_}_|(multi)|**0.019**_±_**0.001**|0.074_±_0.011|0.002_±_0.001|
546
+ |**LSTM**|∆_t_= 0_._075||(high)|0.056_±_0.008|0.191_±_0.013|0.012_±_0.002|
547
+ |**FNO**|∆_t_= 0_._075||(high)|0.030_±_0.001|**0.052**_±_**0.001**|**0.001**_±_**0.000**|
548
+ |**Transformer**|∆_t_= 0_._075||(high)|0.057_±_0.004|0.167_±_0.012|0.010_±_0.001|
549
+
550
+ Table 5: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
551
+
552
+ 17
553
+
554
+ |||**Cahn–Hilliard equation**|**Cahn–Hilliard equation**|**Cahn–Hilliard equation**|||
555
+ |---|---|---|---|---|---|---|
556
+ |**Model**|**Resolution**|||**MAE**|**RMSE**|**RSE**|
557
+ |_NH_ = 250,_NL_|= 1000||||||
558
+ |**DON**|∆_t_= 0_._02||(high)|0.066_±_0.004|0.104_±_0.005|0.039_±_0.004|
559
+ |**DON**|∆_t_= 0_._1||(low)|0.050_±_0.006|0.074_±_0.007|0.020_±_0.004|
560
+ |**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.031_±_0.003|0.053_±_0.004|0.010_±_0.002|
561
+ |**DON-LSTM**|∆_t_= 0_._02||(high)|0.125_±_0.015|0.206_±_0.021|0.154_±_0.032|
562
+ |**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.023**_±_**0.003**|**0.043**_±_**0.004**|**0.007**_±_**0.001**|
563
+ |**LSTM**|∆_t_= 0_._02||(high)|0.025_±_0.000|0.054_±_0.001|0.011_±_0.000|
564
+ |**FNO**|∆_t_= 0_._02||(high)|0.032_±_0.002|0.054_±_0.004|0.011_±_0.001|
565
+ |**Transformer**|∆_t_= 0_._02||(high)|0.049_±_0.001|0.093_±_0.001|0.031_±_0.001|
566
+ |_NH_ = 500,_NL_|= 2000||||||
567
+ |**DON**|∆_t_= 0_._02||(high)|0.041_±_0.001|0.067_±_0.001|0.016_±_0.001|
568
+ |**DON**|∆_t_= 0_._1||(low)|0.044_±_0.002|0.063_±_0.004|0.014_±_0.002|
569
+ |**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.018_±_0.001|0.031_±_0.002|**0.003**_±_**0.000**|
570
+ |**DON-LSTM**|∆_t_= 0_._02||(high)|0.079_±_0.010|0.141_±_0.013|0.072_±_0.014|
571
+ |**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.016**_±_**0.002**|**0.030**_±_**0.003**|0.003_±_0.001|
572
+ |**LSTM**|∆_t_= 0_._02||(high)|0.015_±_0.000|0.037_±_0.001|0.005_±_0.000|
573
+ |**FNO**|∆_t_= 0_._02||(high)|0.022_±_0.001|0.036_±_0.001|0.005_±_0.000|
574
+ |**Transformer**|∆_t_= 0_._02||(high)|0.028_±_0.002|0.062_±_0.001|0.014_±_0.000|
575
+ |_NH_ = 750,_NL_|= 3000||||||
576
+ |**DON**|∆_t_= 0_._02||(high)|0.034_±_0.002|0.056_±_0.002|0.011_±_0.001|
577
+ |**DON**|∆_t_= 0_._1||(low)|0.047_±_0.004|0.066_±_0.006|0.016_±_0.003|
578
+ |**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.013_±_0.001|0.024_±_0.001|0.002_±_0.000|
579
+ |**DON-LSTM**|∆_t_= 0_._02||(high)|0.055_±_0.007|0.109_±_0.013|0.043_±_0.010|
580
+ |**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.011**_±_**0.001**|**0.021**_±_**0.002**|**0.002**_±_**0.000**|
581
+ |**LSTM**|∆_t_= 0_._02||(high)|0.013_±_0.001|0.029_±_0.001|0.003_±_0.000|
582
+ |**FNO**|∆_t_= 0_._02||(high)|0.018_±_0.000|0.031_±_0.000|0.003_±_0.000|
583
+ |**Transformer**|∆_t_= 0_._02||(high)|0.021_±_0.001|0.049_±_0.001|0.009_±_0.000|
584
+ |_NH_ = 1000,_NL_ = 4000|||||||
585
+ |**DON**|∆_t_= 0_._02||(high)|0.025_±_0.002|0.044_±_0.001|0.007_±_0.000|
586
+ |**DON**|∆_t_= 0_._1||(low)|0.010_±_0.000|0.020_±_0.001|0.001_±_0.000|
587
+ |**DON**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|0.009_±_0.000|0.016_±_0.000|0.001_±_0.000|
588
+ |**DON-LSTM**|∆_t_= 0_._02||(high)|0.045_±_0.003|0.092_±_0.007|0.031_±_0.004|
589
+ |**DON-LSTM**|∆_t_=_{_0_._02_,_|0_._1_}_|(multi)|**0.007**_±_**0.000**|**0.015**_±_**0.000**|**0.001**_±_**0.000**|
590
+ |**LSTM**|∆_t_= 0_._02||(high)|0.011_±_0.001|0.025_±_0.001|0.002_±_0.000|
591
+ |**FNO**|∆_t_= 0_._02||(high)|0.017_±_0.000|0.028_±_0.000|0.003_±_0.000|
592
+ |**Transformer**|∆_t_= 0_._02||(high)|0.016_±_0.000|0.041_±_0.001|0.006_±_0.000|
593
+
594
+ Table 6: The mean and the standard deviation of prediction metrics on high-resolution data. Each model is trained 5 times.
595
+
596
+ 18
597
+
598
+ **==> picture [397 x 213] intentionally omitted <==**
599
+
600
+ **----- Start of picture text -----**<br>
601
+ Korteweg de Vries Viscous Burgers'<br>0.6 0.14<br>0.5 0.12<br>0.4 0.10<br>0.08<br>0.3<br>0.06<br>0.2<br>0.04<br>0.1<br>0.02<br>0.0<br>NH: 250 500 750 1000 NH: 100 250 400 550 700<br>NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800<br>Benjamin Bona Mahony Cahn Hilliard<br>0.35<br>0.30 0.20<br>0.25<br>0.15<br>0.20<br>0.15 0.10<br>0.10<br>0.05<br>0.05<br>0.00 0.00<br>NH: 250 500 750 1000 NH: 250 500 750 1000<br>NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000<br>Number of training points of high (NH) and low (NL) resolution<br>DON (DH) DON (DL) DON (DH, DL) LSTM (DH) DON-LSTM (DH) DON-LSTM (DH, DL)<br>2)yi 2) y<br>(yi (yi<br>n 1 n i = 0 n 1 n i = 0<br>RSE =<br>**----- End of picture text -----**<br>
602
+
603
+ 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).
604
+
605
+ 19
606
+
607
+ **==> picture [396 x 214] intentionally omitted <==**
608
+
609
+ **----- Start of picture text -----**<br>
610
+ Korteweg de Vries Viscous Burgers'<br>0.4 0.20<br>0.3 0.15<br>0.2 0.10<br>0.1 0.05<br>0.0<br>NH: 250 500 750 1000 NH: 100 250 400 550 700<br>NL: 1000 2000 3000 4000 NL: 400 1000 1600 2200 2800<br>Benjamin Bona Mahony Cahn Hilliard<br>0.175<br>0.030<br>0.150<br>0.025<br>0.125<br>0.020<br>0.100<br>0.075 0.015<br>0.050 0.010<br>0.025 0.005<br>0.000 0.000<br>NH: 250 500 750 1000 NH: 250 500 750 1000<br>NL: 1000 2000 3000 4000 NL: 1000 2000 3000 4000<br>Number of training points of high (NH) and low (NL) resolution<br>DON-LSTM (DH, DL) LSTM (DH) Transformer (DH) FNO (DH)<br>2)yi 2) y<br>(yi (yi<br>n 1 n i = 0 n 1 n i = 0<br>RSE =<br>**----- End of picture text -----**<br>
611
+
612
+ 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).
613
+
614
+ ## C ARCHITECTURE DETAILS
615
+
616
+ ## C.1 DEEPONET
617
+
618
+ 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.
619
+
620
+ Table 7: Branch network.
621
+
622
+ ||LAYER|OUTPUT SHAPE|ACTIVATION|PARAM|
623
+ |---|---|---|---|---|
624
+ |0|INPUT|(NONE, X)|-|0|
625
+ |1|DENSE|(NONE, 150)|SWISH|150_x_+ 150|
626
+ |2|DENSE|(NONE, 250)|SWISH|37_,_750|
627
+ |3|DENSE|(NONE, 450)|SWISH|112_,_950|
628
+ |4|DENSE|(NONE, 380)|SWISH|171_,_380|
629
+ |5|DENSE|(NONE, 320)|SWISH|121_,_920|
630
+ |6|DENSE|(NONE,300)|LINEAR|96_,_300|
631
+
632
+ 20
633
+
634
+ Table 8: Trunk network.
635
+
636
+ ||LAYER|OUTPUT SHAPE|ACTIVATION|PARAM|
637
+ |---|---|---|---|---|
638
+ |0|INPUT|(NONE, 2)|-|0|
639
+ |1|DENSE|(NONE, 200)|SWISH|600|
640
+ |2|DENSE|(NONE, 220)|SWISH|44_,_220|
641
+ |3|DENSE|(NONE, 240)|SWISH|53_,_040|
642
+ |4|DENSE|(NONE, 250)|SWISH|60_,_250|
643
+ |5|DENSE|(NONE, 260)|SWISH|65_,_260|
644
+ |6|DENSE|(NONE, 280)|LINEAR|73_,_080|
645
+ |7|DENSE|(NONE,300)|LINEAR|84_,_300|
646
+
647
+ 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.
648
+
649
+ ## C.2 DON-LSTM
650
+
651
+ Table 9: LSTM extension for the input of _t_ timesteps.
652
+
653
+ ||LAYER||OUTPUT SHAPE|ACTIVATION|PARAM|
654
+ |---|---|---|---|---|---|
655
+ |0|DEEPONET|OUTPUT|(NONE,_x × t_)|-|0|
656
+ |1|RESHAPE||(NONE,_t_,_x_)|-|0|
657
+ |2|LSTM||(NONE,_t_, 200)|TANH|4_×_((_x_+ 1)_×_200 + 2002)|
658
+ |3|DENSE||(NONE,_t_,_x_)|LINEAR|_xt_+_x_|
659
+
660
+ The inputs and outputs in the LSTM training are normalized using standard scaling.
661
+
662
+ ## D DATA SCALING DETAILS
663
+
664
+ 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.
665
+
666
+ ## D.1 STANDARD SCALING
667
+
668
+ The standard scaling formula is defined as:
669
+
670
+ **==> picture [224 x 19] intentionally omitted <==**
671
+
672
+ where _x[′]_ are the standardized values, _x_ are the original values, _µ_ is the mean, and _σ_ is the standard deviation of _x_ .
673
+
674
+ ## D.2 MIN-MAX SCALING
675
+
676
+ Min-max scaling, also known as Min-max normalization, scales the data between 0 and 1. It is expressed by the equation:
677
+
678
+ **==> picture [240 x 21] intentionally omitted <==**
679
+
680
+ where _x[′]_ are the normalized values, _x_ are the original values, and _xmin_ and _xmax_ are the minimal and maximal values of _x_ .
681
+
682
+ 21
683
+
684
+ ## E EVALUATION METRICS
685
+
686
+ 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.
687
+
688
+ ## E.1 MEAN AVERAGE ERROR
689
+
690
+ The mean average error (MAE) is expressed as:
691
+
692
+ **==> picture [248 x 28] intentionally omitted <==**
693
+
694
+ 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.
695
+
696
+ E.2 ROOT MEAN SQUARED ERROR
697
+
698
+ The root mean squared error (RMSE) is expressed as:
699
+
700
+ **==> picture [258 x 37] intentionally omitted <==**
701
+
702
+ 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.
703
+
704
+ ## E.3 RELATIVE SQUARED ERROR
705
+
706
+ 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:
707
+
708
+ **==> picture [252 x 27] intentionally omitted <==**
709
+
710
+ 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.
711
+
712
+ 22
713
+
open_review/iclr2024_8541.json ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8541",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "The Trickle-down Impact of Reward Inconsistency on RLHF",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 6,
10
+ 6,
11
+ 5,
12
+ 5,
13
+ 6
14
+ ],
15
+ "score_mean": 5.6,
16
+ "score_variance": 0.3,
17
+ "score_spread": 1,
18
+ "score_min": 5,
19
+ "score_max": 6,
20
+ "decision": "Accept (poster)",
21
+ "rebuttal_validity_ground_truth": null,
22
+ "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.",
23
+ "forum_id": "MeHmwCDifc",
24
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
25
+ "n_reviews": 5,
26
+ "per_review": [
27
+ {
28
+ "reviewer": "Reviewer_5JFN",
29
+ "review_id": "WREReQ7S8n",
30
+ "scores": {
31
+ "rating": 6,
32
+ "soundness": 1,
33
+ "presentation": 2,
34
+ "contribution": 3,
35
+ "confidence": 4
36
+ },
37
+ "review_text_chars": 5209,
38
+ "edit_detected": true,
39
+ "edit_delta_seconds": 1921359,
40
+ "post_rebuttal_text_signal": false,
41
+ "score_mentions_in_text": [
42
+ {
43
+ "to": 53
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "reviewer": "Reviewer_gxZU",
49
+ "review_id": "yQUHud619k",
50
+ "scores": {
51
+ "rating": 6,
52
+ "soundness": 3,
53
+ "presentation": 3,
54
+ "contribution": 3,
55
+ "confidence": 3
56
+ },
57
+ "review_text_chars": 2766,
58
+ "edit_detected": true,
59
+ "edit_delta_seconds": 122499,
60
+ "post_rebuttal_text_signal": false,
61
+ "score_mentions_in_text": []
62
+ },
63
+ {
64
+ "reviewer": "Reviewer_iZzr",
65
+ "review_id": "wOdAhbhVf8",
66
+ "scores": {
67
+ "rating": 5,
68
+ "soundness": 2,
69
+ "presentation": 2,
70
+ "contribution": 3,
71
+ "confidence": 5
72
+ },
73
+ "review_text_chars": 5327,
74
+ "edit_detected": true,
75
+ "edit_delta_seconds": 447105,
76
+ "post_rebuttal_text_signal": false,
77
+ "score_mentions_in_text": []
78
+ },
79
+ {
80
+ "reviewer": "Reviewer_Kxr1",
81
+ "review_id": "7JROTldfix",
82
+ "scores": {
83
+ "rating": 5,
84
+ "soundness": 2,
85
+ "presentation": 2,
86
+ "contribution": 2,
87
+ "confidence": 4
88
+ },
89
+ "review_text_chars": 4934,
90
+ "edit_detected": true,
91
+ "edit_delta_seconds": 1912969,
92
+ "post_rebuttal_text_signal": false,
93
+ "score_mentions_in_text": []
94
+ },
95
+ {
96
+ "reviewer": "Reviewer_n2Hx",
97
+ "review_id": "3r0WV196I3",
98
+ "scores": {
99
+ "rating": 6,
100
+ "soundness": 2,
101
+ "presentation": 3,
102
+ "contribution": 3,
103
+ "confidence": 4
104
+ },
105
+ "review_text_chars": 3928,
106
+ "edit_detected": true,
107
+ "edit_delta_seconds": 1959003,
108
+ "post_rebuttal_text_signal": false,
109
+ "score_mentions_in_text": []
110
+ }
111
+ ],
112
+ "any_review_edit_detected": true,
113
+ "any_post_rebuttal_text_signal": false,
114
+ "review_score_dimensions": [
115
+ "rating",
116
+ "soundness",
117
+ "presentation",
118
+ "contribution",
119
+ "confidence"
120
+ ]
121
+ }
open_review/iclr2024_8541.md ADDED
The diff for this file is too large to render. See raw diff
 
open_review/iclr2024_8542.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8542",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Federated Q-Learning: Linear Regret Speedup with Low Communication Cost",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 6,
10
+ 6,
11
+ 5,
12
+ 5
13
+ ],
14
+ "score_mean": 5.5,
15
+ "score_variance": 0.33,
16
+ "score_spread": 1,
17
+ "score_min": 5,
18
+ "score_max": 6,
19
+ "decision": "Accept (poster)",
20
+ "rebuttal_validity_ground_truth": null,
21
+ "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.",
22
+ "forum_id": "fe6ANBxcKM",
23
+ "primary_area": "reinforcement learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_tdCn",
28
+ "review_id": "acXJaMjC5F",
29
+ "scores": {
30
+ "rating": 6,
31
+ "soundness": 3,
32
+ "presentation": 3,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 2898,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 3367318,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_62fC",
44
+ "review_id": "uEBesOygZC",
45
+ "scores": {
46
+ "rating": 6,
47
+ "soundness": 3,
48
+ "presentation": 3,
49
+ "contribution": 3,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 1986,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 962534,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_8uCJ",
60
+ "review_id": "6m4e9XhuAQ",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 3,
64
+ "presentation": 3,
65
+ "contribution": 2,
66
+ "confidence": 3
67
+ },
68
+ "review_text_chars": 3029,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1036331,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_dPut",
76
+ "review_id": "2MeDD0cmQk",
77
+ "scores": {
78
+ "rating": 5,
79
+ "soundness": 3,
80
+ "presentation": 3,
81
+ "contribution": 2,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 746,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 3419252,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8542.md ADDED
The diff for this file is too large to render. See raw diff
 
open_review/iclr2024_8543.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8543",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Explaining the Out-of-Distribution Detection Paradox through Likelihood Peaks",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 6,
10
+ 5,
11
+ 6
12
+ ],
13
+ "score_mean": 5.67,
14
+ "score_variance": 0.33,
15
+ "score_spread": 1,
16
+ "score_min": 5,
17
+ "score_max": 6,
18
+ "decision": "Reject",
19
+ "rebuttal_validity_ground_truth": null,
20
+ "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",
21
+ "forum_id": "jQ596tXT3k",
22
+ "primary_area": "generative models",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_urvk",
27
+ "review_id": "CjCPY8JcGY",
28
+ "scores": {
29
+ "rating": 6,
30
+ "soundness": 3,
31
+ "presentation": 4,
32
+ "contribution": 3,
33
+ "confidence": 4
34
+ },
35
+ "review_text_chars": 1847,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 844836,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_c1to",
43
+ "review_id": "SMnaDwuTmr",
44
+ "scores": {
45
+ "rating": 5,
46
+ "soundness": 2,
47
+ "presentation": 3,
48
+ "contribution": 2,
49
+ "confidence": 1
50
+ },
51
+ "review_text_chars": 3290,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 1986403,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_i5V7",
59
+ "review_id": "aYLEsy1R73",
60
+ "scores": {
61
+ "rating": 6,
62
+ "soundness": 2,
63
+ "presentation": 2,
64
+ "contribution": 3,
65
+ "confidence": 4
66
+ },
67
+ "review_text_chars": 4725,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 1977124,
70
+ "post_rebuttal_text_signal": true,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": true,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8543.md ADDED
@@ -0,0 +1,687 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - EXPLAINING THE OUT OF-DISTRIBUTION DETECTION PARADOX THROUGH LIKELIHOOD PEAKS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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).
14
+
15
+ 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.
16
+
17
+ 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:
18
+
19
+ _OOD datapoints can be assigned higher likelihoods while not being generated if they belong to regions of low probability mass._
20
+
21
+ 1
22
+
23
+ **==> picture [198 x 134] intentionally omitted <==**
24
+
25
+ **==> picture [195 x 158] intentionally omitted <==**
26
+
27
+ 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.
28
+
29
+ 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.
30
+
31
+ **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.
32
+
33
+ ## 2 BACKGROUND
34
+
35
+ **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
36
+
37
+ **==> picture [281 x 11] intentionally omitted <==**
38
+
39
+ 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θ_ .
40
+
41
+ 2
42
+
43
+ **==> picture [191 x 73] intentionally omitted <==**
44
+
45
+ **==> picture [191 x 74] intentionally omitted <==**
46
+
47
+ **==> picture [397 x 97] intentionally omitted <==**
48
+
49
+ **----- Start of picture text -----**<br>
50
+ (a) FMNIST-trained model vs MNIST and Omniglot. (b) MNIST-trained model vs FMNIST and Omniglot.<br>(c) CIFAR10-trained model vs SVHN. (d) CIFAR10-trained model vs CelebA. (e) CIFAR100-trained model vs SVHN.<br>**----- End of picture text -----**<br>
51
+
52
+ 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.
53
+
54
+ **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).
55
+
56
+ **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.
57
+
58
+ 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.
59
+
60
+ 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.
61
+
62
+ 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
63
+
64
+ 3
65
+
66
+ the convolution between a pre-trained density _pθ_ and a Gaussian with log standard deviation _r_ as
67
+
68
+ **==> picture [349 x 23] intentionally omitted <==**
69
+
70
+ Tempczyk et al. (2022) showed that under mild regularity conditions, for sufficiently negative _r_ (i.e. small standard deviation),
71
+
72
+ **==> picture [275 x 11] intentionally omitted <==**
73
+
74
+ 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θ_ .
75
+
76
+ ## 3 RELATED WORK
77
+
78
+ 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.
79
+
80
+ 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.
81
+
82
+ 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.
83
+
84
+ 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.
85
+
86
+ 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
87
+
88
+ 4
89
+
90
+ 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.
91
+
92
+ ## 4 METHOD
93
+
94
+ 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.
95
+
96
+ ## 4.1 PROBABILITY MASS, SHARP LIKELIHOOD PEAKS, AND INTRINSIC DIMENSION
97
+
98
+ **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] _[}]_[:]
99
+
100
+ **==> picture [365 x 25] intentionally omitted <==**
101
+
102
+ 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.
103
+
104
+ **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
105
+
106
+ **==> picture [364 x 24] intentionally omitted <==**
107
+
108
+ > 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.
109
+
110
+ 5
111
+
112
+ 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.
113
+
114
+ **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.
115
+
116
+ **==> picture [152 x 119] intentionally omitted <==**
117
+
118
+ 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.
119
+
120
+ 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.
121
+
122
+ 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.
123
+
124
+ ## 4.2 PUTTING IT ALL TOGETHER: DUAL THRESHOLD OOD DETECTION
125
+
126
+ 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
127
+
128
+ **Algorithm 1** Dual threshold OOD detection, returns True if **x** 0 is deemed OOD, and False if it is deemed in-distribution.
129
+
130
+ |**Require: x**0_, pθ, r, ψL, ψ_LID<br>1: **if**log_pθ_(**x**0)_< ψL_**then**<br>2:<br>**return**True|_▷_case(_i_)|
131
+ |---|---|
132
+ |3: **if**<br>_∂_<br>_∂r_ log ˆ_ρr_(**x**0)_< ψ_LID**then**<br>4:<br>**return**True<br>5: **return**False|_▷_case(_ii_)<br>_▷_case(_iii_)|
133
+
134
+ 6
135
+
136
+ 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.
137
+
138
+ 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θ_ .
139
+
140
+ ## 5 EXPERIMENTS
141
+
142
+ **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]
143
+
144
+ **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.
145
+
146
+ **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.
147
+
148
+ **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.
149
+
150
+ **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
151
+
152
+ 7
153
+
154
+ **==> picture [36 x 154] intentionally omitted <==**
155
+
156
+ **==> picture [154 x 154] intentionally omitted <==**
157
+
158
+ **==> picture [154 x 36] intentionally omitted <==**
159
+
160
+ **==> picture [154 x 154] intentionally omitted <==**
161
+
162
+ **==> picture [154 x 36] intentionally omitted <==**
163
+
164
+ **==> picture [35 x 154] intentionally omitted <==**
165
+
166
+ 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.
167
+
168
+ **==> picture [97 x 78] intentionally omitted <==**
169
+
170
+ **==> picture [96 x 78] intentionally omitted <==**
171
+
172
+ **==> picture [96 x 78] intentionally omitted <==**
173
+
174
+ **==> picture [96 x 78] intentionally omitted <==**
175
+
176
+ **==> picture [392 x 15] intentionally omitted <==**
177
+
178
+ **----- Start of picture text -----**<br>
179
+ (a) FMNIST (vs) MNIST : (b) FMNIST-gen (vs) Omniglot : (c) CIFAR10 (vs) SVHN : (d) CIFAR10-gen (vs) CelebA :<br>AUC boost (0 . 070 → 0 . 953) AUC boost (0 . 000 → 0 . 996) AUC boost (0 . 060 → 0 . 926) AUC boost (0 . 258 → 0 . 733)<br>**----- End of picture text -----**<br>
180
+
181
+ 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.
182
+
183
+ 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.
184
+
185
+ **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.
186
+
187
+ 8
188
+
189
+ 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.
190
+
191
+ |Trained on<br>OOD Dataset|MNIST<br>_∗_<br>FMNIST<br>Omniglot|FMNIST<br>MNIST<br>Omniglot|CIFAR10<br>SVHN<br>CelebA|SVHN<br>_∗_|
192
+ |---|---|---|---|---|
193
+ |||||CIFAR10<br>CelebA|
194
+ |Na¨ıve Likelihoodlog_pθ_(**x**0)<br>_∥∂_<br>_∂_**x** log_pθ_(**x**0)_∥_2<br>Complexity Correction_‡_<br>Likelihood Ratios_‡_<br>Dual Threshold (Ours)|**1**_._<br>0_._807<br>0_._156<br>0_._444<br>0_._945<br>0_._852<br>0_._944<br>0_._722<br>**1**_._<br>**0**_._|0_._069<br>0_._088<br>0_._516<br>0_._538<br>0_._939<br>**0**_._<br>0_._666<br>0_._639<br>**0**_._<br>0_._862|0_._084<br>0_._386<br>0_._722<br>0_._433<br>0_._835<br>0_._479<br>0_._299<br>0_._396<br>**0**_._<br>**0**_._|**0**_._<br>**0**_._<br>0_._200<br>0_._080<br>0_._771<br>0_._639<br>0_._302<br>0_._099<br>**0**_._<br>**0**_._|
195
+ |NAE|**1**_._<br>**0**_._|**0**_._<br>**0**_._|**0**_._<br>**0**_._|0_._948<br>0_._965|
196
+
197
+ 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.
198
+
199
+ 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.
200
+
201
+ ## 6 CONCLUSIONS, LIMITATIONS, AND FUTURE WORK
202
+
203
+ 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.
204
+
205
+ **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.
206
+
207
+ 9
208
+
209
+ **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.
210
+
211
+ ## REFERENCES
212
+
213
+ - 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.
214
+
215
+ - 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.
216
+
217
+ - 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.
218
+
219
+ - 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.
220
+
221
+ - 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.
222
+
223
+ - Johann Brehmer and Kyle Cranmer. Flows for simultaneous manifold learning and density estimation. In _Advances in Neural Information Processing Systems_ , volume 33, 2020.
224
+
225
+ - 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.
226
+
227
+ - 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.
228
+
229
+ - 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.
230
+
231
+ - Hyunsun Choi, Eric Jang, and Alexander A Alemi. WAIC, but Why? Generative ensembles for robust anomaly detection. _arXiv:1810.01392_ , 2018.
232
+
233
+ - 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.
234
+
235
+ - Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. _arXiv preprint arXiv:1605.08803_ , 2016.
236
+
237
+ - Yilun Du and Igor Mordatch. Implicit generation and modeling with energy based models. In _Advances in Neural Information Processing Systems_ , volume 32, 2019.
238
+
239
+ - Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios. Neural spline flows. In _Advances in neural information processing systems_ , volume 32, 2019.
240
+
241
+ - 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.
242
+
243
+ - 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.
244
+
245
+ 10
246
+
247
+ Keinosuke Fukunaga and David R Olsen. An algorithm for finding intrinsic dimensionality of data. _IEEE Transactions on computers_ , 100(2):176–183, 1971.
248
+
249
+ - 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.
250
+
251
+ - Nico G¨ornitz, Marius Kloft, Konrad Rieck, and Ulf Brefeld. Toward supervised anomaly detection. _Journal of Artificial Intelligence Research_ , 46:235–262, 2013.
252
+
253
+ - 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.
254
+
255
+ 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.
256
+
257
+ Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In _Advances in Neural Information Processing Systems_ , volume 33, pp. 6840–6851, 2020.
258
+
259
+ - 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.
260
+
261
+ - Diederik P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In _Advances in Neural Information Processing Systems_ , volume 31, 2018.
262
+
263
+ - Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. In _International Conference on Learning Representations_ , 2014.
264
+
265
+ - 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.
266
+
267
+ - Andreas M Kist. CelebA Dataset cropped with Haar-Cascade face detector, October 2021. URL [URL removed]
268
+
269
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
270
+
271
+ Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. _Science_ , 350(6266):1332–1338, 2015.
272
+
273
+ Ya Le and Xuan Yang. Tiny ImageNet Visual Recognition Challenge. 2015.
274
+
275
+ - Charline Le Lan and Laurent Dinh. Perfect density models cannot guarantee anomaly detection. _Entropy_ , 23(12):1690, 2021.
276
+
277
+ - 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.
278
+
279
+ - Elizaveta Levina and Peter Bickel. Maximum likelihood estimation of intrinsic dimension. In _Advances in Neural Information Processing Systems_ , volume 17, 2004.
280
+
281
+ - 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.
282
+
283
+ - 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.
284
+
285
+ - 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.
286
+
287
+ 11
288
+
289
+ 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.
290
+
291
+ - 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.
292
+
293
+ - Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, and Balaji Lakshminarayanan. Detecting outof-distribution inputs to deep generative models using typicality. _arXiv:1906.02994_ , 2019b.
294
+
295
+ - 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.
296
+
297
+ - 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.
298
+
299
+ - Joaquin Qui˜nonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. _Dataset shift in machine learning_ . Mit Press, 2008.
300
+
301
+ - 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.
302
+
303
+ - 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.
304
+
305
+ - 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.
306
+
307
+ - 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.
308
+
309
+ - 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.
310
+
311
+ - Saeed Saremi and Aapo Hyv¨arinen. Neural empirical bayes. _Journal of Machine Learning Research_ , 20(181):1–23, 2019.
312
+
313
+ - 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.
314
+
315
+ - 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.
316
+
317
+ - Justin Sirignano and Rama Cont. Universal features of price formation in financial markets: Perspectives from deep learning. _Quantitative Finance_ , 19(9):1449–1459, 2019.
318
+
319
+ - 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.
320
+
321
+ - 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.
322
+
323
+ 12
324
+
325
+ 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.
326
+
327
+ - 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.
328
+
329
+ Arash Vahdat and Jan Kautz. NVAE: A deep hierarchical variational autoencoder. In _Advances in Neural Information Processing Systems_ , volume 33, pp. 19667–19679, 2020.
330
+
331
+ Sven-Ake Wegner. Lecture notes on high-dimensional data. _arXiv:2101.05841_ , 2021.
332
+
333
+ - 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.
334
+
335
+ - Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms. _arXiv:1708.07747_ , 2017.
336
+
337
+ 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.
338
+
339
+ - Sangwoong Yoon, Yung-Kyun Noh, and Frank Park. Autoencoding under normalization constraints. In _International Conference on Machine Learning_ , pp. 12087–12097. PMLR, 2021.
340
+
341
+ - 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.
342
+
343
+ 13
344
+
345
+ **==> picture [191 x 74] intentionally omitted <==**
346
+
347
+ **==> picture [191 x 73] intentionally omitted <==**
348
+
349
+ **==> picture [397 x 97] intentionally omitted <==**
350
+
351
+ **----- Start of picture text -----**<br>
352
+ (a) EMNIST-trained model vs MNIST and Omniglot (b) Omniglot-trained model vs FMNIST and EMNIST<br>(c) Tiny-trained model vs SVHN (d) CelebA-trained model vs SVHN (e) CIFAR100-trained model vs CelebA<br>**----- End of picture text -----**<br>
353
+
354
+ 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.
355
+
356
+ ## A DIAGNOSING PATHOLOGIES IN FLOW MODELS
357
+
358
+ 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.
359
+
360
+ 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.
361
+
362
+ 14
363
+
364
+ ## B COMPUTATIONAL INTRACTABILITY OF PROBABILITY MASSES
365
+
366
+ 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:
367
+
368
+ **==> picture [383 x 28] intentionally omitted <==**
369
+
370
+ 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.
371
+
372
+ **==> picture [198 x 157] intentionally omitted <==**
373
+
374
+ Figure 7: The trend of the average estimated log P _θ_ ( **x** _∈ BR_ ( **x** 0)) for MNIST and FMNIST on an FMNIST-trained NF.
375
+
376
+ 15
377
+
378
+ **==> picture [179 x 108] intentionally omitted <==**
379
+
380
+ **==> picture [179 x 108] intentionally omitted <==**
381
+
382
+ **==> picture [396 x 138] intentionally omitted <==**
383
+
384
+ **----- Start of picture text -----**<br>
385
+ (a) Convolution of the first mode (b) Convolution of the second mode<br>(c) Convolution of the third mode (d) Convolution of the fourth mode<br>**----- End of picture text -----**<br>
386
+
387
+ Figure 8: The estimated convolution log _ρr_ ( **x** _i_ ) for different modes of a mixture of Gaussians.
388
+
389
+ ## C ON THE QUALITY OF THE LINEAR APPROXIMATION
390
+
391
+ In this section, we assess the accuracy of the approximation _ρ_ ˆ _r_ , as introduced in subsection 4.1.
392
+
393
+ ## C.1 EMPIRICAL RESULTS
394
+
395
+ 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.
396
+
397
+ 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:
398
+
399
+ **==> picture [362 x 25] intentionally omitted <==**
400
+
401
+ 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.
402
+
403
+ ## C.2 THEORETICAL BOUNDS
404
+
405
+ 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.
406
+
407
+ 16
408
+
409
+ **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:
410
+
411
+ **==> picture [327 x 26] intentionally omitted <==**
412
+
413
+ 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:
414
+
415
+ **==> picture [334 x 25] intentionally omitted <==**
416
+
417
+ 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):
418
+
419
+ **Lemma C.1.** _Given a bounded function h_ : R _[d] →_ R[+] _where M_ := sup **x** _∈_ R _d_ ( _h_ ( **x** )) _, we have that_
420
+
421
+ **==> picture [277 x 22] intentionally omitted <==**
422
+
423
+ _when δ > d._
424
+
425
+ _Proof._
426
+
427
+ **==> picture [366 x 79] intentionally omitted <==**
428
+
429
+ 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.
430
+
431
+ 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).
432
+
433
+ **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:_
434
+
435
+ **==> picture [300 x 28] intentionally omitted <==**
436
+
437
+ _Proof._
438
+
439
+ **==> picture [377 x 67] intentionally omitted <==**
440
+
441
+ 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).
442
+
443
+ 17
444
+
445
+ ## D EXPERIMENTAL DETAILS AND ADDITIONAL EXPERIMENTS
446
+
447
+ ## D.1 DETAILS OF LID ESTIMATION
448
+
449
+ 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.
450
+
451
+ 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.
452
+
453
+ 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.
454
+
455
+ Table 2: Ablation study for the choice of _r_ evaluating on ROC-AUC (higher is better).
456
+
457
+ ||FMNIST (vs) MNIST<br>MNIST (vs) FMNIST<br>CIFAR10 (vs) SVHN<br>SVHN (vs) CIFAR10|
458
+ |---|---|
459
+ |||
460
+ |_r_ =_−_20<br>_r_ =_−_10<br>Adaptive scaling|**0**_._<br>1_._000<br>0_._730<br>**0**_._<br>0_._957<br>1_._000<br>0_._737<br>0_._991<br>0_._953<br>1_._000<br>**0**_._<br>0_._986|
461
+
462
+ 18
463
+
464
+ Table 3: Essential hyperparameter settings for the normalizing flow models.
465
+
466
+ |Property|Model Confguration|
467
+ |---|---|
468
+ |Learning rate|1_×_10_−_3|
469
+ |Gradient Clipping|Value based (max =1_._0)|
470
+ |Scheduler|ExponentialLR(with a factor of0_._99)|
471
+ |Optimizer|AdamW|
472
+ |Weight decay|5_×_10_−_5|
473
+ |Batch size|128|
474
+ |Epochs|400|
475
+ |Transform blocks|Actnorm_→_(1_×_1)Convolution_→_Coupling|
476
+ |Number of multiscale levels|7levels|
477
+ |Coupling layer backbone|ResNet (channel size= 64, # blocks =2, dropout =0_._2)|
478
+ |Masking scheme|Checkerboard|
479
+ |Latent Space|Standard isotropic Gaussian|
480
+ |Data pre-processing|Dequantization & Logit scaling|
481
+ |Data shape|28_×_28_×_1for grayscale and32_×_32_×_3for RGB|
482
+
483
+ ## D.2 HYPERPARAMETER SETTING FOR NORMALIZING FLOWS
484
+
485
+ 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.
486
+
487
+ 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.
488
+
489
+ We used an NVIDIA Tesla V100 SXM2 with 7 hours of GPU time to train each of the models.
490
+
491
+ **==> picture [96 x 96] intentionally omitted <==**
492
+
493
+ **==> picture [96 x 96] intentionally omitted <==**
494
+
495
+ **==> picture [96 x 96] intentionally omitted <==**
496
+
497
+ **==> picture [96 x 96] intentionally omitted <==**
498
+
499
+ **==> picture [396 x 16] intentionally omitted <==**
500
+
501
+ **----- Start of picture text -----**<br>
502
+ (a) Original samples from the test (b) Reconstructed samples from (c) Original samples from the (d) Reconstructed samples from<br>split. the test split. OOD dataset. the OOD dataset.<br>**----- End of picture text -----**<br>
503
+
504
+ 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.
505
+
506
+ 19
507
+
508
+ **==> picture [96 x 96] intentionally omitted <==**
509
+
510
+ **==> picture [96 x 96] intentionally omitted <==**
511
+
512
+ **==> picture [96 x 96] intentionally omitted <==**
513
+
514
+ **==> picture [97 x 96] intentionally omitted <==**
515
+
516
+ **==> picture [396 x 15] intentionally omitted <==**
517
+
518
+ **----- Start of picture text -----**<br>
519
+ (a) Glow model trained on (b) Glow model trained on FM- (c) Glow model trained on Om- (d) Glow model trained on EM-<br>MNIST. NIST. niglot. NIST.<br>**----- End of picture text -----**<br>
520
+
521
+ **==> picture [96 x 96] intentionally omitted <==**
522
+
523
+ **==> picture [96 x 96] intentionally omitted <==**
524
+
525
+ **==> picture [96 x 96] intentionally omitted <==**
526
+
527
+ **==> picture [97 x 96] intentionally omitted <==**
528
+
529
+ **==> picture [396 x 15] intentionally omitted <==**
530
+
531
+ **----- Start of picture text -----**<br>
532
+ (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<br>MNIST. NIST. Omniglot. EMNIST.<br>**----- End of picture text -----**<br>
533
+
534
+ 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.
535
+
536
+ **==> picture [96 x 96] intentionally omitted <==**
537
+
538
+ **==> picture [96 x 96] intentionally omitted <==**
539
+
540
+ **==> picture [96 x 96] intentionally omitted <==**
541
+
542
+ **==> picture [96 x 96] intentionally omitted <==**
543
+
544
+ **==> picture [396 x 15] intentionally omitted <==**
545
+
546
+ **----- Start of picture text -----**<br>
547
+ (a) Glow model trained on (b) Glow model trained on CI- (c) Glow model trained on (d) Glow model trained on Tiny<br>SVHN. FAR10. CelebA. ImageNet.<br>**----- End of picture text -----**<br>
548
+
549
+ **==> picture [96 x 96] intentionally omitted <==**
550
+
551
+ **==> picture [96 x 96] intentionally omitted <==**
552
+
553
+ **==> picture [96 x 96] intentionally omitted <==**
554
+
555
+ **==> picture [96 x 96] intentionally omitted <==**
556
+
557
+ **==> picture [396 x 15] intentionally omitted <==**
558
+
559
+ **----- Start of picture text -----**<br>
560
+ (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<br>SVHN. FAR10. CelebA. Tiny ImageNet.<br>**----- End of picture text -----**<br>
561
+
562
+ Figure 12: Samples generated from models trained on the RGB collection: the artifacts in Glow models are apparent.
563
+
564
+ 20
565
+
566
+ ## D.3 INTRINSIC DIMENSION VS LIKELIHOOD SCATTERPLOTS
567
+
568
+ 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.
569
+
570
+ **==> picture [185 x 185] intentionally omitted <==**
571
+
572
+ **==> picture [185 x 185] intentionally omitted <==**
573
+
574
+ 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”.
575
+
576
+ **==> picture [185 x 185] intentionally omitted <==**
577
+
578
+ **==> picture [184 x 185] intentionally omitted <==**
579
+
580
+ 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”.
581
+
582
+ 21
583
+
584
+ **==> picture [185 x 185] intentionally omitted <==**
585
+
586
+ **==> picture [185 x 186] intentionally omitted <==**
587
+
588
+ 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”
589
+
590
+ **==> picture [185 x 186] intentionally omitted <==**
591
+
592
+ **==> picture [185 x 186] intentionally omitted <==**
593
+
594
+ 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”.
595
+
596
+ 22
597
+
598
+ 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.
599
+
600
+ |Trained on<br>OOD Dataset|MNIST<br>_∗_<br>FMNIST<br>Omniglot|FMNIST<br>MNIST<br>Omniglot|CIFAR10<br>SVHN<br>CelebA|SVHN<br>_∗_|
601
+ |---|---|---|---|---|
602
+ |||||CIFAR10<br>CelebA|
603
+ |Na¨ıve Likelihoodlog_pθ_(**x**0)<br>_∥∂_<br>_∂_**x** log_pθ_(**x**0)_∥_2<br>Complexity Correction_‡_<br>Likelihood Ratios_‡_<br>Dual Threshold (Ours)|0_._004<br>0_._000<br>0_._997<br>0_._997<br>0_._026<br>0_._000<br>0_._998<br>**1**_._<br>**0**_._<br>**1**_._|0_._040<br>0_._000<br>0_._993<br>0_._993<br>0_._044<br>0_._001<br>**1**_._<br>**1**_._<br>**1**_._<br>0_._996|0_._025<br>0_._240<br>0_._712<br>0_._379<br>0_._678<br>0_._243<br>0_._299<br>0_._396<br>**0**_._<br>**0**_._|0_._971<br>**0**_._<br>0_._195<br>0_._077<br>0_._714<br>0_._451<br>0_._302<br>0_._099<br>**0**_._<br>**0**_._|
604
+
605
+ ## D.4 ADDITIONAL AUC RESULTS
606
+
607
+ 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.
608
+
609
+ 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.
610
+
611
+ ## D.5 EXTRA ABLATIONS
612
+
613
+ 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.
614
+
615
+ 23
616
+
617
+ 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.
618
+
619
+ |OOD Task Type<br>Dataset Pair<br>_A_(and)_B_|_A_-gen (vs)_B_<br>_§_<br>(AUC-ROC)<br>Na¨ıve Likelihood<br>(AUC-ROC)<br>Dual Threshold|_A_(vs)_B_<br>_†_<br>(AUC-ROC)<br>Na¨ıve Likelihood<br>(AUC-ROC)<br>Dual Threshold|
620
+ |---|---|---|
621
+ |EMNIST (and) MNIST<br>EMNIST (and) Omniglot<br>EMNIST (and) FMNIST<br>Omniglot (and) MNIST<br>Omniglot (and) EMNIST<br>Omniglot (and) FMNIST<br>FMNIST (and) MNIST<br>FMNIST (and) EMNIST<br>FMNIST (and) Omniglot<br>MNIST (and) EMNIST<br>MNIST (and) Omniglot<br>MNIST (and) FMNIST|**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**1**_._<br>**0**_._<br>**0**_._|**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>0_._998<br>0_._998<br>1_._000<br>1_._000<br>0_._983<br>0_._983<br>1_._000<br>1_._000<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>0_._985<br>0_._985<br>**0**_._<br>**0**_._<br>1_._000<br>1_._000|
622
+ |CelebA (and) Tiny<br>CelebA (and) SVHN<br>CelebA (and) CIFAR100<br>CelebA (and) CIFAR10<br>Tiny (and) CelebA<br>Tiny (and) SVHN<br>Tiny (and) CIFAR100<br>Tiny (and) CIFAR10<br>SVHN (and) CelebA<br>SVHN (and) Tiny<br>SVHN (and) CIFAR100<br>SVHN (and) CIFAR10<br>CIFAR100 (and) CelebA<br>CIFAR100 (and) Tiny<br>CIFAR100 (and) SVHN<br>CIFAR100 (and) CIFAR10<br>CIFAR10 (and) CelebA<br>CIFAR10 (and) Tiny<br>CIFAR10 (and) SVHN<br>CIFAR10 (and) CIFAR100|0_._933<br>0_._965<br>**0**_._<br>**0**_._<br>0_._946<br>0_._967<br>0_._944<br>0_._965<br>0_._640<br>0_._646<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>0_._984<br>0_._984<br>0_._971<br>0_._971<br>0_._970<br>0_._970<br>0_._970<br>0_._970<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._<br>**0**_._|0_._905<br>0_._936<br>**0**_._<br>**0**_._<br>0_._919<br>0_._941<br>0_._915<br>0_._935<br>0_._812<br>0_._812<br>**0**_._<br>**0**_._<br>0_._796<br>0_._822<br>0_._802<br>0_._825<br>0_._995<br>0_._995<br>0_._987<br>0_._987<br>0_._987<br>0_._987<br>0_._986<br>0_._986<br>**0**_._<br>**0**_._<br>0_._485<br>0_._493<br>**0**_._<br>**0**_._<br>0_._492<br>0_._502<br>**0**_._<br>**0**_._<br>0_._543<br>0_._548<br>**0**_._<br>**0**_._<br>0_._518<br>0_._561|
623
+
624
+ Table 6: Ablation study for the dual thresholding method on ROC-AUC (higher is better).
625
+
626
+ |Method|FMNIST (vs) MNIST<br>MNIST (vs) FMNIST<br>CIFAR10 (vs) SVHN<br>SVHN (vs) CIFAR10|
627
+ |---|---|
628
+ |||
629
+ |LID_θ_(**x**0)<br>_∥∂_<br>_∂_**x** log_pθ_(**x**0)_∥_2+ log_pθ_(**x**)<br>LID_θ_(**x**0) + log_pθ_(**x**)(Ours)|0_._947<br>0_._002<br>0_._949<br>0_._009<br>0_._509<br>0_._983<br>0_._716<br>0_._962<br>**0**_._<br>**1**_._<br>**0**_._<br>**0**_._|
630
+
631
+ 24
632
+
633
+ ## E CRITICAL ANALYSIS OF OOD BASELINES
634
+
635
+ 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.
636
+
637
+ 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:
638
+
639
+ **==> picture [267 x 11] intentionally omitted <==**
640
+
641
+ 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.
642
+
643
+ 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 _λ_ .
644
+
645
+ 25
646
+
647
+ **==> picture [96 x 96] intentionally omitted <==**
648
+
649
+ (a) Samples from RQ-NSF model trained on CIFAR10.
650
+
651
+ **==> picture [96 x 96] intentionally omitted <==**
652
+
653
+ **==> picture [96 x 14] intentionally omitted <==**
654
+
655
+ **----- Start of picture text -----**<br>
656
+ (b) Samples from RQ-NSF model<br>trained on SVHN.<br>**----- End of picture text -----**<br>
657
+
658
+ **==> picture [96 x 96] intentionally omitted <==**
659
+
660
+ **==> picture [97 x 96] intentionally omitted <==**
661
+
662
+ (c) Samples from RQ-NSF model (d) Samples from RQ-NSF model trained on FMNIST. trained on MNIST.
663
+
664
+ **==> picture [96 x 96] intentionally omitted <==**
665
+
666
+ **==> picture [96 x 96] intentionally omitted <==**
667
+
668
+ **==> picture [96 x 96] intentionally omitted <==**
669
+
670
+ **==> picture [97 x 96] intentionally omitted <==**
671
+
672
+ (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.
673
+
674
+ 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).
675
+
676
+ **==> picture [195 x 113] intentionally omitted <==**
677
+
678
+ (a) Performance comparison of different methods on two pathological and non-pathological OOD detection tasks obtained from the FMNIST and MNIST pair.
679
+
680
+ **==> picture [196 x 113] intentionally omitted <==**
681
+
682
+ (b) Performance comparison of different methods on two pathological and non-pathological OOD detection tasks obtained from the CIFAR10 and SVHN pair.
683
+
684
+ 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).
685
+
686
+ 26
687
+
open_review/iclr2024_8544.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8544",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Finite-Time Analysis of On-Policy Heterogeneous Federated Reinforcement Learning",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 6,
10
+ 5,
11
+ 8,
12
+ 6
13
+ ],
14
+ "score_mean": 6.25,
15
+ "score_variance": 1.58,
16
+ "score_spread": 3,
17
+ "score_min": 5,
18
+ "score_max": 8,
19
+ "decision": "Accept (poster)",
20
+ "rebuttal_validity_ground_truth": true,
21
+ "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.",
22
+ "forum_id": "D2eOVqPX9g",
23
+ "primary_area": "reinforcement learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_rA2b",
28
+ "review_id": "4c2NRfAAHA",
29
+ "scores": {
30
+ "rating": 6,
31
+ "soundness": 3,
32
+ "presentation": 4,
33
+ "contribution": 3,
34
+ "confidence": 3
35
+ },
36
+ "review_text_chars": 1174,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 265029,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_qewk",
44
+ "review_id": "oVEQlnaJ6N",
45
+ "scores": {
46
+ "rating": 5,
47
+ "soundness": 3,
48
+ "presentation": 1,
49
+ "contribution": 2,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 1567,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 824031,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_uJdU",
60
+ "review_id": "iVQFRSC94m",
61
+ "scores": {
62
+ "rating": 8,
63
+ "soundness": 3,
64
+ "presentation": 3,
65
+ "contribution": 3,
66
+ "confidence": 3
67
+ },
68
+ "review_text_chars": 1627,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 871157,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_pmTu",
76
+ "review_id": "LvZaY3SfuP",
77
+ "scores": {
78
+ "rating": 6,
79
+ "soundness": 3,
80
+ "presentation": 3,
81
+ "contribution": 3,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 1708,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 967942,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8544.md ADDED
The diff for this file is too large to render. See raw diff
 
open_review/iclr2024_8547.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8547",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "DIRECTIONALITY IN GRAPH TRANSFORMERS",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 3,
10
+ 5,
11
+ 3,
12
+ 6
13
+ ],
14
+ "score_mean": 4.25,
15
+ "score_variance": 2.25,
16
+ "score_spread": 3,
17
+ "score_min": 3,
18
+ "score_max": 6,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "Yp01vcQSNl",
23
+ "primary_area": "learning on graphs and other geometries & topologies",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_1Uzt",
28
+ "review_id": "uzEm6onQYn",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 2,
32
+ "presentation": 2,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 2053,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 905970,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_r1B3",
44
+ "review_id": "9FG47UFvrd",
45
+ "scores": {
46
+ "rating": 5,
47
+ "soundness": 2,
48
+ "presentation": 3,
49
+ "contribution": 3,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 2775,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 989043,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_yoox",
60
+ "review_id": "sMDMt3Tm2z",
61
+ "scores": {
62
+ "rating": 3,
63
+ "soundness": 2,
64
+ "presentation": 1,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 3985,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1049741,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_A6eP",
76
+ "review_id": "Ml1w96kC9r",
77
+ "scores": {
78
+ "rating": 6,
79
+ "soundness": 3,
80
+ "presentation": 2,
81
+ "contribution": 2,
82
+ "confidence": 4
83
+ },
84
+ "review_text_chars": 2054,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1164355,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8547.md ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## DIRECTIONALITY IN GRAPH TRANSFORMERS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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).
14
+
15
+ 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)).
16
+
17
+ 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
18
+
19
+ 1
20
+
21
+ 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.
22
+
23
+ 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.
24
+
25
+ ## 2 RELATED WORK
26
+
27
+ **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.
28
+
29
+ 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.
30
+
31
+ 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.
32
+
33
+ 2
34
+
35
+ **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.
36
+
37
+ 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.
38
+
39
+ ## 3 DIGT: DIRECTED GRAPH TRANSFORMER
40
+
41
+ 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.
42
+
43
+ ## 3.1 INPUT LAYER
44
+
45
+ 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.
46
+
47
+ 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
48
+
49
+ **==> picture [330 x 11] intentionally omitted <==**
50
+
51
+ 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]_ .
52
+
53
+ 3
54
+
55
+ 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
56
+
57
+ **==> picture [275 x 11] intentionally omitted <==**
58
+
59
+ 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.
60
+
61
+ ## 3.2 DIGT ATTENTION LAYER
62
+
63
+ 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).]
64
+
65
+ Generalizing to our _d_ -dimensional source and target encoding _vectors_ **s** _i_ and **t** _i_ , we could analogously write:
66
+
67
+ **==> picture [276 x 24] intentionally omitted <==**
68
+
69
+ 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.
70
+
71
+ **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
72
+
73
+ **==> picture [343 x 41] intentionally omitted <==**
74
+
75
+ and similarly for the target nodes **T** , let
76
+
77
+ 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
78
+
79
+ **==> picture [333 x 14] intentionally omitted <==**
80
+
81
+ 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_ .
82
+
83
+ **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.
84
+
85
+ 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:
86
+
87
+ **==> picture [345 x 15] intentionally omitted <==**
88
+
89
+ This way the attention considers all node pairs within _k_ -hops.
90
+
91
+ 4
92
+
93
+ **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
94
+
95
+ **==> picture [272 x 13] intentionally omitted <==**
96
+
97
+ By doing this, we weigh the importance of directionality for the attention/adjacency information.
98
+
99
+ 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
100
+
101
+ **==> picture [318 x 19] intentionally omitted <==**
102
+
103
+ 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.
104
+
105
+ ## 3.3 OUTPUT LAYERS AND PREDICTION
106
+
107
+ 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:
108
+
109
+ **==> picture [309 x 11] intentionally omitted <==**
110
+
111
+ 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_ )).
112
+
113
+ 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.
114
+
115
+ ## 3.4 ALTERNATIVE APPROACHES FOR DIRECTIONALITY
116
+
117
+ We now propose some other alternatives to model directionality directly in Transformer architectures.
118
+
119
+ **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
120
+
121
+ **==> picture [333 x 11] intentionally omitted <==**
122
+
123
+ Consider the attention matrix before the softmax, given as
124
+
125
+ **==> picture [80 x 13] intentionally omitted <==**
126
+
127
+ 5
128
+
129
+ 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
130
+
131
+ **==> picture [351 x 13] intentionally omitted <==**
132
+
133
+ where we use the subscript `cols` to denote that softmax is applied along the columns.
134
+
135
+ 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:
136
+
137
+ **==> picture [268 x 11] intentionally omitted <==**
138
+
139
+ 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.
140
+
141
+ **Exploiting Dual Attention Matrices** Another strategy to incorporate direction is by leveraging two key, query and value representations for each node, given as:
142
+
143
+ **==> picture [342 x 25] intentionally omitted <==**
144
+
145
+ We can then obtain dual attention matrices:
146
+
147
+ **==> picture [375 x 19] intentionally omitted <==**
148
+
149
+ which can then be aggregated to obtain the new value representation via the weighted sum approach in Eq. (13).
150
+
151
+ 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.
152
+
153
+ - 4 EXPERIMENTS
154
+
155
+ 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.
156
+
157
+ ## 4.1 DIRECTED GRAPH DATASETS
158
+
159
+ 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.
160
+
161
+ **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_
162
+
163
+ 6
164
+
165
+ Table 1: Randomized directionality via edge flips: Model performance
166
+
167
+ |Model<br>MNIST<br>CIFAR10|Model<br>Ogbg-Code2|Model<br>Malnet-tiny|
168
+ |---|---|---|
169
+ |EGT<br>98.41 +/- 0.04<br>68.70 +/- 0.41<br>EGT-Flip50<br>97.99 +/- 0.09<br>67.28 +/- 0.38|DAG<br>20.2 +/- 0.2<br>DAG-Flip50<br>19.0 +/- 0.1|Exphormer<br>94.02 +/- 0.21<br>Exphormer-Flip50<br>87.90 +/- 1.65|
170
+ ||||
171
+ |Model<br>FlowGraph2<br>FlowGraph3<br>FlowGraph6<br>Twitter3<br>Twitter5|||
172
+ |DiGT<br>97.42 +/- 0.82<br>74.55 +/- 0.69<br>46.80 +/- 0.97<br>91.67 +/- 0.79<br>85.94 +/- 0.25<br>DiGT-Flip50<br>49.67 +/- 1.39<br>32.33 +/- 1.66<br>16.78 +/- 0.04<br>82.96 +/- 1.13<br>65.44 +/- 0.38|||
173
+
174
+ _(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.
175
+
176
+ **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).
177
+
178
+ 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.
179
+
180
+ **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.
181
+
182
+ 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
183
+
184
+ > 1[URL removed]
185
+
186
+ 7
187
+
188
+ 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.
189
+
190
+ **==> picture [388 x 189] intentionally omitted <==**
191
+
192
+ **----- Start of picture text -----**<br>
193
+ 12 Flow2<br>Flow3<br>Flow6<br>10<br>Twitter3<br>Twitter5<br>8 MNIST<br>CIFAR10<br>6 Malnet-tiny<br>4<br>2<br>0<br>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<br>)( G<br>SCC<br>M<br>S<br>**----- End of picture text -----**<br>
194
+
195
+ 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.
196
+
197
+ Table 2: Accuracy for GNN and GT models. Blank denotes no previous reported results.
198
+
199
+ |Model|FlowGraph2|FlowGraph3|FlowGraph6|Twitter3|Twitter5|Malnet-tiny|
200
+ |---|---|---|---|---|---|---|
201
+ |GCN (Kipf & Welling, 2016)<br>GAT (Veliˇckovi´c et al., 2017)<br>DiGCN (Tong et al., 2020a)<br>PNA (Corso et al., 2020)|87.50 +/- 1.27<br>84.92 +/- 1.90<br>95.67 +/- 0.51<br>96.17 +/- 0.31|58.28 +/- 0.88<br>58.83 +/- 1.47<br>71.22 +/- 1.03<br>72.94 +/- 0.64|30.36 +/- 0.55<br>30.31 +/- 0.28<br>36.78 +/- 0.85<br>41.42 +/- 1.32|76.24 +/- 0.56<br>74.59 +/- 1.59<br>73.51 +/- 0.61<br>88.26 +/- 1.16|61.23 +/- 1.67<br>56.79 +/- 0.05<br>52.85 +/- 1.94<br>70.94 +/- 2.01|92.1 +/- 0.24|
202
+ |Graph Transformer (Dwivedi & Bresson, 2021)<br>SAN (Kreuzer et al., 2021)<br>EGT (Hussain et al., 2022)<br>Exphormer (Shirzad et al., 2023)|93.17 +/- 0.82<br>91.73 +/- 1.84<br>95.00 +/- 1.67<br>96.72 +/- 0.44|66.17 +/- 0.60<br>63.87 +/- 0.66<br>72.06 +/- 1.16<br>72.81 +/- 0.38|36.20 +/- 1.12<br>34.57 +/- 0.45<br>42.87 +/- 0.62<br>41.70 +/- 0.39|90.66 +/- 0.35<br>85.33 +/- 0.78<br>86.49 +/- 0.73<br>89.76 +/- 0.30|79.55 +/- 0.68<br>63.13 +/- 1.65<br>73.94 +/- 1.47<br>72.72 +/- 1.40|94.02 +/- 0.21|
203
+ |DiGT|**97.42 +/- 0.82**|**74.55 +/- 0.69**|**46.80 +/- 0.97**|**91.67 +/- 0.79**|**85.94 +/- 0.25**||
204
+
205
+ ## 4.2 EXPERIMENTAL COMPARISON
206
+
207
+ ## 4.2.1 DIGT VS. GNNS AND GTS
208
+
209
+ 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.
210
+
211
+ 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
212
+
213
+ 8
214
+
215
+ 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.
216
+
217
+ Table 3: Incorporating directionality into graph transformers. Bold denotes best results, italics the second best.
218
+
219
+ |Model|FlowGraph2|FlowGraph3|FlowGraph6|Twitter3|Twitter5|Malnet-tiny|
220
+ |---|---|---|---|---|---|---|
221
+ |Vanilla Transformer<br>Vanilla-asym|95.58 +/- 0.66<br>95.50 +/- 0.20|68.22 +/- 0.55<br>69.28 +/- 0.75|39.56 +/- 1.61<br>41.42 +/- 0.78|89.12 +/- 0.43<br>_91.28 +/- 0.78_|77.03 +/- 1.40<br>79.42 +/- 0.48||
222
+ |EGT (Hussain et al., 2022)<br>EGT-asym|95.00 +/- 1.67<br>96.50 +/- 0.89|72.06 +/- 1.16<br>72.39 +/- 0.55|42.87 +/- 0.62<br>_42.88 +/- 0.20_|86.49 +/- 0.73<br>90.37 +/- 0.29|73.94 +/- 1.47<br>_82.60 +/- 0.35_||
223
+ |Exphormer (Shirzad et al., 2023)<br>Exphormer-asym<br>Exphormer-dual|96.72 +/- 0.44<br>**98.41 +/- 1.18**<br>97.42 +/- 0.31|72.81 +/- 0.38<br>**74.72 +/- 2.24**<br>73.39 +/- 0.90|41.70 +/- 0.39<br>42.67 +/- 0.80<br>42.28 +/- 0.17|89.76 +/- 0.30<br>90.83 +/- 1.14<br>90.78 +/- 0.81|72.72 +/- 1.40<br>80.07 +/- 1.18<br>79.59 +/- 0.69|94.02 +/- 0.21<br>93.85 +/- 0.15<br>**94.23 +/- 0.20**|
224
+ |DiGT|_97.42 +/- 0.82_|_74.55 +/- 0.69_|**46.80 +/- 0.97**|**91.67 +/- 0.79**|**85.94 +/- 0.25**||
225
+
226
+ ## 4.2.2 INCORPORATING DIRECTION INTO GTS
227
+
228
+ 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.
229
+
230
+ 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.
231
+
232
+ ## 5 CONCLUSIONS AND FUTURE WORK
233
+
234
+ 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.
235
+
236
+ 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.
237
+
238
+ 9
239
+
240
+ ## REFERENCES
241
+
242
+ - 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.
243
+
244
+ - 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.
245
+
246
+ - Amanda Bertsch, Uri Alon, Graham Neubig, and Matthew R Gormley. Unlimiformer: Long-range transformers with unlimited length input. _arXiv preprint arXiv:2305.01625_ , 2023.
247
+
248
+ - 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.
249
+
250
+ - 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.
251
+
252
+ - 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.
253
+
254
+ Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. _AAAI Workshop on Deep Learning on Graphs: Methods and Applications_ , 2021.
255
+
256
+ - Vijay Prakash Dwivedi, Chaitanya K Joshi, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. _arXiv preprint arXiv:2003.00982_ , 2020.
257
+
258
+ - Scott Freitas, Yuxiao Dong, Joshua Neil, and Duen Horng Chau. A large-scale database for graph representation learning. _arXiv preprint arXiv:2011.07682_ , 2020.
259
+
260
+ - 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.
261
+
262
+ Yixuan He, Gesine Reinert, and Mihai Cucuringu. Digrac: Digraph clustering based on flow imbalance. _arXiv preprint arXiv:2106.05194_ , 2021.
263
+
264
+ - 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.
265
+
266
+ - 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.
267
+
268
+ - Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. _arXiv preprint arXiv:1609.02907_ , 2016.
269
+
270
+ - Jon M Kleinberg. Authoritative sources in a hyperlinked environment. _Journal of the ACM (JACM)_ , 46(5):604–632, 1999.
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
277
+
278
+ 10
279
+
280
+ - Jure Leskovec and Julian Mcauley. Learning to discover social circles in ego networks. _Advances in neural information processing systems_ , 25, 2012.
281
+
282
+ - Yuankai Luo. Dagformer: Directed acyclic graph transformer. _arXiv preprint arXiv:2210.13148_ , 2022.
283
+
284
+ - Fragkiskos D Malliaros and Michalis Vazirgiannis. Clustering and community detection in directed networks: A survey. _Physics reports_ , 533(4):95–142, 2013.
285
+
286
+ - 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.
287
+
288
+ - 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.
289
+
290
+ - 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.
291
+
292
+ - 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.
293
+
294
+ - 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.
295
+
296
+ - Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. _ACM Computing Surveys_ , 55(6):1–28, 2022.
297
+
298
+ - 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.
299
+
300
+ - Zekun Tong, Yuxuan Liang, Changsheng Sun, David S Rosenblum, and Andrew Lim. Directed graph convolutional network. _arXiv preprint arXiv:2004.13970_ , 2020b.
301
+
302
+ - 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.
303
+
304
+ - Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. _arXiv preprint arXiv:1710.10903_ , 2017.
305
+
306
+ - 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.
307
+
308
+ - 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.
309
+
310
+ - 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.
311
+
312
+ - 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.
313
+
314
+ 11
315
+
open_review/iclr2024_8548.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8548",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Training Diffusion Models with Reinforcement Learning",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 5,
10
+ 8,
11
+ 6,
12
+ 6
13
+ ],
14
+ "score_mean": 6.25,
15
+ "score_variance": 1.58,
16
+ "score_spread": 3,
17
+ "score_min": 5,
18
+ "score_max": 8,
19
+ "decision": "Accept (poster)",
20
+ "rebuttal_validity_ground_truth": true,
21
+ "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.",
22
+ "forum_id": "YCWjhGrJFD",
23
+ "primary_area": "generative models",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_qqX7",
28
+ "review_id": "7QT1jjqoGe",
29
+ "scores": {
30
+ "rating": 5,
31
+ "soundness": 3,
32
+ "presentation": 2,
33
+ "contribution": 1,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 3855,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 1330994,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_sWSo",
44
+ "review_id": "BEujamuBbq",
45
+ "scores": {
46
+ "rating": 8,
47
+ "soundness": 4,
48
+ "presentation": 4,
49
+ "contribution": 3,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 3001,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 1757922,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_EgHv",
60
+ "review_id": "wlw0IfLk6E",
61
+ "scores": {
62
+ "rating": 6,
63
+ "soundness": 2,
64
+ "presentation": 3,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 2432,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1823987,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_rYFt",
76
+ "review_id": "tXmkJsrWRj",
77
+ "scores": {
78
+ "rating": 6,
79
+ "soundness": 2,
80
+ "presentation": 3,
81
+ "contribution": 2,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 2318,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1882819,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8548.md ADDED
@@ -0,0 +1,748 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## TRAINING DIFFUSION MODELS WITH REINFORCEMENT LEARNING
2
+
3
+ Authors withheld for review
4
+
5
+ ## ABSTRACT
6
+
7
+ 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] .
8
+
9
+ ## 1 INTRODUCTION
10
+
11
+ 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.
12
+
13
+ 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.
14
+
15
+ 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
16
+
17
+ 1
18
+
19
+ **==> picture [395 x 187] intentionally omitted <==**
20
+
21
+ **----- Start of picture text -----**<br>
22
+ Compressibility: llama<br>Aesthetic Quality: rabbit<br>Prompt-Image Alignment: a raccoon washing dishes<br>**----- End of picture text -----**<br>
23
+
24
+ **==> picture [68 x 67] intentionally omitted <==**
25
+
26
+ **==> picture [68 x 67] intentionally omitted <==**
27
+
28
+ **==> picture [67 x 67] intentionally omitted <==**
29
+
30
+ **==> picture [68 x 67] intentionally omitted <==**
31
+
32
+ **==> picture [68 x 67] intentionally omitted <==**
33
+
34
+ **==> picture [68 x 67] intentionally omitted <==**
35
+
36
+ **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.
37
+
38
+ additional human annotations. We use this procedure to improve prompt-image alignment for unusual subject-setting compositions.
39
+
40
+ 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.
41
+
42
+ ## 2 RELATED WORK
43
+
44
+ **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.
45
+
46
+ **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.
47
+
48
+ 2
49
+
50
+ **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.
51
+
52
+ **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.
53
+
54
+ ## 3 PRELIMINARIES
55
+
56
+ In this section, we provide a brief background on diffusion models and the RL problem formulation.
57
+
58
+ ## 3.1 DIFFUSION MODELS
59
+
60
+ 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:
61
+
62
+ **==> picture [358 x 13] intentionally omitted <==**
63
+
64
+ 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).
65
+
66
+ 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:
67
+
68
+ **==> picture [297 x 12] intentionally omitted <==**
69
+
70
+ ## 3.2 MARKOV DECISION PROCESSES AND REINFORCEMENT LEARNING
71
+
72
+ 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** ).
73
+
74
+ 3
75
+
76
+ 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:
77
+
78
+ **==> picture [170 x 19] intentionally omitted <==**
79
+
80
+ - 4 REINFORCEMENT LEARNING TRAINING OF DIFFUSION MODELS
81
+
82
+ 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.
83
+
84
+ ## 4.1 PROBLEM STATEMENT
85
+
86
+ 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:
87
+
88
+ **==> picture [176 x 12] intentionally omitted <==**
89
+
90
+ for some context distribution _p_ ( **c** ) of our choosing.
91
+
92
+ ## 4.2 REWARD-WEIGHTED REGRESSION
93
+
94
+ 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).
95
+
96
+ A standard weighting scheme uses exponentiated rewards to ensure nonnegativity,
97
+
98
+ **==> picture [144 x 21] intentionally omitted <==**
99
+
100
+ where _β_ is an inverse temperature and _Z_ is a normalization constant. We also consider a simplified weighting scheme that uses binary weights,
101
+
102
+ **==> picture [138 x 13] intentionally omitted <==**
103
+
104
+ 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.
105
+
106
+ Within the RL formalism, the RWR procedure corresponds to the following one-step MDP:
107
+
108
+ **==> picture [348 x 12] intentionally omitted <==**
109
+
110
+ 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.
111
+
112
+ 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.
113
+
114
+ ## 4.3 DENOISING DIFFUSION POLICY OPTIMIZATION
115
+
116
+ 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
117
+
118
+ 4
119
+
120
+ 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.
121
+
122
+ **Denoising as a multi-step MDP.** We map the iterative denoising procedure to the following MDP:
123
+
124
+ **==> picture [375 x 43] intentionally omitted <==**
125
+
126
+ 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.
127
+
128
+ 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.
129
+
130
+ **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.
131
+
132
+ 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):
133
+
134
+ **==> picture [310 x 31] intentionally omitted <==**
135
+
136
+ where the expectation is taken over denoising trajectories generated by the current parameters _θ_ .
137
+
138
+ 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):
139
+
140
+ **==> picture [367 x 31] intentionally omitted <==**
141
+
142
+ 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).
143
+
144
+ ## 5 REWARD FUNCTIONS FOR TEXT-TO-IMAGE DIFFUSION
145
+
146
+ 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.
147
+
148
+ ## 5.1 COMPRESSIBILITY AND INCOMPRESSIBILITY
149
+
150
+ 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.
151
+
152
+ 5
153
+
154
+ **==> picture [336 x 90] intentionally omitted <==**
155
+
156
+ **----- Start of picture text -----**<br>
157
+ “what is happening LLaVA BERTScore<br>in this image?”<br>similarity-based<br>“a monkey is...” reward<br>Diffusion<br>“a monkey washing dishes...”<br>Model<br>**----- End of picture text -----**<br>
158
+
159
+ **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).
160
+
161
+ 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.
162
+
163
+ ## 5.2 AESTHETIC QUALITY
164
+
165
+ 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).
166
+
167
+ ## 5.3 AUTOMATED PROMPT ALIGNMENT WITH VISION-LANGUAGE MODELS
168
+
169
+ 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.
170
+
171
+ 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.
172
+
173
+ 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.
174
+
175
+ ## 6 EXPERIMENTAL EVALUATION
176
+
177
+ 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:
178
+
179
+ 1. How do variants of DDPO compare to RWR and to each other?
180
+
181
+ 2. Can VLMs allow for optimizing rewards that are difficult to specify manually?
182
+
183
+ 3. Do the effects of RL finetuning generalize to prompts not seen during finetuning?
184
+
185
+ 6
186
+
187
+ **==> picture [397 x 417] intentionally omitted <==**
188
+
189
+ **----- Start of picture text -----**<br>
190
+ Pretrained Aesthetic Quality<br>Compressibility Incompressibility<br>Figure 3 (DDPO samples)DDPO samples) samples) Qualitative depiction of the effects of RL finetuning on different reward<br>functions. DDPO transforms naturalistic images into stylized artwork to maximize aesthetic quality, transforms naturalistic images into stylized artwork to maximize aesthetic quality,<br>removes background content and applies foreground smoothing to maximize compressibility, and<br>adds high-frequency noise to maximize incompressibility.<br>DDPOIS DDPOSF RWR RWRsparse<br>**----- End of picture text -----**<br>
191
+
192
+ **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.
193
+
194
+ **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.
195
+
196
+ ## 6.1 ALGORITHM COMPARISONS
197
+
198
+ 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.
199
+
200
+ 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.
201
+
202
+ 7
203
+
204
+ **==> picture [390 x 224] intentionally omitted <==**
205
+
206
+ **----- Start of picture text -----**<br>
207
+ a dolphin riding a bike<br>Prompt Alignment<br>0 . 84<br>0 . 81<br>an ant playing chess 0 . 78<br>0 . 75<br>0 . 72<br>0 . 69<br>a bear washing dishes<br>10k 20k 30k 40k 50k<br>Reward Queries<br>. . . riding a bike<br>. . . playing chess<br>. . . washing dishes<br>BERTScore<br>**----- End of picture text -----**<br>
208
+
209
+ **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.
210
+
211
+ 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.
212
+
213
+ ## 6.2 AUTOMATED PROMPT ALIGNMENT
214
+
215
+ 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_ ”.
216
+
217
+ 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.
218
+
219
+ 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).
220
+
221
+ 8
222
+
223
+ **==> picture [382 x 141] intentionally omitted <==**
224
+
225
+ **----- Start of picture text -----**<br>
226
+ Aesthetic Quality (New Animals) Aesthetic Quality (Non-Animals) Prompt Alignment (New Scenarios)<br>Pretrained<br>Finetuned<br>**----- End of picture text -----**<br>
227
+
228
+ **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.
229
+
230
+ ## 6.3 GENERALIZATION
231
+
232
+ 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_ ”.
233
+
234
+ ## 7 DISCUSSION AND LIMITATIONS
235
+
236
+ 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.
237
+
238
+ **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.
239
+
240
+ 9
241
+
242
+ ## CODE REFERENCES
243
+
244
+ 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).
245
+
246
+ ## REFERENCES
247
+
248
+ - 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.
249
+
250
+ - 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] .
251
+
252
+ - Philip Bachman and Doina Precup. Data generation as sequential decision making. _Advances in Neural Information Processing Systems_ , 28, 2015.
253
+
254
+ - 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.
255
+
256
+ - 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.
257
+
258
+ - 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.
259
+
260
+ - 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] .
261
+
262
+ 10
263
+
264
+ - 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.
265
+
266
+ - 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.
267
+
268
+ Andrew Collette. _Python and HDF5_ . O’Reilly, 2013.
269
+
270
+ 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.
271
+
272
+ Prafulla Dhariwal and Alexander Quinn Nichol. Diffusion models beat GANs on image synthesis. In _Advances in Neural Information Processing Systems_ , 2021.
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - Ying Fan and Kangwook Lee. Optimizing ddpm sampling with shortcut fine-tuning. _arXiv preprint arXiv:2301.13362_ , 2023.
279
+
280
+ - 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.
281
+
282
+ - 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.
283
+
284
+ - Leo Gao, John Schulman, and Jacob Hilton. Scaling laws for reward model overoptimization. _arXiv preprint arXiv:2210.10760_ , 2022.
285
+
286
+ - 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]
287
+
288
+ - 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.
289
+
290
+ - 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.
291
+
292
+ - 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] .
293
+
294
+ - Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. In _NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications_ , 2021.
295
+
296
+ - Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In _Advances in Neural Information Processing Systems_ , 2020.
297
+
298
+ - 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.
299
+
300
+ 11
301
+
302
+ 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.
303
+
304
+ Michael Janner, Yilun Du, Joshua Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. In _International Conference on Machine Learning_ , 2022.
305
+
306
+ - Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In _Proceedings of the Nineteenth International Conference on Machine Learning_ , pp. 267–274, 2002.
307
+
308
+ - Diederik P Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. In _Neural Information Processing Systems_ , 2021.
309
+
310
+ - W. Bradley Knox and Peter Stone. TAMER: Training an Agent Manually via Evaluative Reinforcement. In _International Conference on Development and Learning_ , 2008.
311
+
312
+ - 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.
313
+
314
+ Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. 2023.
315
+
316
+ - 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.
317
+
318
+ - 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.
319
+
320
+ - 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.
321
+
322
+ - Ashvin Nair, Murtaza Dalal, Abhishek Gupta, and Sergey Levine. Accelerating online reinforcement learning with offline datasets. _arXiv preprint arXiv:2006.09359_ , 2020.
323
+
324
+ - 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.
325
+
326
+ - 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.
327
+
328
+ - Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. In _International Conference on Machine Learning_ , 2021.
329
+
330
+ - 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.
331
+
332
+ - 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] .
333
+
334
+ - Jan Peters and Stefan Schaal. Reinforcement learning by reward-weighted regression for operational space control. In _International Conference on Machine learning_ , 2007.
335
+
336
+ 12
337
+
338
+ - 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.
339
+
340
+ - 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.
341
+
342
+ - 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.
343
+
344
+ - 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.
345
+
346
+ - 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.
347
+
348
+ - 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.
349
+
350
+ - Chrisoph Schuhmann. Laion aesthetics, Aug 2022. URL `[URL removed] laion-aesthetics/` .
351
+
352
+ - John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In _International Conference on Machine Learning_ , 2015.
353
+
354
+ - John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. _arXiv preprint arXiv:1707.06347_ , 2017.
355
+
356
+ - 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.
357
+
358
+ - Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In _International Conference on Machine Learning_ , 2015.
359
+
360
+ - Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In _International Conference on Learning Representations_ , 2021. URL `[URL removed] id=St1giarCHLP` .
361
+
362
+ - 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.
363
+
364
+ - 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` .
365
+
366
+ - 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.
367
+
368
+ - 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.
369
+
370
+ 13
371
+
372
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. _Reinforcement learning_ , pp. 5–32, 1992.
373
+
374
+ - 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` .
375
+
376
+ - 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.
377
+
378
+ - 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.
379
+
380
+ - 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.
381
+
382
+ - 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.
383
+
384
+ - Lvmin Zhang and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models, 2023.
385
+
386
+ - 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.
387
+
388
+ - 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.
389
+
390
+ - 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.
391
+
392
+ 14
393
+
394
+ ## APPENDIX A OVEROPTIMIZATION
395
+
396
+ **==> picture [276 x 10] intentionally omitted <==**
397
+
398
+ **----- Start of picture text -----**<br>
399
+ Incompressibility Counting Animals<br>**----- End of picture text -----**<br>
400
+
401
+ **==> picture [48 x 48] intentionally omitted <==**
402
+
403
+ **----- Start of picture text -----**<br>
404
+ DDPO<br>**----- End of picture text -----**<br>
405
+
406
+ **==> picture [49 x 48] intentionally omitted <==**
407
+
408
+ **==> picture [48 x 48] intentionally omitted <==**
409
+
410
+ **==> picture [49 x 48] intentionally omitted <==**
411
+
412
+ **==> picture [48 x 49] intentionally omitted <==**
413
+
414
+ **----- Start of picture text -----**<br>
415
+ RWR<br>**----- End of picture text -----**<br>
416
+
417
+ **==> picture [49 x 49] intentionally omitted <==**
418
+
419
+ **==> picture [48 x 49] intentionally omitted <==**
420
+
421
+ **==> picture [49 x 49] intentionally omitted <==**
422
+
423
+ **==> picture [49 x 48] intentionally omitted <==**
424
+
425
+ **==> picture [48 x 48] intentionally omitted <==**
426
+
427
+ **==> picture [49 x 48] intentionally omitted <==**
428
+
429
+ **==> picture [48 x 48] intentionally omitted <==**
430
+
431
+ **==> picture [49 x 49] intentionally omitted <==**
432
+
433
+ **==> picture [48 x 49] intentionally omitted <==**
434
+
435
+ **==> picture [49 x 49] intentionally omitted <==**
436
+
437
+ **==> picture [48 x 49] intentionally omitted <==**
438
+
439
+ **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.
440
+
441
+ 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.
442
+
443
+ 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.
444
+
445
+ 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.
446
+
447
+ ## APPENDIX B COMPARISON TO CLASSIFIER GUIDANCE
448
+
449
+ 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
450
+
451
+ |Method|Aesthetic Score|
452
+ |---|---|
453
+ |Base model<br>5.95_±_0.03<br>Universal guidance<br>6.14_±_0.05<br>DDPOIS@ 20k reward queries<br>6.63_±_0.03||
454
+
455
+ **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”.
456
+
457
+ 15
458
+
459
+ 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.
460
+
461
+ 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.
462
+
463
+ ## APPENDIX C COMPARISON TO DPOK
464
+
465
+ 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:
466
+
467
+ - 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.
468
+
469
+ - 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.
470
+
471
+ - 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.
472
+
473
+ - 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).
474
+
475
+ - Unlike DPOK, we do not employ KL regularization.
476
+
477
+ **==> picture [396 x 199] intentionally omitted <==**
478
+
479
+ **----- Start of picture text -----**<br>
480
+ ImageReward Aesthetic Quality<br>2 . 0<br>6 . 2<br>1 . 5<br>6 . 0<br>1 . 0 5 . 8<br>0 . 5 5 . 6<br>5 . 4<br>0 . 0<br>5 . 2<br>0 5k 10k 15k 20k 25k 0 5k 10k 15k 20k 25k<br>Reward Queries Reward Queries<br>Color Composition DDPOIS<br>Count Location DPOK<br>Score<br>Score<br>Aesthetic<br>ImageReward<br>LAION<br>**----- End of picture text -----**<br>
481
+
482
+ **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.
483
+
484
+ > 1 `[URL removed]
485
+
486
+ 16
487
+
488
+ **==> picture [386 x 113] intentionally omitted <==**
489
+
490
+ **----- Start of picture text -----**<br>
491
+ Color Count Composition Location<br>Pretrained<br>Finetuned<br>**----- End of picture text -----**<br>
492
+
493
+ **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.
494
+
495
+ 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.
496
+
497
+ ## APPENDIX D IMPLEMENTATION DETAILS
498
+
499
+ 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.
500
+
501
+ ## D.1 DDPO IMPLEMENTATION
502
+
503
+ 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.
504
+
505
+ ## D.2 RWR IMPLEMENTATION
506
+
507
+ 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.
508
+
509
+ ## D.3 REWARD NORMALIZATION
510
+
511
+ 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.
512
+
513
+ 17
514
+
515
+ ## D.4 RESOURCE DETAILS
516
+
517
+ 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.
518
+
519
+ ## D.5 FULL HYPERPARAMETERS
520
+
521
+ |||DDPOIS|DDPOSF|RWR|RWRsparse|
522
+ |---|---|---|---|---|---|
523
+ |||||||
524
+ |Diffusion|Denoising steps (_T_)<br>Guidance weight (_w_)|50<br>5.0|50<br>5.0|50<br>5.0|50<br>5.0|
525
+ |||||||
526
+ |Optimization|Optimizer<br>Learning rate<br>Weight decay<br>_β_1<br>_β_2<br>_ϵ_<br>Gradient clip norm|AdamW<br>1e-5<br>1e-4<br>0.9<br>0.999<br>1e-8<br>1.0|AdamW<br>1e-5<br>1e-4<br>0.9<br>0.999<br>1e-8<br>1.0|AdamW<br>1e-5<br>1e-4<br>0.9<br>0.999<br>1e-8<br>1.0|AdamW<br>1e-5<br>1e-4<br>0.9<br>0.999<br>1e-8<br>1.0|
527
+ |||||||
528
+ |RWR|Inverse temperature (_β_)<br>Percentile<br>Batch size<br>Gradient updates per iteration<br>Samples per iteration|-<br>-<br>-<br>-<br>-|-<br>-<br>-<br>-<br>-|0.2<br>-<br>128<br>400<br>10k|-<br>0.9<br>128<br>400<br>10k|
529
+ |DDPO<br>Batch size<br>64<br>256<br>-<br>-<br>Samples per iteration<br>256<br>256<br>-<br>-<br>Gradient updates per iteration<br>4<br>1<br>-<br>-<br>Clip range<br>1e-4<br>-<br>-<br>-||||||
530
+
531
+ D.6 LIST OF 45 COMMON ANIMALS
532
+
533
+ This list was used for experiments with the aesthetic quality reward function and the VLM-based reward function.
534
+
535
+ |cat<br>deer<br>lizard<br>mouse<br>pig|dog<br>cow<br>beetle<br>rat<br>turkey|horse<br>goat<br>ant<br>snake<br>fy|monkey<br>lion<br>butterfy<br>turtle<br>llama|rabbit<br>tiger<br>fsh<br>frog<br>camel|zebra<br>bear<br>shark<br>chicken<br>bat|spider<br>raccoon<br>whale<br>duck<br>gorilla|bird<br>fox<br>dolphin<br>goose<br>hedgehog|sheep<br>wolf<br>squirrel<br>bee<br>kangaroo|
536
+ |---|---|---|---|---|---|---|---|---|
537
+
538
+ APPENDIX E ADDITIONAL DESIGN DECISIONS
539
+
540
+ ## E.1 CFG TRAINING
541
+
542
+ 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_ :
543
+
544
+ **==> picture [190 x 11] intentionally omitted <==**
545
+
546
+ **==> picture [12 x 9] intentionally omitted <==**
547
+
548
+ 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.
549
+
550
+ 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
551
+
552
+ 18
553
+
554
+ 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.
555
+
556
+ **==> picture [252 x 219] intentionally omitted <==**
557
+
558
+ **----- Start of picture text -----**<br>
559
+ JPEG Compressibility<br>0<br>− 50<br>− 100<br>− 150<br>− 200<br>0 10k 20k 30k 40k<br>Reward Queries<br>with CFG training without CFG training<br>(kb)<br>Filesize<br>Negative<br>**----- End of picture text -----**<br>
560
+
561
+ **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.
562
+
563
+ ## E.2 INTERLEAVING
564
+
565
+ 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).
566
+
567
+ 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.
568
+
569
+ ## APPENDIX F QUANTITATIVE RESULTS FOR GENERALIZATION
570
+
571
+ 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.
572
+
573
+ 19
574
+
575
+ **==> picture [396 x 127] intentionally omitted <==**
576
+
577
+ **----- Start of picture text -----**<br>
578
+ Aesthetic Quality JPEG Compressibility Samples per Iteration (RWR)<br>0 256<br>5 . 2 512<br>− 50 1,024<br>5 . 0 2,048<br>4,096<br>4 . 8 − 100 8,192<br>16,384<br>4 . 6<br>− 150<br>4 . 4<br>4 . 2<br>0 10k 20k 30k 0 10k 20k 30k Samples per Iteration (DDPOIS)<br>Reward Queries Reward Queries 256<br>Score (kb)<br>Aesthetic Filesize<br>LAION Negative<br>**----- End of picture text -----**<br>
579
+
580
+ **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.
581
+
582
+ **==> picture [278 x 225] intentionally omitted <==**
583
+
584
+ **----- Start of picture text -----**<br>
585
+ Aesthetic Quality Quantitative Generalization<br>Finetuning Prompts (Animals Only)<br>5 . 2 Unseen Animals<br>Ordinary Objects<br>5 . 0<br>4 . 8<br>4 . 6<br>4 . 4<br>4 . 2<br>0 10k 20k 30k 40k 50k<br>Reward Queries<br>Reward<br>**----- End of picture text -----**<br>
586
+
587
+ **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.).
588
+
589
+ 20
590
+
591
+ **==> picture [392 x 127] intentionally omitted <==**
592
+
593
+ **----- Start of picture text -----**<br>
594
+ Pretrained Aesthetic Quality<br>Compressibility Incompressibility<br>**----- End of picture text -----**<br>
595
+
596
+ **==> picture [49 x 48] intentionally omitted <==**
597
+
598
+ **==> picture [49 x 48] intentionally omitted <==**
599
+
600
+ **==> picture [48 x 48] intentionally omitted <==**
601
+
602
+ **==> picture [49 x 48] intentionally omitted <==**
603
+
604
+ **==> picture [49 x 48] intentionally omitted <==**
605
+
606
+ **==> picture [49 x 48] intentionally omitted <==**
607
+
608
+ **==> picture [48 x 48] intentionally omitted <==**
609
+
610
+ **==> picture [49 x 48] intentionally omitted <==**
611
+
612
+ **==> picture [49 x 48] intentionally omitted <==**
613
+
614
+ **==> picture [48 x 48] intentionally omitted <==**
615
+
616
+ **==> picture [49 x 48] intentionally omitted <==**
617
+
618
+ **==> picture [49 x 48] intentionally omitted <==**
619
+
620
+ **==> picture [49 x 48] intentionally omitted <==**
621
+
622
+ **==> picture [48 x 48] intentionally omitted <==**
623
+
624
+ **==> picture [49 x 48] intentionally omitted <==**
625
+
626
+ **==> picture [49 x 48] intentionally omitted <==**
627
+
628
+ **Figure 13 (RWR samples)**
629
+
630
+ **==> picture [364 x 184] intentionally omitted <==**
631
+
632
+ **----- Start of picture text -----**<br>
633
+ a hedgehog riding a bike a dog riding a bike<br>a lizard riding a bike a shark washing dishes<br>a frog washing dishes a monkey washing dishes<br>**----- End of picture text -----**<br>
634
+
635
+ **==> picture [60 x 60] intentionally omitted <==**
636
+
637
+ **==> picture [61 x 60] intentionally omitted <==**
638
+
639
+ **==> picture [60 x 60] intentionally omitted <==**
640
+
641
+ **==> picture [60 x 60] intentionally omitted <==**
642
+
643
+ **==> picture [61 x 60] intentionally omitted <==**
644
+
645
+ **==> picture [60 x 60] intentionally omitted <==**
646
+
647
+ **Figure 14 (More image-prompt alignment samples)**
648
+
649
+ ## APPENDIX G MORE SAMPLES
650
+
651
+ 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.
652
+
653
+ 21
654
+
655
+ **==> picture [101 x 9] intentionally omitted <==**
656
+
657
+ **----- Start of picture text -----**<br>
658
+ Pretrained (New Animals)<br>**----- End of picture text -----**<br>
659
+
660
+ **==> picture [64 x 64] intentionally omitted <==**
661
+
662
+ **==> picture [64 x 64] intentionally omitted <==**
663
+
664
+ **==> picture [64 x 64] intentionally omitted <==**
665
+
666
+ **==> picture [64 x 64] intentionally omitted <==**
667
+
668
+ **==> picture [64 x 64] intentionally omitted <==**
669
+
670
+ **==> picture [64 x 64] intentionally omitted <==**
671
+
672
+ **==> picture [64 x 63] intentionally omitted <==**
673
+
674
+ **==> picture [64 x 63] intentionally omitted <==**
675
+
676
+ **==> picture [64 x 63] intentionally omitted <==**
677
+
678
+ **Aesthetic Quality (New Animals)**
679
+
680
+ **==> picture [64 x 64] intentionally omitted <==**
681
+
682
+ **==> picture [63 x 64] intentionally omitted <==**
683
+
684
+ **==> picture [64 x 64] intentionally omitted <==**
685
+
686
+ **==> picture [64 x 64] intentionally omitted <==**
687
+
688
+ **==> picture [63 x 64] intentionally omitted <==**
689
+
690
+ **==> picture [64 x 64] intentionally omitted <==**
691
+
692
+ **==> picture [64 x 63] intentionally omitted <==**
693
+
694
+ **==> picture [63 x 63] intentionally omitted <==**
695
+
696
+ **==> picture [64 x 63] intentionally omitted <==**
697
+
698
+ **Pretrained (Non-Animals)**
699
+
700
+ **==> picture [64 x 63] intentionally omitted <==**
701
+
702
+ **==> picture [64 x 63] intentionally omitted <==**
703
+
704
+ **==> picture [64 x 64] intentionally omitted <==**
705
+
706
+ **==> picture [64 x 64] intentionally omitted <==**
707
+
708
+ **==> picture [64 x 64] intentionally omitted <==**
709
+
710
+ **Aesthetic Quality (Non-Animals)**
711
+
712
+ **==> picture [64 x 64] intentionally omitted <==**
713
+
714
+ **==> picture [64 x 64] intentionally omitted <==**
715
+
716
+ **==> picture [64 x 64] intentionally omitted <==**
717
+
718
+ **==> picture [64 x 64] intentionally omitted <==**
719
+
720
+ **==> picture [64 x 64] intentionally omitted <==**
721
+
722
+ **==> picture [64 x 64] intentionally omitted <==**
723
+
724
+ **Figure 15 (Aesthetic quality generalization)**
725
+
726
+ 22
727
+
728
+ **==> picture [364 x 448] intentionally omitted <==**
729
+
730
+ **----- Start of picture text -----**<br>
731
+ a capybara washing dishes a snail playing chess<br>a dog doing laundry a giraffe playing basketball<br>a parrot driving a car a duck taking an exam<br>a robot fishing in a lake a horse typing on a keyboard<br>a rabbit sewing clothes a tree riding a bike<br>a car eating a sandwich an apple playing soccer<br>**----- End of picture text -----**<br>
732
+
733
+ **==> picture [60 x 60] intentionally omitted <==**
734
+
735
+ **==> picture [61 x 60] intentionally omitted <==**
736
+
737
+ **==> picture [60 x 60] intentionally omitted <==**
738
+
739
+ **==> picture [60 x 60] intentionally omitted <==**
740
+
741
+ **==> picture [61 x 60] intentionally omitted <==**
742
+
743
+ **==> picture [60 x 60] intentionally omitted <==**
744
+
745
+ **Figure 16 (Image-prompt alignment generalization)**
746
+
747
+ 23
748
+
open_review/iclr2024_8556.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8556",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Doubly Robust Instance-Reweighted Adversarial Training",
6
+ "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.",
7
+ "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, [...]",
8
+ "initial_scores": [
9
+ 6,
10
+ 6,
11
+ 8
12
+ ],
13
+ "score_mean": 6.67,
14
+ "score_variance": 1.33,
15
+ "score_spread": 2,
16
+ "score_min": 6,
17
+ "score_max": 8,
18
+ "decision": "Accept (poster)",
19
+ "rebuttal_validity_ground_truth": true,
20
+ "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",
21
+ "forum_id": "OF5x1dzWSS",
22
+ "primary_area": "optimization",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_u17N",
27
+ "review_id": "Xe2xrHh8ov",
28
+ "scores": {
29
+ "rating": 6,
30
+ "soundness": 3,
31
+ "presentation": 3,
32
+ "contribution": 3,
33
+ "confidence": 5
34
+ },
35
+ "review_text_chars": 2510,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 805338,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_bEW4",
43
+ "review_id": "iz3ZbCusQK",
44
+ "scores": {
45
+ "rating": 6,
46
+ "soundness": 3,
47
+ "presentation": 3,
48
+ "contribution": 3,
49
+ "confidence": 4
50
+ },
51
+ "review_text_chars": 1475,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 805713,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_6nnk",
59
+ "review_id": "LsJCnj0NRj",
60
+ "scores": {
61
+ "rating": 8,
62
+ "soundness": 3,
63
+ "presentation": 3,
64
+ "contribution": 3,
65
+ "confidence": 5
66
+ },
67
+ "review_text_chars": 2897,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 2032127,
70
+ "post_rebuttal_text_signal": false,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": false,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8556.md ADDED
@@ -0,0 +1,722 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## DOUBLY ROBUST INSTANCE-REWEIGHTED ADVERSARIAL TRAINING
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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
16
+
17
+ 1
18
+
19
+ 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:
20
+
21
+ _How to systematically determine the importance weights via a principled approach, rather than resorting to heuristics/interpretations which are often sub-optimal?_
22
+
23
+ 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:
24
+
25
+ _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?_
26
+
27
+ In this paper, we propose a novel doubly robust instance reweighted optimization approach to address both of the above questions.
28
+
29
+ ## 1.1 OUR CONTRIBUTIONS
30
+
31
+ **(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.
32
+
33
+ **(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.
34
+
35
+ **(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.
36
+
37
+ 2
38
+
39
+ ## 1.2 RELATED WORK
40
+
41
+ **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.
42
+
43
+ **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).
44
+
45
+ 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.
46
+
47
+ Due to space limitation, more discussions about related literature in Bilevel Optimization and Stochastic Compositional Optimization is deferred to Appendix A.
48
+
49
+ ## 2 PRELIMINARY ON AT
50
+
51
+ **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
52
+
53
+ _i_ =1
54
+
55
+ **==> picture [261 x 27] intentionally omitted <==**
56
+
57
+ 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.
58
+
59
+ **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
60
+
61
+ 3
62
+
63
+ 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
64
+
65
+ **==> picture [321 x 27] intentionally omitted <==**
66
+
67
+ 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.
68
+
69
+ **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):
70
+
71
+ **==> picture [335 x 27] intentionally omitted <==**
72
+
73
+ 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.
74
+
75
+ ## 3 PROPOSED FRAMEWORK FOR INSTANCE REWEIGHTED AT
76
+
77
+ ## 3.1 DONE: DOUBLY ROBUST INSTANCE REWEIGHTED AT
78
+
79
+ Using the bilevel formulation for AT in Eq. equation 3, we can incorporate the instance reweighted idea as
80
+
81
+ **==> picture [386 x 27] intentionally omitted <==**
82
+
83
+ 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:
84
+
85
+ **==> picture [387 x 27] intentionally omitted <==**
86
+
87
+ 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
88
+
89
+ 4
90
+
91
+ 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).
92
+
93
+ 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.
94
+
95
+ ## 3.2 AN EQUIVALENT COMPOSITIONAL BILEVEL OPTIMIZATION PROBLEM
96
+
97
+ 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
98
+
99
+ **==> picture [339 x 28] intentionally omitted <==**
100
+
101
+ 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.
102
+
103
+ 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
104
+
105
+ **==> picture [353 x 28] intentionally omitted <==**
106
+
107
+ 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_
108
+
109
+ **==> picture [380 x 31] intentionally omitted <==**
110
+
111
+ **==> picture [159 x 19] intentionally omitted <==**
112
+
113
+ 5
114
+
115
+ 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.
116
+
117
+ 3.3 COMPOSITIONAL IMPLICIT DIFFERENTIATION (CID)
118
+
119
+ 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:
120
+
121
+ **==> picture [335 x 59] intentionally omitted <==**
122
+
123
+ 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
124
+
125
+ **==> picture [307 x 20] intentionally omitted <==**
126
+
127
+ with each _vi[∗]_[being the solution of the linear system] _[ ∇]_[2] _δ[h][i]_[ (] _[θ, δ] i[∗]_[(] _[θ]_[))] _[ v]_[=] _[ ∇][δ][g][i]_[ (] _[θ, δ] i[∗]_[(] _[θ]_[))][.]
128
+
129
+ 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
130
+
131
+ **==> picture [387 x 28] intentionally omitted <==**
132
+
133
+ 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).
134
+
135
+ 6
136
+
137
+ ## **Algorithm 1** Compositional Implicit Differentiation (CID)
138
+
139
+ 1: **Input:** stepsizes _α, {βt}, {ηt}_ , initializations _θ_ 0 _∈_ R _[d]_ , _δ_[0] _∈_ R _[p]_ , and _u_ 0 _∈_ R _[m]_ .
140
+
141
+ 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**
142
+
143
+ ## 3.4 CONVERGENCE ANALYSIS OF CID
144
+
145
+ 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).
146
+
147
+ **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_
148
+
149
+ **==> picture [197 x 29] intentionally omitted <==**
150
+
151
+ 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] ).
152
+
153
+ ## 4 EXPERIMENTS
154
+
155
+ ## 4.1 EXPERIMENTAL SETUP
156
+
157
+ **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.
158
+
159
+ More details about the training and hyperparameters search can be found in Appendix B.
160
+
161
+ **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.
162
+
163
+ ## 4.2 BETTER DISTRIBUTION OF ROBUST PERFORMANCE
164
+
165
+ 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
166
+
167
+ 7
168
+
169
+ **==> picture [186 x 112] intentionally omitted <==**
170
+
171
+ **==> picture [186 x 112] intentionally omitted <==**
172
+
173
+ Figure 1: Per-class robust accuracy comparisons between our method and traditional AT method on balanced and imbalanced (0.2 imbalance ratio) CIFAR10.
174
+
175
+ Table 1: Performance evaluations on balanced and imbalanced (0.2 imbalance ratio) CIFAR10.
176
+
177
+ |Method|Balanced CIFAR10|Unbalanced CIFAR10|
178
+ |---|---|---|
179
+ ||SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA<br>SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA||
180
+ ||||
181
+ |AT<br>FAT<br>WMMR<br>MAIL<br>GAIRAT|82.1<br>49.29<br>28.35<br>45.22<br>**86.21**<br>46.59<br>27.12<br>43.71<br>81.6<br>49.53<br>31.24<br>40.9<br>83.47<br>55.12<br>37.30<br>44.08<br>83.22<br>54.81<br>37.45<br>41.10|69.74<br>42.37<br>6.25<br>39.55<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>72.01<br>45.64<br>9.8<br>37.17<br>73.87<br>45.18<br>16.9<br>35.43|
182
+ ||||
183
+ |DONE-GD<br>DONE-PGD<br>DONE-ADAM|83.41<br>57.46<br>40.11<br>**45.66**<br>82.62<br>**58.54**<br>40.18<br>44.49<br>82.25<br>58.51<br>**40.36**<br>44.20|74.22<br>**48.29**<br>**17.19**<br>**40.06**<br>**74.58**<br>48.13<br>15.83<br>38.69<br>74.56<br>48.15<br>17.10<br>39.46|
184
+
185
+ 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.
186
+
187
+ ## 4.3 MAIN RESULTS
188
+
189
+ ## **Comparisons under CIFAR10.** The overall
190
+
191
+ 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
192
+
193
+ Table 4: Comparisons with fast AT methods.
194
+
195
+ |Method|SA|RA-PGD|RA-Tail-30|
196
+ |---|---|---|---|
197
+ |||||
198
+ |Fast-AT<br>Fast-AT-GA<br>Fast-BAT|**82.44**<br>79.83<br>79.91|45.37<br>47.56<br>49.13|23.3<br>25.01<br>26.05|
199
+ |DONE<br>79.17<br>**55.17**<br>**37.13**||||
200
+
201
+ 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
202
+
203
+ 8
204
+
205
+ Table 2: Performance evaluations on balanced and imbalanced (0.2 imbalance ratio) SVHN.
206
+
207
+ |Method|Balanced SVHN|Unbalanced SVHN (0.2)|
208
+ |---|---|---|
209
+ ||||
210
+ ||SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA|SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA|
211
+ ||||
212
+ |AT<br>MAIL<br>GAIRAT|**93.21**<br>57.82<br>47.21<br>46.27<br>93.11<br>65.56<br>52.23<br>41.38<br>91.56<br>64.74<br>52.15<br>39.41|88.46<br>51.08<br>33.67<br>41.13<br>86.62<br>48.48<br>31.91<br>34.46<br>86.73<br>53.79<br>36.46<br>33.25|
213
+ ||||
214
+ |DONE-PGD<br>DONE-ADAM|92.80<br>**66.20**<br>**55.84**<br>48.32<br>92.58<br>65.72<br>53.79<br>**49.13**|88.05<br>54.85<br>39.91<br>41.44<br>**88.98**<br>**55.90**<br>**41.10**<br>**42.38**|
215
+
216
+ Table 3: Performance evaluations on STL10 and GTSRB (originally imbalanced) datasets.
217
+
218
+ |Method|STL10|GTSRB|
219
+ |---|---|---|
220
+ ||||
221
+ ||SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA|SA<br>RA-PGD<br>RA-Tail-30<br>RA-AA|
222
+ ||||
223
+ |AT<br>MAIL<br>GAIRAT|67.11<br>36.28<br>10.07<br>32.58<br>**68.06**<br>38.20<br>13.33<br>32.86<br>65.67<br>35.23<br>15.21<br>30.42|88.13<br>59.65<br>27.03<br>**57.83**<br>88.47<br>55.96<br>20.73<br>53.44<br>86.67<br>54.38<br>22.10<br>51.18|
224
+ ||||
225
+ |DONE-PGD<br>DONE-ADAM|66.98<br>**40.23**<br>**17.87**<br>33.71<br>66.92<br>39.70<br>17.62<br>**34.59**|**89.34**<br>**60.16**<br>27.41<br>57.25<br>88.76<br>60.05<br>**28.35**<br>57.70|
226
+
227
+ 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.
228
+
229
+ **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.
230
+
231
+ **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.
232
+
233
+ ## 5 CONCLUSIONS
234
+
235
+ 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.
236
+
237
+ 9
238
+
239
+ ## REFERENCES
240
+
241
+ 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.
242
+
243
+ - Maksym Andriushchenko and Nicolas Flammarion. Understanding and improving fast adversarial training. _Advances in Neural Information Processing Systems_ , 33:16048–16059, 2020.
244
+
245
+ - 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.
246
+
247
+ - Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In _International conference on machine learning_ , pp. 284–293. PMLR, 2018b.
248
+
249
+ - 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.
250
+
251
+ - Jose Blanchet, Donald Goldfarb, Garud Iyengar, Fengpei Li, and Chaoxu Zhou. Unbiased simulation for optimizing stochastic function compositions. _arXiv preprint arXiv:1711.07564_ , 2017.
252
+
253
+ - 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.
254
+
255
+ - 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.
256
+
257
+ - 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.
258
+
259
+ - 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]
260
+
261
+ - 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.
262
+
263
+ - Adithya M Devraj and Jianshu Chen. Stochastic variance reduced primal dual algorithms for empirical composition optimization. _Advances in Neural Information Processing Systems_ , 32, 2019.
264
+
265
+ - 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.
266
+
267
+ - Justin Domke. Generic methods for optimization-based modeling. _International Conference on Artificial Intelligence and Statistics (AISTATS)_ , pp. 318–326, 2012.
268
+
269
+ - 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.
270
+
271
+ 10
272
+
273
+ - 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.
274
+
275
+ - 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.
276
+
277
+ - Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. _arXiv preprint arXiv:1412.6572_ , 2014.
278
+
279
+ - 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.
280
+
281
+ - 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.
282
+
283
+ - Riccardo Grazzi, Luca Franceschi, Massimiliano Pontil, and Saverio Salzo. On the iteration complexity of hypergradient computation. _International Conference on Machine Learning (ICML))_ , 2020a.
284
+
285
+ - 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.
286
+
287
+ - 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.
288
+
289
+ Kaiyi Ji and Yingbin Liang. Lower bounds and accelerated algorithms for bilevel optimization. _arXiv preprint arXiv:2102.03926_ , 2021.
290
+
291
+ - 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.
292
+
293
+ - Kayi Ji, Junjie Yang, and Yingbin Liang. Bilevel optimization: Convergence analysis and enhanced design. _International Conference on Machine Learning (ICML))_ , 2021.
294
+
295
+ Jing Jiang and ChengXiang Zhai. Instance weighting for domain adaptation in nlp. ACL, 2007.
296
+
297
+ Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
298
+
299
+ - 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.
300
+
301
+ - 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.
302
+
303
+ - 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.
304
+
305
+ - 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.
306
+
307
+ - Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. _arXiv preprint arXiv:1806.09055_ , 2018.
308
+
309
+ 11
310
+
311
+ - 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.
312
+
313
+ - 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.
314
+
315
+ - 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.
316
+
317
+ - 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.
318
+
319
+ - 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.
320
+
321
+ - 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.
322
+
323
+ - 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.
324
+
325
+ - Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
326
+
327
+ - 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.
328
+
329
+ - 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.
330
+
331
+ - Fabian Pedregosa. Hyperparameter optimization with approximate gradient. In _International Conference on Machine Learning (ICML)_ , pp. 737–746, 2016.
332
+
333
+ - Thomas Pethick, Grigorios G Chrysos, and Volkan Cevher. Revisiting adversarial training for the worst-performing class. _arXiv preprint arXiv:2302.08872_ , 2023.
334
+
335
+ - 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.
336
+
337
+ - 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.
338
+
339
+ - Hamed Rahimian and Sanjay Mehrotra. Distributionally robust optimization: A review. _arXiv preprint arXiv:1908.05659_ , 2019.
340
+
341
+ - 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.
342
+
343
+ - 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.
344
+
345
+ 12
346
+
347
+ 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.
348
+
349
+ - Leslie Rice, Eric Wong, and Zico Kolter. Overfitting in adversarially robust deep learning. In _International Conference on Machine Learning_ , pp. 8093–8104. PMLR, 2020.
350
+
351
+ - 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.
352
+
353
+ - 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.
354
+
355
+ - 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.
356
+
357
+ - 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.
358
+
359
+ - Florian Tramèr, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. The space of transferable adversarial examples. _arXiv preprint arXiv:1704.03453_ , 2017.
360
+
361
+ - 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.
362
+
363
+ - 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.
364
+
365
+ - Mengdi Wang, Ji Liu, and Ethan Fang. Accelerating stochastic composition optimization. _Advances in Neural Information Processing Systems_ , 29, 2016.
366
+
367
+ - 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.
368
+
369
+ - 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.
370
+
371
+ - Eric Wong, Leslie Rice, and J Zico Kolter. Fast is better than free: Revisiting adversarial training. _arXiv preprint arXiv:2001.03994_ , 2020.
372
+
373
+ - 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.
374
+
375
+ - Yao-Yuan Yang, Cyrus Rashtchian, Hongyang Zhang, Ruslan Salakhutdinov, and Kamalika Chaudhuri. Adversarial robustness through local lipschitzness. _arXiv preprint arXiv:2003.02460_ , 20, 2020a.
376
+
377
+ - 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.
378
+
379
+ - 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.
380
+
381
+ - 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.
382
+
383
+ 13
384
+
385
+ 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.
386
+
387
+ - 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.
388
+
389
+ - 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.
390
+
391
+ - 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.
392
+
393
+ - 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.
394
+
395
+ - 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.
396
+
397
+ 14
398
+
399
+ ## SUPPLEMENTARY MATERIAL
400
+
401
+ We provide the details omitted in the main paper. The sections are organized as fellows:
402
+
403
+ _•_ Appendix A: We discuss related literature about bilevel optimization and stochastic compositional optimization.
404
+
405
+ _•_ Appendix B: We provide more details about datasets, training setups, hyperparameters search, and implementations.
406
+
407
+ _•_ Appendix C: We provide the distributions of the robustly learned instance weights and models’ confusion matrices for the considered datasets.
408
+
409
+ _•_ Appendix D: We provide the proof of Proposition 1.
410
+
411
+ _•_ Appendix E: We present the convergence analysis of our proposed CID algorithm including the statements of assumptions and the full proof of Theorem 1.
412
+
413
+ ## A MORE RELATED WORK DISCUSSIONS ABOUT BILEVEL OPTIMIZATION AND STOCHASTIC COMPOSITIONAL OPTIMIZATION
414
+
415
+ **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.
416
+
417
+ **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).
418
+
419
+ ## B MORE EMPIRICAL SPECIFICATIONS
420
+
421
+ ## B.1 MORE DETAILS ABOUT TRAINING AND HYPERPARAMETERS SEARCH
422
+
423
+ 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.
424
+
425
+ 15
426
+
427
+ 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).
428
+
429
+ **==> picture [196 x 120] intentionally omitted <==**
430
+
431
+ **==> picture [196 x 120] intentionally omitted <==**
432
+
433
+ **==> picture [196 x 120] intentionally omitted <==**
434
+
435
+ **==> picture [196 x 120] intentionally omitted <==**
436
+
437
+ **==> picture [196 x 120] intentionally omitted <==**
438
+
439
+ **==> picture [196 x 120] intentionally omitted <==**
440
+
441
+ 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.
442
+
443
+ ## B.2 FURTHER DESCRIPTIONS ABOUT DATASETS
444
+
445
+ 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
446
+
447
+ 16
448
+
449
+ **==> picture [400 x 334] intentionally omitted <==**
450
+
451
+ **----- Start of picture text -----**<br>
452
+ 0<br>1000 104 65 73 44 37 57 44 28 48 1200<br>57 1231 41 52 54 12 8 32 4 9 0.8<br>1000<br>31 117 990 139 55 31 18 81 9 29<br>29 187 71 863 59 60 10 31 20 170 800<br>0.6<br>31 168 49 48 1096 28 28 19 6 27<br>20<br>600<br>38 90 42 112 78 942 89 25 29 55<br>0.4<br>123 79 51 74 123 78 840 32 78 22<br>400<br>25 254 94 108 14 20 5 959 5 16<br>111 126 66 75 112 61 155 9 647 138 200 0.2<br>135 105 99 69 107 55 24 34 46 826<br>40<br>0 1 2 3 4 5 6 7 8 9 0.0<br>Predicted 0 20 40<br>SVHN (divide by 1500 to obtain accuracies) GTSRB<br>airplane 689 21 43 24 21 8 22 24 112 36 700 airplane 555 38 36 7 16 6 7 1 81 53<br>500<br>automobile 26 754 8 20 5 5 11 3 30 138 bird 58 243 15 67 182 58 47 108 15 7<br>600<br>bird 84 22 429 80 136 43 118 56 19 13 car 39 5 493 15 11 10 11 6 43 167<br>400<br>cat 53 31 74 344 115 114 138 49 31 51 500 cat 15 129 14 75 269 94 79 87 17 21<br>deer 56 16 99 70 437 36 148 83 35 20 400 deer 25 73 10 45 424 33 108 66 7 9 300<br>dog 42 14 63 156 66 443 94 81 15 26 dog 14 120 9 64 207 118 133 107 7 21<br>300<br>frog 29 11 51 70 104 28 651 26 11 19 horse 16 25 10 28 139 95 354 91 6 36 200<br>horse 40 2 36 44 63 44 47 685 10 29 200 monkey 10 84 9 71 220 106 89 196 3 12<br>ship 120 43 24 16 20 10 18 8 704 37 100 ship 143 12 38 11 23 10 5 3 436 119 100<br>truck 47 89 13 27 7 10 21 26 37 723<br>truck 66 8 218 18 10 8 10 13 95 354<br>airplaneautomobilebird cat deer dog frog horse ship truck<br>airplane bird car cat deer dog horsemonkeyship truck<br>0<br>1<br>2<br>3<br>4<br>5<br>Ground Truth<br>6<br>7<br>8<br>9<br>**----- End of picture text -----**<br>
453
+
454
+ CIFAR10 (divide by 1000 to obtain accuracies)
455
+
456
+ STL10 (divide by 800 to obtain accuracies)
457
+
458
+ 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.
459
+
460
+ 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.
461
+
462
+ ## B.3 FURTHER IMPLEMENTATION SPECIFICATIONS
463
+
464
+ 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.
465
+
466
+ For example, to run our DONE-ADAM algorithm on the balanced CIFAR10 dataset, please run the following command:
467
+
468
+ 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
469
+
470
+ 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.
471
+
472
+ 17
473
+
474
+ **==> picture [380 x 195] intentionally omitted <==**
475
+
476
+ **----- Start of picture text -----**<br>
477
+ 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<br>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<br>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<br>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<br>(a) STL10 dataset (b) CIFAR10 dataset<br>**----- End of picture text -----**<br>
478
+
479
+ 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.
480
+
481
+ Both implementations perform similarly. Please check the file ‘train.py’ for more details about the arguments and the possible options.
482
+
483
+ We run all baselines on a single NVIDIA Tesla V100 GPU.
484
+
485
+ ## C DISTRIBUTIONS OF LEARNED WEIGHTS
486
+
487
+ 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.
488
+
489
+ 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.
490
+
491
+ 18
492
+
493
+ **==> picture [390 x 465] intentionally omitted <==**
494
+
495
+ **----- Start of picture text -----**<br>
496
+ airplane automobile bird cat deer<br>800<br>600<br>400<br>200<br>0<br>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<br>800<br>600<br>400<br>200<br>0<br>0.00 0.01 0.00 0.01 0.00 0.01 0.00 0.01 0.00 0.01<br>CIFAR10 dataset<br>airplane bird car cat deer<br>125<br>100<br>75<br>50<br>25<br>0<br>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<br>125<br>100<br>75<br>50<br>25<br>0<br>0.0 0.1 0.0 0.1 0.0 0.1 0.0 0.1 0.0 0.1<br>STL10 dataset<br>0 1 2 3 4<br>200<br>150<br>100<br>50<br>0<br>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<br>200<br>150<br>100<br>50<br>0<br>0.00 0.04 0.00 0.04 0.00 0.04 0.00 0.04 0.00 0.04<br>SVHN dataset<br>Density<br>Density<br>Density<br>Density<br>Density<br>Density<br>**----- End of picture text -----**<br>
497
+
498
+ 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.
499
+
500
+ 19
501
+
502
+ **==> picture [381 x 195] intentionally omitted <==**
503
+
504
+ **----- Start of picture text -----**<br>
505
+ 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<br>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<br>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<br>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<br>(a) STL10 dataset (b) CIFAR10 dataset<br>**----- End of picture text -----**<br>
506
+
507
+ 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.
508
+
509
+ ## D PROOF OF PROPOSITION 1
510
+
511
+ Recall the reformulated problem (7), which we rewrite as
512
+
513
+ **==> picture [272 x 66] intentionally omitted <==**
514
+
515
+ _ℓ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
516
+
517
+ **==> picture [357 x 66] intentionally omitted <==**
518
+
519
+ 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.,]
520
+
521
+ **==> picture [182 x 30] intentionally omitted <==**
522
+
523
+ we obtain
524
+
525
+ **==> picture [330 x 37] intentionally omitted <==**
526
+
527
+ 20
528
+
529
+ Therefore, we obtain
530
+
531
+ **==> picture [398 x 56] intentionally omitted <==**
532
+
533
+ _⊤_ 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]
534
+
535
+ **==> picture [317 x 30] intentionally omitted <==**
536
+
537
+ Substituting eq. (13) in eq. (12) yields
538
+
539
+ **==> picture [223 x 25] intentionally omitted <==**
540
+
541
+ **==> picture [298 x 13] intentionally omitted <==**
542
+
543
+ **==> picture [316 x 24] intentionally omitted <==**
544
+
545
+ Now, combining eq. (14) and eq. (11) we obtain
546
+
547
+ **==> picture [380 x 54] intentionally omitted <==**
548
+
549
+ which completes the proof.
550
+
551
+ ## E CONVERGENCE ANALYSIS OF THE CID ALGORITHM
552
+
553
+ We provide the convergence analysis of the CID algorithm for solving the generic compositional bilevel optimization problem (8), which we rewrite as follows:
554
+
555
+ **==> picture [335 x 59] intentionally omitted <==**
556
+
557
+ **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.
558
+
559
+ 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.
560
+
561
+ 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).
562
+
563
+ **Assumption 1.** _The objective functions f , gi, and hi for any i_ = 1 _, . . . , M satisfy_
564
+
565
+ 21
566
+
567
+ - _f is Cf -Lipschitz continuous and Lf -smooth, i.e., for any z and z[′] ,_
568
+
569
+ **==> picture [336 x 14] intentionally omitted <==**
570
+
571
+ - _gi is Cg-Lipschitz continuous and Lg-smooth, i.e., for any w and w[′] ,_
572
+
573
+ **==> picture [351 x 14] intentionally omitted <==**
574
+
575
+ **==> picture [168 x 11] intentionally omitted <==**
576
+
577
+ **==> picture [276 x 14] intentionally omitted <==**
578
+
579
+ **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[′] ,_
580
+
581
+ **==> picture [389 x 23] intentionally omitted <==**
582
+
583
+ **Assumption 3.** _The stochastic sample gi for any i_ = 1 _, . . . , M has bounded variance, i.e.,_
584
+
585
+ **==> picture [281 x 31] intentionally omitted <==**
586
+
587
+ The following theorem (as restatement of Theorem 1) characterizes the convergence rate of our designed CID algorithm.
588
+
589
+ **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_
590
+
591
+ **==> picture [193 x 28] intentionally omitted <==**
592
+
593
+ 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).
594
+
595
+ ## E.1 SUPPORTING LEMMAS
596
+
597
+ For notational convenience, we let _L_ = max _{Lf , Lg, Lh}_ , _C_ = max _{Cf , Cg}_ , and _τ_ = max _{Lθδ, Lδδ}_ .
598
+
599
+ **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 θ, θ[′] ,_
600
+
601
+ **==> picture [397 x 41] intentionally omitted <==**
602
+
603
+ _Proof._ Applying the chain rule, we have
604
+
605
+ **==> picture [285 x 22] intentionally omitted <==**
606
+
607
+ Therefore, using triangle inequality, we obtain
608
+
609
+ **==> picture [378 x 75] intentionally omitted <==**
610
+
611
+ 22
612
+
613
+ **==> picture [302 x 98] intentionally omitted <==**
614
+
615
+ The chain rule yields
616
+
617
+ **==> picture [369 x 40] intentionally omitted <==**
618
+
619
+ where the last equality follows from the implicit differentiation result for bilevel optimization Pedregosa (2016); Ji et al. (2021).
620
+
621
+ Thus, we obtain
622
+
623
+ **==> picture [377 x 67] intentionally omitted <==**
624
+
625
+ 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)
626
+
627
+ Rearranging the above equation completes the proof.
628
+
629
+ **Lemma 2.** _Suppose that Assumptions 1 and 3 hold. Then, we have_
630
+
631
+ **==> picture [393 x 26] intentionally omitted <==**
632
+
633
+ > _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]
634
+
635
+ **==> picture [376 x 123] intentionally omitted <==**
636
+
637
+ 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_ + _µ_[.]
638
+
639
+ **==> picture [339 x 30] intentionally omitted <==**
640
+
641
+ 23
642
+
643
+ **==> picture [290 x 28] intentionally omitted <==**
644
+
645
+ 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 _µ_[.]
646
+
647
+ **==> picture [399 x 148] intentionally omitted <==**
648
+
649
+ **==> picture [397 x 141] intentionally omitted <==**
650
+
651
+ **==> picture [399 x 144] intentionally omitted <==**
652
+
653
+ Hence, the proof is complete.
654
+
655
+ **Lemma 3.** _Suppose that Assumptions 1 and 2 hold. Then we have_
656
+
657
+ **==> picture [398 x 50] intentionally omitted <==**
658
+
659
+ _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.
660
+
661
+ 24
662
+
663
+ **Lemma 4.** _Suppose that Assumptions 1, 2, 3 hold. Then, we have_
664
+
665
+ **==> picture [397 x 72] intentionally omitted <==**
666
+
667
+ _Proof._ Based on the Lipschitzness of _∇F_ ( _θ_ ) in Lemma 1, we have
668
+
669
+ **==> picture [387 x 168] intentionally omitted <==**
670
+
671
+ Next, we upper-bound the inner product terms _A_ 1 and _A_ 2, respectively. Using Young’s inequality, we obtain
672
+
673
+ **==> picture [373 x 275] intentionally omitted <==**
674
+
675
+ 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
676
+
677
+ **==> picture [340 x 19] intentionally omitted <==**
678
+
679
+ 25
680
+
681
+ **==> picture [342 x 97] intentionally omitted <==**
682
+
683
+ where the last inequality uses the upper-bound ��� _∇gi_ ( _θt, δi,tK_[)] �� _≤ C_ + _Lµ[C]_[, which can be obtained] similarly to eq. (24).
684
+
685
+ 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
686
+
687
+ **==> picture [368 x 116] intentionally omitted <==**
688
+
689
+ Then, the proof is complete.
690
+
691
+ E.2 PROOF OF THEOREM 2 (I.E., THEOREM 1)
692
+
693
+ Denote _Vt_ = _F_ ( _θt_ ) + �� _g_ ( _θt−_ 1 _, δtK−_ 1[)] _[ −][u][t]_ ��2. Then, using eq. (32) we obtain
694
+
695
+ **==> picture [376 x 120] intentionally omitted <==**
696
+
697
+ where the last inequality follows from lemma 2. Further, following from the fact that (1 _−ηt_ )(1+ _ηt_ ) = 1 _− ηt_[2] _[<]_[ 1][, we obtain]
698
+
699
+ **==> picture [358 x 54] intentionally omitted <==**
700
+
701
+ 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
702
+
703
+ **==> picture [258 x 26] intentionally omitted <==**
704
+
705
+ 26
706
+
707
+ **==> picture [288 x 56] intentionally omitted <==**
708
+
709
+ 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
710
+
711
+ **==> picture [348 x 30] intentionally omitted <==**
712
+
713
+ Thus, rearranging terms, we obtain
714
+
715
+ **==> picture [392 x 30] intentionally omitted <==**
716
+
717
+ Hence, the proof is complete by choosing the batchsize _|B|_ = _O_ ( _T_ ) and stepsize _βt_ =
718
+
719
+ 1 ~~_√_~~ _T_[.]
720
+
721
+ 27
722
+
open_review/iclr2024_8558.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8558",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Abstractors and relational cross-attention: An inductive bias for explicit relational reasoning in Transformers",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 8,
10
+ 6,
11
+ 6,
12
+ 6
13
+ ],
14
+ "score_mean": 6.5,
15
+ "score_variance": 1,
16
+ "score_spread": 2,
17
+ "score_min": 6,
18
+ "score_max": 8,
19
+ "decision": "Accept (poster)",
20
+ "rebuttal_validity_ground_truth": true,
21
+ "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.",
22
+ "forum_id": "XNa6r6ZjoB",
23
+ "primary_area": "unsupervised, self-supervised, semi-supervised, and supervised representation learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_eiad",
28
+ "review_id": "M5iQ6geZzR",
29
+ "scores": {
30
+ "rating": 8,
31
+ "soundness": 4,
32
+ "presentation": 4,
33
+ "contribution": 3,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 4228,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 904809,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_nkpJ",
44
+ "review_id": "3mwop6wpdd",
45
+ "scores": {
46
+ "rating": 6,
47
+ "soundness": 3,
48
+ "presentation": 3,
49
+ "contribution": 3,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 1284,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 908653,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_4fms",
60
+ "review_id": "FKQwFuogXn",
61
+ "scores": {
62
+ "rating": 6,
63
+ "soundness": 3,
64
+ "presentation": 3,
65
+ "contribution": 2,
66
+ "confidence": 3
67
+ },
68
+ "review_text_chars": 3816,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 957443,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_qTc8",
76
+ "review_id": "8OS7M2t7Es",
77
+ "scores": {
78
+ "rating": 6,
79
+ "soundness": 2,
80
+ "presentation": 2,
81
+ "contribution": 3,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 2771,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 2660743,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8558.md ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - ABSTRACTORS AND RELATIONAL CROSS ATTENTION: AN INDUCTIVE BIAS FOR EXPLICIT RELATIONAL REASONING IN TRANSFORMERS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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).
18
+
19
+ 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
20
+
21
+ 1
22
+
23
+ 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”.
24
+
25
+ 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.
26
+
27
+ 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.
28
+
29
+ ## 2 RELATIONAL CROSS-ATTENTION AND THE ABSTRACTOR MODULE
30
+
31
+ 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.
32
+
33
+ ## 2.1 MODELING RELATIONS AS INNER PRODUCTS
34
+
35
+ 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]_[,]
36
+
37
+ **==> picture [348 x 19] intentionally omitted <==**
38
+
39
+ 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.
40
+
41
+ Considering all pairwise relations yields a _relation tensor_ , _R_ = [ _r_ ( _xi, xj_ )] _i,j ∈_ R _[n][×][n][×][d][r]_ .
42
+
43
+ ## 2.2 RELATIONAL CROSS-ATTENTION
44
+
45
+ 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_ :=
46
+
47
+ 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.
48
+
49
+ 2
50
+
51
+ _ϕ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
52
+
53
+ **==> picture [332 x 25] intentionally omitted <==**
54
+
55
+ 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.
56
+
57
+ 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,
58
+
59
+ **==> picture [314 x 26] intentionally omitted <==**
60
+
61
+ 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.
62
+
63
+ This modification yields a variant of attention that we call _relational cross-attention_ (RCA), given by
64
+
65
+ **==> picture [262 x 19] intentionally omitted <==**
66
+
67
+ 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.
68
+
69
+ 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.
70
+
71
+ 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.
72
+
73
+ 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]
74
+
75
+ **==> picture [339 x 35] intentionally omitted <==**
76
+
77
+ ## 2.3 SYMBOL ASSIGNMENT MECHANISMS
78
+
79
+ 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.
80
+
81
+ 3
82
+
83
+ **==> picture [398 x 130] intentionally omitted <==**
84
+
85
+ **----- Start of picture text -----**<br>
86
+ Encoder states Relational Abstract states<br>Relation tensor Relation tensor Bottleneck<br>𝐸1 𝐸2 𝐸3 ⋯ 𝐸𝑛 𝑅𝑖𝑗 = ⟨𝜙𝑞 𝑥𝑖 , 𝜙𝑘(𝑥𝑗)⟩ 𝑅𝑖𝑗 = ⟨𝜙𝑞 𝑥𝑖 , 𝜙𝑘(𝑥𝑗)⟩ 𝐴1 𝐴2 𝐴3 ⋯ 𝐴𝑛<br>𝑥1 𝑥2 𝑥3 ⋯ 𝑥𝑛 𝑥1 𝑥2 𝑥3 ⋯ 𝑥𝑛 𝑠1 𝑠2 𝑠3 ⋯ 𝑠𝑛<br>Input sequence Input sequence Symbols<br>(a) E ← SelfAttention( X ) (b) A ← RelationalCrossAttention(X , S)<br>**----- End of picture text -----**<br>
87
+
88
+ 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.
89
+
90
+ **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.
91
+
92
+ **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] _[, . . .]_[)][.]
93
+
94
+ **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,
95
+
96
+ **==> picture [317 x 41] intentionally omitted <==**
97
+
98
+ 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.
99
+
100
+ 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.
101
+
102
+ ## 2.4 THE ABSTRACTOR MODULE
103
+
104
+ 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
105
+
106
+ 4
107
+
108
+ 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.
109
+
110
+ ## **Algorithm 1:** Abstractor module
111
+
112
+ **Input :** object sequence: _**X**_ = ( _x_ 1 _, . . . , xn_ ) _∈_ R _[n][×][d]_
113
+
114
+ _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]_[)]
115
+
116
+ 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).
117
+
118
+ ## 3 ABSTRACTOR ARCHITECTURES
119
+
120
+ 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.
121
+
122
+ 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.
123
+
124
+ 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
125
+
126
+ > 2Layer-normalization can also be applied _before_ relational cross-attention, as in the pre-LN Transformer (Xiong et al., 2020).
127
+
128
+ 5
129
+
130
+ **==> picture [318 x 160] intentionally omitted <==**
131
+
132
+ **----- Start of picture text -----**<br>
133
+ (a) 𝑋 Abstractor Decoder ෝ𝒚<br>(b) 𝑋 Encoder Abstractor Decoder ෝ𝒚<br>Encoder<br>(c) 𝑋 Decoder ෝ𝒚<br>Abstractor<br>(d) 𝑋 Encoder Abstractor Decoder ෝ𝒚<br>(e) 𝑋 Encoder Abstractor Abstractor Decoder ෝ𝒚<br>**----- End of picture text -----**<br>
134
+
135
+ Figure 2: Examples of Abstractor-based model architectures.
136
+
137
+ 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).
138
+
139
+ ## 4 EXPERIMENTS
140
+
141
+ ## 4.1 DISCRIMINATIVE RELATIONAL TASKS
142
+
143
+ **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.
144
+
145
+ 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.
146
+
147
+ _**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.
148
+
149
+ **==> picture [100 x 83] intentionally omitted <==**
150
+
151
+ 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
152
+
153
+ 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
154
+
155
+ 6
156
+
157
+ **==> picture [386 x 116] intentionally omitted <==**
158
+
159
+ **----- Start of picture text -----**<br>
160
+ Learning Asymmetric ≺ Relation SET Classification Comparison to symbolic baseline for SET task<br>0 . 9 AbstractorCoRelNet 1 . 0 AbstractorCoRelNet 100<br>0 . 8 CoRelNetPrediNetMLP (Asymmetric) 0 . 8 CoRelNetPrediNetMLP (No Softmax) 80<br>0 . 7<br>0 . 6 0 . 6 60<br>MLP with purely symbolic input<br>0 . 5 Abstractor on images, pre-learned relations<br>0 500 1000 1500 2000 1000 2000 3000 4000 5000 0 200 400 600 800 1000<br>Training Set Size Training Set Size Training Set Size<br>(a) The ≺ relation can be learned (b) The Abstractor’s ability to (c) Comparison of Abstractor<br>with asymmetric but not sym- model multi-dimensional rela- trained on card images and MLP<br>metric inner products. tions enables it to solve SET . with hand-encoded relations.<br>Accuracy<br>Accuracy Accuracy Classification<br>SET<br>**----- End of picture text -----**<br>
161
+
162
+ Figure 4: Experiments on discriminative relational tasks and comparison to CoRelNet.
163
+
164
+ 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.
165
+
166
+ _**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”.
167
+
168
+ 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.
169
+
170
+ ## 4.2 OBJECT-SORTING: PURELY RELATIONAL SEQUENCE-TO-SEQUENCE TASKS
171
+
172
+ 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.
173
+
174
+ **==> picture [168 x 106] intentionally omitted <==**
175
+
176
+ **----- Start of picture text -----**<br>
177
+ Random Object Sorting<br>1 . 00<br>0 . 75<br>0 . 50<br>0 . 25 Abstractor<br>Ablation Model<br>0 . 00 Transformer<br>0 500 1000 1500 2000 2500 3000<br>Training Set Size<br>Accuracy<br>Sorting<br>**----- End of picture text -----**<br>
178
+
179
+ **==> picture [181 x 29] intentionally omitted <==**
180
+
181
+ **----- Start of picture text -----**<br>
182
+ (a) Learning curves on sorting sequences of ran-<br>dom objects. The abstractor is dramatically more<br>sample-efficient.<br>**----- End of picture text -----**<br>
183
+
184
+ **==> picture [179 x 147] intentionally omitted <==**
185
+
186
+ **----- Start of picture text -----**<br>
187
+ Random Object Sorting Generalization<br>1 . 0<br>0 . 5<br>Abstractor<br>Pre-trained<br>Transformer<br>0 . 0 Pre-trained<br>0 500 1000 1500 2000 2500 3000<br>Training Set Size<br>(b) Learning curves with and without pre-training<br>on a similar sorting task. The Abstractor benefits<br>from pre-training.<br>Accuracy<br>Sorting<br>**----- End of picture text -----**<br>
188
+
189
+ Figure 5: Experiments on object-sorting, a purely relational sequence-to-sequence task.
190
+
191
+ 7
192
+
193
+ 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
194
+
195
+ Figure 6: Examples of input/target sequences from the math problem-solving dataset.
196
+
197
+ **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.
198
+
199
+ 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).
200
+
201
+ **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.
202
+
203
+ 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.
204
+
205
+ ## 4.3 MATH PROBLEM-SOLVING: PARTIALLY-RELATIONAL SEQUENCE-TO-SEQUENCE TASKS
206
+
207
+ 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).
208
+
209
+ 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
210
+
211
+ 8
212
+
213
+ **==> picture [397 x 184] intentionally omitted <==**
214
+
215
+ **----- Start of picture text -----**<br>
216
+ calculus d ifferentiate algebra s equence n ext t erm algebra l inear 1 d<br>1 . 000<br>0 . 8<br>0 . 9<br>0 . 975<br>0 . 8<br>0 . 950 0 . 6<br>0 20 40 0 20 40 0 20 40<br>epoch epoch epoch<br>polynomials e xpand polynomials a dd<br>Model<br>0 . 80 0 . 85 Transformer<br>Transformer+<br>0 . 75 Abstractor (pos. symbols)<br>0 . 80<br>Abstractor (symbolic attn)<br>0 . 70<br>0 20 40 0 20 40<br>epoch epoch<br>(val) (val) (val)<br>Accuracy Accuracy Accuracy<br>TF TF TF<br>(val) (val)<br>Accuracy Accuracy<br>TF TF<br>**----- End of picture text -----**<br>
217
+
218
+ Figure 7: Training curves comparing an Abstractor-based architecture to a standard Transformer on mathematics problem-solving tasks.
219
+
220
+ 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).
221
+
222
+ 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.
223
+
224
+ 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.
225
+
226
+ 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.
227
+
228
+ ## 5 CONCLUSION
229
+
230
+ 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.
231
+
232
+ 9
233
+
234
+ ## CODE AND REPRODUCIBILITY
235
+
236
+ Code, detailed experimental logs, and instructions for reproducing our experimental results are available at: [URL removed]
237
+
238
+ ## REFERENCES
239
+
240
+ Altabaa, Awni and John Lafferty (2023). “Relational Convolutional Networks: A Framework for Learning Representations of Hierarchical Relations”. arXiv: 2310.03240 [cs].
241
+
242
+ Altabaa, Awni and John Lafferty (2024). “Approximation of relation functions and attention mechanisms”. In: arXiv: 2402.08856 [cs.LG].
243
+
244
+ 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].
245
+
246
+ Cybenko, George (1989). “Approximation by superpositions of a sigmoidal function”. In: _Mathematics of Control, Signals, and Systems_ .
247
+
248
+ 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.
249
+
250
+ Graves, Alex, Greg Wayne, and Ivo Danihelka (2014). “Neural Turing Machines”. arXiv: 1410. 5401 [cs.NE].
251
+
252
+ 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].
253
+
254
+ 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_ .
255
+
256
+ 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].
257
+
258
+ 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].
259
+
260
+ Mondal, Shanka Subhra, Taylor Whittington Webb, and Jonathan Cohen (2023). “Learning to reason over visual objects”. In: _International Conference on Learning Representations_ .
261
+
262
+ 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.
263
+
264
+ 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_ .
265
+
266
+ Saxton, David, Edward Grefenstette, Felix Hill, and Pushmeet Kohli (2019). “Analysing Mathematical Reasoning Abilities of Neural Models”. arXiv: 1904.01557 [cs.LG].
267
+
268
+ 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_ .
269
+
270
+ Shaw, Peter, Jakob Uszkoreit, and Ashish Vaswani (2018). “Self-Attention with Relative Position Representations”. arXiv: 1803.02155 [cs.CL].
271
+
272
+ 10
273
+
274
+ 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_ .
275
+
276
+ Webb, Taylor, Keith J Holyoak, and Hongjing Lu (2023). “Emergent analogical reasoning in large language models”. In: _Nature Human Behaviour_ .
277
+
278
+ 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].
279
+
280
+ Webb, Taylor Whittington, Ishan Sinha, and Jonathan Cohen (2021). “Emergent Symbols through Binding in External Memory”. In: _International Conference on Learning Representations_ .
281
+
282
+ 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_ .
283
+
284
+ 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_ .
285
+
286
+ 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.
287
+
288
+ Zhou, Shuheng, John Lafferty, and Larry Wasserman (2009). “Compressed and Privacy-Sensitive Sparse Regression”. In: _IEEE Trans. Information Theory_ .
289
+
290
+ 11
291
+
292
+ ## A MULTI-ATTENTION DECODER
293
+
294
+ **Algorithm 2:** Multi-Attention Decoder
295
+
296
+ **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]_[)]
297
+
298
+ ## B UNIVERSAL APPROXIMATION OF RELATION FUNCTIONS
299
+
300
+ 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
301
+
302
+ **==> picture [124 x 19] intentionally omitted <==**
303
+
304
+ 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.
305
+
306
+ 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
307
+
308
+ AbstractorLayer( _X_ ) = FeedForward _ϕq_ ( _X_ ) _ϕk_ ( _X_ ) _[⊤] S ._ (7) � �
309
+
310
+ We will characterize the function class AbstractorLayer : _X[n] →_ R _[n][×][d]_ induced by varying the parameters of _ϕq, ϕk,_ FeedForward and _S_ .
311
+
312
+ **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._
313
+
314
+ 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.
315
+
316
+ **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_
317
+
318
+ **==> picture [154 x 11] intentionally omitted <==**
319
+
320
+ 12
321
+
322
+ _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_
323
+
324
+ **==> picture [360 x 12] intentionally omitted <==**
325
+
326
+ > _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,
327
+
328
+ **==> picture [198 x 37] intentionally omitted <==**
329
+
330
+ 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
331
+
332
+ **==> picture [336 x 12] intentionally omitted <==**
333
+
334
+ 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
335
+
336
+ **==> picture [282 x 17] intentionally omitted <==**
337
+
338
+ 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
339
+
340
+ **==> picture [344 x 18] intentionally omitted <==**
341
+
342
+ Note that _R_[ˆ] _i·_ is close to _Ri·_ by Equation (8)
343
+
344
+ **==> picture [306 x 36] intentionally omitted <==**
345
+
346
+ Now consider the ( _i, j_ )-th element of the difference in Equation (10)
347
+
348
+ **==> picture [366 x 19] intentionally omitted <==**
349
+
350
+ 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).
351
+
352
+ This holds for all _i, j_ , which completes the proof.
353
+
354
+ ## C EXPERIMENTAL DETAILS
355
+
356
+ 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.
357
+
358
+ 13
359
+
360
+ ## C.1 DISCRIMINATIVE TASKS (SECTION 4.1)
361
+
362
+ ## C.1.1 PAIRWISE ORDER
363
+
364
+ 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.
365
+
366
+ **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.
367
+
368
+ **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.
369
+
370
+ **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.
371
+
372
+ **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.
373
+
374
+ **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.
375
+
376
+ ## C.1.2 _SET_
377
+
378
+ 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.
379
+
380
+ **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.
381
+
382
+ **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.
383
+
384
+ **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.
385
+
386
+ 14
387
+
388
+ 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.
389
+
390
+ **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.
391
+
392
+ **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.
393
+
394
+ **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.
395
+
396
+ **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.
397
+
398
+ ## C.2 RELATIONAL SEQUENCE-TO-SEQUENCE TASKS (SECTION 4.2)
399
+
400
+ ## C.2.1 SAMPLE-EFFICIENCY IN RELATIONAL SEQ2SEQ TASKS
401
+
402
+ **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.
403
+
404
+ **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.
405
+
406
+ **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.
407
+
408
+ **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.
409
+
410
+ ## C.2.2 GENERALIZATION TO NEW OBJECT-SORTING TASKS
411
+
412
+ **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.
413
+
414
+ **Transformer architecture** The Transformer is identical to the previous section.
415
+
416
+ **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
417
+
418
+ 15
419
+
420
+ 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.
421
+
422
+ ## C.3 MATH PROBLEM-SOLVING (SECTION 4.3)
423
+
424
+ **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.
425
+
426
+ **Transformer architecture.** The Transformer Encoder and Decoder have identical hyperparameters to the Encoder and Decoder of the Abstractor architecture.
427
+
428
+ **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.
429
+
430
+ **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.
431
+
432
+ - C.4 ADDITIONAL EXPERIMENT: ROBUSTNESS AND OUT-OF-DISTRIBUTION GENERALIZATION IN THE OBJECT-SORTING EXPERIMENTS
433
+
434
+ 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.
435
+
436
+ 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_ ).
437
+
438
+ **==> picture [179 x 120] intentionally omitted <==**
439
+
440
+ **----- Start of picture text -----**<br>
441
+ Robustness to Additive Noise<br>1 . 00 Abstractor<br>Ablation Model<br>Transformer<br>0 . 75<br>0 . 50<br>0 . 25<br>0 . 00<br>0 . 0 0 . 2 0 . 4 0 . 6 0 . 8 1 . 0<br>Noise Level<br>Accuracy<br>Sorting<br>**----- End of picture text -----**<br>
442
+
443
+ **==> picture [180 x 18] intentionally omitted <==**
444
+
445
+ **----- Start of picture text -----**<br>
446
+ (a) The Abstractor is more robust to corruption by<br>additive noise.<br>**----- End of picture text -----**<br>
447
+
448
+ **==> picture [180 x 143] intentionally omitted <==**
449
+
450
+ **----- Start of picture text -----**<br>
451
+ Robustness to Random Linear Transformations<br>1 . 00 Abstractor<br>Ablation Model<br>0 . 75 Transformer<br>0 . 50<br>0 . 25<br>0 . 00<br>0 . 0 0 . 2 0 . 4 0 . 6 0 . 8 1 . 0<br>Noise Level<br>(b) The Abstractor is more robust to corruption by<br>a random linear transformation.<br>Accuracy<br>Sorting<br>**----- End of picture text -----**<br>
452
+
453
+ Figure 8: Experiments on robustness.
454
+
455
+ 16
456
+
457
+ 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.
458
+
459
+ 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.
460
+
461
+ 17
462
+
open_review/iclr2024_8560.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8560",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Understanding and Robustifying Sub-domain Alignment for Domain Adaptation",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 6,
10
+ 5,
11
+ 6
12
+ ],
13
+ "score_mean": 5.67,
14
+ "score_variance": 0.33,
15
+ "score_spread": 1,
16
+ "score_min": 5,
17
+ "score_max": 6,
18
+ "decision": "Reject",
19
+ "rebuttal_validity_ground_truth": null,
20
+ "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.",
21
+ "forum_id": "gLZeEpfVjy",
22
+ "primary_area": "general machine learning (i.e., none of the above)",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_W1Lh",
27
+ "review_id": "JbiAZczKSR",
28
+ "scores": {
29
+ "rating": 6,
30
+ "soundness": 3,
31
+ "presentation": 3,
32
+ "contribution": 2,
33
+ "confidence": 3
34
+ },
35
+ "review_text_chars": 2412,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 1781936,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_epCK",
43
+ "review_id": "k3hSvonC7K",
44
+ "scores": {
45
+ "rating": 5,
46
+ "soundness": 2,
47
+ "presentation": 3,
48
+ "contribution": 2,
49
+ "confidence": 4
50
+ },
51
+ "review_text_chars": 1946,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 1891333,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_p9oY",
59
+ "review_id": "QOiw3Uzt8F",
60
+ "scores": {
61
+ "rating": 6,
62
+ "soundness": 3,
63
+ "presentation": 3,
64
+ "contribution": 3,
65
+ "confidence": 4
66
+ },
67
+ "review_text_chars": 2032,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 1167112,
70
+ "post_rebuttal_text_signal": false,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": false,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8560.md ADDED
@@ -0,0 +1,917 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - UNDERSTANDING AND ROBUSTIFYING SUB DOMAIN ALIGNMENT FOR DOMAIN ADAPTATION
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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:
16
+
17
+ 1
18
+
19
+ **==> picture [377 x 219] intentionally omitted <==**
20
+
21
+ **----- Start of picture text -----**<br>
22
+ (a) One-dimensional space<br>(d) Visualization of high-dimensional space<br>(b) Sub-domain 1 (c) Sub-domain 2 (e) DARSA illustration<br>**----- End of picture text -----**<br>
23
+
24
+ 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.]
25
+
26
+ _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:
27
+
28
+ - **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.
29
+
30
+ - **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.
31
+
32
+ ## 2 RELATED WORK
33
+
34
+ We review the most relevant work below and provide a comprehensive discussion in Appendix A.
35
+
36
+ **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.
37
+
38
+ **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
39
+
40
+ 2
41
+
42
+ 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.
43
+
44
+ **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).
45
+
46
+ ## 3 PRELIMINARIES
47
+
48
+ 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.
49
+
50
+ **Probabilistic Classifier Discrepancy.** For a distribution _D_ , we define the discrepancy between two functions _f_ and _g_ as:
51
+
52
+ **==> picture [140 x 11] intentionally omitted <==**
53
+
54
+ 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.
55
+
56
+ **Wasserstein Distance.** The Kantorovich-Rubenstein dual representation of the Wasserstein-1 distance (Villani, 2009) between two distributions _PS_ and _PT_ is defined as
57
+
58
+ **==> picture [234 x 13] intentionally omitted <==**
59
+
60
+ 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 Φ.
61
+
62
+ ## 4 UNDERSTANDING SUB-DOMAIN-BASED METHODS
63
+
64
+ 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
65
+
66
+ 3
67
+
68
+ 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.
69
+
70
+ ## 4.1 GENERALIZATION BOUNDS FOR DOMAIN ADAPTATION
71
+
72
+ 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).
73
+
74
+ **Theorem 4.1** (Full Domain Generalization Bound) **.** _For a hypothesis f_ : _X →_ [0 _,_ 1] _,_
75
+
76
+ **==> picture [295 x 11] intentionally omitted <==**
77
+
78
+ _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
79
+
80
+ **==> picture [275 x 11] intentionally omitted <==**
81
+
82
+ 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:
83
+
84
+ **==> picture [338 x 12] intentionally omitted <==**
85
+
86
+ 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:
87
+
88
+ **==> picture [299 x 18] intentionally omitted <==**
89
+
90
+ 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.
91
+
92
+ ## 4.2 ANALYSIS OF SUB-DOMAIN-BASED METHODS
93
+
94
+ 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:
95
+
96
+ **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]_
97
+
98
+ **==> picture [397 x 40] intentionally omitted <==**
99
+
100
+ 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.
101
+
102
+ 4
103
+
104
+ **Lemma 4.4** (Decomposition of the Classification Error) **.** _For any hypothesis f ∈_ H _,_
105
+
106
+ **==> picture [306 x 14] intentionally omitted <==**
107
+
108
+ With above results, we present a generalization bound with sub-domain information: **Theorem 4.5** (Sub-domain-based Generalization Bound) **.**
109
+
110
+ **==> picture [343 x 14] intentionally omitted <==**
111
+
112
+ _In particular, in a balanced domain adaptation setting where for all k, wS[k]_[=] _[ w] T[k][, we have that]_
113
+
114
+ _γ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)
115
+
116
+ _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.
117
+
118
+ 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.
119
+
120
+ **Theorem 4.7** (Benefits of Sub-domain Alignment) **.** _Under the following assumptions:_
121
+
122
+ _**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][′]_
123
+
124
+ _Then the following inequality holds:_
125
+
126
+ **==> picture [289 x 14] intentionally omitted <==**
127
+
128
+ _where δc is_ 4 _[√] ϵ. In particular, when wS[k]_[=] _[ w] T[k][for all][ k][,]_
129
+
130
+ **==> picture [288 x 14] intentionally omitted <==**
131
+
132
+ _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).
133
+
134
+ _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.
135
+
136
+ 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:
137
+
138
+ **==> picture [249 x 14] intentionally omitted <==**
139
+
140
+ 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.
141
+
142
+ **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:_
143
+
144
+ **==> picture [271 x 13] intentionally omitted <==**
145
+
146
+ 5
147
+
148
+ _then we have_[�] _[K] k_ =1 _[w] T[k]_[(] _[γ][k]_[)] _[⋆][≤][γ][⋆][.][Further, let]_
149
+
150
+ **==> picture [281 x 14] intentionally omitted <==**
151
+
152
+ _denote the sub-domain-based generalization bound and let_
153
+
154
+ **==> picture [146 x 11] intentionally omitted <==**
155
+
156
+ _denote the generalization bound without any sub-domain information, we have,_
157
+
158
+ **==> picture [82 x 11] intentionally omitted <==**
159
+
160
+ _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.
161
+
162
+ 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.
163
+
164
+ ## 5 METHODS
165
+
166
+ 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.
167
+
168
+ The objective function of DARSA is defined as follows:
169
+
170
+ **==> picture [273 x 13] intentionally omitted <==**
171
+
172
+ where _LY_ , _LD_ , _LC_ are losses described below with relative weights given by _λY_ and _λD_ .
173
+
174
+ **Weighted source domain classification error** _LY_ **.** The weighted source domain classification error in Theorem 4.10 can be further expressed as:
175
+
176
+ **==> picture [390 x 36] intentionally omitted <==**
177
+
178
+ 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:]
179
+
180
+ **==> picture [190 x 19] intentionally omitted <==**
181
+
182
+ ˆ 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).
183
+
184
+ **Weighted source-target subdomain discrepancy** _LD_ **.** The weighted source-target domain discrepancy in Theorem 4.10 can be further expressed as:
185
+
186
+ **==> picture [356 x 13] intentionally omitted <==**
187
+
188
+ 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.
189
+
190
+ **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
191
+
192
+ 6
193
+
194
+ **==> picture [258 x 136] intentionally omitted <==**
195
+
196
+ 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_ .
197
+
198
+ 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:
199
+
200
+ **==> picture [342 x 52] intentionally omitted <==**
201
+
202
+ 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_ .
203
+
204
+ ## 6 EXPERIMENTS
205
+
206
+ 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.
207
+
208
+ **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.
209
+
210
+ **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
211
+
212
+ > 1The code to replicate all experiments is available at: [URL removed] DARSA/
213
+
214
+ 7
215
+
216
+ **==> picture [112 x 108] intentionally omitted <==**
217
+
218
+ **==> picture [116 x 107] intentionally omitted <==**
219
+
220
+ **==> picture [220 x 10] intentionally omitted <==**
221
+
222
+ **----- Start of picture text -----**<br>
223
+ (a) Domain Discrepancy (b) Source Classification Loss<br>**----- End of picture text -----**<br>
224
+
225
+ 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
226
+
227
+ 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.
228
+
229
+ ## 6.1 EMPIRICAL ANALYSIS OF OUR PROPOSED GENERALIZATION BOUND
230
+
231
+ 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.
232
+
233
+ ## 6.2 IMPORTANCE OF RE-WEIGHTING
234
+
235
+ 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:
236
+
237
+ - DARSA: Full algorithm where weights are inferred.
238
+
239
+ - DARSA Oracle: Utilizing true values of _wT[k]_
240
+
241
+ - _T_[.]
242
+
243
+ - DARSA Small Divergence: Setting _wT[k]_[to be 20% divergent from true values.]
244
+
245
+ - DARSA Large Divergence: Setting _wT[k]_[to be 50% divergent from true values.]
246
+
247
+ - • DARSA Flip: Swapping _wT[k]_[with] _[ w] S[k]_[, effectively flipping importance weighting.]
248
+
249
+ - DARSA Uniform: Assigning uniform weights for all sub-domains.
250
+
251
+ 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.
252
+
253
+ ## 6.3 DARSA ON REAL-WORLD DATASETS
254
+
255
+ 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.
256
+
257
+ 8
258
+
259
+ 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.
260
+
261
+ ||M_→_MM<br>MM_→_M<br>U_→_M<br>S_→_M|
262
+ |---|---|
263
+ |DARSA Oracle<br>DARSA Uniform<br>DARSA Small Divergence<br>DARSA Large Divergence<br>DARSA Flip|**96.2**<br>98.4<br>**92.7**<br>**92.6**<br>67.9<br>96.6<br>75.9<br>71.7<br>95.6<br>98.3<br>91.4<br>92.4<br>85.0<br>98.2<br>86.1<br>85.2<br>55.7<br>65.7<br>57.4<br>65.7|
264
+ |DARSA|96.0<br>**98.8**<br>92.6<br>90.1|
265
+
266
+ Table 2: Summary of UDA results on the Digits datasets with shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
267
+
268
+ ||M_→_MM<br>_α_= 3<br>MM_→_M<br>_α_= 3<br>U_→_M<br>_α_= 3<br>S_→_M<br>_α_= 3<br>M_→_MM<br>_α_= 8<br>MM_→_M<br>_α_= 8<br>U_→_M<br>_α_= 8<br>S_→_M<br>_α_= 8|
269
+ |---|---|
270
+ |DANN (Ganin et al., 2016)<br>DSN (Bousmalis et al., 2016)<br>ADDA (Tzeng et al., 2017)<br>pixelDA(Bousmalis et al., 2017)<br>CDAN (Long et al., 2018)<br>WDGRL (Shen et al., 2018)<br>MCD (Saito et al., 2018)<br>CAT (Deng et al., 2019)<br>MDD (Zhang et al., 2019)<br>DRANet (Lee et al., 2021)<br>Source Only|63.1<br>93.0<br>59.8<br>64.9<br>61.1<br>90.2<br>49.1<br>57.3<br>62.3<br>98.4<br>59.9<br>15.2<br>57.5<br>95.3<br>30.3<br>17.8<br>88.2<br>90.7<br>44.8<br>42.4<br>47.9<br>89.4<br>45.7<br>45.3<br>95.0<br>96.0<br>72.0<br>68.0<br>**81.0**<br>95.6<br>29.2<br>60.4<br>58.7<br>96.0<br>42.0<br>38.3<br>37.1<br>90.6<br>34.8<br>32.5<br>60.4<br>93.6<br>63.9<br>64.3<br>22.3<br>91.4<br>46.7<br>52.2<br>58.1<br>98.2<br>74.6<br>75.5<br>37.4<br>**97.5**<br>76.1<br>66.7<br>54.1<br>95.4<br>81.0<br>65.8<br>48.9<br>93.8<br>61.3<br>62.2<br>48.7<br>97.7<br>82.3<br>62.4<br>47.6<br>93.6<br>83.2<br>64.5<br>95.2<br>97.8<br>86.5<br>40.2<br>63.3<br>96.1<br>54.2<br>31.3<br>47.9<br>91.5<br>40.8<br>53.7<br>39.6<br>88.4<br>27.8<br>47.2|
271
+ |DARSA|**96.0**<br>**98.8**<br>**92.6**<br>**90.1**<br>78.8<br>97.3<br>**87.9**<br>**83.5**|
272
+
273
+ **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).
274
+
275
+ **TST.** As demonstrated in Table 3, DARSA achieves competitive performance on this biologically relevant task. For comprehensive experimental details, refer to Appendix H.
276
+
277
+ Table 3: Summary of UDA results on the TST datasets with shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
278
+
279
+ ||DANN<br>WDGRL<br>DSN<br>ADDA<br>CAT<br>CDAN<br>Source only<br>**DARSA**|
280
+ |---|---|
281
+ |Clock-∆19 to Wildtype<br>Wildtype to Clock-∆19|79.9<br>79.6<br>79.4<br>75.1<br>77.3<br>75.0<br>73.8<br>**86.6**<br>81.5<br>79.5<br>80.9<br>72.6<br>78.6<br>73.6<br>70.4<br>**84.8**|
282
+
283
+ **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.
284
+
285
+ ## 7 CONCLUSION
286
+
287
+ 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.
288
+
289
+ 9
290
+
291
+ ## REPRODUCIBILITY STATEMENT
292
+
293
+ 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.
294
+
295
+ ## REFERENCES
296
+
297
+ - 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.
298
+
299
+ - 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.
300
+
301
+ - 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_ .
302
+
303
+ - Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. _Advances in neural information processing systems_ , 19, 2006.
304
+
305
+ - 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.
306
+
307
+ - 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.
308
+
309
+ - 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.
310
+
311
+ - Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. _Advances in neural information processing systems_ , 29, 2016.
312
+
313
+ - 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.
314
+
315
+ - David Carlson, Sunil Kumar, and Kafui Dzirasa. Multi-region local field potential recordings during a tail-suspension test. _Duke Research Data Repository_ , 2023.
316
+
317
+ - Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. _Advances in neural information processing systems_ , 26, 2013.
318
+
319
+ - 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.
320
+
321
+ - 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.
322
+
323
+ 10
324
+
325
+ - 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.
326
+
327
+ - 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.
328
+
329
+ - 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.
330
+
331
+ - 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.
332
+
333
+ - Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In _International conference on machine learning_ , pp. 1180–1189. PMLR, 2015.
334
+
335
+ - 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.
336
+
337
+ - 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.
338
+
339
+ - 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.
340
+
341
+ - 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.
342
+
343
+ Mahta HassanPour Zonoozi and Vahid Seydi. A survey on adversarial domain adaptation. _Neural Processing Letters_ , pp. 1–41, 2022.
344
+
345
+ - 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.
346
+
347
+ - 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.
348
+
349
+ - 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.
350
+
351
+ 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.
352
+
353
+ - 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.
354
+
355
+ - 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.
356
+
357
+ - Benjamin Letham, Brian Karrer, Guilherme Ottoni, and Eytan Bakshy. Constrained bayesian optimization with noisy experiments. 2019.
358
+
359
+ - 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.
360
+
361
+ 11
362
+
363
+ - 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.
364
+
365
+ - 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.
366
+
367
+ - Yitong Li, David E Carlson, et al. Extracting relationships by multi-domain matching. _Advances in Neural Information Processing Systems_ , 31, 2018.
368
+
369
+ - 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.
370
+
371
+ - Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Coupled generative adversarial networks. _arXiv preprint arXiv:1606.07536_ , 2016.
372
+
373
+ - 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.
374
+
375
+ - Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. _Advances in neural information processing systems_ , 31, 2018.
376
+
377
+ - 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.
378
+
379
+ - 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.
380
+
381
+ - 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.
382
+
383
+ - Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation: Learning bounds and algorithms. _arXiv preprint arXiv:0902.3430_ , 2009.
384
+
385
+ - Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Multiple source adaptation and the r´enyi divergence. _arXiv preprint arXiv:1205.2628_ , 2012.
386
+
387
+ - Papers with Code. Domain Adaptation. [URL removed] domain-adaptation, 2023. Online; accessed 24-Sept-2023.
388
+
389
+ - 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.
390
+
391
+ - 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.
392
+
393
+ - 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.
394
+
395
+ - Tim Sainburg, Leland McInnes, and Timothy Q Gentner. Parametric umap embeddings for representation and semisupervised learning. _Neural Computation_ , 33(11):2881–2907, 2021.
396
+
397
+ - 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.
398
+
399
+ - 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.
400
+
401
+ 12
402
+
403
+ - 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.
404
+
405
+ - Yuan Shi and Fei Sha. Information-theoretical learning of discriminative clusters for unsupervised domain adaptation. _arXiv preprint arXiv:1206.6438_ , 2012.
406
+
407
+ - Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. _Advances in neural information processing systems_ , 30, 2017.
408
+
409
+ - 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.
410
+
411
+ - Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. _arXiv preprint arXiv:1412.3474_ , 2014.
412
+
413
+ - 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.
414
+
415
+ - 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.
416
+
417
+ - 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.
418
+
419
+ - C´edric Villani. _Optimal transport: old and new_ , volume 338. Springer, 2009.
420
+
421
+ - 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.
422
+
423
+ - Mei Wang and Weihong Deng. Deep visual domain adaptation: A survey. _Neurocomputing_ , 312: 135–153, 2018.
424
+
425
+ - 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.
426
+
427
+ - 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.
428
+
429
+ - 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.
430
+
431
+ 13
432
+
433
+ ## APPENDIX
434
+
435
+ ## A RELATED WORK
436
+
437
+ **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.
438
+
439
+ **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).
440
+
441
+ **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.
442
+
443
+ **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).
444
+
445
+ **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
446
+
447
+ 14
448
+
449
+ 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.
450
+
451
+ ## B DEFINITIONS AND PROOFS
452
+
453
+ **Definition B.1.** For some _K ≥_ 0, the set of _K_ -Lipschitz functions denotes the set of functions _f_ that verify:
454
+
455
+ **==> picture [174 x 12] intentionally omitted <==**
456
+
457
+ 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 _λ_ .
458
+
459
+ **Definition B.2.** For a distribution _D_ , we define the discrepancy between two functions _f_ and _g_ as:
460
+
461
+ _γD_ ( _f, g_ ) = E _x∼D_ [ _|f_ ( _x_ ) _− g_ ( _x_ ) _|_ ]
462
+
463
+ 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.
464
+
465
+ **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:
466
+
467
+ **==> picture [140 x 12] intentionally omitted <==**
468
+
469
+ where we use _D[k]_ to represent the distribution of the _k_ -th sub-distribution.
470
+
471
+ 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] _,_
472
+
473
+ **==> picture [292 x 12] intentionally omitted <==**
474
+
475
+ _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)._
476
+
477
+ _Proof._ For a hypothesis _f_ : _X →_ [0 _,_ 1] with _f ∈_ H, we have that
478
+
479
+ **==> picture [363 x 11] intentionally omitted <==**
480
+
481
+ And then bound the RHS by taking the absolute value of differences:
482
+
483
+ **==> picture [376 x 25] intentionally omitted <==**
484
+
485
+ 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.
486
+
487
+ **==> picture [339 x 26] intentionally omitted <==**
488
+
489
+ 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,
490
+
491
+ **==> picture [362 x 49] intentionally omitted <==**
492
+
493
+ 15
494
+
495
+ 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
496
+
497
+ **==> picture [304 x 11] intentionally omitted <==**
498
+
499
+ 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_ ).
500
+
501
+ For succinctness and clarity of the following analysis in this work, as defined in Definition B.2, we express equation 18 as:
502
+
503
+ **==> picture [292 x 11] intentionally omitted <==**
504
+
505
+ where _γ[⋆]_ = min _f ∈_ H _[γ][S]_[(] _[f]_[) +] _[ γ][T]_[ (] _[f]_[)]
506
+
507
+ **Lemma B.5** (Decomposition of the Classification Error) **.** _For any hypothesis f ∈_ H _,_
508
+
509
+ **==> picture [245 x 66] intentionally omitted <==**
510
+
511
+ _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.
512
+
513
+ We can write out _γS_ ( _f_ ) = _γPS_ ( _f, gS_ ) as sub-domain specific component.
514
+
515
+ **==> picture [281 x 227] intentionally omitted <==**
516
+
517
+ With similar proof, we have:
518
+
519
+ **==> picture [318 x 30] intentionally omitted <==**
520
+
521
+ 16
522
+
523
+ **Theorem B.6** (Sub-domain-based Generalization Bound) **.**
524
+
525
+ **==> picture [324 x 30] intentionally omitted <==**
526
+
527
+ _Proof._
528
+
529
+ **==> picture [326 x 65] intentionally omitted <==**
530
+
531
+ 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.
532
+
533
+ 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).
534
+
535
+ **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:
536
+
537
+ **==> picture [317 x 31] intentionally omitted <==**
538
+
539
+ 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** .
540
+
541
+ 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.
542
+
543
+ **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,_
544
+
545
+ **==> picture [198 x 30] intentionally omitted <==**
546
+
547
+ **==> picture [381 x 12] intentionally omitted <==**
548
+
549
+ 17
550
+
551
+ _Proof._
552
+
553
+ **==> picture [337 x 153] intentionally omitted <==**
554
+
555
+ _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_ .
556
+
557
+ **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:]_
558
+
559
+ **==> picture [276 x 12] intentionally omitted <==**
560
+
561
+ _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,
562
+
563
+ **==> picture [288 x 25] intentionally omitted <==**
564
+
565
+ We can study the limits of these three terms when n _→_ + _∞_
566
+
567
+ 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]_ ).
568
+
569
+ Second, based on Lemma B.8, we have that
570
+
571
+ **==> picture [372 x 30] intentionally omitted <==**
572
+
573
+ We observe that _x �→[√] x_ is a concave function, thus by Jensen’s inequality, we have that
574
+
575
+ **==> picture [152 x 37] intentionally omitted <==**
576
+
577
+ Also By Jensen’s inequality, we have that,
578
+
579
+ **==> picture [118 x 12] intentionally omitted <==**
580
+
581
+ And from Proposition 6 in (Delon & Desolneux, 2020), we have
582
+
583
+ **==> picture [134 x 37] intentionally omitted <==**
584
+
585
+ 18
586
+
587
+ Similarly for _MW_ 1( _PT , PT[n]_[)][ the same argument holds.][Therefore we have,]
588
+
589
+ And
590
+
591
+ **==> picture [174 x 88] intentionally omitted <==**
592
+
593
+ We can conclude that:
594
+
595
+ **==> picture [322 x 71] intentionally omitted <==**
596
+
597
+ This concludes the proof.
598
+
599
+ **Theorem B.11** (Sub-domain Alignment Can Improve Domain Alignment) **.** _If the following assumptions hold:_
600
+
601
+ _**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][′]_
602
+
603
+ _Then the following inequality holds:_
604
+
605
+ **==> picture [177 x 14] intentionally omitted <==**
606
+
607
+ _where δc is_ 4 _[√] ϵ._
608
+
609
+ _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:
610
+
611
+ Thus we have,
612
+
613
+ **==> picture [326 x 135] intentionally omitted <==**
614
+
615
+ Also we prove in Theorem B.10 that:
616
+
617
+ **==> picture [156 x 11] intentionally omitted <==**
618
+
619
+ Then we conclude our proof and show that:
620
+
621
+ **==> picture [323 x 30] intentionally omitted <==**
622
+
623
+ 19
624
+
625
+ **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 _:_
626
+
627
+ _then we have_
628
+
629
+ **==> picture [271 x 40] intentionally omitted <==**
630
+
631
+ _Further, let_
632
+
633
+ **==> picture [339 x 43] intentionally omitted <==**
634
+
635
+ _denote the general generalization bound without any sub-domain information. We have for all f , ϵc_ ( _f_ ) _≤ ϵg_ ( _f_ ) + _δc_
636
+
637
+ _where δc is_ 4 _[√] ϵ._
638
+
639
+ **==> picture [398 x 324] intentionally omitted <==**
640
+
641
+ 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_ ) _}_
642
+
643
+ ## C EMPIRICAL EVIDENCE FOR ASSUMPTIONS IN THEOREM 4.7
644
+
645
+ ## C.1 GAUSSIAN DISTRIBUTION
646
+
647
+ 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.
648
+
649
+ 20
650
+
651
+ **==> picture [195 x 106] intentionally omitted <==**
652
+
653
+ **==> picture [195 x 106] intentionally omitted <==**
654
+
655
+ **==> picture [244 x 9] intentionally omitted <==**
656
+
657
+ **----- Start of picture text -----**<br>
658
+ (a) MNIST (b) MNIST-M<br>**----- End of picture text -----**<br>
659
+
660
+ Figure 4: Distributions of the learned representations
661
+
662
+ .
663
+
664
+ ## C.2 DISTANCE ASSUMPTION
665
+
666
+ 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.
667
+
668
+ 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.
669
+
670
+ |Sub-domain|Paired source-target sub-domain<br>Non-paired source-target sub-domains|
671
+ |---|---|
672
+ |0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9|5.9<br>79.4<br>9.5<br>85.5<br>7.5<br>85.4<br>11.4<br>82.6<br>7.7<br>80.5<br>11.4<br>84.8<br>7.0<br>89.5<br>11.9<br>89.6<br>8.1<br>72.8<br>9.6<br>81.2|
673
+
674
+ ## D ALGORITHM
675
+
676
+ Our framework is outlined in pseudo-code in Algorithm 1.
677
+
678
+ **Algorithm 1** Domain Adaptation via Rebalanced Sub-domain Alignment(DARSA)
679
+
680
+ **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]
681
+
682
+ ## E ANALYSIS OF FEATURE SPACE
683
+
684
+ 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
685
+
686
+ 21
687
+
688
+ 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.
689
+
690
+ **==> picture [238 x 119] intentionally omitted <==**
691
+
692
+ **==> picture [238 x 291] intentionally omitted <==**
693
+
694
+ **----- Start of picture text -----**<br>
695
+ (a) DARSA<br>(b) DANN<br>(c) CAT<br>**----- End of picture text -----**<br>
696
+
697
+ 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.
698
+
699
+ ## F ANALYSIS OF WEIGHTS
700
+
701
+ 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
702
+
703
+ 22
704
+
705
+ **==> picture [160 x 156] intentionally omitted <==**
706
+
707
+ Figure 6: Evolution of the absolute difference between the estimated target weight _w_ ˆ _T_ and the actual ground truth _wT_ across epochs.
708
+
709
+ 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.
710
+
711
+ 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.
712
+
713
+ ## G DETAILS OF EXPERIMENTAL SETUP: DIGITS DATASETS WITH LABEL SHIFTING
714
+
715
+ 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).
716
+
717
+ ## G.1 DETAILS OF THE DIGITS DATASETS WITH LABEL DISTRIBUTION SHIFTS
718
+
719
+ ## G.1.1 WEAK IMBALANCE: _α_ = 3
720
+
721
+ **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).
722
+
723
+ **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.
724
+
725
+ 23
726
+
727
+ **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.
728
+
729
+ **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.
730
+
731
+ - G.1.2 STRONG IMBALANCE: _α_ = 8
732
+
733
+ **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).
734
+
735
+ **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.
736
+
737
+ **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.
738
+
739
+ **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.
740
+
741
+ ## G.2 ADDITIONAL EMPIRICAL ANALYSIS OF OUR PROPOSED GENERALIZATION BOUND
742
+
743
+ 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.
744
+
745
+ 24
746
+
747
+ **==> picture [96 x 92] intentionally omitted <==**
748
+
749
+ **==> picture [100 x 91] intentionally omitted <==**
750
+
751
+ **==> picture [96 x 93] intentionally omitted <==**
752
+
753
+ **==> picture [100 x 92] intentionally omitted <==**
754
+
755
+ **==> picture [396 x 125] intentionally omitted <==**
756
+
757
+ **----- Start of picture text -----**<br>
758
+ (a) Domain Discrepancy (b) Source Clf Loss (c) Domain Discrepancy (d) Source Clf Loss<br>(e) Domain Discrepancy (f) Source Clf Loss (g) Domain Discrepancy (h) Source Clf Loss<br>**----- End of picture text -----**<br>
759
+
760
+ 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.
761
+
762
+ **==> picture [96 x 93] intentionally omitted <==**
763
+
764
+ **==> picture [100 x 96] intentionally omitted <==**
765
+
766
+ **==> picture [96 x 93] intentionally omitted <==**
767
+
768
+ **==> picture [100 x 96] intentionally omitted <==**
769
+
770
+ **==> picture [396 x 129] intentionally omitted <==**
771
+
772
+ **----- Start of picture text -----**<br>
773
+ (a) Domain Discrepancy (b) Source Clf Loss (c) Domain Discrepancy (d) Source Clf Loss<br>(e) Domain Discrepancy (f) Source Clf Loss (g) Domain Discrepancy (h) Source Clf Loss<br>**----- End of picture text -----**<br>
774
+
775
+ 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.
776
+
777
+ ## G.3 EVALUATE DARSA ON VARYING IMBALANCE RATES
778
+
779
+ 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.
780
+
781
+ 25
782
+
783
+ Source: USPS - even : odd digit = 1: _α_ Target: MNIST - odd : even digit = _α_ :1
784
+
785
+ Table 5: Summary of UDA results on USPS to MNIST adaptation with varying imbalance rates
786
+
787
+ |_α_|1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10|
788
+ |---|---|
789
+ |Accuracy (%)|97.1<br>92.8<br>92.6<br>92.1<br>85.8<br>93.3<br>88.1<br>87.9<br>77.4<br>71.3|
790
+
791
+ ## G.4 THE RATIONALE FOR COMPETING ALGORITHMS CHOICES
792
+
793
+ 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.
794
+
795
+ ## G.5 MODEL STRUCTURES
796
+
797
+ 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.
798
+
799
+ ## G.6 ABLATION STUDY
800
+
801
+ 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.
802
+
803
+ ## G.7 EVALUATE DARSA ON BENCHMARKS WITHOUT ADDITIONAL LABEL DISTRIBUTION SHIFTS
804
+
805
+ 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.
806
+
807
+ ## G.8 MODEL HYPERPARAMETERS
808
+
809
+ 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
810
+
811
+ 26
812
+
813
+ Table 6: Ablation study results. Each row represents a configuration with different _λ_ values. The last column reports the prediction accuracy (%) for each configuration.
814
+
815
+ |Experiment|_λY_|_λD_|_λa_|_λc_|Accuracy|
816
+ |---|---|---|---|---|---|
817
+ |M_→_MM<br>M_→_MM<br>M_→_MM<br>M_→_MM<br>M_→_MM|0.4<br>0<br>0.4<br>0.4<br>0.4|0.35<br>0.35<br>0<br>0.35<br>0.35|0.9<br>0.9<br>0.9<br>0<br>0.9|1<br>1<br>1<br>1<br>0|96.0<br>61.3<br>72.5<br>61.9<br>33.5|
818
+ |MM_→_M<br>MM_→_M<br>MM_→_M<br>MM_→_M<br>MM_→_M|1<br>0<br>1<br>1<br>1|0.5<br>0.5<br>0<br>0.5<br>0.5|1<br>1<br>1<br>1<br>0|1<br>1<br>1<br>0<br>1|98.8<br>96.7<br>98.4<br>15<br>98.2|
819
+ |U_→_M<br>U_→_M<br>U_→_M<br>U_→_M<br>U_→_M|1<br>0<br>1<br>1<br>1|0.5<br>0.5<br>0<br>0.5<br>0.5|1<br>1<br>1<br>0<br>1|1<br>1<br>1<br>1<br>0|92.60<br>65.90<br>85.80<br>76.20<br>58.40|
820
+ |S_→_M<br>S_→_M<br>S_→_M<br>S_→_M<br>S_→_M|0.95<br>0<br>0.95<br>0.95<br>0.95|0.11<br>0.11<br>0<br>0.11<br>0.11|0.11<br>0.11<br>0.11<br>0.11<br>0|0.3<br>0.3<br>0.3<br>0<br>0.3|90.1<br>77.9<br>86.1<br>64.3<br>84.9|
821
+
822
+ **==> picture [179 x 90] intentionally omitted <==**
823
+
824
+ **==> picture [179 x 90] intentionally omitted <==**
825
+
826
+ **==> picture [360 x 121] intentionally omitted <==**
827
+
828
+ **----- Start of picture text -----**<br>
829
+ (a) No LY (b) No LD<br>(c) No Lintra (d) No Linter<br>**----- End of picture text -----**<br>
830
+
831
+ 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.
832
+
833
+ .
834
+
835
+ 27
836
+
837
+ Table 7: Summary of UDA results on the Digits datasets without shifted label distribution, measured in terms of prediction accuracy (%) on the target domain.
838
+
839
+ ||DANN<br>WDGRL<br>DSN<br>ADDA<br>CAT<br>CDAN<br>pixelDA<br>DRANet<br>DARSA|
840
+ |---|---|
841
+ |U_→_M<br>S_→_M|74.5<br>84.8<br>91.0<br>90.1<br>80.9<br>98.0<br>87.6<br>97.8<br>97.4<br>73.9<br>59.3<br>82.7<br>76.0<br>98.1<br>89.2<br>71.6<br>59.7<br>98.6|
842
+
843
+ Table 8: Model hyperparameters used for Digits datasets with weak imbalance _α_ = 3
844
+
845
+ ||MNIST to<br>MNIST-M<br>MNIST-M to<br>MNIST<br>USPS to<br>MNIST<br>SVHN to<br>MNIST|
846
+ |---|---|
847
+ |DARSA|batch size = 512,<br>_α_= 0_._01,_λY_ = 0_._4,<br>_λD_ = 0_._35,_λc_ = 1,<br>_λa_ = 0_._9,<br>m = 30<br>SGD,momentum = 0.5<br>batch size = 512,<br>_α_= 0_._01,_λY_ = 1,<br>_λD_ = 0_._5,_λc_ = 1,<br>_λa_ = 1,<br>m = 30<br>SGD,momentum = 0.4<br>batch size = 256,<br>,_α_= 0_._01,_λY_ = 1,<br>_λD_ = 0_._5,_λc_ = 1,<br>_λa_ = 1,<br>m = 30<br>SGD,momentum = 0.4<br>batch size = 256,<br>_α_= 0_._05,_λY_ = 0_._95,<br>_λD_ = 0_._11,_λc_ = 0_._3,<br>_λa_ = 0_._11,<br>m = 50<br>SGD,momentum = 0.4|
848
+ |DANN|batch size = 32<br>Adam,<br>learningrate = 1e-4<br>batch size = 32<br>Adam,<br>learningrate = 1e-5<br>batch size = 32<br>Adam,<br>learningrate = 1e-4<br>batch size = 64<br>Adam,<br>learningrate = 1e-4|
849
+ |WDGRL|batch size = 32<br>Adam,<br>learning rate = 1e-5,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 3<br>batch size = 64<br>Adam,<br>learning rate = 1e-4,<br>_γ_ = 10,<br>critic training step: 5,<br>feature extractor<br>and discriminator<br>trainingstep: 10<br>batch size = 32<br>Adam,<br>learning rate = 1e-4,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 2<br>batch size = 32<br>Adam,<br>learning rate = 1e-5,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 3|
850
+ |DSN|batch size = 32<br>SGD, momentum = 0.8,<br>learning rate = 1e-2,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._25<br>batch size = 32<br>SGD, momentum = 0.8,<br>learning rate = 0.01,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._25<br>batch size = 32<br>SGD, momentum = 0.8,<br>learning rate = 0.01,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._4<br>batch size = 512<br>SGD, momentum = 0.5,<br>learning rate = 1e-5,<br>_α_= 0_._046,<br>_β_ = 0_._61_, γ_ = 0_._92|
851
+ |ADDA|batch size = 64<br>Adam,<br>learning rate = 1e-3,<br>critic training step: 1,<br>target model<br>trainingstep: 10<br>batch size =64<br>Adam,<br>learning rate = 1e-5,<br>critic training step: 1,<br>target model<br>trainingstep: 1<br>batch size = 64<br>Adam,<br>learning rate = 1e-3,<br>critic training step: 1,<br>target model<br>trainingstep: 1<br>batch size = 64<br>Adam,<br>learning rate = 1e-3,<br>critic training step: 3,<br>target model<br>trainingstep: 2|
852
+ |CAT|batch size = 512<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 256<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30|
853
+ |CDAN|batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =0.01<br>batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =0.01<br>batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =0.01<br>batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =0.1|
854
+ |pixelDA|batch size = 64<br>Adam<br>learning rate =0.0002,<br>dim of the<br>noise input: 10<br>batch size = 64<br>Adam<br>learning rate =0.0002,<br>dim of the<br>noise input: 10<br>batch size = 32<br>Adam,<br>learning rate =0.0001,<br>dim of the<br>noise input: 20<br>batch size = 32<br>Adam,<br>learning rate =0.0001,<br>dim of the<br>noise input: 20|
855
+ |DRANet|batch size = 32<br>Adam<br>batch size = 32<br>Adam<br>batch size = 32<br>Adam<br>batch size = 32<br>Adam|
856
+ |MCD|batch size = 128<br>learningrate = 0.01<br>batch size = 128<br>learningrate = 0.01<br>batch size = 128<br>learningrate = 0.01<br>batch size = 128<br>learningrate = 0.01|
857
+ |MDD|batch size = 128<br>learning rate = 0.01<br>batch size = 128<br>learning rate = 0.01<br>batch size = 128<br>learning rate = 0.01<br>batch size = 128<br>learning rate = 0.01|
858
+
859
+ stated, we resort to the default hyperparameters from the respective implementations of the benchmark.).
860
+
861
+ 28
862
+
863
+ Table 9: Model hyperparameters used for Digits datasets with strong imbalance _α_ = 8
864
+
865
+ ||MNIST to<br>MNIST-M<br>MNIST-M to<br>MNIST<br>USPS to<br>MNIST<br>SVHN to<br>MNIST|
866
+ |---|---|
867
+ |DARSA|batch size = 1024,<br>_α_= 0_._01,_λY_ = 0_._8,<br>_λD_ = 0_._4,_λc_ = 0_._9,<br>_λa_ = 0_._9,<br>m = 30<br>SGD,momentum = 0.5<br>batch size = 1024,<br>_α_= 0_._01,_λY_ = 1,<br>_λD_ = 0_._5,_λc_ = 1,<br>_λa_ = 0_._5,<br>m = 30<br>SGD,momentum = 0.4<br>batch size = 1024,<br>,_α_= 0_._01,_λY_ = 1,<br>_λD_ = 0_._1,_λc_ = 1,<br>_λa_ = 1,<br>m = 30<br>SGD,momentum = 0.4<br>batch size = 1024,<br>_α_= 0_._01,_λY_ = 0_._95,<br>_λD_ = 0_._11,_λc_ = 1,<br>_λa_ = 1,<br>m = 50<br>SGD,momentum = 0.4|
868
+ |DANN|batch size = 64<br>Adam,<br>learningrate = 1e-3<br>batch size = 256<br>Adam,<br>learningrate = 1e-6<br>batch size = 64<br>Adam,<br>learningrate = 1e-4<br>batch size = 128<br>Adam,<br>learningrate = 1e-3|
869
+ |WDGRL|batch size = 64<br>Adam,<br>learning rate = 1e-4,<br>_γ_ = 10,<br>critic training step: 5,<br>feature extractor<br>and discriminator<br>trainingstep: 10<br>batch size = 128<br>Adam,<br>learning rate = 1e-5,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 5<br>batch size = 64<br>Adam,<br>learning rate = 1e-4,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 4<br>batch size = 64<br>Adam,<br>learning rate = 1e-6,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 3|
870
+ |DSN|batch size = 32<br>SGD, momentum = 0.8,<br>learning rate = 1e-2,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._25<br>batch size = 32<br>SGD, momentum = 0.8,<br>learning rate = 1e-2,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._25<br>batch size = 64<br>SGD, momentum = 0.8,<br>learning rate = 1e-2,<br>_α_= 0_._01,<br>_β_ = 0_._075_, γ_ = 0_._4<br>batch size = 256<br>SGD, momentum = 0.1,<br>learning rate = 1e-4,<br>_α_= 0_._046,<br>_β_ = 0_._075_, γ_ = 0_._25|
871
+ |ADDA|batch size = 128<br>Adam,<br>learning rate = 1e-5,<br>critic training step: 1,<br>target model<br>trainingstep: 1<br>batch size =256<br>Adam,<br>learning rate = 1e-6,<br>critic training step: 2,<br>target model<br>trainingstep: 1<br>batch size = 128<br>Adam,<br>learning rate = 1e-5,<br>critic training step: 1,<br>target model<br>trainingstep: 1<br>batch size = 128<br>Adam,<br>learning rate = 1e-6,<br>critic training step: 4,<br>target model<br>trainingstep: 1|
872
+ |CAT|batch size = 512<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 256<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30<br>batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 30|
873
+ |CDAN|batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =1e-3<br>batch size = 128<br>SGD, momentum = 0.5,<br>learningrate =0.1<br>batch size = 64<br>SGD, momentum = 0.9,<br>learningrate =0.01<br>batch size = 16<br>SGD, momentum = 0.1,<br>learningrate =1e-4|
874
+ |pixelDA|batch size = 64<br>Adam<br>learning rate =0.0002,<br>dim of the<br>noise input: 10<br>batch size = 64<br>Adam<br>learning rate =0.0002,<br>dim of the<br>noise input: 20<br>batch size = 32<br>Adam,<br>learning rate =0.001,<br>dim of the<br>noise input: 20<br>batch size = 32<br>Adam,<br>learning rate =0.001,<br>dim of the<br>noise input: 20|
875
+ |DRANet|batch size = 32<br>Adam<br>batch size = 32<br>Adam<br>batch size = 32<br>Adam<br>batch size = 32<br>Adam|
876
+ |MCD|batch size = 128<br>learningrate = 0.1<br>batch size = 128<br>learningrate = 0.01<br>batch size = 128<br>learningrate = 0.01<br>batch size = 128<br>learningrate = 0.01|
877
+ |MDD|batch size = 128<br>learning rate = 0.1<br>batch size = 128<br>learning rate = 0.01<br>batch size = 128<br>learning rate = 0.01<br>batch size = 128<br>learning rate = 0.01|
878
+
879
+ ## H DETAILS OF EXPERIMENTAL SETUP: TST DATASET WITH SHIFTED LABEL DISTRIBUTION
880
+
881
+ 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.
882
+
883
+ 29
884
+
885
+ ## H.1 DETAILS OF THE TST DATASET WITH SHIFTED LABEL DISTRIBUTION
886
+
887
+ 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.
888
+
889
+ ## H.2 MODEL STRUCTURES
890
+
891
+ 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.
892
+
893
+ ## H.3 MODEL HYPERPARAMETERS
894
+
895
+ 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.).
896
+
897
+ ## I ACCESSIBILITY OF THE DATASETS AND COMPUTING RESOURCES
898
+
899
+ **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.
900
+
901
+ **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.
902
+
903
+ 30
904
+
905
+ Table 10: Model hyperparameters used for the label distribution shifting TST datasets
906
+
907
+ ||Clock-∆19 to Wildtype<br>Wildtype to Clock-∆19|
908
+ |---|---|
909
+ |DARSA|batch size = 128,<br>_α_=1e-4,_λY_ = 1,<br>_λD_ = 0_._4,_λc_ = 0_._1,<br>_λa_ = 0_._9,<br>m = 50<br>SGD,momentum = 0.6<br>batch size = 128,<br>_α_= 0_._001,_λY_ = 0_._7,<br>_λD_ = 0_._1,_λc_ = 0_._1,<br>_λa_ = 1,<br>m = 50<br>SGD,momentum = 0.3|
910
+ |DANN|batch size = 32<br>Adam,<br>learningrate = 1e-4<br>batch size = 32<br>Adam,<br>learningrate = 1e-4|
911
+ |WDGRL|batch size = 32<br>Adam,<br>learning rate = 1e-4,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 2<br>batch size = 32<br>Adam,<br>learning rate = 1e-5,<br>_γ_ = 10,<br>critic training step: 1,<br>feature extractor<br>and discriminator<br>trainingstep: 3|
912
+ |DSN|batch size = 64<br>SGD, momentum = 0.5,<br>learning rate = 0.1,<br>_α_= 1,<br>_β_ = 1_, γ_ = 1<br>batch size = 32<br>SGD, momentum = 0.5,<br>learning rate = 0.1,<br>_α_= 1,<br>_β_ = 1_, γ_ = 1|
913
+ |CAT|batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 3<br>batch size = 128<br>SGD,<br>learning rate =<br>0_._01<br>(1+10_p_)0_._75 ,<br>momentum = 0.9,<br>p = 0.9,<br>m = 3|
914
+ |CDAN|batch size = 64<br>SGD, momentum = 0.9,<br>learningrate = 0.1<br>batch size = 64<br>SGD, momentum = 0.9,<br>learningrate = 0.1|
915
+
916
+ 31
917
+
open_review/iclr2024_8562.json ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8562",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicry",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 5,
10
+ 8,
11
+ 6
12
+ ],
13
+ "score_mean": 6.33,
14
+ "score_variance": 2.33,
15
+ "score_spread": 3,
16
+ "score_min": 5,
17
+ "score_max": 8,
18
+ "decision": "Accept (poster)",
19
+ "rebuttal_validity_ground_truth": true,
20
+ "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.",
21
+ "forum_id": "4g02l2N2Nx",
22
+ "primary_area": "representation learning for computer vision, audio, language, and other modalities",
23
+ "n_reviews": 3,
24
+ "per_review": [
25
+ {
26
+ "reviewer": "Reviewer_ZtxG",
27
+ "review_id": "Txr5iZ6dGK",
28
+ "scores": {
29
+ "rating": 5,
30
+ "soundness": 3,
31
+ "presentation": 2,
32
+ "contribution": 3,
33
+ "confidence": 4
34
+ },
35
+ "review_text_chars": 1515,
36
+ "edit_detected": true,
37
+ "edit_delta_seconds": 673446,
38
+ "post_rebuttal_text_signal": false,
39
+ "score_mentions_in_text": []
40
+ },
41
+ {
42
+ "reviewer": "Reviewer_y6Q1",
43
+ "review_id": "4M84HaQsnE",
44
+ "scores": {
45
+ "rating": 8,
46
+ "soundness": 3,
47
+ "presentation": 4,
48
+ "contribution": 3,
49
+ "confidence": 4
50
+ },
51
+ "review_text_chars": 3372,
52
+ "edit_detected": true,
53
+ "edit_delta_seconds": 703259,
54
+ "post_rebuttal_text_signal": false,
55
+ "score_mentions_in_text": []
56
+ },
57
+ {
58
+ "reviewer": "Reviewer_PsQx",
59
+ "review_id": "a9VIdkeDR1",
60
+ "scores": {
61
+ "rating": 6,
62
+ "soundness": 3,
63
+ "presentation": 2,
64
+ "contribution": 3,
65
+ "confidence": 4
66
+ },
67
+ "review_text_chars": 1237,
68
+ "edit_detected": true,
69
+ "edit_delta_seconds": 802398,
70
+ "post_rebuttal_text_signal": false,
71
+ "score_mentions_in_text": []
72
+ }
73
+ ],
74
+ "any_review_edit_detected": true,
75
+ "any_post_rebuttal_text_signal": false,
76
+ "review_score_dimensions": [
77
+ "rating",
78
+ "soundness",
79
+ "presentation",
80
+ "contribution",
81
+ "confidence"
82
+ ]
83
+ }
open_review/iclr2024_8562.md ADDED
@@ -0,0 +1,665 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## THE HEDGEHOG & THE PORCUPINE: EXPRESSIVE LINEAR ATTENTIONS WITH SOFTMAX MIMICRY
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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:
14
+
15
+ - **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).
16
+
17
+ - **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).
18
+
19
+ 1
20
+
21
+ **==> picture [396 x 116] intentionally omitted <==**
22
+
23
+ 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
24
+
25
+ - **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.
26
+
27
+ 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).
28
+
29
+ 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:
30
+
31
+ - **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).
32
+
33
+ - **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).
34
+
35
+ 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.
36
+
37
+ 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.
38
+
39
+ We validate experimentally that Hedgehog’s improved expressivity translates to closing the softmax attention performance gap in the three regimes mentioned above:
40
+
41
+ 2
42
+
43
+ - **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).
44
+
45
+ - **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.
46
+
47
+ - **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.
48
+
49
+ 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).
50
+
51
+ ## 2 PRELIMINARIES AND RELATED WORK
52
+
53
+ 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.
54
+
55
+ **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):
56
+
57
+ **==> picture [340 x 28] intentionally omitted <==**
58
+
59
+ 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.
60
+
61
+ **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:
62
+
63
+ **==> picture [259 x 28] intentionally omitted <==**
64
+
65
+ **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).
66
+
67
+ ## 3 IMPROVING LINEAR ATTENTION VIA SPIKY AND MONOTONIC WEIGHTS
68
+
69
+ 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.
70
+
71
+ 3
72
+
73
+ **==> picture [397 x 124] intentionally omitted <==**
74
+
75
+ 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).
76
+
77
+ **==> picture [396 x 68] intentionally omitted <==**
78
+
79
+ 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).
80
+
81
+ ## 3.1 PROPERTIES FOR EXPRESSIVE ATTENTION MAPS
82
+
83
+ 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.
84
+
85
+ **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).
86
+
87
+ 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.
88
+
89
+ **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
90
+
91
+ 4
92
+
93
+ ||BERT-FT|1|+ ELU|ReLU|Performer|cosFormer|exp(t = 1)|exp(t = 2)|
94
+ |---|---|---|---|---|---|---|---|---|
95
+ |Matthew’s correlation|**58.8**||28.1|39.5|24.7|39.9|45.9|50.0|
96
+
97
+ 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.
98
+
99
+ _decreased_ attention weights. Later in Sec 3.2, we find this corresponds to failing to recover original performance when converting finetuned Transformers.
100
+
101
+ ## 3.2 EXPLAINING THE LINEAR ATTENTION PERFORMANCE GAP
102
+
103
+ 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.
104
+
105
+ **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).
106
+
107
+ **==> picture [160 x 103] intentionally omitted <==**
108
+
109
+ 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.
110
+
111
+ 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.
112
+
113
+ Figure 4: Associative recall performance strongly corresponds to lower attention entropy; present in softmax attention but not prior linear variants.
114
+
115
+ **Finetuned-conversion** . We next compare how various
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ ## 4 HEDGEHOG: EXPRESSIVE LINEAR ATTENTION VIA SOFTMAX MIMICRY
122
+
123
+ 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.
124
+
125
+ 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
126
+
127
+ > 1[URL removed]
128
+
129
+ 5
130
+
131
+ 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.
132
+
133
+ ## 4.1 SIMPLE POLYNOMIAL APPROXIMATIONS TO SOFTMAX ATTENTION
134
+
135
+ 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).
136
+
137
+ 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.
138
+
139
+ **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.
140
+
141
+ **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.
142
+
143
+ ## 4.2 LEARNABLE LINEAR ATTENTIONS FOR MIMICKING SOFTMAX
144
+
145
+ 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.
146
+
147
+ **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
148
+
149
+ |Method|Complexity|Spiky?|Mono-<br>tonic?|Train-from-<br>scratch (acc)|BERT-FT<br>(MC)|**Taylor Spikiness**|**Taylor Monotonicity**|
150
+ |---|---|---|---|---|---|---|---|
151
+ |Softmax|_O_(_n_2_d_)|✓|✓|100.0|58.8|||
152
+ |1 + ELU|**_O_(****_nd_2)**|✗|✗|17.0|28.1|||
153
+ |Performer|_O_(_nd′_2)|✗|✗|17.0|24.7|||
154
+ |CosFormer|**_O_(****_nd_2)**|✗|✗|17.0|39.9|||
155
+ |Taylor Exp|_O_(_nd_3)|✓|✓|**100.0**|**58.4**|||
156
+
157
+ Table 2: Summary of feature maps compared to softmax, exhibiting an efficiency vs. expressivity tradeoff.
158
+
159
+ Figure 5: Taylor approximation recovers spikiness and monotonicity
160
+
161
+ 6
162
+
163
+ 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
164
+
165
+ **==> picture [292 x 17] intentionally omitted <==**
166
+
167
+ **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]
168
+
169
+ **==> picture [316 x 28] intentionally omitted <==**
170
+
171
+ 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.
172
+
173
+ ## 5 EXPERIMENTS
174
+
175
+ 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).
176
+
177
+ ## 5.1 BENCHMARKING HEDGEHOG FOR EXPRESSIVITY AND EFFICIENCY
178
+
179
+ 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?
180
+
181
+ **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.
182
+
183
+ **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_ .
184
+
185
+ **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
186
+
187
+ |Method|Complexity|AR|BERT-FT|
188
+ |---|---|---|---|
189
+ |Softmax|_O_(_n_2_d_)|100.0|58.8|
190
+ |Taylor Exp|_O_(_nd_3)|100.0|58.4|
191
+ |Hedgehog|**_O_(****_nd_2)**|**100.0**|**59.2**|
192
+
193
+ 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.
194
+
195
+ **==> picture [179 x 69] intentionally omitted <==**
196
+
197
+ Figure 6: Hedgehog linear scaling in wallclock time (left) and memory (right). Unlike the Taylor approx., Hedgehog inference gets real-world gains over FlashAttention.
198
+
199
+ 7
200
+
201
+ **==> picture [396 x 55] intentionally omitted <==**
202
+
203
+ 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).
204
+
205
+ |Dataset|HH<br>(CoLA)|HH<br>(WT-103)|T2R-HH<br>(CoLA)|HH<br>(No Train)|1 +<br>ELU|Performer|CosFormer|
206
+ |---|---|---|---|---|---|---|---|
207
+ |CoLA|**0.172**|0.352|0.191|0.694|1.223|1.293|1.196|
208
+ |MRPC|0.663|**0.485**|1.128|1.250|2.165|2.234|1.982|
209
+ |MNLI|**0.345**|0.382|0.613|0.851|1.51|1.581|1.338|
210
+ |QNLI|0.671|**0.444**|1.126|1.139|1.968|2.069|1.817|
211
+
212
+ **==> picture [99 x 54] intentionally omitted <==**
213
+
214
+ 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.).
215
+
216
+ Figure 8: Hedgehog ablated attention weights.
217
+
218
+ **==> picture [228 x 49] intentionally omitted <==**
219
+
220
+ |Seq. Len|256|1024|2048|4096|
221
+ |---|---|---|---|---|
222
+ |CoLA KL|0.182|0.187|0.190|0.181|
223
+
224
+ Table 5: Hedgehog attention maintains fidelity with softmax attention over context lengths for BERT-FT on CoLA.
225
+
226
+ Figure 9: Hedgehog trained on CoLA and WT-103 recover softmax attentions on MRPC data.
227
+
228
+ 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.
229
+
230
+ 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).
231
+
232
+ **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.
233
+
234
+ 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.
235
+
236
+ ## 5.2 LEARNING SEQUENCE MODELING FROM SCRATCH
237
+
238
+ 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.,
239
+
240
+ 8
241
+
242
+ |Model<br>ListOps|Model<br>ListOps|Text<br>Retrieval|Text<br>Retrieval|Image<br>Pathfnder<br>Average|Image<br>Pathfnder<br>Average|Image<br>Pathfnder<br>Average|
243
+ |---|---|---|---|---|---|---|
244
+ |Transformer|36.37|64.27|57.46|42.44|71.40|54.39|
245
+ |Local Att<br>Linear Trans.<br>Reformer<br>Sparse Trans.<br>Sinkhorn Trans.<br>Linformer<br>Performer<br>Synthesizer<br>Longformer<br>BigBird<br>Nystrmformer_†_<br>cosFormer_†_<br>Skyformer_†_|15.82<br>16.13<br>37.27<br>17.07<br>33.67<br>35.70<br>18.01<br>36.99<br>35.63<br>36.05<br>37.15<br>37.90<br>**39.25**|52.98<br>**65.90**<br>56.10<br>63.58<br>61.20<br>53.94<br>65.40<br>61.68<br>62.85<br>64.02<br>65.52<br>63.41<br>64.70|53.39<br>53.09<br>53.40<br>59.59<br>53.83<br>52.27<br>53.82<br>54.67<br>56.89<br>59.29<br>79.56<br>61.36<br>82.06|41.46<br>42.34<br>38.07<br>44.24<br>41.23<br>38.56<br>42.77<br>41.61<br>42.22<br>40.83<br>41.58<br>**43.17**<br>40.77|66.63<br>75.30<br>68.50<br>71.71<br>67.45<br>76.34<br>**77.05**<br>69.45<br>69.71<br>74.87<br>70.94<br>70.33<br>70.73|46.06<br>50.55<br>50.67<br>51.24<br>51.29<br>51.36<br>51.41<br>52.88<br>53.46<br>55.01<br>58.95<br>55.23<br>59.50|
246
+ |Hedgehog|37.15|64.60|**82.24**|40.15|74.16|**59.66**|
247
+
248
+ 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.
249
+
250
+ |Model|Transformer|Performer|Reformer|AFT|(1|+ ELU)|Hedgehog|
251
+ |---|---|---|---|---|---|---|---|
252
+ |Perplexity|**18.6**|26.8|25.6|28.2||25.6|20.8|
253
+
254
+ 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%.
255
+
256
+ 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.
257
+
258
+ ## 5.3 FINETUNED CONVERSION OF QUADRATIC TO LINEAR TRANSFORMERS
259
+
260
+ 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).
261
+
262
+ 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.
263
+
264
+ ## 5.4 PRETRAINED CONVERSION FOR SUBQUADRATIC TASK TRANSFER
265
+
266
+ 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.
267
+
268
+ 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
269
+
270
+ 9
271
+
272
+ 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).
273
+
274
+ |Method|CoLA|SST2|MRPC|STS-B|QQP|MNLI|QNLI|RTE|(%) Recover|Top-1|Acc. %|
275
+ |---|---|---|---|---|---|---|---|---|---|---|---|
276
+ |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|
277
+ |T2R|43.6|87.7|83.0|78.6|86.7|78.9|84.6|54.1|88.9|||
278
+ |T2R-HH|56.9|90.9|89.1|77.7|90.0|77.4|84.5|56.3|93.5|T2R-HH|77.0|
279
+ |Hedgehog|**59.2**|**92.6**|**90.1**|**87.4**|**91.0**|**82.6**|**89.6**|**69.3**|**99.3**|Hedgehog|**79.5**|
280
+ |Table 8: <br>original|Finetuned-conversion evaluation. <br>fnetuned BERT (BERT-FT) GLUE|||||Hedgehog recovers <br>performance.|||99.3% of|Table 9:<br>Hedgehog<br>achieve 99% ViT acc.||
281
+
282
+ Table 8: Finetuned-conversion evaluation. Hedgehog recovers 99.3% of original finetuned BERT (BERT-FT) GLUE performance.
283
+
284
+ |Method<br>GPT-2<br>GPT-2 FT<br>Hybrid H3<br>Hyena<br>T2R-GPT-2<br>HH-GPT-2<br>PPL<br>28.0<br>15.8<br>18.5<br>18.5<br>19.4<br>**16.7**<br>Table 10: Pretrained-conversion for 125M GPT-2 on WT-103 lang.|Llama-2<br>R1 / R2 / RL|
285
+ |---|---|
286
+ ||Softmax (Zero-shot)<br>19.3 / 6.8 / 14.9<br>Softmax (LoRA)<br>51.1 / 27.6 / 43.5|
287
+ ||T2R (LoRA)<br>2.8 / 0.0 / 2.6<br>Hedgehog (LoRA)<br>**47.4 / 23.4 / 39.1**|
288
+
289
+ 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.
290
+
291
+ Table 11: Hedgehog Llama-2 conversion (ROUGE).
292
+
293
+ ## 6 CONCLUSION
294
+
295
+ 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.
296
+
297
+ 10
298
+
299
+ ## REFERENCES
300
+
301
+ Josh Alman and Zhao Song. Fast attention requires bounded entries. _arXiv preprint arXiv:2302.13214_ , 2023.
302
+
303
+ - 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.
304
+
305
+ - Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. _arXiv preprint arXiv:1409.0473_ , 2014.
306
+
307
+ - 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.
308
+
309
+ - 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.
310
+
311
+ - 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.
312
+
313
+ - 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.
314
+
315
+ - 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.
316
+
317
+ - 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.
318
+
319
+ - 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.
320
+
321
+ 11
322
+
323
+ - 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]
324
+
325
+ - 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.
326
+
327
+ - Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. _arXiv preprint arXiv:2305.14314_ , 2023.
328
+
329
+ - 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.
330
+
331
+ - 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.
332
+
333
+ - 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.
334
+
335
+ - 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]
336
+
337
+ - Albert Gu, Karan Goel, and Christopher R´e. Efficiently modeling long sequences with structured state spaces. _arXiv preprint arXiv:2111.00396_ , 2021.
338
+
339
+ - 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.
340
+
341
+ - 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.
342
+
343
+ - 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]
344
+
345
+ - 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.
346
+
347
+ - 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.
348
+
349
+ - 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.
350
+
351
+ 12
352
+
353
+ - 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.
354
+
355
+ - 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.
356
+
357
+ - 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.
358
+
359
+ - Hao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz, Noah A Smith, and Lingpeng Kong. Random feature attention. _arXiv preprint arXiv:2103.02143_ , 2021.
360
+
361
+ - 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.
362
+
363
+ - 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]
364
+
365
+ - 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.
366
+
367
+ - 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.
368
+
369
+ - 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.
370
+
371
+ - 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.
372
+
373
+ - 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.
374
+
375
+ - 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.
376
+
377
+ - 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.
378
+
379
+ - 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.
380
+
381
+ 13
382
+
383
+ - Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. _Transactions of the Association for Computational Linguistics_ , 7:625–641, 2019.
384
+
385
+ - 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.
386
+
387
+ - 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.
388
+
389
+ 14
390
+
391
+ ## A HEDGEHOG IMPLEMENTATION DETAILS
392
+
393
+ We provide further details on the Hedgehog feature map and attention weight distillation training.
394
+
395
+ ## A.1 MECHANICS FOR HEDGEHOG FEATURE MAP
396
+
397
+ To improve Hedgehog performance in practice, we explored variations along two additional criteria for numerical stability and improved expressivity.
398
+
399
+ **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
400
+
401
+ **==> picture [311 x 28] intentionally omitted <==**
402
+
403
+ (also performing better than dividing each element by the max over _{_ exp( _**w** i[⊤]_ _**[x]**_[ +] _**[ b]**_[)] _[}][d] i_ =1[)]
404
+
405
+ **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
406
+
407
+ **==> picture [390 x 19] intentionally omitted <==**
408
+
409
+ 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).
410
+
411
+ ## A.2 HEDGEHOG FEATURE MAP AND MODEL ARCHITECTURE
412
+
413
+ 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.
414
+
415
+ 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)
416
+
417
+ A.3 HEDGEHOG DISTILLATION AND FINETUNING IMPLEMENTATION DETAILS
418
+
419
+ 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.
420
+
421
+ 15
422
+
423
+ **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.
424
+
425
+ **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:
426
+
427
+ 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] .
428
+
429
+ 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.
430
+
431
+ 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
432
+
433
+ Listing 1: Hedgehog distillation loss for one attention head
434
+
435
+ > 2[URL removed]
436
+
437
+ 16
438
+
439
+ 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
440
+
441
+ Listing 2: Hedgehog Attention class for easy attention distillation.
442
+
443
+ > _†_ 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.
444
+
445
+ 17
446
+
447
+ 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()
448
+
449
+ Listing 3: End-to-end joint attention distillation.
450
+
451
+ ## B DEFERRED EXPERIMENTAL DETAILS
452
+
453
+ ## B.1 ASSOCIATIVE RECALL ANALYSIS (SECTION 3.2)
454
+
455
+ 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.
456
+
457
+ |Input Sequence|Next<br>Token|Vocab<br>Size|Seq.<br>Length|
458
+ |---|---|---|---|
459
+ |c9<br>k 8 j 3 ... f 1c|9|40|128|
460
+
461
+ Table 12: Associative recall task. Example from Ba et al. (2016).
462
+
463
+ **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).
464
+
465
+ **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
466
+
467
+ 18
468
+
469
+ 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).
470
+
471
+ **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).
472
+
473
+ ## B.2 BERT-BASE FINETUNED ON COLA CONVERSION (SECTION 3.2)
474
+
475
+ **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.
476
+
477
+ ## B.3 HEDGEHOG TRAINING FROM SCRATCH (SECTION 5.2)
478
+
479
+ **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).
480
+
481
+ **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.
482
+
483
+ ## B.4 HEDGEHOG FINETUNED CONVERSION (SECTION 5.3)
484
+
485
+ **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.
486
+
487
+ **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.
488
+
489
+ ## B.5 HEDGEHOG PRETRAINED CONVERSION (SECTION 5.4)
490
+
491
+ **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.
492
+
493
+ > 3[URL removed]
494
+
495
+ > 4[URL removed]
496
+
497
+ > 5[URL removed]
498
+
499
+ > 6[URL removed]
500
+
501
+ 19
502
+
503
+ **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.
504
+
505
+ 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.
506
+
507
+ 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.
508
+
509
+ 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.
510
+
511
+ 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 </s> Llama stop token.
512
+
513
+ 1 # Llama-2 prompt template for SAMSum 2 3 Summarize this dialog: 4 {input} 5 --6 Summary: 7 {output}{eos_token}
514
+
515
+ Listing 4: Llama-2 prompt template for SAMSum corpus summarization
516
+
517
+ ## C ADDITIONAL RESULTS
518
+
519
+ ## C.1 EXTENDED COMPARISON TO ATTENTION MODELS ON LRA
520
+
521
+ 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.
522
+
523
+ ## C.2 HEDGEHOG FEATURE MAP GENERALIZATION TO NEW DATA
524
+
525
+ 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.
526
+
527
+ **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-
528
+
529
+ 20
530
+
531
+ |Model<br>ListOps|Model<br>ListOps|Text<br>Retrieval|Text<br>Retrieval|Image<br>Pathfnder<br>Average|Image<br>Pathfnder<br>Average|Image<br>Pathfnder<br>Average|
532
+ |---|---|---|---|---|---|---|
533
+ |Transformer|36.37|64.27|57.46|42.44|71.40|54.39|
534
+ |Local Att<br>Linear Trans.<br>Reformer<br>Sparse Trans.<br>Sinkhorn Trans.<br>Linformer<br>Performer<br>Synthesizer<br>Longformer<br>BigBird<br>Nystrmformer_†_<br>cosFormer_†_<br>Skyformer_†_|15.82<br>16.13<br>37.27<br>17.07<br>33.67<br>35.70<br>18.01<br>36.99<br>35.63<br>36.05<br>37.15<br>37.90<br>**39.25**|52.98<br>65.90<br>56.10<br>63.58<br>61.20<br>53.94<br>65.40<br>61.68<br>62.85<br>64.02<br>65.52<br>63.41<br>64.70|53.39<br>53.09<br>53.40<br>59.59<br>53.83<br>52.27<br>53.82<br>54.67<br>56.89<br>59.29<br>79.56<br>61.36<br>82.06|41.46<br>42.34<br>38.07<br>44.24<br>41.23<br>38.56<br>**42.77**<br>41.61<br>42.22<br>40.83<br>41.58<br>43.17<br>40.77|66.63<br>75.30<br>68.50<br>71.71<br>67.45<br>76.34<br>**77.05**<br>69.45<br>69.71<br>74.87<br>70.94<br>70.33<br>70.73|46.06<br>50.55<br>50.67<br>51.24<br>51.29<br>51.36<br>51.41<br>52.88<br>53.46<br>55.01<br>58.95<br>55.23<br>59.50|
535
+ |Hedgehog|37.15|64.60|**82.24**|40.15|74.16|**59.66**|
536
+
537
+ 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 (%).
538
+
539
+ 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).
540
+
541
+ ## C.2.1 QUALITATIVE EVIDENCE OF HEDGEHOG DATA GENERALIZATION
542
+
543
+ 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).
544
+
545
+ 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.
546
+
547
+ ## C.2.2 QUANTITATIVE ANALYSIS OF HEDGEHOG DATA GENERALIZATION
548
+
549
+ 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.
550
+
551
+ ## C.2.3 HEDGEHOG DATA GENERALIZATION VIA GLUE TASK TRANSFER
552
+
553
+ 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-
554
+
555
+ 21
556
+
557
+ **==> picture [396 x 173] intentionally omitted <==**
558
+
559
+ 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.
560
+
561
+ **==> picture [396 x 172] intentionally omitted <==**
562
+
563
+ 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.
564
+
565
+ 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.
566
+
567
+ 22
568
+
569
+ |CoLA|MNLI<br>MRPC|MNLI<br>MRPC|QNLI|QQP|RTE|SST-2|STS-B|
570
+ |---|---|---|---|---|---|---|---|
571
+ |**0.173**<br>0.357<br>0.191<br>0.687|**0.340**<br>0.381<br>0.603<br>0.845|0.652<br>**0.484**<br>1.124<br>1.264|0.673<br>**0.446**<br>1.141<br>1.146|**0.374**<br>0.432<br>0.658<br>0.890|0.932<br>**0.428**<br>1.357<br>1.493|**0.211**<br>0.347<br>0.254<br>0.859|**0.275**<br>0.360|
572
+ ||||||||0.444<br>0.743|
573
+ |1.231<br>1.293<br>1.191|1.500<br>1.592<br>1.341|2.150<br>2.239<br>1.987|1.947<br>2.059<br>1.840|1.509<br>1.588<br>1.330|2.491<br>2.594<br>2.398|1.505<br>1.558<br>1.443|1.285<br>1.352<br>1.142|
574
+
575
+ 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).
576
+
577
+ ||||QQP|RTE<br>SST-2<br>STS-B|RTE<br>SST-2<br>STS-B|RTE<br>SST-2<br>STS-B|
578
+ |---|---|---|---|---|---|---|
579
+ |**58.4**<br>47.2<br>50.3|**89.4**<br>**89.4**<br>83.3|87.7<br>**89.2**<br>85.9|89.8<br>**90.4**<br>86.5|62.1<br>**62.5**<br>55.6|**91.9**<br>91.4<br>89.5|85.3<br>**86.7**<br>79.3|
580
+ |26.8<br>24.7<br>41.1|81.9<br>81.4<br>82|78.5<br>75.8<br>82.6|89.1<br>86.5<br>89.3|55.6<br>55.6<br>54.9|85.9<br>85.1<br>88.4|41.8<br>39.8<br>76.6|
581
+
582
+ 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.
583
+
584
+ ## C.3 LLAMA-2 SAMSUM GENERATIONS
585
+
586
+ 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.
587
+
588
+ 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).
589
+
590
+ 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)).
591
+
592
+ # (Input): <s> Summarize this dialog: Hannah: Hey, do you have Betty’s number? Amanda: Lemme check Hannah: <file_gif> Amanda: Sorry, can’t find it.
593
+
594
+ 23
595
+
596
+ Amanda: Ask Larry Amanda: He called her last time we were at the park together Hannah: I don’t know him well Hannah: <file_gif> 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.</s> # (Hedgehog Llama-2): Hannah is looking for Betty’s number. Amanda will text her.</s> # (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. ?
597
+
598
+ Listing 5: SAMSum Llama-2 generations after LoRA finetuning.
599
+
600
+ 24
601
+
602
+ # (Input): <s> 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.</s> # (Hedgehog Llama-2): Eric and Rob are watching a stand-up comedy by a Russian comedian.</s> # (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
603
+
604
+ Listing 6: SAMSum Llama-2 generations after LoRA finetuning.
605
+
606
+ 25
607
+
608
+ # (Input): <s> 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: <file_photo> Lenny: <file_photo> Lenny: <file_photo> 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.</s> # (Hedgehog Llama-2): Lenny wants to buy a new pair of trousers. Bob suggests the first two options.</s> # (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:
609
+
610
+ Listing 7: SAMSum Llama-2 generations after LoRA finetuning.
611
+
612
+ 26
613
+
614
+ # (Input): <s> 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.</s> # (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.</s> # (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
615
+
616
+ Listing 8: SAMSum Llama-2 generations after LoRA finetuning.
617
+
618
+ ## C.4 ADDITIONAL ATTENTION WEIGHT VISUALIZATIONS
619
+
620
+ 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.
621
+
622
+ 27
623
+
624
+ **==> picture [378 x 164] intentionally omitted <==**
625
+
626
+ Figure 12: BERT attention visualizations for CoLA. Head 1; 1st, 6th, and 12th layers.
627
+
628
+ **==> picture [378 x 163] intentionally omitted <==**
629
+
630
+ Figure 13: BERT attention visualizations for CoLA. Head 6; 1st, 6th, and 12th layers.
631
+
632
+ **==> picture [378 x 164] intentionally omitted <==**
633
+
634
+ Figure 14: BERT attention visualizations for CoLA. Head 12; 1st, 6th, and 12th layers.
635
+
636
+ 28
637
+
638
+ **==> picture [378 x 164] intentionally omitted <==**
639
+
640
+ Figure 15: BERT attention visualizations for RTE. Head 0; 1st, 6th, and 12th layers.
641
+
642
+ **==> picture [378 x 163] intentionally omitted <==**
643
+
644
+ Figure 16: BERT attention visualizations for RTE. Head 6; 1st, 6th, and 12th layers.
645
+
646
+ **==> picture [378 x 164] intentionally omitted <==**
647
+
648
+ Figure 17: BERT attention visualizations for RTE. Head 12; 1st, 6th, and 12th layers.
649
+
650
+ 29
651
+
652
+ **==> picture [378 x 164] intentionally omitted <==**
653
+
654
+ Figure 18: BERT attention visualizations for SST2. Head 1; 1st, 6th, and 12th layers.
655
+
656
+ **==> picture [378 x 163] intentionally omitted <==**
657
+
658
+ Figure 19: BERT attention visualizations for SST2. Head 6; 1st, 6th, and 12th layers.
659
+
660
+ **==> picture [378 x 164] intentionally omitted <==**
661
+
662
+ Figure 20: BERT attention visualizations for SST2. Head 12; 1st, 6th, and 12th layers.
663
+
664
+ 30
665
+
open_review/iclr2024_8564.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8564",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "How does overparametrization affect features?",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 6,
10
+ 3,
11
+ 3,
12
+ 3
13
+ ],
14
+ "score_mean": 3.75,
15
+ "score_variance": 2.25,
16
+ "score_spread": 3,
17
+ "score_min": 3,
18
+ "score_max": 6,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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 ",
22
+ "forum_id": "M8Q3XTUJP9",
23
+ "primary_area": "general machine learning (i.e., none of the above)",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_3arT",
28
+ "review_id": "gC3dyJHMli",
29
+ "scores": {
30
+ "rating": 6,
31
+ "soundness": 4,
32
+ "presentation": 4,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 2609,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 906284,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_6Vs9",
44
+ "review_id": "Jat4EyLQl2",
45
+ "scores": {
46
+ "rating": 3,
47
+ "soundness": 2,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 2097,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 968641,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_Si1X",
60
+ "review_id": "VHkphzQdam",
61
+ "scores": {
62
+ "rating": 3,
63
+ "soundness": 1,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 3583,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1040445,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_Y4Do",
76
+ "review_id": "gzhy4eCgIu",
77
+ "scores": {
78
+ "rating": 3,
79
+ "soundness": 2,
80
+ "presentation": 1,
81
+ "contribution": 2,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 4226,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1239634,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8564.md ADDED
@@ -0,0 +1,533 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - HOW DOES OVERPARAMETERIZATION AFFECT FEA TURES?
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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:
16
+
17
+ _Even after many concatenations of independently trained underparameterized networks, can we fully retrieve the expressive power and the performance of overparameterized networks?_
18
+
19
+ Our answer to this question is negative, and we summarize our contributions as follows:
20
+
21
+ 1
22
+
23
+ – 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.
24
+
25
+ - 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.
26
+
27
+ - 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.
28
+
29
+ - 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.
30
+
31
+ - 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.
32
+
33
+ ## RELATED WORK
34
+
35
+ **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.
36
+
37
+ **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.
38
+
39
+ **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]_[)] .
40
+
41
+ 2
42
+
43
+ ## 2 SETTING
44
+
45
+ ## 2.1 SCALED MODELS AND FEATURES
46
+
47
+ 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
48
+
49
+ - **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_
50
+
51
+ - **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).
52
+
53
+ 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.
54
+
55
+ 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
56
+
57
+ **==> picture [392 x 29] intentionally omitted <==**
58
+
59
+ 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.
60
+
61
+ **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_
62
+
63
+ **==> picture [269 x 19] intentionally omitted <==**
64
+
65
+ **==> picture [215 x 13] intentionally omitted <==**
66
+
67
+ ## 2.2 FEATURE SPAN ERROR
68
+
69
+ 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.
70
+
71
+ **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},_
72
+
73
+ **==> picture [380 x 31] intentionally omitted <==**
74
+
75
+ _Let_ ( _R_[2] ) _[j] be the R_[2] _-error for the regression (Reg). The feature span error FSE(Mβ →Mγ) is:_
76
+
77
+ **==> picture [292 x 30] intentionally omitted <==**
78
+
79
+ 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).
80
+
81
+ 3
82
+
83
+ 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.
84
+
85
+ ## 2.3 CONCATENATION OF LOW-WIDTH NETWORKS
86
+
87
+ 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?
88
+
89
+ **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][.]_
90
+
91
+ For _U_ in Definition 2.3, we consider the two following values:
92
+
93
+ – _U_[¯] : the smallest integer such that _Sα_[( ¯] _[U]_[)] has at least as many features as _M_ 1, i.e., _U_[¯] = _⌈_ 1 _/α⌉_ .
94
+
95
+ – _U[∗]_ : the smallest integer such that the models _Mα_[(1)] _[, . . . , M] α_[ (] _[U]_[)] collectively have at least the same number of parameters as _M_ 1.
96
+
97
+ ## 2.4 FEATURE PERFORMANCE
98
+
99
+ 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.
100
+
101
+ **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._
102
+
103
+ 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.
104
+
105
+ **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]_
106
+
107
+ **==> picture [265 x 14] intentionally omitted <==**
108
+
109
+ 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.
110
+
111
+ ## 3 NUMERICAL EXPERIMENTS
112
+
113
+ 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.
114
+
115
+ ## 3.1 EXPERIMENTAL SETUP
116
+
117
+ 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-
118
+
119
+ 4
120
+
121
+ **==> picture [384 x 105] intentionally omitted <==**
122
+
123
+ **----- Start of picture text -----**<br>
124
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 3 0 . 2<br>Sα [(] [U] [∗] [)] → T1 Sα [(] [U] [∗] [)] → RN1 0 . 2 Sα [(] [U] [∗] [)] → VGG1<br>0 . 2 T1 → T1 RN1 → RN1 VGG1 → VGG1<br>0 . 1<br>0 . 1<br>0 . 1<br>0 . 0 0 . 0 0 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Error Error Error<br>**----- End of picture text -----**<br>
125
+
126
+ 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.
127
+
128
+ 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.
129
+
130
+ - 3.2 CONCATENATION OF LOW-WIDTH NETWORKS CANNOT FULLY CAPTURE THE FEATURES OF OVERPAMETRIZED ONES AFTER TRAINING
131
+
132
+ 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):
133
+
134
+ **==> picture [331 x 13] intentionally omitted <==**
135
+
136
+ 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.
137
+
138
+ **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 _._
139
+
140
+ 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.
141
+
142
+ We establish Empirical finding 3.1 based on Figures 1 and 7, which provide the following observations:
143
+
144
+ - **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.
145
+
146
+ - – **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.
147
+
148
+ 5
149
+
150
+ **==> picture [398 x 245] intentionally omitted <==**
151
+
152
+ **----- Start of picture text -----**<br>
153
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 3 T1 → T α 0 . 4 RN1 → RN α 0 . 4 VGG1 → VGG α<br>Sα [( ¯] U ) → T α Sα [( ¯] U ) → RN α Sα [( ¯] U ) → VGG α<br>0 . 2<br>0 . 2 0 . 2<br>0 . 1<br>0 . 0 0 . 0<br>0 . 0 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>1/2 1/4 1/8 α α<br>(a) (b) (c)<br>Figure 2: FSG with respect to low-width concatenated networks features (after training). Figures 2a, 2b<br>and 2c display FSE( M 1 →Sα [( ¯] U )) in blue line and FSE( Sα [( ¯] U ) →Mα ) in red line in the Transformer, ResNet<br>and VGG settings. As α decreases, the models have lower width and M 1 further struggles to capture Mα .<br>Transformer (FP) ResNet (FP) VGG (FP)<br>95<br>95 . 0<br>80 . 0<br>92 . 5 90<br>77 . 5 Sα [(] [U] [∗] [)] Sα [(] [U] [∗] [)] Sα [(] [U] [∗] [)]<br>T1 90 . 0 RN1 85 VGG1<br>75 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Error Error<br>Error<br>Accuracy Accuracy Accuracy<br>Test Test Test<br>**----- End of picture text -----**<br>
154
+
155
+ 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.
156
+
157
+ 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.
158
+
159
+ **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.
160
+
161
+ In summary, we have showed that the low-width networks cannot fully capture the features of overparameterized networks and the converse also holds.
162
+
163
+ 3.3 CONCATENATIONS OF LOW-WIDTH NETWORKS CANNOT ACHIEVE THE PERFORMANCE OF A SINGLE OVERPARAMETERIZED NETWORK
164
+
165
+ 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.
166
+
167
+ **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 _,_
168
+
169
+ 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.
170
+
171
+ **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.
172
+
173
+ 6
174
+
175
+ **==> picture [387 x 80] intentionally omitted <==**
176
+
177
+ **----- Start of picture text -----**<br>
178
+ Transformer (FP) ResNet (FP) Transformer (FP) ResNet (FP)<br>96 . 0<br>80 . 0 95 . 0 (T1; R 1 [(] [U] → [∗] α [)][)] (RN1; R 1 [(] [U] → [∗] α [)][)]<br>T1 RN1<br>92 . 5 81 . 0 95 . 5<br>77 . 5 ( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)] ( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)]<br>Sα [(] [U] [∗] [)] 90 . 0 Sα [(] [U] [∗] [)]<br>80 . 5 95 . 0<br>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<br>α α α α<br>(a) (b) (c) (d)<br>Accuracy Accuracy Accuracy Accuracy<br>Test Test Test Test<br>**----- End of picture text -----**<br>
179
+
180
+ 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).
181
+
182
+ - 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.
183
+
184
+ - – In Figures 4c and 4d, adding _R_ ( _M_ 1 _→Sα_[(] _[U]_[)] ) to _M_ 1 does not improve the performance of _M_ 1.
185
+
186
+ ## 4 HOW DO WIDE MODELS CAPTURE FEATURES THAT SHALLOW ONES CANNOT?
187
+
188
+ 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.
189
+
190
+ **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:
191
+
192
+ 1. _**X**_ = ( _**X**_ [1] _, . . . ,_ _**X**_ [7]) _∈_ R[7] _[d]_ , where each patch _**X**_ [ _j_ ] _∈_ R _[d] ._
193
+
194
+ 2. Sample _s_ 1 _, . . . , s_ 5 such that each _sj_ is uniformly distributed over _{−_ 1 _,_ 1 _}_ .
195
+
196
+ 3. The label _y_ is defined by _y_ = sgn( _s_ 1 + _s_ 2 + _s_ 3 _· s_ 4 _· s_ 5) _._
197
+
198
+ 4. Signal patches: Uniformly sample indices _ℓ_ 1( _**X**_ ) _, . . . , ℓ_ 5( _**X**_ ) such that
199
+
200
+ **==> picture [85 x 11] intentionally omitted <==**
201
+
202
+ 5. Noisy patches: _**X**_ [ _j_ ] _∼N_ (0 _, ξ_[2] ( **I** _d −_[�][5] _i_ =1 _**[v]**[i]_ _**[v]** i[⊤]_[))] _[,]_[ for the remaining patches.]
203
+
204
+ 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.
205
+
206
+ **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
207
+
208
+ **==> picture [273 x 10] intentionally omitted <==**
209
+
210
+ 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.
211
+
212
+ 7
213
+
214
+ **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:
215
+
216
+ – 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._
217
+
218
+ – 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.
219
+
220
+ 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.
221
+
222
+ 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.
223
+
224
+ ||_n_1|_U ∗_|Average train|Average test|
225
+ |---|---|---|---|---|
226
+ ||100<br>250|300<br>120|accuracy (%)<br>75_._01_±_0_._07<br>75_._12_±_0_._25|accuracy (%)<br>74_._12_±_0_._88<br>74_._23_±_0_._74|
227
+ ||10,000|3|100_._00_±_0_._00|100_._00_±_0_._00|
228
+ ||15,000|2|100_._00_±_0_._00|100_._00_±_0_._00|
229
+ ||30,000|1|100_._00_±_0_._00|100_._00_±_0_._00|
230
+
231
+ 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.
232
+
233
+ **Training.** We train our model using binary cross entropy and normalized stochatic gradient descent for faster convergence. See the Appendix for more details.
234
+
235
+ 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_ ,
236
+
237
+ **==> picture [387 x 30] intentionally omitted <==**
238
+
239
+ 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 _._
240
+
241
+ **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_
242
+
243
+ _1. M_ 1 _learns all the signal vectors._
244
+
245
+ _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._
246
+
247
+ We now describe some important dynamics of the learning process as follows:
248
+
249
+ – **Initialization** : In order to learn _**v** k_ , the network needs to have some neurons that are _activated_ .
250
+
251
+ – **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).
252
+
253
+ – **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.
254
+
255
+ – **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.
256
+
257
+ – **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.
258
+
259
+ 8
260
+
261
+ **==> picture [395 x 108] intentionally omitted <==**
262
+
263
+ **----- Start of picture text -----**<br>
264
+ 150 v 1 α = 1 / 300 150 v 3 α = 1 / 300 1 . 0 M 1<br>α = 1 / 120 α = 1 / 120<br>50 α = 1 / 3 50 α = 1 / 3<br>25 αα == 11 / 2 25 αα == 11 / 2 v 1<br>0 . 8 v 2<br>v 3<br>3 3 v 4<br>1 1 v 5<br>0 0 0 . 6<br>1000 2500 4000 1000 2500 4000 500 4000<br># epochs # epochs # epochs<br>(a) (b) (c)<br>neurons neurons<br>activated activated Correlation<br># #<br>**----- End of picture text -----**<br>
265
+
266
+ 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.
267
+
268
+ During the training, overparameterized models learn all the signal vectors while the neurons of concetenations of low-width networks unlearn some signal vectors.
269
+
270
+ – **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).
271
+
272
+ – **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.
273
+
274
+ **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:
275
+
276
+ – 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.
277
+
278
+ **==> picture [160 x 106] intentionally omitted <==**
279
+
280
+ 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.
281
+
282
+ ## 5 CONCLUSION AND FUTURE WORK
283
+
284
+ 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.
285
+
286
+ 9
287
+
288
+ ## REFERENCES
289
+
290
+ - Zeyuan Allen-Zhu and Yuanzhi Li. Backward feature correction: How deep learning performs deep learning. _arXiv preprint arXiv:2001.04413_ , 2020.
291
+
292
+ - 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.
293
+
294
+ - 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.
295
+
296
+ - George Cybenko. Approximation by superpositions of a sigmoidal function. _Mathematics of control, signals and systems_ , 2(4):303–314, 1989.
297
+
298
+ Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. _arXiv preprint arXiv:1803.03635_ , 2018.
299
+
300
+ - 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.
301
+
302
+ - Boris Hanin and Mark Sellke. Approximating continuous functions by relu nets of minimal width. _arXiv preprint arXiv:1710.11278_ , 2017.
303
+
304
+ - 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.
305
+
306
+ - 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.
307
+
308
+ - 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.
309
+
310
+ - 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.
311
+
312
+ - 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.
313
+
314
+ - 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.
315
+
316
+ - Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
317
+
318
+ - Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. _Communications of the ACM_ , 60(6):84–90, 2017.
319
+
320
+ - Amil Merchant, Elahe Rahimtoroghi, Ellie Pavlick, and Ian Tenney. What happens to bert embeddings during fine-tuning? _arXiv preprint arXiv:2004.14448_ , 2020.
321
+
322
+ - 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.
323
+
324
+ - 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.
325
+
326
+ 10
327
+
328
+ - 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.
329
+
330
+ - 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.
331
+
332
+ - 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.
333
+
334
+ - 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.
335
+
336
+ - Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. _arXiv preprint arXiv:1409.1556_ , 2014.
337
+
338
+ - 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]
339
+
340
+ - Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. _arXiv preprint arXiv:1605.07146_ , 2016.
341
+
342
+ - Xiang Zhang, Junbo Zhao, and Yann LeCun. Character-level convolutional networks for text classification. _Advances in neural information processing systems_ , 28, 2015.
343
+
344
+ 11
345
+
346
+ ## A ADDITIONAL DETAILS AND RESULTS ON THE FSG METHOD
347
+
348
+ 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.
349
+
350
+ ## A.1 METHODOLOGY TO SOLVE THE REGRESSION PROBLEM.
351
+
352
+ 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.
353
+
354
+ – **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.
355
+
356
+ - **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].
357
+
358
+ – **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.
359
+
360
+ – **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.
361
+
362
+ ## A.2 ADDITIONAL DETAILS ABOUT EXPERIMENTAL SETUP
363
+
364
+ 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.
365
+
366
+ 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 _}_ .
367
+
368
+ 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α_ .
369
+
370
+ 12
371
+
372
+ **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.
373
+
374
+ ## A.3 MEASURING THE FSG FOR RANDOM NETWORKS
375
+
376
+ **==> picture [384 x 281] intentionally omitted <==**
377
+
378
+ **----- Start of picture text -----**<br>
379
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 3 0 . 4<br>0 . 4 Sα [(] [U] [∗] [)] [,r] → RN [r] 1<br>Sα [(] [U] [∗] [)] [,r] → T [r] 1 0 . 2 RN [r] 1 [→] [RN] [r] 1<br>0 . 2 FSE(T [r] 1 [→] [T] [r] 1 [)]<br>0 . 1 0 . 2 Sα [(] [U] [∗] [)] [,r] → VGG [r] 1<br>VGG [r] 1 [→] [VGG] [r] 1<br>0 . 0 0 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Figure 7: FSG with respect to overparameterized features (random networks). FSE( Sαα [[(]] [[U]] [[∗]] [[)]] [[,r]] →M [[r]] 1<br>FSE( M [[r]] 1 [[→M][r]][[r]] 1 [[)]] [[are]] [[displayed]] [[by]] [[blue]] [[and]] [[red]] [[lines,]] [[respectively,]] [[in]] [[the]] [[settings]] [[of]] [[Transformer,]]<br>and VGG. Unlike trained networks, the concatenated random low-width network features are capable of fitting<br>overparameterized network features effectively, regardless of their size. In fact, we observe that the<br>improves as the value of α decreases.<br>Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 6<br>0 . 4 RN [r] 1 [→] [RN] α [r] 0 . 4<br>0 . 4 Sα [( ¯] U ) ,r → RN [r] α<br>0 . 2 T [r] 1 [→] [T] α [r] 0 . 2 0 . 2 VGG [r] 1 [→] [VGG] α [r]<br>Sα [( ¯] U ) ,r → T [r] α Sα [( ¯] U ) ,r → VGG [r] α<br>0 . 0 0 . 0 0 . 0<br>1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>1/2 1/4 1/8<br>α α α<br>(a) (b) (c)<br>Error Error Error<br>Error Error Error<br>**----- End of picture text -----**<br>
380
+
381
+ 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.
382
+
383
+ 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.
384
+
385
+ ## B ADDITIONAL DETAILS ABOUT FEATURE PERFORMANCE
386
+
387
+ 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.
388
+
389
+ ## C ADDITIONAL DETAILS FOR OUR THEORETICAL SETTING
390
+
391
+ 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).
392
+
393
+ 13
394
+
395
+ ||||RN_α_|||VGG_α_|||T_α_||
396
+ |---|---|---|---|---|---|---|---|---|---|---|
397
+ ||||Average training|Average test||Average training|Average test||Average training|Average test|
398
+ |_α_|¯_U_|_U ∗_|accuracy (%)|accuracy (%)|_U ∗_|accuracy (%)|accuracy (%)|_U ∗_|accuracy (%)|accuracy (%)|
399
+ |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|
400
+ |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|
401
+ |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|
402
+ |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|
403
+ |1/16|16|254|86_._81_±_0_._19|84_._30_±_0_._28|251|75_._66_±_0_._52|76_._47_±_0_._63|-|-|-|
404
+
405
+ 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.
406
+
407
+ ## C.1 INITIALIZATION SCHEME
408
+
409
+ **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).
410
+
411
+ **Justification of the parameters choice.** We here justify the multiple choices made in the setting described above:
412
+
413
+ – 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.
414
+
415
+ 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
416
+
417
+ **==> picture [282 x 14] intentionally omitted <==**
418
+
419
+ – Orthogonality of features and noisy patches: given the orthogonal structure in _D_ , a neuron
420
+
421
+ _**W**_ 1[(0)] [ _j,_ :] can only activate a single feature. Indeed, by Pythagoras theorem, we have
422
+
423
+ **==> picture [269 x 31] intentionally omitted <==**
424
+
425
+ 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.
426
+
427
+ – 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.
428
+
429
+ ## C.2 ADDITIONAL IMPLEMENTATION DETAILS
430
+
431
+ 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.
432
+
433
+ 14
434
+
435
+ **==> picture [384 x 105] intentionally omitted <==**
436
+
437
+ **----- Start of picture text -----**<br>
438
+ v 1 v 2 Multiplication features<br>100 0 100 0 100 0<br>1 1 1<br>2<br>50 50 50 3<br>0 0 0<br>Models Models Models<br>(a) (b) (c)<br>% % %<br>100 250 10,000 15,000 30,000 100 250 10,000 15,000 30,000 100 250 10,000 15,000 30,000<br>**----- End of picture text -----**<br>
439
+
440
+ 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.
441
+
442
+ ## D ADDITIONAL EXPERIMENTAL RESULTS
443
+
444
+ 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.
445
+
446
+ ## D.1 PERFORMANCE OF FEATURE RESIDUALS ALONE
447
+
448
+ |Features||Transformer|ResNet|VGG|
449
+ |---|---|---|---|---|
450
+ |FP(_R_(_M_1 _→S_(_U∗_)<br>_α_|))|31.47_±_0.52|17.79_±_0.73|40.05_±_1.16|
451
+ |FP(_S_(_U∗_)_,r_<br>_α_<br>)||46.98_±_0.55|34.30_±_0.04|47.48_±_0.01|
452
+ |FP(_R_(_S_(_U∗_)<br>_α_<br>_→M_1))||50.97_±_0.18|53.46_±_0.03|56.42_±_0.06|
453
+ |FP(_Mr_<br>1)||51.37_±_0.28|28.73_±_0.36|19.03_±_1.03|
454
+
455
+ 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).
456
+
457
+ 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).
458
+
459
+ D.2 CONTRIBUTION OF FEATURE RESIDUALS FOR VGG
460
+
461
+ This section shows the contribution of residuals for VGG.
462
+
463
+ ## D.3 TEST ERRORS FOR THE FSG METHOD
464
+
465
+ 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.
466
+
467
+ 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
468
+
469
+ 15
470
+
471
+ **==> picture [389 x 158] intentionally omitted <==**
472
+
473
+ **----- Start of picture text -----**<br>
474
+ VGG (FP) VGG (FP)<br>95 96<br>(VGG1; R 1 [(] [U] → [∗] α [)][)]<br>95 VGG1<br>90<br>( Sα [(] [U] [∗] [)] ; Rα [(] [U] → [∗] 1 [)][)]<br>94<br>85 Sα [(] [U] [∗] [)]<br>1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α<br>(a) (b)<br>Accuracy Accuracy<br>Test Test<br>**----- End of picture text -----**<br>
475
+
476
+ 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
477
+
478
+ 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.
479
+
480
+ **==> picture [384 x 105] intentionally omitted <==**
481
+
482
+ **----- Start of picture text -----**<br>
483
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 3 0 . 2<br>Sα [(] [U] [∗] [)] → T1 Sα [(] [U] [∗] [)] → RN1 0 . 2 Sα [(] [U] [∗] [)] → VGG1<br>0 . 2 T1 → T1 RN1 → RN1 VGG1 → VGG1<br>0 . 1<br>0 . 1<br>0 . 1<br>0 . 0 0 . 0 0 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Error Error Error<br>**----- End of picture text -----**<br>
484
+
485
+ Figure 11: **Test Error: FSG with respect to overparameterized features (after training).** This figure displays the test errors corresponding to Figure 1.
486
+
487
+ **==> picture [387 x 80] intentionally omitted <==**
488
+
489
+ **----- Start of picture text -----**<br>
490
+ Transformer (FSE) 0 . 3 Resnet (FSE) VGG (FSE) 0 . 4 VGG (FSE) outliers removed<br>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<br>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<br>VGG [r] 1 [→] [VGG] [r] 1 VGG [r] 1 [→] [VGG] [r] 1<br>0 . 0 0 . 0 0 . 1<br>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<br>α α α α<br>(a) (b) (c) (d)<br>Error Error Error Error<br>**----- End of picture text -----**<br>
491
+
492
+ 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.
493
+
494
+ 16
495
+
496
+ **==> picture [384 x 116] intentionally omitted <==**
497
+
498
+ **----- Start of picture text -----**<br>
499
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>T1 → T α RN1 → RN α VGG1 → VGG α<br>0 . 4 0 . 4<br>Sα [( ¯] U ) → T α Sα [( ¯] U ) → RN α Sα [( ¯] U ) → VGG α<br>0 . 2<br>0 . 2 0 . 2<br>0 . 0 0 . 0 0 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Error Error Error<br>**----- End of picture text -----**<br>
500
+
501
+ 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.
502
+
503
+ **==> picture [384 x 116] intentionally omitted <==**
504
+
505
+ **----- Start of picture text -----**<br>
506
+ Transformer (FSE) ResNet (FSE) VGG (FSE)<br>0 . 6<br>0 . 4 RN [r] 1 [→] [RN] α [r] 0 . 4<br>0 . 4 Sα [( ¯] U ) ,r → RN [r] α<br>0 . 2 T [r] 1 [→] [T] α [r] 0 . 2 0 . 2 VGG [r] 1 [→] [VGG] α [r]<br>Sα [( ¯] U ) ,r → T [r] α Sα [( ¯] U ) ,r → VGG [r] α<br>0 . 0 0 . 0 0 . 0<br>1/2 1/4 1/8 1/2 1/4 1/8 1/16 1/2 1/4 1/8 1/16<br>α α α<br>(a) (b) (c)<br>Error Error Error<br>**----- End of picture text -----**<br>
507
+
508
+ 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.
509
+
510
+ ## D.4 SHUFFLED REGRESSION FOR VISION EXPERIMENTS
511
+
512
+ 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.
513
+
514
+ 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.
515
+
516
+ |Regression|Error|FSE(RN1 _→_RN1)|FSE(_S_(_U∗_)<br>1_/_2<br>_→_RN1)|FSE(_S_(_U∗_)<br>1_/_4<br>_→_RN1)|FSE(_S_(_U∗_)<br>1_/_8<br>_→_RN1)|FSE(_S_(_U∗_)<br>1_/_16 _→_RN1)|
517
+ |---|---|---|---|---|---|---|
518
+ |Regular|valid.<br>test|0.0236_±_0_._000106<br>0.0505_±_0_._000747|0.0201_±_3_._1_e −_05<br>0.041_±_0_._000109|0.0327_±_0_._000165<br>0.0607_±_0_._00023|0.0967_±_0_._000294<br>0.1212_±_0_._000401|0.1885_±_0_._000111<br>0.1845_±_0_._000396|
519
+ |Shuffed|valid.<br>test|0.0279_±_0_._00019<br>0.0281_±_0_._000259|0.0234_±_2_._9_e −_05<br>0.0236_±_3_._7_e −_05|0.0372_±_0_._000178<br>0.0376_±_0_._000155|0.1004_±_0_._000264<br>0.102_±_0_._000384|0.1871_±_7_e −_05<br>0.1908_±_0_._000731|
520
+
521
+ Table 4: **Shuffled Regression for Resnet**
522
+
523
+ 17
524
+
525
+ |Regression|Error|FSE(VGG1 _→_VGG1)|FSE(_S_(_U∗_)<br>1_/_2<br>_→_VGG1)|FSE(_S_(_U∗_)<br>1_/_4<br>_→_VGG1)|FSE(_S_(_U∗_)<br>1_/_8<br>_→_VGG1)|FSE(_S_(_U∗_)<br>1_/_16 _→_VGG1)|
526
+ |---|---|---|---|---|---|---|
527
+ |Regular|valid.<br>test|0.0084_±_6_._9_e −_05<br>0.0694_±_0_._000778|0.0079_±_3_._3_e −_05<br>0.0508_±_0_._000267|0.0143_±_0_._000119<br>0.0658_±_0_._000426|0.0734_±_0_._000126<br>0.1134_±_0_._000214|0.2116_±_0_._000362<br>0.209_±_0_._003072|
528
+ |Shuffed|valid.<br>test|0.0168_±_0_._000129<br>0.017_±_0_._000168|0.0145_±_5_._5_e −_05<br>0.0148_±_5_._9_e −_05|0.0224_±_0_._000183<br>0.0236_±_0_._000177|0.0791_±_0_._000118<br>0.0833_±_0_._000514|0.2101_±_0_._000295<br>0.2124_±_0_._000795|
529
+
530
+ Table 5: **Shuffled Regression for VGG**
531
+
532
+ 18
533
+
open_review/iclr2024_8566.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8566",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Relational Convolutional Networks: A framework for learning representations of hierarchical relations",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 5,
10
+ 8,
11
+ 5,
12
+ 6
13
+ ],
14
+ "score_mean": 6.0,
15
+ "score_variance": 2,
16
+ "score_spread": 3,
17
+ "score_min": 5,
18
+ "score_max": 8,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": null,
21
+ "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.",
22
+ "forum_id": "CARclfc9ci",
23
+ "primary_area": "unsupervised, self-supervised, semi-supervised, and supervised representation learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_mJyy",
28
+ "review_id": "rJvUylFhuA",
29
+ "scores": {
30
+ "rating": 5,
31
+ "soundness": 3,
32
+ "presentation": 3,
33
+ "contribution": 2,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 3541,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 539670,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_ikDu",
44
+ "review_id": "NGGCkjjhR2",
45
+ "scores": {
46
+ "rating": 8,
47
+ "soundness": 4,
48
+ "presentation": 4,
49
+ "contribution": 4,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 6893,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 728803,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": [
57
+ {
58
+ "to": 8
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "reviewer": "Reviewer_nJRP",
64
+ "review_id": "YAmSGBd0yC",
65
+ "scores": {
66
+ "rating": 5,
67
+ "soundness": 3,
68
+ "presentation": 3,
69
+ "contribution": 3,
70
+ "confidence": 3
71
+ },
72
+ "review_text_chars": 1346,
73
+ "edit_detected": true,
74
+ "edit_delta_seconds": 825845,
75
+ "post_rebuttal_text_signal": false,
76
+ "score_mentions_in_text": []
77
+ },
78
+ {
79
+ "reviewer": "Reviewer_Y5Cn",
80
+ "review_id": "ekX7n1iT89",
81
+ "scores": {
82
+ "rating": 6,
83
+ "soundness": 3,
84
+ "presentation": 3,
85
+ "contribution": 3,
86
+ "confidence": 2
87
+ },
88
+ "review_text_chars": 1574,
89
+ "edit_detected": true,
90
+ "edit_delta_seconds": 838690,
91
+ "post_rebuttal_text_signal": false,
92
+ "score_mentions_in_text": []
93
+ }
94
+ ],
95
+ "any_review_edit_detected": true,
96
+ "any_post_rebuttal_text_signal": false,
97
+ "review_score_dimensions": [
98
+ "rating",
99
+ "soundness",
100
+ "presentation",
101
+ "contribution",
102
+ "confidence"
103
+ ]
104
+ }
open_review/iclr2024_8566.md ADDED
@@ -0,0 +1,538 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## RELATIONAL CONVOLUTIONAL NETWORKS: A FRAMEWORK FOR LEARNING REPRESENTATIONS OF HIERARCHICAL RELATIONS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.”
16
+
17
+ 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.
18
+
19
+ 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.
20
+
21
+ 1
22
+
23
+ ## 1.1 RELATED WORK
24
+
25
+ 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).
26
+
27
+ **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).
28
+
29
+ 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
30
+
31
+ **==> picture [198 x 224] intentionally omitted <==**
32
+
33
+ **----- Start of picture text -----**<br>
34
+ 𝑙 𝑙<br>𝑧1 , … , 𝑧𝑛𝑙 ∈ℝ [𝑑][𝑙][×𝑛][𝑙]<br>Relational Convolution<br>𝑅 [(𝑙−1)] ∈ℝ [𝑛][𝑙−1][×𝑛][𝑙−1][×𝑟][𝑙−1]<br>Inner Product Relation<br>⋮<br>2 2<br>𝑧1 , … , 𝑧𝑛2 ∈ℝ [𝑑][2][×𝑛][2]<br>Relational Convolution<br>𝑅 [(1)] ∈ℝ [𝑛][1][×𝑛][1][×𝑟][1]<br>Inner Product Relation<br>1 1<br>𝑧1 , … , 𝑧𝑛1 ∈ℝ [𝑑][1][×𝑛][1]<br>Initial Embedder<br>𝑥1, … , 𝑥𝑛1 ∈𝕏 [𝑛][1]<br>**----- End of picture text -----**<br>
35
+
36
+ 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.
37
+
38
+ 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.
39
+
40
+ **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.
41
+
42
+ **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.
43
+
44
+ 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.
45
+
46
+ ## 2 MULTI-DIMENSIONAL INNER PRODUCT RELATION MODULE
47
+
48
+ 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
49
+
50
+ 2
51
+
52
+ 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_ ”.
53
+
54
+ 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_ .
55
+
56
+ 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,
57
+
58
+ _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)
59
+
60
+ 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.
61
+
62
+ 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,
63
+
64
+ **==> picture [346 x 19] intentionally omitted <==**
65
+
66
+ 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.
67
+
68
+ 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.
69
+
70
+ ## 3 RELATIONAL CONVOLUTIONS WITH GRAPHLET FILTERS
71
+
72
+ ## 3.1 RELATIONAL CONVOLUTIONS WITH DISCRETE GROUPS
73
+
74
+ 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.
75
+
76
+ 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
77
+
78
+ **==> picture [350 x 24] intentionally omitted <==**
79
+
80
+ 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.
81
+
82
+ 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
83
+
84
+ 3
85
+
86
+ **==> picture [358 x 194] intentionally omitted <==**
87
+
88
+ **----- Start of picture text -----**<br>
89
+ graphlet filters<br>𝒇∈ℝ [𝑠×𝑠×𝑑][𝑟][×𝑛][𝑓]<br>⋅,⋅ 𝑟𝑒𝑙 ⋅,⋅ 𝑟𝑒𝑙<br>⋅,⋅ 𝑟𝑒𝑙<br>relation subtensors ⋯<br>𝑅 𝑔, 𝑔∈𝒢<br>𝑅∗𝒇 ǁ𝑧1 ǁ𝑧2 ⋯ ǁ𝑧|𝒢|<br>(𝑅∗𝒇)(𝐺) 𝑧1 𝑧2 ⋯ 𝑧𝑛𝑔<br>**----- End of picture text -----**<br>
90
+
91
+ 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”.
92
+
93
+ 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,
94
+
95
+ **==> picture [284 x 42] intentionally omitted <==**
96
+
97
+ 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.
98
+
99
+ 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,
100
+
101
+ **==> picture [306 x 14] intentionally omitted <==**
102
+
103
+ 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.
104
+
105
+ 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_ ,
106
+
107
+ **==> picture [309 x 15] intentionally omitted <==**
108
+
109
+ _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.
110
+
111
+ 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.
112
+
113
+ 4
114
+
115
+ ## 3.2 RELATIONAL CONVOLUTIONS WITH ‘SOFT’ GROUPS
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ 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
122
+
123
+ **==> picture [319 x 51] intentionally omitted <==**
124
+
125
+ 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_ .
126
+
127
+ Now, we can define the ‘soft’ relational inner product _given_ the soft group _Gk_ by
128
+
129
+ **==> picture [276 x 24] intentionally omitted <==**
130
+
131
+ 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_ .
132
+
133
+ 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
134
+
135
+ **==> picture [330 x 13] intentionally omitted <==**
136
+
137
+ ## 4 GROUPING LAYERS
138
+
139
+ 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.
140
+
141
+ **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.
142
+
143
+ 5
144
+
145
+ **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,
146
+
147
+ **==> picture [264 x 43] intentionally omitted <==**
148
+
149
+ 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.
150
+
151
+ **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.
152
+
153
+ **==> picture [305 x 57] intentionally omitted <==**
154
+
155
+ 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.
156
+
157
+ ## 5 EXPERIMENTS
158
+
159
+ ## 5.1 RELATIONAL GAMES
160
+
161
+ 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.
162
+
163
+ 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.
164
+
165
+ 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.
166
+
167
+ 6
168
+
169
+ **==> picture [376 x 296] intentionally omitted <==**
170
+
171
+ **----- Start of picture text -----**<br>
172
+ same occurs xoccurs between match patt<br>Pentominoes Hexominoes Stripes<br>Figure 3: Relational games dataset. Left Examples of objects from each split. Right<br>problem instances for each task. The first row is an example where the relation holds and the second<br>row is an example where the relation does not hold.<br>same occurs xoccurs<br>1 . 0 1 . 0 1 . 0<br>0 . 8 0 . 8 0 . 8<br>0 . 6 0 . 6 0 . 6<br>0 1000 2000 0 1000 2000 0 1000 2000<br>batch step batch step batch step<br>between match pattern<br>1 . 0 1 . 0 Model<br>RelConvNet<br>0 . 8 0 . 8<br>CoRelNet<br>0 . 6 0 . 6 PrediNet<br>Transformer<br>0 1000 2000 0 1000 2000<br>batch step batch step<br>accuracy accuracy accuracy<br>training training training<br>accuracy accuracy<br>training training<br>**----- End of picture text -----**<br>
173
+
174
+ 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.
175
+
176
+ 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.
177
+
178
+ **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.
179
+
180
+ 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.
181
+
182
+ **==> picture [397 x 137] intentionally omitted <==**
183
+
184
+ **----- Start of picture text -----**<br>
185
+ Split = Hexos Split = Stripes<br>1 . 0<br>0 . 8<br>Model<br>CoRelNet<br>0 . 6 PrediNet<br>Transformer<br>RelConvNet<br>0 . 4 RelConvNet (Temporal G)<br>RelConvNet (Feature G)<br>RelConvNet (Contextual G)<br>0 . 2<br>0 . 0<br>same occurs xoccurs between match pattern same occurs xoccurs between match pattern<br>Task Task<br>Accuracy<br>**----- End of picture text -----**<br>
186
+
187
+ 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.
188
+
189
+ 7
190
+
191
+ **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.
192
+
193
+ ## 5.2 ‘SET’: GROUPING AND COMPOSITIONALITY IN RELATIONAL REASONING
194
+
195
+ ‘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.
196
+
197
+ 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.
198
+
199
+ 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.
200
+
201
+ 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.
202
+
203
+ 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
204
+
205
+ 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.
206
+
207
+ 8
208
+
209
+ **==> picture [359 x 238] intentionally omitted <==**
210
+
211
+ **----- Start of picture text -----**<br>
212
+ 1 . 0<br>0 . 8<br>0 . 6<br>0 . 4<br>0 . 2<br>0 . 0<br>RelConvNet CoRelNet PrediNet Transformer<br>* * * Model<br>(a) Example of “contains set” task. (b) Hold-out test accuracy.<br>1 . 0 1 . 0<br>0 . 9 0 . 9<br>Model Model<br>0 . 8 RelConvNet 0 . 8 RelConvNet<br>CoRelNet CoRelNet<br>0 . 7 PrediNet 0 . 7 PrediNet<br>Transformer Transformer<br>0 . 6 0 . 6<br>0 . 5 0 . 5<br>0 20 40 60 80 100 0 20 40 60 80 100<br>epoch epoch<br>(c) Training accuracy over the course of training. (d) Validation accuracy over the course of training.<br>label = 0 Accuracy<br>label = 1<br>accuracy accuracy<br>training validation<br>**----- End of picture text -----**<br>
213
+
214
+ 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.
215
+
216
+ 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.
217
+
218
+ ## 6 DISCUSSION
219
+
220
+ **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.
221
+
222
+ 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.
223
+
224
+ **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,
225
+
226
+ 9
227
+
228
+ 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.
229
+
230
+ 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.
231
+
232
+ ## CODE AND DATA
233
+
234
+ Code and experimental logs are available at: [URL removed]]
235
+
236
+ ## REFERENCES
237
+
238
+ - 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.
239
+
240
+ - 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.
241
+
242
+ 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.
243
+
244
+ - 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.
245
+
246
+ - 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.
247
+
248
+ - 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.
249
+
250
+ - 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.
251
+
252
+ Thomas Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard Zemel. Neural Relational Inference for Interacting Systems, June 2018.
253
+
254
+ Thomas N. Kipf and Max Welling. Semi-Supervised Classification with Graph Convolutional Networks, February 2017.
255
+
256
+ - 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.
257
+
258
+ - 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.
259
+
260
+ 10
261
+
262
+ - 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.
263
+
264
+ - Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning Convolutional Neural Networks for Graphs, June 2016.
265
+
266
+ - Rasmus Berg Palm, Ulrich Paquet, and Ole Winther. Recurrent Relational Networks, November 2018.
267
+
268
+ - 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.
269
+
270
+ - 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]
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ - 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]
277
+
278
+ - 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.
279
+
280
+ - Petar Veliˇckovi´c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. _arXiv preprint arXiv:1710.10903_ , 2017.
281
+
282
+ - 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]
283
+
284
+ - Taylor W. Webb, Ishan Sinha, and Jonathan D. Cohen. Emergent Symbols through Binding in External Memory, 2021. URL [URL removed]
285
+
286
+ - 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.
287
+
288
+ - 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.
289
+
290
+ - 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.
291
+
292
+ - Chi Zhang, Feng Gao, Baoxiong Jia, Yixin Zhu, and Song-Chun Zhu. RAVEN: A Dataset for Relational and Analogical Visual rEasoNing, March 2019.
293
+
294
+ 11
295
+
296
+ ## A EXPERIMENTS SUPPLEMENT
297
+
298
+ ## A.1 RELATIONAL GAMES
299
+
300
+ 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).
301
+
302
+ |Task|Description|
303
+ |---|---|
304
+ |same|Two random cells out of nine are occupied by an object. They are the|
305
+ ||“same” if they have the same color, shape, and orientation (i.e., identical|
306
+ ||image)|
307
+ |occurs|The top row contains one object and the bottom row contains three|
308
+ ||objects. The “occurs” relationship holds if at least one of the objects in|
309
+ ||the bottom row is the same as the object in the toprow.|
310
+ |xoccurs|Same as occurs, but the relationship holds if exactly one of the objects|
311
+ ||in the bottom row is the same as the object in the toprow.|
312
+ |between|The grid is occupied by three objects in a line (horizontal or vertical).|
313
+ ||The “between��� relationshipholds if the outer objects are the same.|
314
+ |row match|The frst and third rows of the grid are occupied by three objects each.|
315
+ |pattern|The “match pattern” relationship holds if the relation pattern in each|
316
+ ||row is the same (e.g., AAA, AAB, ABC, etc.)|
317
+
318
+ Table 1: Relational games tasks.
319
+
320
+ |Model / Component|Architecture|
321
+ |---|---|
322
+ |Common CNN|Conv2DÑMaxPool2DÑConv2DÑMaxPool2DÑFlatten.|
323
+ |Embedder|Conv2D: num flters = 16, flter size =3�3, activation = relu.|
324
+ ||MaxPool2D: stride = 2.|
325
+ |RelConvNet|CNNÑMD-IPRÑRelConvÑFlattenÑMLP.|
326
+ ||MD-IPR: relation dim = 16, projection dim = 4, symmetric.|
327
+ ||RelConv: num flters = 16,flter size = 3,discretegroups = combinations.|
328
+ |CoRelNet|CNNÑCoRelNetÑFlattenÑMLP.|
329
+ ||Standard CoRelNet has no hyperparameters.|
330
+ |PrediNet|CNNÑPrediNetÑFlattenÑMLP.|
331
+ ||PrediNet: keydim = 4,number of heads = 4,num relations = 16.|
332
+ |Transformer|CNNÑTransformerEncoderÑAveragePoolingÑMLP.|
333
+ ||TransformerEncoder: num layers = 1, num heads = 8, feedforward|
334
+ ||intermediate size = 32,activation = relu.|
335
+ |Common output MLP|Dense(64, ’relu’)ÑDense(2).|
336
+
337
+ Table 2: Model architectures for relational games experiments.
338
+
339
+ |Groupinglayer|Description|
340
+ |---|---|
341
+ |Temporal Grouping|_G_learned directlyasparameter.|
342
+ |Feature-based Grouping|_G_ produced byMLP with two hidden layers of size 32 and relu activation.|
343
+ |Contextual Grouping|_G_produced by message-passing (via Transformer Encoder Block) followed|
344
+ ||by an MLP (eq. (11)). Encoder Block has 4 heads, inner dim = 32, and relu|
345
+ ||activation. MLP same as feature-based grouping.|
346
+
347
+ Table 3: hyperparameters of grouping layers.
348
+
349
+ 12
350
+
351
+ |||Hexos Accuracy|Stripes Accuracy|
352
+ |---|---|---|---|
353
+ |Task|Model|||
354
+ |same|CoRelNet|0_._988�0_._006|0_._724�0_._112|
355
+ ||PrediNet|0_._990�0_._004|0_._983�0_._007|
356
+ ||Transformer|0_._997�0_._001|0_._993�0_._004|
357
+ ||RelConvNet|0_._989�0_._002|0_._974�0_._003|
358
+ ||RelConvNet (Temporal G)|0_._981�0_._002|0_._965�0_._007|
359
+ ||RelConvNet (Feature G)|0_._985�0_._001|0_._978�0_._006|
360
+ ||RelConvNet(Contextual G)|0_._981�0_._002|0_._969�0_._012|
361
+ |occurs|CoRelNet|0_._992�0_._004|0_._518�0_._012|
362
+ ||PrediNet|0_._907�0_._020|0_._775�0_._046|
363
+ ||Transformer|0_._881�0_._015|0_._724�0_._021|
364
+ ||RelConvNet|0_._980�0_._001|0_._880�0_._015|
365
+ ||RelConvNet (Temporal G)|0_._983�0_._001|0_._920�0_._012|
366
+ ||RelConvNet (Feature G)|0_._788�0_._112|0_._747�0_._099|
367
+ ||RelConvNet(Contextual G)|0_._951�0_._004|0_._830�0_._044|
368
+ |xoccurs|CoRelNet|0_._980�0_._007|0_._606�0_._035|
369
+ ||PrediNet|0_._872�0_._036|0_._810�0_._028|
370
+ ||Transformer|0_._867�0_._017|0_._753�0_._031|
371
+ ||RelConvNet|0_._967�0_._001|0_._946�0_._006|
372
+ ||RelConvNet (Temporal G)|0_._963�0_._006|0_._939�0_._012|
373
+ ||RelConvNet (Feature G)|0_._760�0_._107|0_._754�0_._103|
374
+ ||RelConvNet(Contextual G)|0_._942�0_._020|0_._901�0_._029|
375
+ |between|CoRelNet|0_._995�0_._001|0_._582�0_._063|
376
+ ||PrediNet|0_._978�0_._006|0_._950�0_._019|
377
+ ||Transformer|0_._986�0_._003|0_._961�0_._010|
378
+ ||RelConvNet|0_._991�0_._001|0_._988�0_._002|
379
+ ||RelConvNet (Temporal G)|0_._992�0_._001|0_._979�0_._004|
380
+ ||RelConvNet (Feature G)|0_._993�0_._001|0_._981�0_._003|
381
+ ||RelConvNet(Contextual G)|0_._992�0_._002|0_._972�0_._012|
382
+ |match pattern|CoRelNet|0_._942�0_._011|0_._581�0_._026|
383
+ ||PrediNet|0_._710�0_._040|0_._658�0_._053|
384
+ ||Transformer|0_._627�0_._005|0_._591�0_._006|
385
+ ||RelConvNet|0_._961�0_._015|0_._870�0_._041|
386
+ ||RelConvNet (Temporal G)|0_._979�0_._003|0_._967�0_._002|
387
+ ||RelConvNet (Feature G)|0_._976�0_._003|0_._958�0_._009|
388
+ ||RelConvNet (Contextual G)|0_._935�0_._047|0_._896�0_._060|
389
+
390
+ 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.
391
+
392
+ ## A.2 SET
393
+
394
+ 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).
395
+
396
+ ## B COMPUTATIONAL EFFICIENCY AND PARAMETER EFFICIENCY
397
+
398
+ ## B.1 PARAMETER EFFICIENCY
399
+
400
+ 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.
401
+
402
+ 13
403
+
404
+ |Model / Component|Architecture|
405
+ |---|---|
406
+ |Common CNN|Conv2DÑMaxPool2DÑConv2DÑMaxPool2DÑFlattenÑ|
407
+ |Embedder|Dense(64, ’relu’) Ñ Dense(64, ’tanh’).|
408
+ ||Conv2D: num flters = 32, flter size =5�5, activation = relu.|
409
+ ||MaxPool2D: stride = 4.|
410
+ |RelConvNet|CNNÑMD-IPRÑRelConvÑFlattenÑMLP.|
411
+ ||MD-IPR: relation dim = 16, projection dim = 16, symmetric.|
412
+ ||RelConv: num flters = 16, flter size = 3, discrete groups = combinations,|
413
+ ||symmetric relational innerproduct with ‘max’ aggregator.|
414
+ |CoRelNet|CNNÑCoRelNetÑFlattenÑMLP.|
415
+ ||Standard CoRelNet has no hyperparameters.|
416
+ |PrediNet|CNNÑPrediNetÑFlattenÑMLP.|
417
+ ||PrediNet: keydim = 4,number of heads = 4,num relations = 16.|
418
+ |Transformer|CNNÑTransformerEncoderÑAveragePoolingÑMLP.|
419
+ ||TransformerEncoder: num layers = 1, num heads = 8, feedforward|
420
+ ||intermediate size = 32,activation = relu.|
421
+ |Common output MLP|Dense(64, ’relu’)ÑDense(32, ’relu’)ÑDense(2).|
422
+
423
+ Table 5: Model architectures for “contains set” experiments.
424
+
425
+ ||Accuracy|
426
+ |---|---|
427
+ |Model||
428
+ |CoRelNet|0_._563�0_._001|
429
+ |PrediNet|0_._508�0_._002|
430
+ |RelConvNet|0_._979�0_._006|
431
+ |Transformer|0_._584�0_._004|
432
+
433
+ 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.
434
+
435
+ **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.
436
+
437
+ **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.
438
+
439
+ ## B.2 COMPUTATIONAL CONSIDERATIONS
440
+
441
+ 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.
442
+
443
+ 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,
444
+
445
+ _R_ :  t _Rij_ : D _g_ P _G_ such that _i, j_ P _g_ u _._
446
+
447
+ 14
448
+
449
+ ## When _G_ is sparse and structured, _R_ is sparse.
450
+
451
+ 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,
452
+
453
+ ## _R_ :  t _Rij_ : D _k_ P r _ng_ s _, g_ P _G_ such that _αgk_ ¡ 0 and _i, j_ P _g_ u _._
454
+
455
+ Thus, only a sparse subset of the _m_ � _m_ relation tensor would need to be computed and stored.
456
+
457
+ ## C GEOEMTRY OF REPRESENTATIONS LEARNED BY MD-IPR AND RELCONV
458
+
459
+ 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.
460
+
461
+ 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.
462
+
463
+ 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.
464
+
465
+ ## D SOME INITIAL IDEAS ON HIGHER-ORDER RELATIONAL TASKS
466
+
467
+ 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.
468
+
469
+ ## **Propositional logic.** Consider evaluating boolean logic formula such as,
470
+
471
+ ## _x_ 1 ^ pp _x_ 2 x_ 3 q ^ pp _x_ 3 ^ _x_ 4 q _ p _x_ 5 ^ _x_ 6 ^ _x_ 7 qqq _._
472
+
473
+ 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
474
+
475
+ 15
476
+
477
+ **==> picture [358 x 447] intentionally omitted <==**
478
+
479
+ **----- Start of picture text -----**<br>
480
+ Number Color Fill Shape<br>one red empty diamond<br>two green striped oval<br>three purple solid squiggle<br>Encoder 0<br>Encoder 1<br>Encoder 2<br>Encoder 3<br>Encoder 4<br>Encoder 5<br>**----- End of picture text -----**<br>
481
+
482
+ 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.
483
+
484
+ 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.
485
+
486
+ **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
487
+
488
+ 16
489
+
490
+ **==> picture [378 x 111] intentionally omitted <==**
491
+
492
+ Figure 8: The relations learned by the MD-IPR layer encodes the latent relations underlying the SET task.
493
+
494
+ **==> picture [252 x 181] intentionally omitted <==**
495
+
496
+ **----- Start of picture text -----**<br>
497
+ not set<br>40<br>set<br>20<br>0<br>20<br>40 20 0 20 40 60 80<br>R[g], f rel [PC1]<br> [PC2]<br>rel<br> f<br>],<br>g<br>[<br>R<br>**----- End of picture text -----**<br>
498
+
499
+ Figure 9: The relational convolution layer produces representations which separates ‘sets’ from ‘non-sets’.
500
+
501
+ by relational convolutions, each of which summarizes the relations within a group of objects at some level of hierarchy.
502
+
503
+ **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.
504
+
505
+ **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.
506
+
507
+ ## E DISCUSSION ON USE OF TCN IN EVALUATING RELATIONAL ARCHITECTURES
508
+
509
+ 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
510
+
511
+ 17
512
+
513
+ 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.
514
+
515
+ “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,
516
+
517
+ **==> picture [203 x 98] intentionally omitted <==**
518
+
519
+ 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.
520
+
521
+ 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.
522
+
523
+ To understand how context normalization works, consider first a context window of size 2, and let _β_ 0 _, γ_ 1. Then, along each dimension, we have
524
+
525
+ **==> picture [166 x 24] intentionally omitted <==**
526
+
527
+ 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.
528
+
529
+ Similarly, consider a context window of size 3. Then, along each dimension, we have,
530
+
531
+ **==> picture [282 x 40] intentionally omitted <==**
532
+
533
+ 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.
534
+
535
+ 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.
536
+
537
+ 18
538
+
open_review/iclr2024_8568.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8568",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Initializing the Layer-wise Learning Rate",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 6,
10
+ 3,
11
+ 3,
12
+ 3
13
+ ],
14
+ "score_mean": 3.75,
15
+ "score_variance": 2.25,
16
+ "score_spread": 3,
17
+ "score_min": 3,
18
+ "score_max": 6,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "mSSi0zYkEA",
23
+ "primary_area": "optimization",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_5Czw",
28
+ "review_id": "5WbAYNijfQ",
29
+ "scores": {
30
+ "rating": 6,
31
+ "soundness": 3,
32
+ "presentation": 2,
33
+ "contribution": 3,
34
+ "confidence": 3
35
+ },
36
+ "review_text_chars": 2243,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 9044,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_LTJF",
44
+ "review_id": "aAe9dYqg4r",
45
+ "scores": {
46
+ "rating": 3,
47
+ "soundness": 2,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 3
51
+ },
52
+ "review_text_chars": 1553,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 308588,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_cEsi",
60
+ "review_id": "nQ6wPZfmSV",
61
+ "scores": {
62
+ "rating": 3,
63
+ "soundness": 2,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 3
67
+ },
68
+ "review_text_chars": 3176,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1159661,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_R9Q4",
76
+ "review_id": "FyVLUY39QA",
77
+ "scores": {
78
+ "rating": 3,
79
+ "soundness": 2,
80
+ "presentation": 3,
81
+ "contribution": 2,
82
+ "confidence": 4
83
+ },
84
+ "review_text_chars": 3882,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1322695,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": false,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8568.md ADDED
@@ -0,0 +1,463 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - INITIALIZING THE LAYER WISE LEARNING RATE
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ 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).
20
+
21
+ 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.
22
+
23
+ 1
24
+
25
+ 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.
26
+
27
+ 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).
28
+
29
+ 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.
30
+
31
+ ## 2 RELATED WORKS
32
+
33
+ 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).
34
+
35
+ 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).
36
+
37
+ 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).
38
+
39
+ 2
40
+
41
+ **==> picture [378 x 119] intentionally omitted <==**
42
+
43
+ **----- Start of picture text -----**<br>
44
+ 80<br>1.5<br>70<br>1.0<br>60<br>single single<br>0.5<br>increasing 50 increasing<br>decreasing decreasing<br>0.0 40<br>0 50 100 150 0 20 40 60 80<br>Layers Epoch<br>i<br>Top-1 Acc %<br>Learning Rates<br>**----- End of picture text -----**<br>
45
+
46
+ 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.
47
+
48
+ ## 3 LAYER-WISE LEARNING RATES
49
+
50
+ 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.
51
+
52
+ **==> picture [235 x 11] intentionally omitted <==**
53
+
54
+ 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.
55
+
56
+ **==> picture [247 x 12] intentionally omitted <==**
57
+
58
+ 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.
59
+
60
+ 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.
61
+
62
+ 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).
63
+
64
+ 3
65
+
66
+ - 3.1 REGULARIZING ARCHITECTURE-INDUCED CONVERGENCE BIAS
67
+
68
+ **Algorithm 1:** Layer-wise learning rate initialization of neural networks
69
+
70
+ **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_
71
+
72
+ 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.
73
+
74
+ 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.
75
+
76
+ 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.
77
+
78
+ 4
79
+
80
+ Table 1: Final top-1 validation accuracy for ImageNet-1k classification. Trained without gradient clipping and label smoothing.
81
+
82
+ |Model<br>#Params|Optimizer|Data<br>Augmentation|Epochs|Learning Rate|
83
+ |---|---|---|---|---|
84
+ |||||Single<br>Layer-wise|
85
+ |ResNet-50<br>25.56M|SGD|basic|90|76.80<br>**77.12(+0.32)**|
86
+ ||||200|77.11<br>**77.98(+0.87)**|
87
+ |||strong|300|78.41<br>**79.12(+0.71)**|
88
+ ||AdamW|basic|90|76.40<br>**76.67(+0.27)**|
89
+ ||||200|76.44<br>**77.12(+0.68)**|
90
+ |||strong|300|78.49<br>**78.96(+0.47)**|
91
+ |ConvNeXt-T<br>28.59M|AdamW|strong|300|80.49<br>**80.56(+0.07)**|
92
+ |ViT-S/16<br>22.05M|SGD|basic|300|65.53<br>**70.29(+4.76)**|
93
+ ||AdamW|basic|300|74.11<br>**74.58(+0.47)**|
94
+ |||strong|300|78.00<br>**78.25(+0.25)**|
95
+ |Swin-T<br>28.29M|AdamW|strong|300|79.84<br>**79.96(+0.12)**|
96
+
97
+ Table 2: Comparison with layer-wise gradient normalization techniques when training ResNet-50 on ImageNet-1k for 90 epochs
98
+
99
+ |SGD|SGD-LW|SGD-NG|Adam-NG|LARS|LAMB|
100
+ |---|---|---|---|---|---|
101
+ |76.80|**77.12**|76.85|76.33|76.71|76.43|
102
+
103
+ ## 4 EXPERIMENTS
104
+
105
+ 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.
106
+
107
+ 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.
108
+
109
+ 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
110
+
111
+ 5
112
+
113
+ **==> picture [384 x 238] intentionally omitted <==**
114
+
115
+ **----- Start of picture text -----**<br>
116
+ 2.5<br>80<br>2.0<br>1.5 60<br>single<br>1.0 single<br>layer-wise 40 layer-wise<br>0.5<br>0 50 100 150 200<br>0 50 100 150 200<br>Epoch Epoch<br>Figure 2: ResNet-50 train loss and validation accuracy with basic data augmentation and SGD.<br>3.5<br>80<br>2.5<br>60<br>1.5 single<br>single<br>layer-wise 40 layer-wise<br>0.5<br>0 50 100 150 200 250 300<br>0 50 100 150 200 250 300<br>Epoch Epoch<br>Train Loss Top-1 Acc %<br>Train Loss Top-1 Acc %<br>**----- End of picture text -----**<br>
117
+
118
+ Figure 3: ViT-S/16 train loss and validation accuracy with basic data augmentation and AdamW.
119
+
120
+ 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.
121
+
122
+ ## 4.1 IMAGENET-1K RESULTS
123
+
124
+ 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.
125
+
126
+ 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
127
+
128
+ 6
129
+
130
+ **==> picture [380 x 96] intentionally omitted <==**
131
+
132
+ **----- Start of picture text -----**<br>
133
+ 2.0 single 1.5 single<br>layer-wise layer-wise<br>1.0<br>1.0<br>0.5<br>0.0 0.0<br>0 50 100 150 0 50 100 150<br>Layers Layers (excluding scale, bias)<br>i i<br>Learning Rates Learning Rates<br>**----- End of picture text -----**<br>
134
+
135
+ 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.
136
+
137
+ **==> picture [380 x 95] intentionally omitted <==**
138
+
139
+ **----- Start of picture text -----**<br>
140
+ 3.0 single 3.0 single<br>layer-wise layer-wise<br>2.0 2.0<br>1.0 1.0<br>0.0 0.0<br>0 50 100 150 0 50 100 150<br>Layers Layers (excluding scale, bias)<br>i i<br>Learning Rates Learning Rates<br>**----- End of picture text -----**<br>
141
+
142
+ 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.
143
+
144
+ 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.
145
+
146
+ ## 4.2 INSPECTING ASSIGNED LEARNING RATES
147
+
148
+ 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.
149
+
150
+ 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
151
+
152
+ 7
153
+
154
+ **==> picture [356 x 174] intentionally omitted <==**
155
+
156
+ **----- Start of picture text -----**<br>
157
+ single single<br>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<br>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<br>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<br>layer-wise layer-wise 0.04<br>0.74<br>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<br>0.05<br>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<br>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<br>0.05 0.1 0.2 0.4 0.05 0.1 0.2 0.4<br>**----- End of picture text -----**<br>
158
+
159
+ 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.
160
+
161
+ 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.
162
+
163
+ 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.
164
+
165
+ ## 4.3 CIFAR-100 RESULTS
166
+
167
+ 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.
168
+
169
+ 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.
170
+
171
+ 8
172
+
173
+ **==> picture [396 x 188] intentionally omitted <==**
174
+
175
+ **----- Start of picture text -----**<br>
176
+ SGD SGD-LW<br>1.5 1.5<br>1.0 1.0<br>width<br>0.5 0.5<br>256<br>0.0 0.0 512<br>8 6 4 2 8 6 4 2<br>1024<br>SGD-NG SGD-NG SGD- P<br>1.5 1.5 adap 1.5 2048<br>4096<br>1.0 1.0 1.0<br>8192<br>0.5 0.5 0.5<br>0.0 0.0 0.0<br>6 4 2 0 8 6 4 2 8 6 4 2<br>log2 log2 log2<br>Train loss<br>Train loss<br>**----- End of picture text -----**<br>
177
+
178
+ 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)
179
+
180
+ ## 4.4 COMPARISON WITH RELATED WORK
181
+
182
+ 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.
183
+
184
+ ## 5 CONCLUSION
185
+
186
+ 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.
187
+
188
+ ## REFERENCES
189
+
190
+ - Alessandro Achille, Matteo Rovere, and Stefano Soatto. Critical Learning Periods in Deep Networks. In _International Conference on Learning Representations_ , 2019.
191
+
192
+ - Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Disentangling adaptive gradient methods from learning rates. _arXiv preprint arXiv:2002.11803_ , 2020.
193
+
194
+ - Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your MAML. In _International Conference on Learning Representations_ , 2019.
195
+
196
+ 9
197
+
198
+ 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.
199
+
200
+ - Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. _arXiv preprint arXiv:1607.06450_ , 2016.
201
+
202
+ - 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.
203
+
204
+ - 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.
205
+
206
+ - 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.
207
+
208
+ - 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.
209
+
210
+ - Andrew Brock, Theodore Lim, and Nick Weston. Freezeout: Accelerate training by progressively freezing layers. _arXiv preprint arXiv:1706.04983_ , 2017.
211
+
212
+ - 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.
213
+
214
+ - 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.
215
+
216
+ - 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.
217
+
218
+ - 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.
219
+
220
+ - 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.
221
+
222
+ - 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.
223
+
224
+ - Yann N. Dauphin and Samuel Schoenholz. Metainit: Initializing learning by learning to initialize. _Advances in Neural Information Processing Systems_ , 32, 2019.
225
+
226
+ - 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.
227
+
228
+ - 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.
229
+
230
+ - 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.
231
+
232
+ 10
233
+
234
+ - 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.
235
+
236
+ - 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.
237
+
238
+ - John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. _Journal of machine learning research_ , 12(7), 2011.
239
+
240
+ - Jonathan Frankle and Michael Carbin. The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks. In _International Conference on Learning Representations_ , 2019.
241
+
242
+ Jonathan Frankle, David J. Schwab, and Ari S. Morcos. The Early Phase of Neural Network Training. In _International Conference on Learning Representations_ , 2020.
243
+
244
+ - 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.
245
+
246
+ - 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.
247
+
248
+ - 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.
249
+
250
+ - 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.
251
+
252
+ - Boris Hanin and David Rolnick. How to start training: The effect of initialization and architecture. _Advances in Neural Information Processing Systems_ , 31, 2018.
253
+
254
+ - 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.
255
+
256
+ - 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.
257
+
258
+ - 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.
259
+
260
+ - 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.
261
+
262
+ - 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.
263
+
264
+ - 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.
265
+
266
+ - 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.
267
+
268
+ 11
269
+
270
+ - Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In _International Conference on Learning Representations_ , 2015.
271
+
272
+ - 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.
273
+
274
+ - 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.
275
+
276
+ - 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.
277
+
278
+ - 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.
279
+
280
+ - 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.
281
+
282
+ - 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.
283
+
284
+ - Ilya Loshchilov and Frank Hutter. Decoupled Weight Decay Regularization. In _International Conference on Learning Representations_ , 2019.
285
+
286
+ - 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.
287
+
288
+ - James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In _International Conference on Machine Learning_ , pp. 2408–2417. PMLR, 2015.
289
+
290
+ - Paul Micaelli and Amos J. Storkey. Gradient-based hyperparameter optimization over long horizons. _Advances in Neural Information Processing Systems_ , 34:10798–10809, 2021.
291
+
292
+ - Paul Michel, Omer Levy, and Graham Neubig. Are sixteen heads really better than one? _Advances in neural information processing systems_ , 32, 2019.
293
+
294
+ - Dmytro Mishkin and Jiri Matas. All you need is a good init. In _International Conference on Learning Representations_ , 2016.
295
+
296
+ - 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.
297
+
298
+ - 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.
299
+
300
+ - 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.
301
+
302
+ - 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.
303
+
304
+ - 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.
305
+
306
+ 12
307
+
308
+ 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.
309
+
310
+ - Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? _Advances in neural information processing systems_ , 31, 2018.
311
+
312
+ - 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.
313
+
314
+ - Samuel S. Schoenholz, Justin Gilmer, Surya Ganguli, and Jascha Sohl-Dickstein. Deep Information Propagation. In _International Conference on Learning Representations_ , 2017.
315
+
316
+ - 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.
317
+
318
+ - 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.
319
+
320
+ - 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.
321
+
322
+ - 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.
323
+
324
+ - 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.
325
+
326
+ Shrihari Vasudevan. Dynamic learning rate using Mutual Information. _arXiv preprint arXiv:1805.07249_ , 2018.
327
+
328
+ Ross Wightman. PyTorch Image Models, 2019.
329
+
330
+ - 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.
331
+
332
+ - 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.
333
+
334
+ - 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.
335
+
336
+ - 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.
337
+
338
+ - 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.
339
+
340
+ 13
341
+
342
+ - 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.
343
+
344
+ - 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.
345
+
346
+ - Yang You, Igor Gitman, and Boris Ginsburg. Scaling sgd batch size to 32k for imagenet training. _arXiv preprint arXiv:1708.03888_ , 2017.
347
+
348
+ - 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.
349
+
350
+ - 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.
351
+
352
+ - Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In _European Conference on Computer Vision_ , pp. 818–833. Springer, 2014.
353
+
354
+ - 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.
355
+
356
+ - Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. Mixup: Beyond Empirical Risk Minimization. In _International Conference on Learning Representations_ , 2018a.
357
+
358
+ - Hongyi Zhang, Yann N. Dauphin, and Tengyu Ma. Fixup Initialization: Residual Learning Without Normalization. In _International Conference on Learning Representations_ , 2019b.
359
+
360
+ - 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.
361
+
362
+ - 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.
363
+
364
+ - 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.
365
+
366
+ - 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.
367
+
368
+ 14
369
+
370
+ ## A APPENDIX
371
+
372
+ 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.
373
+
374
+ **==> picture [382 x 225] intentionally omitted <==**
375
+
376
+ **----- Start of picture text -----**<br>
377
+ T max deviation % average deviation % validation accuracy %<br>1 11.02 2.66 77.07<br>10 3.51 0.69 77.01<br>100 1.01 0.18 77.04<br>1000 0.32 0.06 77.07<br>5004 0 0 77.15<br>Single LR Layer-Wise LR<br>10 [4] 10 [4] epoch<br>5<br>10 [3] 10 [3] 15<br>30<br>10 [2] 10 [2]<br>60<br>10 [1] 10 [1] 90<br>0 50 100 150 0 50 100 150<br>Layers (excluding scale, bias)<br>)<br>+<br>vt<br>1/(<br>**----- End of picture text -----**<br>
378
+
379
+ 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.
380
+
381
+ Table 4: ImageNet-1k real, v2 performance improvement due to layer-wise learning rate.
382
+
383
+ |Model<br>#Params|Optimizer<br>Data<br>Augmentation<br>Epochs|Accuracy|
384
+ |---|---|---|
385
+ |||ReaL<br>V2|
386
+ |ResNet-50<br>25.56M|SGD<br>basic<br>90<br>200<br>strong<br>300|83.51(+0.02)<br>72.46(+0.51)|
387
+ |||83.97(+0.71)<br>73.43(+0.65)|
388
+ |||85.43(+0.27)<br>75.18(+1.20)|
389
+ ||AdamW<br>basic<br>90<br>200<br>strong<br>300|82.93(+0.21)<br>71.52(-0.15)|
390
+ |||83.12(+0.63)<br>72.05(+0.37)|
391
+ |||85.24(+0.24)<br>74.56(+0.26)|
392
+ |ConvNeXt-T<br>28.59M|AdamW<br>strong<br>300|85.57(+0.05)<br>76.03(+0.23)|
393
+ |ViT-S/16<br>22.05M|SGD<br>basic<br>300|77.07(+4.90)<br>65.06(+5.41)|
394
+ ||AdamW<br>basic<br>300<br>strong<br>300|80.45(+0.48)<br>68.76(-0.25)|
395
+ |||84.13(+0.26)<br>73.19(-0.13)|
396
+ |Swin-T<br>28.29M|AdamW<br>strong<br>300|85.11(-0.02)<br>75.06(+0.10)|
397
+
398
+ 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-
399
+
400
+ 15
401
+
402
+ **==> picture [384 x 240] intentionally omitted <==**
403
+
404
+ **----- Start of picture text -----**<br>
405
+ 3.5<br>90<br>2.5<br>80<br>1.5 single 70 single<br>layer-wise<br>layer-wise<br>0.5<br>0 50 100 150 200 250 300 60<br>0 50 100 150 200 250 300<br>Epoch Epoch<br>Figure 9: ConvNeXt-T train loss and validation accuracy with strong data augmentation.<br>3.5<br>80<br>2.5 75<br>70<br>1.5 single<br>single<br>layer-wise 65<br>layer-wise<br>0.5<br>0 50 100 150 200 250 300 60<br>0 50 100 150 200 250 300<br>Epoch Epoch<br>Train Loss Top-1 Acc %<br>Train Loss Top-1 Acc %<br>**----- End of picture text -----**<br>
406
+
407
+ Figure 10: Swin-T train loss and validation accuracy with strong data augmentation.
408
+
409
+ **==> picture [380 x 95] intentionally omitted <==**
410
+
411
+ **----- Start of picture text -----**<br>
412
+ single single<br>1.0 layer-wise 1.0 layer-wise<br>0.5 0.5<br>0.0 0.0<br>0 50 100 150 0 50 100 150<br>Layers Layers (excluding scale, bias)<br>i i<br>Learning Rates Learning Rates<br>**----- End of picture text -----**<br>
413
+
414
+ 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.
415
+
416
+ **==> picture [382 x 95] intentionally omitted <==**
417
+
418
+ **----- Start of picture text -----**<br>
419
+ 6.0 single 2.0 single<br>layer-wise layer-wise<br>4.0<br>1.0<br>2.0<br>0.0 0.0<br>0 50 100 150 200 0 50 100 150 200<br>Layers Layers (excluding scale, bias)<br>i i<br>Learning Rates Learning Rates<br>**----- End of picture text -----**<br>
420
+
421
+ 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.
422
+
423
+ 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.
424
+
425
+ 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
426
+
427
+ 16
428
+
429
+ Table 5: Experiment hyperparameters
430
+
431
+ |Model|Dropout<br>Stoch<br>Depth<br>Data<br>Augmentation<br>Optimizer<br>Batch<br>Size<br>lr<br>wd|
432
+ |---|---|
433
+ |ResNet-50|-<br>-<br>basic<br>SGD<br>256<br>0.1<br>1e-4<br>-<br>-<br>strong<br>SGD<br>256<br>0.1<br>1e-4|
434
+ ||-<br>-<br>basic<br>AdamW<br>1024<br>3e-3<br>0.1<br>-<br>-<br>strong<br>AdamW<br>1024<br>3e-3<br>0.1|
435
+ |ConvNeXt-T|-<br>0.1<br>strong<br>AdamW<br>4096<br>4e-3<br>5e-2|
436
+ |ViT-S/16|0.1<br>0.1<br>basic<br>SGD<br>4096<br>0.5/1.6<br>1e-4|
437
+ ||0.1<br>0.1<br>basic<br>AdamW<br>4096<br>1e-2<br>0.1<br>-<br>-<br>strong<br>AdamW<br>4096<br>1e-2<br>0.1|
438
+ |Swin-T|-<br>0.2<br>strong<br>AdamW<br>1024<br>1e-3<br>5e-2|
439
+
440
+ **==> picture [388 x 166] intentionally omitted <==**
441
+
442
+ **----- Start of picture text -----**<br>
443
+ Standard p Lw Init<br>95.0 95.0 95.0<br>94.0 94.0 94.0<br>Width mult.<br>0.5<br>93.0 93.0 93.0<br>1.0<br>92.0 92.0 92.0 2.0<br>4.0<br>91.0 91.0 91.0<br>90.0 90.0 90.0<br>2 1 0 1 2 3 4 5 2 1 0 1 2 3 4 5 2 1 0 1 2 3 4 5<br>log2 log2 log2<br>Validation Accuracy<br>**----- End of picture text -----**<br>
444
+
445
+ 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.
446
+
447
+ 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.
448
+
449
+ 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
450
+
451
+ **==> picture [378 x 103] intentionally omitted <==**
452
+
453
+ **----- Start of picture text -----**<br>
454
+ p Lw Init<br>4.0<br>Width mult.<br>1.0<br>0.5<br>2.0 1.0<br>0.5<br>2.0<br>0.0 0.0 4.0<br>0 10 20 0 10 20<br>Layers Layers<br>i<br>Learning Rates<br>**----- End of picture text -----**<br>
455
+
456
+ Figure 14: Assigned learning rates for DavidNet. **Left** : Maximal update parametrization ( _µ_ P), **Right** : Layer-wise learning rate initialization.
457
+
458
+ 17
459
+
460
+ 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.
461
+
462
+ 18
463
+
open_review/iclr2024_8569.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8569",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Understanding In-Context Learning in Transformers and LLMs by Learning to Learn Discrete Functions",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 8,
10
+ 6,
11
+ 6,
12
+ 8
13
+ ],
14
+ "score_mean": 7.0,
15
+ "score_variance": 1.33,
16
+ "score_spread": 2,
17
+ "score_min": 6,
18
+ "score_max": 8,
19
+ "decision": "Accept (oral)",
20
+ "rebuttal_validity_ground_truth": true,
21
+ "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.",
22
+ "forum_id": "ekeyCgeRfC",
23
+ "primary_area": "general machine learning (i.e., none of the above)",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_bf3N",
28
+ "review_id": "m1fpGYur8v",
29
+ "scores": {
30
+ "rating": 8,
31
+ "soundness": 4,
32
+ "presentation": 4,
33
+ "contribution": 4,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 4213,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 233735,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_fGea",
44
+ "review_id": "cEasYQk3TJ",
45
+ "scores": {
46
+ "rating": 6,
47
+ "soundness": 3,
48
+ "presentation": 3,
49
+ "contribution": 3,
50
+ "confidence": 4
51
+ },
52
+ "review_text_chars": 2676,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 1813717,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_tbmK",
60
+ "review_id": "Y3zDv2cXtI",
61
+ "scores": {
62
+ "rating": 6,
63
+ "soundness": 3,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 4
67
+ },
68
+ "review_text_chars": 4897,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 1956567,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_9RLW",
76
+ "review_id": "nWOt1XGCFc",
77
+ "scores": {
78
+ "rating": 8,
79
+ "soundness": 3,
80
+ "presentation": 2,
81
+ "contribution": 3,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 6178,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 3275810,
87
+ "post_rebuttal_text_signal": true,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8569.md ADDED
The diff for this file is too large to render. See raw diff
 
open_review/iclr2024_8571.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8571",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Simple Data Sharing for Multi-Tasked Goal-Oriented Problems",
6
+ "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.",
7
+ "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 [...]",
8
+ "initial_scores": [
9
+ 3,
10
+ 3,
11
+ 5,
12
+ 5
13
+ ],
14
+ "score_mean": 4.0,
15
+ "score_variance": 1.33,
16
+ "score_spread": 2,
17
+ "score_min": 3,
18
+ "score_max": 5,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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",
22
+ "forum_id": "Nqir5R4ACn",
23
+ "primary_area": "reinforcement learning",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_i3TD",
28
+ "review_id": "RYSnBR1Usx",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 1,
32
+ "presentation": 2,
33
+ "contribution": 3,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 9067,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 2721561,
39
+ "post_rebuttal_text_signal": true,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_Fsyr",
44
+ "review_id": "tgckjaYn9T",
45
+ "scores": {
46
+ "rating": 3,
47
+ "soundness": 2,
48
+ "presentation": 2,
49
+ "contribution": 2,
50
+ "confidence": 2
51
+ },
52
+ "review_text_chars": 4514,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 527788,
55
+ "post_rebuttal_text_signal": false,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_wCFi",
60
+ "review_id": "u9NArux6Tz",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 2,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 2
67
+ },
68
+ "review_text_chars": 1642,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 907549,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_Mndx",
76
+ "review_id": "TM03uZO5lL",
77
+ "scores": {
78
+ "rating": 5,
79
+ "soundness": 2,
80
+ "presentation": 3,
81
+ "contribution": 2,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 3779,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 1004157,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }
open_review/iclr2024_8571.md ADDED
@@ -0,0 +1,683 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ ## - SIMPLE DATA SHARING FOR MULTI-TASKED GOAL ORIENTED PROBLEMS
4
+
5
+ Authors withheld for review
6
+
7
+ ## ABSTRACT
8
+
9
+ 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.
10
+
11
+ ## 1 INTRODUCTION
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ 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
20
+
21
+ 1
22
+
23
+ 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.
24
+
25
+ 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.
26
+
27
+ 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).
28
+
29
+ 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.
30
+
31
+ ## 1.1 RELATED WORK
32
+
33
+ **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.
34
+
35
+ > 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.
36
+
37
+ > 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.
38
+
39
+ 2
40
+
41
+ **==> picture [114 x 54] intentionally omitted <==**
42
+
43
+ **==> picture [138 x 60] intentionally omitted <==**
44
+
45
+ **==> picture [138 x 61] intentionally omitted <==**
46
+
47
+ **==> picture [392 x 19] intentionally omitted <==**
48
+
49
+ **----- Start of picture text -----**<br>
50
+ (a) Similar goal sets with differ- (b) Distinct goal sets with finite con- (c) Goal sets (could be overlapping)<br>ent contexts texts given continuous contexts<br>**----- End of picture text -----**<br>
51
+
52
+ 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.
53
+
54
+ **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.
55
+
56
+ **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.
57
+
58
+ ## 2 PRELIMINARIES
59
+
60
+ ## 2.1 CONTEXTUAL GOAL-ORIENTED (CGO) PROBLEM
61
+
62
+ 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.
63
+
64
+ 3
65
+
66
+ **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.
67
+
68
+ **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_ ( _π_ ).
69
+
70
+ ## 2.2 OFFLINE LEARNING
71
+
72
+ 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.
73
+
74
+ ## 2.3 NOTATION AND ASSUMPTION
75
+
76
+ 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.
77
+
78
+ 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.
79
+
80
+ 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_ ) _∈_
81
+
82
+ > 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.
83
+
84
+ > 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.
85
+
86
+ 4
87
+
88
+ [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[π][∗]_ .
89
+
90
+ **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.,
91
+
92
+ **==> picture [258 x 12] intentionally omitted <==**
93
+
94
+ 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.
95
+
96
+ 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.
97
+
98
+ ## 3 SIMPLE DATA SHARING TO SOLVE CGO PROBLEMS
99
+
100
+ 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.
101
+
102
+ ## 3.1 ACTION-AUGMENTED MDP
103
+
104
+ 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.
105
+
106
+ 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..
107
+
108
+ 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_ :
109
+
110
+ **==> picture [344 x 37] intentionally omitted <==**
111
+
112
+ The extension of _f_ is based on a function _g_ : _X →_ [0 _,_ 1] which determines the _f_[¯] _g_ value only at _a_[+] .
113
+
114
+ **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.
115
+
116
+ 5
117
+
118
+ **Algorithm 1** Simple Data Sharing (SDS) for CGO
119
+
120
+ **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
121
+
122
+ **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._
123
+
124
+ ## 3.2 PRACTICAL ALGORITHM: SIMPLE DATA SHARING
125
+
126
+ 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.
127
+
128
+ ## 3.3 INFORMATION THEORETIC GUARANTEE: SDS+PSPI
129
+
130
+ 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.
131
+
132
+ **Assumption 3.2** (Realizability) **.** _We assume for any π ∈_ Π _, Q[π] ∈F and R ∈G._
133
+
134
+ **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[′] , π_ )] _._
135
+
136
+ **Definition 3.4.** _We define the generalized concentrability coefficients:_
137
+
138
+ **==> picture [344 x 28] intentionally omitted <==**
139
+
140
+ _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._
141
+
142
+ 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 _π_ .
143
+
144
+ > 5 + _s_ is implemented as terminal=True.
145
+
146
+ 6
147
+
148
+ **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 π ∈_ Π _,_
149
+
150
+ **==> picture [296 x 13] intentionally omitted <==**
151
+
152
+ _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._
153
+
154
+ 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).
155
+
156
+ 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.
157
+
158
+ **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._
159
+
160
+ ## 4 EXPERIMENTS
161
+
162
+ 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?
163
+
164
+ ## 4.1 ENVIRONMENTS AND DATASETS
165
+
166
+ **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.
167
+
168
+ **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]
169
+
170
+ **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.
171
+
172
+ > 6We state a more general result for non-finite function classes in the appendix.
173
+
174
+ > 7Such oracle is never visible to the algorithm but only to construct the dataset.
175
+
176
+ > 8Exception: in the original AntMaze, we use the D4RL metric, so the results are comparable to the literature.
177
+
178
+ 7
179
+
180
+ ## 4.2 METHODS
181
+
182
+ 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.
183
+
184
+ **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.
185
+
186
+ **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.
187
+
188
+ **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.
189
+
190
+ **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.
191
+
192
+ **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.
193
+
194
+ ## 4.3 ORIGINAL ANTMAZE
195
+
196
+ 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.
197
+
198
+ **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]
199
+
200
+ **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
201
+
202
+ > 9We choose IQL since it is a popular practical algorithm to solve AntMaze environments
203
+
204
+ > 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.
205
+
206
+ > 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.
207
+
208
+ > 12We include the details for reward model evaluation in Appendix C.2.
209
+
210
+ 8
211
+
212
+ 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.
213
+
214
+ |Env/Method|SDS(Ours)<br>PDS<br>RP<br>UDS+RP|Context-agnostic IQL|
215
+ |---|---|---|
216
+ |umaze<br>umaze diverse<br>medium play<br>medium diverse<br>large play<br>large diverse|94.8±1.3<br>93.0±1.3<br>50.5±2.1<br>54.3±6.3<br>72.8±7.7<br>50.6±7.8<br>72.8±2.6<br>71.5±4.3<br>75.8±1.9<br>66.8±4.9<br>0.5±0.3<br>0.3±0.3<br>84.5±5.2<br>22.8±2.4<br>0.5±0.5<br>0.8±0.5<br>60.0±7.6<br>39.6±4.9<br>0±0<br>0±0<br>36.8±6.9<br>30.0±5.3<br>0±0<br>0±0|97.7±1.0<br>65.5±10.5<br>75.2±3.4<br>76.0±3.7<br>45.8±2.6<br>46.7±5.4|
217
+ |average|**70.8**<br>50.5<br>20.7<br>21.2|67.8|
218
+
219
+ Table 1: Normalized return in AntMaze-v2, averaged over 5 random seeds with standard errors.
220
+
221
+ **==> picture [115 x 87] intentionally omitted <==**
222
+
223
+ **==> picture [116 x 87] intentionally omitted <==**
224
+
225
+ **==> picture [115 x 87] intentionally omitted <==**
226
+
227
+ **==> picture [308 x 9] intentionally omitted <==**
228
+
229
+ **----- Start of picture text -----**<br>
230
+ (a) PDS (b) UDS+RP (c) RP<br>**----- End of picture text -----**<br>
231
+
232
+ Figure 2: Reward model evaluation for the large-diverse environment. Green dots are outliers.
233
+
234
+ ## 4.4 MODIFIED ANTMAZE: FOUR ROOMS
235
+
236
+ **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.
237
+
238
+ **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.
239
+
240
+ |Env/Method|SDS(Ours)<br>PDS<br>Goal Prediction|
241
+ |---|---|
242
+ |medium-play<br>medium-diverse<br>large-play<br>large-diverse|**78.7±0.9**<br>46.0±4.47<br>59.3±2.6<br>**83.6±1.9**<br>51.3±3.6<br>66.7±2.4<br>**65.5±2.5**<br>13.9±2.4<br>41.4±3.6<br>**72.2±2.9**<br>11.1±3.8<br>42.0±3.0|
243
+ |average|**75.0**<br>30.6<br>52.4|
244
+
245
+ 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.
246
+
247
+ ## 4.5 MODIFIED ANTMAZE: RANDOM CELLS
248
+
249
+ **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;
250
+
251
+ 9
252
+
253
+ |Env/Method|SDS(Ours)<br>PDS<br>Goal Prediction|
254
+ |---|---|
255
+ |medium-play<br>medium-diverse<br>large-play<br>large-diverse|**76.8±6.1**<br>52.0±8.8<br>66.7±7.2<br>**78.2±6.5**<br>60.9±11.3<br>69.7±8.7<br>**57.6±12.4**<br>50.6±6.4<br>42.4±8.2<br>54.7±8.8<br>**58.3±9.2**<br>44.2±8.1|
256
+ |average|**66.8**<br>55.5<br>55.8|
257
+
258
+ 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.
259
+
260
+ |bution.||
261
+ |---|---|
262
+ |Env/Method|SDS(Ours)<br>PDS<br>Goal Prediction|
263
+ |medium-play<br>medium-diverse<br>large-play<br>large-diverse|67.9±8.2<br>50.1±13.4<br>**70.5±1.9**<br>**72.5±6.5**<br>57.5±14.8<br>63.0±7.2<br>**60.2±4.8**<br>48.1±8.0<br>44.3±4.1<br>**58.0±5.8**<br>44.1±9.9<br>55.4±5.7|
264
+ |average|**64.7**<br>49.9<br>58.3|
265
+
266
+ 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.
267
+
268
+ 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.
269
+
270
+ **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.
271
+
272
+ **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.
273
+
274
+ ## 5 CONCLUSION AND LIMITATION
275
+
276
+ 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.
277
+
278
+ ## REFERENCES
279
+
280
+ 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.
281
+
282
+ - 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.
283
+
284
+ 10
285
+
286
+ - 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.
287
+
288
+ Ching-An Cheng, Tengyang Xie, Nan Jiang, and Alekh Agarwal. Adversarially trained actor critic for offline reinforcement learning. In _ICML_ , 2022.
289
+
290
+ - Carlo D’Eramo, Davide Tateo, Andrea Bonarini, Marcello Restelli, and Jan Peters. Sharing knowledge in multi-task deep reinforcement learning. In _ICLR_ , 2020.
291
+
292
+ 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.
293
+
294
+ Scott Fujimoto and Shixiang Gu. A minimalist approach to offline reinforcement learning. In _NeurIPS_ , 2021.
295
+
296
+ - Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In _ICML_ , 2019.
297
+
298
+ - 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.
299
+
300
+ - Assaf Hallak, Dotan Di Castro, and Shie Mannor. Contextual markov decision processes. _arXiv preprint arXiv:1502.02259_ , 2015.
301
+
302
+ - 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.
303
+
304
+ - Matteo Hessel, Hubert Soyer, Lasse Espeholt, Wojciech Czarnecki, Simon Schmitt, and Hado Van Hasselt. Multi-task deep reinforcement learning with popart. In _AAAI_ , 2019.
305
+
306
+ Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. _arXiv preprint arXiv:2207.12598_ , 2022.
307
+
308
+ - Hao Hu, Yiqin Yang, Qianchuan Zhao, and Chongjie Zhang. The provable benefit of unsupervised data sharing for offline reinforcement learning. In _ICLR_ , 2023.
309
+
310
+ - Ying Jin, Zhuoran Yang, and Zhaoran Wang. Is pessimism provably efficient for offline rl? In _ICML_ , 2021.
311
+
312
+ Leslie Pack Kaelbling. Learning to achieve goals. In _IJCAI_ , 1993.
313
+
314
+ - 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.
315
+
316
+ - Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q- learning. In _ICLR_ , 2021.
317
+
318
+ - Aviral Kumar, Aurick Zhou, George Tucker, and Sergey Levine. Conservative q-learning for offline reinforcement learning. In _NeurIPS_ , 2020.
319
+
320
+ - Alexander C Li, Lerrel Pinto, and Pieter Abbeel. Generalized hindsight for reinforcement learning. In _NeurIPS_ , 2020.
321
+
322
+ - Anqi Li, Byron Boots, and Ching-An Cheng. Mahalo: Unifying offline reinforcement learning and imitation learning from observations. In _ICML_ , 2023a.
323
+
324
+ - Anqi Li, Dipendra Misra, Andrey Kolobov, and Ching-An Cheng. Survival instinct in offline reinforcement learning. _arXiv preprint arXiv:2306.03286_ , 2023b.
325
+
326
+ - Corey Lynch, Mohi Khansari, Ted Xiao, Vikash Kumar, Jonathan Tompson, Sergey Levine, and Pierre Sermanet. Learning latent plans from play. In _CORL_ , 2020.
327
+
328
+ 11
329
+
330
+ Yecheng Jason Ma, Jason Yan, Dinesh Jayaraman, and Osbert Bastani. Offline goal-conditioned reinforcement learning via _f_ -advantage regression. In _NeurIPS_ , 2022.
331
+
332
+ - 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.
333
+
334
+ - 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.
335
+
336
+ - Ashvin Nair, Vitchyr Pong, Murtaza Dalal, Shikhar Bahl, Steven Lin, and Sergey Levine. Visual reinforcement learning with imagined goals. In _NeurIPS_ , 2018.
337
+
338
+ - Suraj Nair and Chelsea Finn. Hierarchical foresight: Self-supervised learning of long-horizon tasks via visual subgoal generation. In _ICLR_ , 2019.
339
+
340
+ - Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In _ICML_ , 2015.
341
+
342
+ - 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.
343
+
344
+ - Shagun Sodhani, Amy Zhang, and Joelle Pineau. Multi-task reinforcement learning with contextbased representations. In _ICML_ , 2021.
345
+
346
+ - 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.
347
+
348
+ - 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.
349
+
350
+ - 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.
351
+
352
+ - 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.
353
+
354
+ - Yifan Wu, George Tucker, and Ofir Nachum. Behavior regularized offline reinforcement learning. _arXiv preprint arXiv:1911.11361_ , 2019.
355
+
356
+ - Tengyang Xie, Ching-An Cheng, Nan Jiang, Paul Mineiro, and Alekh Agarwal. Bellman-consistent pessimism for offline reinforcement learning. In _NeurIPS_ , 2021.
357
+
358
+ - 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.
359
+
360
+ - Albert Yu and Ray Mooney. Using both demonstrations and language instructions to efficiently learn robotic tasks. In _ICLR_ , 2023.
361
+
362
+ - 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.
363
+
364
+ - 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.
365
+
366
+ 12
367
+
368
+ 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.
369
+
370
+ - 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.
371
+
372
+ 13
373
+
374
+ ## A ADDITIONAL RELATED WORK
375
+
376
+ **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).
377
+
378
+ ## B SDS +PSPI: THEORETICAL ANALYSIS
379
+
380
+ 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.
381
+
382
+ ## B.1 EQUIVALENCE RELATIONS BETWEEN ORIGINAL AND AUGMENTED MDP
383
+
384
+ 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
385
+
386
+ **==> picture [206 x 31] intentionally omitted <==**
387
+
388
+ 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
389
+
390
+ **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_[¯] _._
391
+
392
+ By the construction of the augmented MDP, it is obvious that the following is true.
393
+
394
+ **Lemma B.2.** _Given π_ : _X →_ ∆( _A_ ) _, let π_ ¯ _be its extension. For any h_ : _X × A →_ R _, it holds_
395
+
396
+ **==> picture [230 x 31] intentionally omitted <==**
397
+
398
+ _where T is the goal-reaching time (random variable) and we define h_[˜] _[π]_ ( _x, a_[+] ) = _h_ ( _x, π_ ) _._
399
+
400
+ We can now relate the value functions between the two MDPs.
401
+
402
+ **Proposition B.3.** _For a policy π_ : _S →_ ∆( _A_ ) _, let π_ ¯ _be its extension (defined above). We have for all x ∈X , a ∈A,_
403
+
404
+ **==> picture [88 x 27] intentionally omitted <==**
405
+
406
+ _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_
407
+
408
+ **==> picture [86 x 29] intentionally omitted <==**
409
+
410
+ _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.
411
+
412
+ 14
413
+
414
+ 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
415
+
416
+ **==> picture [158 x 12] intentionally omitted <==**
417
+
418
+ for all _ξ_ : _X_[¯] _→_ ∆( _A_ ). In particular,
419
+
420
+ **==> picture [335 x 12] intentionally omitted <==**
421
+
422
+ 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
423
+
424
+ **==> picture [296 x 28] intentionally omitted <==**
425
+
426
+ For _x ∈X_ and _a ∈A_ , we show how the above equation can be rewritten in _Q[π]_ and _R_ .
427
+
428
+ **Proposition B.4.** _For x ∈X and a ∈A,_
429
+
430
+ **==> picture [222 x 13] intentionally omitted <==**
431
+
432
+ _For a_ = _a_[+] _, Q_[¯] _[π]_[¯] ( _x, a_[+] ) = _R_[¯] ( _x, a_[+] ) = _R_ ( _x_ ) _. For x ∈X_[+] _, Q_[¯] _[π]_[¯] ( _x, a_ ) = 0 _._
433
+
434
+ _Proof._ The proof follows from Lemma B.5 and the definition of _P_[¯] .
435
+
436
+ **Lemma B.5.** _For x ∈X , Q_[¯] _[π]_[¯] ( _x,_ ¯ _π_ ) = max( _R_ ( _x_ ) _, Q[π]_ ( _x, π_ ))
437
+
438
+ _Proof._ For _x ∈X_ ,
439
+
440
+ **==> picture [340 x 131] intentionally omitted <==**
441
+
442
+ where in the last step we use _R_[¯] ( _x_ ) = 1 for _x ∈ G_ and _R_[¯] ( _x_ ) = 0 otherwise.
443
+
444
+ ## B.2 FUNCTION APPROXIMATOR ASSUMPTIONS
445
+
446
+ 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.
447
+
448
+ Recall the zero-reward Bellman backup operator _T[π]_ with respect to _P_ ( _s[′] |s, a_ ) as defined in Assumption 3.3:
449
+
450
+ **==> picture [154 x 12] intentionally omitted <==**
451
+
452
+ 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:
453
+
454
+ **Proposition B.6** (Realizability) **.** _By Assumption 3.2 and Assumption 3.3, there is f ∈F and g ∈G such that Q_[¯] _[π]_[¯] = _f_[¯] _g._
455
+
456
+ 15
457
+
458
+ _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_[+]
459
+
460
+ **==> picture [222 x 41] intentionally omitted <==**
461
+
462
+ 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_ .
463
+
464
+ ## B.3 ALGORITHM
465
+
466
+ 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:
467
+
468
+ **==> picture [429 x 28] intentionally omitted <==**
469
+
470
+ 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.
471
+
472
+ ¯ ¯ 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
473
+
474
+ **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:
475
+
476
+ **==> picture [346 x 17] intentionally omitted <==**
477
+
478
+ 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.
479
+
480
+ 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:
481
+
482
+ **==> picture [363 x 21] intentionally omitted <==**
483
+
484
+ 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.
485
+
486
+ 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:
487
+
488
+ **==> picture [222 x 29] intentionally omitted <==**
489
+
490
+ 16
491
+
492
+ for _x ∈X_ and _a ̸_ = _a_[+] , and _Q_[¯] _[π]_[¯] ( _x, a_ ) = 1 for _x ∈ G_ and _a_ = _a_[+] .
493
+
494
+ 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:
495
+
496
+ **==> picture [401 x 24] intentionally omitted <==**
497
+
498
+ **==> picture [341 x 13] intentionally omitted <==**
499
+
500
+ 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.
501
+
502
+ **==> picture [353 x 63] intentionally omitted <==**
503
+
504
+ 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_[+] ).
505
+
506
+ Using this loss, we define the two-player game of PSPI for the augmented MDP:
507
+
508
+ **==> picture [300 x 60] intentionally omitted <==**
509
+
510
+ Notice _f_[¯] _g_ ( _d_ 0 _,_ ¯ _π_ ) = _f_ ( _d_ 0 _, π_ ). Therefore, this problem can be solved using samples from _D_ without knowing _G_ .
511
+
512
+ B.4 ANALYSIS
513
+
514
+ **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.
515
+
516
+ **High-probability Events** First, we show _Q_[¯] _[π]_[¯] has small empirical errors. **Lemma B.7.** _With probability at least_ 1 _− δ, it holds for all π ∈_ Π _,_
517
+
518
+ **==> picture [192 x 37] intentionally omitted <==**
519
+
520
+ _where_[14]
521
+
522
+ **==> picture [347 x 40] intentionally omitted <==**
523
+
524
+ > 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.
525
+
526
+ > 14Technically, we can remove _N∞_ � _G, |D_ 1dyn _|_ � in the upper bound, but we include it here for a cleaner presentation.
527
+
528
+ 17
529
+
530
+ _Proof._ Note _Q_[¯] _[π]_[¯] = _f_[¯] _g_ for some _f ∈F_ and _g ∈G_ (Proposition B.6) and
531
+
532
+ 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.
533
+
534
+ 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_
535
+
536
+ **==> picture [180 x 38] intentionally omitted <==**
537
+
538
+ _With probability at least_ 1 _− δ, for any f ∈F,g ∈G_
539
+
540
+ **==> picture [269 x 68] intentionally omitted <==**
541
+
542
+ _Proof._ This follows from Theorem 9 of (Cheng et al., 2022).
543
+
544
+ **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,_
545
+
546
+ _Proof._ By Lemma B.7, we have _f_[¯] _g[π]_[(] _[d]_[0] _[,]_[ ¯] _[π]_[)] _[ ≤][Q]_[¯] _[π] R_[(] _[d]_[0] _[,]_[ ¯] _[π]_[) =] _[ Q][π]_[(] _[d]_[0] _[, π]_[)][.]
547
+
548
+ Next we bound the amount of underestimation.
549
+
550
+ **Lemma B.10.** _Suppose x_ 0 _∼ d_ 0 _is not in G almost surely. For any π ∈_ Π _,_
551
+
552
+ **==> picture [356 x 48] intentionally omitted <==**
553
+
554
+ _Note that in a trajectory xT ∈ G whereas xt ∈/ G for t < T by definition of T ._
555
+
556
+ _Proof._ Let _f_[¯] _g[π]_[=][(] _[f][ π][, g][π]_[)][ be the empirical minimizer.][By performance difference lemma,][we can] write
557
+
558
+ **==> picture [168 x 45] intentionally omitted <==**
559
+
560
+ 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
561
+
562
+ 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
563
+
564
+ **==> picture [382 x 31] intentionally omitted <==**
565
+
566
+ **==> picture [298 x 28] intentionally omitted <==**
567
+
568
+ 18
569
+
570
+ 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
571
+
572
+ **==> picture [152 x 13] intentionally omitted <==**
573
+
574
+ Therefore, we can derive
575
+
576
+ **==> picture [370 x 29] intentionally omitted <==**
577
+
578
+ Finally, using Lemma B.2 we can have the final upper bound.
579
+
580
+ B.5 MAIN RESULT: PERFORMANCE BOUND
581
+
582
+ 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.]
583
+
584
+ **==> picture [362 x 186] intentionally omitted <==**
585
+
586
+ where Cdyn( _π_ ) and Cgoal( _π_ ) are the concentrability coefficients defined in Definition 3.4.
587
+
588
+ **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 π ∈_ Π _,_
589
+
590
+ **==> picture [195 x 13] intentionally omitted <==**
591
+
592
+ _where_
593
+
594
+ _and,_
595
+
596
+ **==> picture [300 x 103] intentionally omitted <==**
597
+
598
+ _are statistical errors, and_ C _dyn_ ( _π_ ) _and_ C _goal_ ( _π_ ) _are concentrability coefficients which decrease as the data coverage increases._
599
+
600
+ 19
601
+
602
+ ## C EXPERIMENTAL DETAILS
603
+
604
+ ## C.1 HYPERPARAMETERS AND EXPERIMENTAL SETTINGS
605
+
606
+ **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.
607
+
608
+ **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.
609
+
610
+ **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.
611
+
612
+ **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.
613
+
614
+ **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.
615
+
616
+ ## C.2 REWARD MODEL EVALUATION
617
+
618
+ 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.
619
+
620
+ ## D MORE REWARD MODEL EVALUATIONS
621
+
622
+ Here we present boxplots for reward models with experimental setups in Section 4.3, 4.4 and 4.5.
623
+
624
+ 20
625
+
626
+ **==> picture [127 x 96] intentionally omitted <==**
627
+
628
+ **==> picture [128 x 96] intentionally omitted <==**
629
+
630
+ **==> picture [127 x 96] intentionally omitted <==**
631
+
632
+ **==> picture [296 x 9] intentionally omitted <==**
633
+
634
+ **----- Start of picture text -----**<br>
635
+ (a) PDS (b) UDS+RP (c) RP<br>**----- End of picture text -----**<br>
636
+
637
+ Figure 3: Reward model evaluation for the medium-diverse environment in Section 4.3. Green dots are outliers.
638
+
639
+ **==> picture [127 x 96] intentionally omitted <==**
640
+
641
+ **==> picture [128 x 96] intentionally omitted <==**
642
+
643
+ **==> picture [127 x 96] intentionally omitted <==**
644
+
645
+ **==> picture [296 x 9] intentionally omitted <==**
646
+
647
+ **----- Start of picture text -----**<br>
648
+ (a) PDS (b) UDS+RP (c) RP<br>**----- End of picture text -----**<br>
649
+
650
+ Figure 4: Reward model evaluation for the umaze-diverse environment in Section 4.3. Green dots are outliers.
651
+
652
+ **==> picture [96 x 72] intentionally omitted <==**
653
+
654
+ **==> picture [96 x 72] intentionally omitted <==**
655
+
656
+ **==> picture [96 x 72] intentionally omitted <==**
657
+
658
+ **==> picture [96 x 72] intentionally omitted <==**
659
+
660
+ **==> picture [370 x 9] intentionally omitted <==**
661
+
662
+ **----- Start of picture text -----**<br>
663
+ (a) Large, PDS (b) Large, UDS+RP (c) Medium, PDS (d) Medium, UDS+RP<br>**----- End of picture text -----**<br>
664
+
665
+ Figure 5: Reward model evaluation for Four Rooms in Section 4.4. Green dots are outliers.
666
+
667
+ **==> picture [96 x 72] intentionally omitted <==**
668
+
669
+ **==> picture [96 x 72] intentionally omitted <==**
670
+
671
+ **==> picture [96 x 72] intentionally omitted <==**
672
+
673
+ **==> picture [96 x 72] intentionally omitted <==**
674
+
675
+ **==> picture [370 x 9] intentionally omitted <==**
676
+
677
+ **----- Start of picture text -----**<br>
678
+ (a) Large, PDS (b) Large, UDS+RP (c) Medium, PDS (d) Medium, UDS+RP<br>**----- End of picture text -----**<br>
679
+
680
+ Figure 6: Reward evaluation for Random Cells in Section 4.5 (the test context distribution is the same as training). Green dots are outliers.
681
+
682
+ 21
683
+
open_review/iclr2024_8572.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "paper_id": "iclr2024_8572",
3
+ "source": "iclr2024",
4
+ "source_year": 2024,
5
+ "title": "Efficient Model-Agnostic Multi-Group Equivariant Networks",
6
+ "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.",
7
+ "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]",
8
+ "initial_scores": [
9
+ 3,
10
+ 3,
11
+ 5,
12
+ 5
13
+ ],
14
+ "score_mean": 4.0,
15
+ "score_variance": 1.33,
16
+ "score_spread": 2,
17
+ "score_min": 3,
18
+ "score_max": 5,
19
+ "decision": "Reject",
20
+ "rebuttal_validity_ground_truth": false,
21
+ "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.",
22
+ "forum_id": "O9gstAazBM",
23
+ "primary_area": "learning on graphs and other geometries & topologies",
24
+ "n_reviews": 4,
25
+ "per_review": [
26
+ {
27
+ "reviewer": "Reviewer_ePZ4",
28
+ "review_id": "iueQvuPP5C",
29
+ "scores": {
30
+ "rating": 3,
31
+ "soundness": 2,
32
+ "presentation": 2,
33
+ "contribution": 1,
34
+ "confidence": 4
35
+ },
36
+ "review_text_chars": 5370,
37
+ "edit_detected": true,
38
+ "edit_delta_seconds": 301025,
39
+ "post_rebuttal_text_signal": false,
40
+ "score_mentions_in_text": []
41
+ },
42
+ {
43
+ "reviewer": "Reviewer_gLGd",
44
+ "review_id": "tT9tUPtssZ",
45
+ "scores": {
46
+ "rating": 3,
47
+ "soundness": 1,
48
+ "presentation": 2,
49
+ "contribution": 1,
50
+ "confidence": 2
51
+ },
52
+ "review_text_chars": 2942,
53
+ "edit_detected": true,
54
+ "edit_delta_seconds": 1004974,
55
+ "post_rebuttal_text_signal": true,
56
+ "score_mentions_in_text": []
57
+ },
58
+ {
59
+ "reviewer": "Reviewer_EpCD",
60
+ "review_id": "zWYpE6DF7h",
61
+ "scores": {
62
+ "rating": 5,
63
+ "soundness": 3,
64
+ "presentation": 2,
65
+ "contribution": 2,
66
+ "confidence": 2
67
+ },
68
+ "review_text_chars": 1753,
69
+ "edit_detected": true,
70
+ "edit_delta_seconds": 785423,
71
+ "post_rebuttal_text_signal": false,
72
+ "score_mentions_in_text": []
73
+ },
74
+ {
75
+ "reviewer": "Reviewer_mvp1",
76
+ "review_id": "vWHcNSHN2q",
77
+ "scores": {
78
+ "rating": 5,
79
+ "soundness": 2,
80
+ "presentation": 2,
81
+ "contribution": 2,
82
+ "confidence": 3
83
+ },
84
+ "review_text_chars": 1542,
85
+ "edit_detected": true,
86
+ "edit_delta_seconds": 929799,
87
+ "post_rebuttal_text_signal": false,
88
+ "score_mentions_in_text": []
89
+ }
90
+ ],
91
+ "any_review_edit_detected": true,
92
+ "any_post_rebuttal_text_signal": true,
93
+ "review_score_dimensions": [
94
+ "rating",
95
+ "soundness",
96
+ "presentation",
97
+ "contribution",
98
+ "confidence"
99
+ ]
100
+ }