{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-to-rank-meets-language-boosting-1","title":"Learning-to-Rank Meets Language: Boosting Language-Driven Ordering Alignment for Ordinal Classification","arxiv_id":"2306.13856","date":"2023-06-24","proceeding":"NeurIPS 2023 11","authors":["Rui Wang","Peipei Li","Huaibo Huang","Chunshui Cao","Ran He","Zhaofeng He"],"abstract":"We present a novel language-driven ordering alignment method for ordinal classification. The labels in ordinal classification contain additional ordering relations, making them prone to overfitting when relying solely on training data. Recent developments in pre-trained vision-language models inspire us to leverage the rich ordinal priors in human language by converting the original task into a visionlanguage alignment task. Consequently, we propose L2RCLIP, which fully utilizes the language priors from two perspectives. First, we introduce a complementary prompt tuning technique called RankFormer, designed to enhance the ordering relation of original rank prompts. It employs token-level attention with residual-style prompt blending in the word embedding space. Second, to further incorporate language priors, we revisit the approximate bound optimization of vanilla cross-entropy loss and restructure it within the cross-modal embedding space. Consequently, we propose a cross-modal ordinal pairwise loss to refine the CLIP feature space, where texts and images maintain both semantic alignment and ordering alignment. Extensive experiments on three ordinal classification tasks, including facial age estimation, historical color image (HCI) classification, and aesthetic assessment demonstrate its promising performance. The code is available at https://github.com/raywang335/L2RCLIP.","url_abs":"https://arxiv.org/abs/2306.13856v3","url_pdf":"https://arxiv.org/pdf/2306.13856v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"learning-to-rank-meets-language-boosting-1","repo_url":"https://github.com/raywang335/l2rclip","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-to-rank-meets-language-boosting-1","repo_url":"https://github.com/xk-huang/OrdinalCLIP","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"age-estimation","task_name":"Age Estimation"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"learning-to-rank","task_name":"Learning-To-Rank"},{"task_slug":"ordinal-classification","task_name":"Ordinal Classification"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2306.13856","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.13856"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/raywang335/L2RCLIP","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/raywang335/l2rclip","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xk-huang/OrdinalCLIP","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":7,"ran":1,"ran_honours":1,"unverified":14},"by_repo_kind":{"official":{"samples":13,"ran":6,"repositories":1},"listed":{"samples":10,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/resnet.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/resnet.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"426c97121a63bbb6","entry":"euclidean_dist","repo":"raywang335/l2rclip","repo_kind":"official","path":"loss/ordinal_ce.py","file_url":"https://github.com/raywang335/l2rclip/blob/HEAD/loss/ordinal_ce.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"426c97121a63bbb6"}},{"code_sha256_prefix":"b834e29a85d15c71","entry":"make_layers","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/vgg.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/vgg.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b834e29a85d15c71"}},{"code_sha256_prefix":"e3b2a83f52101f2d","entry":"normalize","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/triplet_loss.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/triplet_loss.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e3b2a83f52101f2d"}},{"code_sha256_prefix":"b96cc34c9484f332","entry":"ordinal_entropy","repo":"raywang335/l2rclip","repo_kind":"official","path":"loss/ordinal_ce.py","file_url":"https://github.com/raywang335/l2rclip/blob/HEAD/loss/ordinal_ce.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b96cc34c9484f332"}},{"code_sha256_prefix":"a9297ce0fe9cac98","entry":"train_collate_fn","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"datasets/make_dataloader.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/datasets/make_dataloader.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9297ce0fe9cac98"}},{"code_sha256_prefix":"0aa02f11f6d7af87","entry":"up_triu","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/ordinal_ce.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/ordinal_ce.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0aa02f11f6d7af87"}},{"code_sha256_prefix":"c4ae4a3fc4c4703e","entry":"val_collate_fn","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"datasets/make_dataloader.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/datasets/make_dataloader.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c4ae4a3fc4c4703e"}},{"code_sha256_prefix":"c064f649a023c5e7","entry":"alexnet","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/alexnet.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/alexnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c064f649a023c5e7"}},{"code_sha256_prefix":"71b4e1d375d8fd78","entry":"cosine_dist","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/triplet_loss.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/triplet_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71b4e1d375d8fd78"}},{"code_sha256_prefix":"faff7e0f9f5b24d3","entry":"count_num_param","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/runner/utils.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/runner/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"faff7e0f9f5b24d3"}},{"code_sha256_prefix":"5315f75bf5367f0a","entry":"euclidean_dist","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/triplet_loss.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/triplet_loss.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5315f75bf5367f0a"}},{"code_sha256_prefix":"057d3a33431e9827","entry":"get_logger","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/utils/logging.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/utils/logging.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"057d3a33431e9827"}},{"code_sha256_prefix":"10fed523733edbf9","entry":"is_seq_of","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/utils/registry.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/utils/registry.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10fed523733edbf9"}},{"code_sha256_prefix":"0fe9165ed9ea4d70","entry":"make_loss","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/make_loss.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/make_loss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0fe9165ed9ea4d70"}},{"code_sha256_prefix":"81d8962ccb99c2ae","entry":"ordinal_entropy_stage1","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"loss/ordinal_ce_stage1.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/loss/ordinal_ce_stage1.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"81d8962ccb99c2ae"}},{"code_sha256_prefix":"5f1101145f896208","entry":"read_image","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"datasets/bases.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/datasets/bases.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f1101145f896208"}},{"code_sha256_prefix":"d2a914b660839f7d","entry":"resnet18","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/resnet.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d2a914b660839f7d"}},{"code_sha256_prefix":"0b63d2a1df1e76b4","entry":"train_collate_fn","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"datasets/make_dataloader_clipreid.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/datasets/make_dataloader_clipreid.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b63d2a1df1e76b4"}},{"code_sha256_prefix":"3c4ce255e7bff04f","entry":"val_collate_fn","repo":"raywang335/L2RCLIP","repo_kind":"official","path":"datasets/make_dataloader_clipreid.py","file_url":"https://github.com/raywang335/L2RCLIP/blob/HEAD/datasets/make_dataloader_clipreid.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c4ce255e7bff04f"}},{"code_sha256_prefix":"605fa285c125d097","entry":"vgg11","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/vgg.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/vgg.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"605fa285c125d097"}},{"code_sha256_prefix":"71569392426397ab","entry":"vgg11_bn","repo":"xk-huang/OrdinalCLIP","repo_kind":"listed","path":"ordinalclip/models/image_encoders/vgg.py","file_url":"https://github.com/xk-huang/OrdinalCLIP/blob/HEAD/ordinalclip/models/image_encoders/vgg.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71569392426397ab"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}